class Azure::Web::Mgmt::V2018_02_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/2018-02-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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12748
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12789
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28560
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28605
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28583
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12769
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 647
def analyze_custom_hostname(resource_group_name, name, host_name:nil, custom_headers:nil)
  response = analyze_custom_hostname_async(resource_group_name, name, host_name:host_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
analyze_custom_hostname_async(resource_group_name, name, host_name:nil, custom_headers:nil) click to toggle source

Analyze a custom hostname.

Analyze a custom hostname.

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

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'hostName' => host_name,'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16091
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16132
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16112
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 666
def analyze_custom_hostname_with_http_info(resource_group_name, name, host_name:nil, custom_headers:nil)
  analyze_custom_hostname_async(resource_group_name, name, host_name:host_name, custom_headers:custom_headers).value!
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 758
def apply_slot_config_to_production(resource_group_name, name, slot_swap_entity, custom_headers:nil)
  response = apply_slot_config_to_production_async(resource_group_name, name, slot_swap_entity, custom_headers:custom_headers).value!
  nil
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 801
def apply_slot_config_to_production_async(resource_group_name, name, slot_swap_entity, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'slot_swap_entity is nil' if slot_swap_entity.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::CsmSlotEntity.mapper()
  request_content = @client.serialize(request_mapper,  slot_swap_entity)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

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

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 780
def apply_slot_config_to_production_with_http_info(resource_group_name, name, slot_swap_entity, custom_headers:nil)
  apply_slot_config_to_production_async(resource_group_name, name, slot_swap_entity, custom_headers:custom_headers).value!
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16209
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16256
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::V2018_02_01::Models::CsmSlotEntity.mapper()
  request_content = @client.serialize(request_mapper,  slot_swap_entity)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16233
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
backup(resource_group_name, name, request, custom_headers:nil) click to toggle source

Creates a backup of an app.

Creates a backup of an app.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param request [BackupRequest] Backup configuration. You can use the JSON response from the POST action as input here. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [BackupItem] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 872
def backup(resource_group_name, name, request, custom_headers:nil)
  response = backup_async(resource_group_name, name, request, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
backup_async(resource_group_name, name, request, custom_headers:nil) click to toggle source

Creates a backup of an app.

Creates a backup of an app.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param request [BackupRequest] Backup configuration. You can use the JSON response from the POST action as input here. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_mapper = Azure::Web::Mgmt::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16330
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16373
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16352
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 892
def backup_with_http_info(resource_group_name, name, request, custom_headers:nil)
  backup_async(resource_group_name, name, request, custom_headers:custom_headers).value!
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38247
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38286
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38267
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.

Create function for web site, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param function_envelope [FunctionEnvelope] Function details. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [FunctionEnvelope] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39829
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.

Create function for web site, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param function_envelope [FunctionEnvelope] Function details. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39872
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::V2018_02_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::V2018_02_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.

Create function for web site, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param function_envelope [FunctionEnvelope] Function details. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39851
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38368
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38407
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::V2018_02_01::Models::MSDeploy.mapper()
  request_content = @client.serialize(request_mapper,  msdeploy)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:put, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 201 || status_code == 409
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39957
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40000
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::V2018_02_01::Models::MSDeploy.mapper()
  request_content = @client.serialize(request_mapper,  msdeploy)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:put, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 201 || status_code == 409
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39979
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38388
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38129
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38166
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::V2018_02_01::Models::MSDeploy.mapper()
  request_content = @client.serialize(request_mapper,  msdeploy)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

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

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:put, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 201 || status_code == 409
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39704
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39745
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::V2018_02_01::Models::MSDeploy.mapper()
  request_content = @client.serialize(request_mapper,  msdeploy)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:put, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 201 || status_code == 409
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39725
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38148
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37778
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37823
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::V2018_02_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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39332
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39381
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::V2018_02_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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39357
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41081
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41120
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::V2018_02_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::V2018_02_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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40827
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40870
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::V2018_02_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::V2018_02_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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40849
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41101
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37801
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_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39206
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39243
def begin_install_site_extension_async(resource_group_name, name, site_extension_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'site_extension_id is nil' if site_extension_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'siteExtensionId' => site_extension_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:put, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 201 || status_code == 200 || status_code == 429
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [SiteExtensionInfo] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40583
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.

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

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'siteExtensionId' => site_extension_id,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:put, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 201 || status_code == 200 || status_code == 429
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40604
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39225
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38022
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38057
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39590
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39629
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39610
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38040
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38613
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38652
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38633
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38490
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38531
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38511
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37913
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37952
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::V2018_02_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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38878
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38915
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::V2018_02_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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40234
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40275
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::V2018_02_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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40255
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38897
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38985
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39024
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::V2018_02_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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40348
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40391
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::V2018_02_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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40370
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39005
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39474
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39517
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::V2018_02_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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39496
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39095
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39136
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::V2018_02_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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40465
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40510
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::V2018_02_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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40488
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 39116
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37933
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_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.

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 [Object] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38736
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38781
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 = Azure::Web::Mgmt::V2018_02_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_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.

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 [Object] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40087
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40134
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 = Azure::Web::Mgmt::V2018_02_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_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40111
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 38759
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40710
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40753
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::V2018_02_01::Models::CsmSlotEntity.mapper()
  request_content = @client.serialize(request_mapper,  slot_swap_entity)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40732
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40971
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41010
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::V2018_02_01::Models::CsmSlotEntity.mapper()
  request_content = @client.serialize(request_mapper,  slot_swap_entity)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

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

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 40991
def begin_swap_slot_with_production_with_http_info(resource_group_name, name, slot_swap_entity, custom_headers:nil)
  begin_swap_slot_with_production_async(resource_group_name, name, slot_swap_entity, custom_headers:custom_headers).value!
end
create_deployment(resource_group_name, name, id, deployment, custom_headers:nil) click to toggle source

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

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

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param id [String] ID of an existing deployment. @param deployment [Deployment] Deployment details. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Deployment] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5881
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5920
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21409
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21452
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21431
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5901
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7519
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7536
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::V2018_02_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.

Create function for web site, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param function_envelope [FunctionEnvelope] Function details. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [FunctionEnvelope] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23149
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. If a slot is not specified, the API deletes a deployment for the production slot. @param function_envelope [FunctionEnvelope] Function details. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] promise which provides async access to http response.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23168
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9707
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9724
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25456
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25475
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7035
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7051
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22633
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22651
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 351
def create_or_update(resource_group_name, name, site_envelope, custom_headers:nil)
  response = create_or_update_async(resource_group_name, name, site_envelope, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 369
def create_or_update_async(resource_group_name, name, site_envelope, custom_headers:nil)
  # Send request
  promise = begin_create_or_update_async(resource_group_name, name, site_envelope, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::Web::Mgmt::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4365
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4404
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19795
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19838
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19817
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4385
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6566
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6613
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22136
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22187
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22162
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6590
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_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7995
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8036
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23657
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23702
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23680
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8016
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_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8333
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8376
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24012
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24057
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24035
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8355
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14480
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14521
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30391
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30436
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30414
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14501
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9135
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9180
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::V2018_02_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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24849
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24898
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::V2018_02_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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24874
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9158
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15777
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15797
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35149
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35166
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31956
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31975
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3888
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3939
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::V2018_02_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}/config/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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19290
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19345
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::V2018_02_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}/config/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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19318
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3914
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36818
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36863
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::V2018_02_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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37300
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37345
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::V2018_02_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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34245
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34296
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::V2018_02_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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34271
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37323
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 33734
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 33783
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::V2018_02_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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 33759
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36841
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.

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

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app to delete. @param delete_metrics [Boolean] If true, web app metrics are also deleted. @param delete_empty_server_farm [Boolean] Specify true if the App Service plan will be empty after app deletion and you want to delete the empty App Service plan. By default, the empty App Service plan is not deleted. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 403
def delete(resource_group_name, name, delete_metrics:nil, delete_empty_server_farm:nil, custom_headers:nil)
  response = delete_async(resource_group_name, name, delete_metrics:delete_metrics, delete_empty_server_farm:delete_empty_server_farm, custom_headers:custom_headers).value!
  nil
end
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.

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

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app to delete. @param delete_metrics [Boolean] If true, web app metrics are also deleted. @param delete_empty_server_farm [Boolean] Specify true if the App Service plan will be empty after app deletion and you want to delete the empty App Service plan. By default, the empty App Service plan is not deleted. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'deleteMetrics' => delete_metrics,'deleteEmptyServerFarm' => delete_empty_server_farm,'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 204 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
delete_backup(resource_group_name, name, backup_id, custom_headers:nil) click to toggle source

Deletes a backup of an app by its ID.

Deletes a backup of an app by its ID.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1206
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1243
def delete_backup_async(resource_group_name, name, backup_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'backup_id is nil' if backup_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

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

Deletes the backup configuration of an app.

Deletes the backup configuration of an app.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2387
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2422
def delete_backup_configuration_async(resource_group_name, name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
delete_backup_configuration_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Deletes the backup configuration of an app.

Deletes the backup configuration of an app.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the backup configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17946
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17985
def delete_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17966
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2405
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16685
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16726
def delete_backup_slot_async(resource_group_name, name, backup_id, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'backup_id is nil' if backup_id.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16706
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1225
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5366
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5403
def delete_continuous_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'web_job_name is nil' if web_job_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
delete_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20859
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20900
def delete_continuous_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'web_job_name is nil' if web_job_name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
delete_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20880
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5385
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6000
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6037
def delete_deployment_async(resource_group_name, name, id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'id is nil' if id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
delete_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21535
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21576
def delete_deployment_slot_async(resource_group_name, name, id, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'id is nil' if id.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
delete_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21556
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6019
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6694
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6733
def delete_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22271
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22314
def delete_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22293
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6714
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7567
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7604
def delete_function_async(resource_group_name, name, function_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'function_name is nil' if function_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'functionName' => function_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 204 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
delete_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7586
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8116
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8153
def delete_host_name_binding_async(resource_group_name, name, host_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'host_name is nil' if host_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'hostName' => host_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23785
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23826
def delete_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, 'host_name is nil' if host_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'hostName' => host_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23806
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8135
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_hybrid_connection(resource_group_name, name, namespace_name, relay_name, custom_headers:nil) click to toggle source

Removes a Hybrid Connection from this site.

Removes a Hybrid Connection from this site.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8458
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8497
def delete_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
  fail ArgumentError, 'relay_name is nil' if relay_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24141
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24182
def delete_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
  fail ArgumentError, 'relay_name is nil' if relay_name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24162
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8478
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.

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

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23201
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.

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

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'functionName' => function_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 204 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
delete_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.

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

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23222
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10118
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10165
def delete_instance_process_async(resource_group_name, name, process_id, instance_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, 'instance_id is nil' if instance_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 204 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25892
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25943
def delete_instance_process_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, 'instance_id is nil' if instance_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 204 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25918
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10142
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12869
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12906
def delete_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
delete_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28688
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28729
def delete_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
delete_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28709
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12888
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_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13557
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13598
def delete_process_async(resource_group_name, name, process_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 204 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29412
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29457
def delete_process_slot_async(resource_group_name, name, process_id, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 204 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29435
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13578
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14601
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14638
def delete_public_certificate_async(resource_group_name, name, public_certificate_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'public_certificate_name is nil' if public_certificate_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'publicCertificateName' => public_certificate_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30519
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30560
def delete_public_certificate_slot_async(resource_group_name, name, slot, public_certificate_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, 'public_certificate_name is nil' if public_certificate_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'publicCertificateName' => public_certificate_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30540
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14620
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9260
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9297
def delete_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'entity_name is nil' if entity_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24981
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25022
def delete_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'entity_name is nil' if entity_name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25002
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9279
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15452
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15489
def delete_site_extension_async(resource_group_name, name, site_extension_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'site_extension_id is nil' if site_extension_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'siteExtensionId' => site_extension_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 204 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31428
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31469
def delete_site_extension_slot_async(resource_group_name, name, site_extension_id, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'site_extension_id is nil' if site_extension_id.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'siteExtensionId' => site_extension_id,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 204 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31449
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15471
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15833
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15880
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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15857
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35196
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35231
def delete_source_control_async(resource_group_name, name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 202 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
delete_source_control_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Deletes the source control configuration of an app.

Deletes the source control configuration of an app.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will delete the source control configuration for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32007
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32046
def delete_source_control_slot_async(resource_group_name, name, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 202 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32027
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35214
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4017
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4052
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}/config/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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19426
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19465
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}/config/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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19446
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4035
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36028
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36065
def delete_triggered_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'web_job_name is nil' if web_job_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
delete_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.

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

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32895
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.

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

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
delete_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.

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

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32916
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36047
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36945
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36986
def delete_vnet_connection_async(resource_group_name, name, vnet_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 33868
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 33913
def delete_vnet_connection_slot_async(resource_group_name, name, vnet_name, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 33891
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36966
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.

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

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app to delete. @param delete_metrics [Boolean] If true, web app metrics are also deleted. @param delete_empty_server_farm [Boolean] Specify true if the App Service plan will be empty after app deletion and you want to delete the empty App Service plan. By default, the empty App Service plan is not deleted. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 425
def delete_with_http_info(resource_group_name, name, delete_metrics:nil, delete_empty_server_farm:nil, custom_headers:nil)
  delete_async(resource_group_name, name, delete_metrics:delete_metrics, delete_empty_server_farm:delete_empty_server_farm, custom_headers:custom_headers).value!
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6219
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6262
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21768
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21815
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21792
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6241
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12204
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12243
def generate_new_site_publishing_password_async(resource_group_name, name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27981
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28024
def generate_new_site_publishing_password_slot_async(resource_group_name, name, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28003
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12224
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 240
def get(resource_group_name, name, custom_headers:nil)
  response = get_async(resource_group_name, name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_async(resource_group_name, name, custom_headers:nil) click to toggle source

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

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

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

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1939
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1974
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17464
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17503
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17484
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_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets the Authentication/Authorization settings of an app.

Gets the Authentication/Authorization settings of an app.

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

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1957
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2483
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2518
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18049
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18088
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18069
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2501
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1097
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1134
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16569
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16610
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16590
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1116
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_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4253
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4292
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19676
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19719
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19698
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4716
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4753
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20167
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20208
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20188
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4735
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4273
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5037
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5072
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20509
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20548
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20529
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5055
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5257
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5294
def get_continuous_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'web_job_name is nil' if web_job_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20743
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20784
def get_continuous_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'web_job_name is nil' if web_job_name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20764
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5276
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5770
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5807
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21291
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21332
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21312
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5789
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2815
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2850
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18402
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18441
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18422
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2833
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6449
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6488
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22012
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22055
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22034
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6469
def get_domain_ownership_identifier_with_http_info(resource_group_name, name, domain_ownership_identifier_name, custom_headers:nil)
  get_domain_ownership_identifier_async(resource_group_name, name, domain_ownership_identifier_name, custom_headers:custom_headers).value!
end
get_function(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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7408
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7445
def get_function_async(resource_group_name, name, function_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'function_name is nil' if function_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'functionName' => function_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7427
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7294
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7329
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22910
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22949
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22930
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7312
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7883
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7920
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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23538
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23579
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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23559
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7902
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8217
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8256
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23892
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23933
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23913
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8237
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.

Get function information by its ID for web site, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [FunctionEnvelope] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23031
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.

Get function information by its ID for web site, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'functionName' => function_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

Get function information by its ID for web site, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23052
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_ms_deploy_status(resource_group_name, name, instance_id, custom_headers:nil) click to toggle source

Get the status of the last MSDeploy operation.

Get the status of the last MSDeploy operation.

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

@return [MSDeployStatus] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9596
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9633
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25338
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25379
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25359
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9615
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9756
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9793
def get_instance_msdeploy_log_async(resource_group_name, name, instance_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'instance_id is nil' if instance_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25509
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25550
def get_instance_msdeploy_log_slot_async(resource_group_name, name, slot, instance_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, 'instance_id is nil' if instance_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25530
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9775
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9993
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10040
def get_instance_process_async(resource_group_name, name, process_id, instance_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, 'instance_id is nil' if instance_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10234
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10281
def get_instance_process_dump_async(resource_group_name, name, process_id, instance_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, 'instance_id is nil' if instance_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = {
          client_side_validation: true,
          required: false,
          serialized_name: 'parsed_response',
          type: {
            name: 'Stream'
          }
        }
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
get_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 26015
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 26066
def get_instance_process_dump_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, 'instance_id is nil' if instance_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = {
          client_side_validation: true,
          required: false,
          serialized_name: 'parsed_response',
          type: {
            name: 'Stream'
          }
        }
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
get_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 26041
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10258
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10494
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10543
def get_instance_process_module_async(resource_group_name, name, process_id, base_address, instance_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, 'base_address is nil' if base_address.nil?
  fail ArgumentError, 'instance_id is nil' if instance_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'baseAddress' => base_address,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 26289
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 26342
def get_instance_process_module_slot_async(resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, 'base_address is nil' if base_address.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, 'instance_id is nil' if instance_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'baseAddress' => base_address,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 26316
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10519
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25760
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25811
def get_instance_process_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, 'instance_id is nil' if instance_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25786
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_thread(resource_group_name, name, process_id, thread_id, instance_id, custom_headers:nil) click to toggle source

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param thread_id [String] TID. @param instance_id [String] ID of a specific scaled-out instance. This is the value of the name property in the JSON response from “GET api/sites/{siteName}/instances”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ProcessThreadInfo] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10750
def get_instance_process_thread(resource_group_name, name, process_id, thread_id, instance_id, custom_headers:nil)
  response = get_instance_process_thread_async(resource_group_name, name, process_id, thread_id, instance_id, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_instance_process_thread_async(resource_group_name, name, process_id, thread_id, instance_id, custom_headers:nil) click to toggle source

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param thread_id [String] TID. @param instance_id [String] ID of a specific scaled-out instance. This is the value of the name property in the JSON response from “GET api/sites/{siteName}/instances”. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads/{threadId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'threadId' => thread_id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

    result
  end

  promise.execute
end
get_instance_process_thread_slot(resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers:nil) click to toggle source

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param thread_id [String] TID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] ID of a specific scaled-out instance. This is the value of the name property in the JSON response from “GET api/sites/{siteName}/instances”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ProcessThreadInfo] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 26559
def get_instance_process_thread_slot(resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers:nil)
  response = get_instance_process_thread_slot_async(resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_instance_process_thread_slot_async(resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers:nil) click to toggle source

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param thread_id [String] TID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] ID of a specific scaled-out instance. This is the value of the name property in the JSON response from “GET api/sites/{siteName}/instances”. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads/{threadId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'threadId' => thread_id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

    result
  end

  promise.execute
end
get_instance_process_thread_slot_with_http_info(resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers:nil) click to toggle source

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param thread_id [String] TID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param instance_id [String] ID of a specific scaled-out instance. This is the value of the name property in the JSON response from “GET api/sites/{siteName}/instances”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 26586
def get_instance_process_thread_slot_with_http_info(resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers:nil)
  get_instance_process_thread_slot_async(resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers:custom_headers).value!
end
get_instance_process_thread_with_http_info(resource_group_name, name, process_id, thread_id, instance_id, custom_headers:nil) click to toggle source

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param thread_id [String] TID. @param instance_id [String] ID of a specific scaled-out instance. This is the value of the name property in the JSON response from “GET api/sites/{siteName}/instances”. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10775
def get_instance_process_thread_with_http_info(resource_group_name, name, process_id, thread_id, instance_id, custom_headers:nil)
  get_instance_process_thread_async(resource_group_name, name, process_id, thread_id, instance_id, custom_headers:custom_headers).value!
end
get_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10017
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11420
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11459
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::V2018_02_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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27161
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27202
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::V2018_02_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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27182
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11440
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7082
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7117
def get_msdeploy_log_async(resource_group_name, name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22684
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22723
def get_msdeploy_log_slot_async(resource_group_name, name, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22704
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7100
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6928
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6963
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22519
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22558
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22539
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6946
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).

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 [Object] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11646
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11687
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 = Azure::Web::Mgmt::V2018_02_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
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).

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 [Object] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27399
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27444
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 = Azure::Web::Mgmt::V2018_02_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
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27422
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_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11667
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12074
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12115
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27844
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27889
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_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27867
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_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12095
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12636
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12673
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28441
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28482
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28462
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12655
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13094
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13133
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28926
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28967
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28947
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13114
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_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13442
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13483
def get_process_async(resource_group_name, name, process_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13663
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13704
def get_process_dump_async(resource_group_name, name, process_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = {
          client_side_validation: true,
          required: false,
          serialized_name: 'parsed_response',
          type: {
            name: 'Stream'
          }
        }
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
get_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29525
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29570
def get_process_dump_slot_async(resource_group_name, name, process_id, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = {
          client_side_validation: true,
          required: false,
          serialized_name: 'parsed_response',
          type: {
            name: 'Stream'
          }
        }
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
get_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29548
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13684
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13903
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13946
def get_process_module_async(resource_group_name, name, process_id, base_address, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, 'base_address is nil' if base_address.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'baseAddress' => base_address,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29779
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29826
def get_process_module_slot_async(resource_group_name, name, process_id, base_address, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, 'base_address is nil' if base_address.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'baseAddress' => base_address,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29803
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13925
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29290
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29335
def get_process_slot_async(resource_group_name, name, process_id, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29313
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_thread(resource_group_name, name, process_id, thread_id, custom_headers:nil) click to toggle source

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

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

@return [ProcessThreadInfo] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14139
def get_process_thread(resource_group_name, name, process_id, thread_id, custom_headers:nil)
  response = get_process_thread_async(resource_group_name, name, process_id, thread_id, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_process_thread_async(resource_group_name, name, process_id, thread_id, custom_headers:nil) click to toggle source

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

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

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'threadId' => thread_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

    result
  end

  promise.execute
end
get_process_thread_slot(resource_group_name, name, process_id, thread_id, slot, custom_headers:nil) click to toggle source

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param thread_id [String] TID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ProcessThreadInfo] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30029
def get_process_thread_slot(resource_group_name, name, process_id, thread_id, slot, custom_headers:nil)
  response = get_process_thread_slot_async(resource_group_name, name, process_id, thread_id, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_process_thread_slot_async(resource_group_name, name, process_id, thread_id, slot, custom_headers:nil) click to toggle source

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param thread_id [String] TID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'threadId' => thread_id,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

    result
  end

  promise.execute
end
get_process_thread_slot_with_http_info(resource_group_name, name, process_id, thread_id, slot, custom_headers:nil) click to toggle source

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param process_id [String] PID. @param thread_id [String] TID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30053
def get_process_thread_slot_with_http_info(resource_group_name, name, process_id, thread_id, slot, custom_headers:nil)
  get_process_thread_slot_async(resource_group_name, name, process_id, thread_id, slot, custom_headers:custom_headers).value!
end
get_process_thread_with_http_info(resource_group_name, name, process_id, thread_id, custom_headers:nil) click to toggle source

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

Get thread information by Thread ID for a specific process, in a specific scaled-out instance in a web site.

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

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14161
def get_process_thread_with_http_info(resource_group_name, name, process_id, thread_id, custom_headers:nil)
  get_process_thread_async(resource_group_name, name, process_id, thread_id, custom_headers:custom_headers).value!
end
get_process_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13463
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14364
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14405
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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30268
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30313
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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30291
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14385
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9021
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9058
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24728
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24769
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24749
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9040
def get_relay_service_connection_with_http_info(resource_group_name, name, entity_name, custom_headers:nil)
  get_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers:custom_headers).value!
end
get_site_extension(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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15291
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15332
def get_site_extension_async(resource_group_name, name, site_extension_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'site_extension_id is nil' if site_extension_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'siteExtensionId' => site_extension_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

Get site extension information by its ID for a web site, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [SiteExtensionInfo] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31256
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.

Get site extension information by its ID for a web site, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'siteExtensionId' => site_extension_id,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

Get site extension information by its ID for a web site, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31279
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15312
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12423
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12458
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28214
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28253
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28234
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12441
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15659
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15698
def get_slot_async(resource_group_name, name, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15679
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35021
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35056
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::V2018_02_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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31821
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31860
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::V2018_02_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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31841
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35039
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3774
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3809
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}/config/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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19169
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19208
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}/config/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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19189
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3792
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35919
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35956
def get_triggered_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'web_job_name is nil' if web_job_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36241
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36284
def get_triggered_web_job_history_async(resource_group_name, name, web_job_name, id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'web_job_name is nil' if web_job_name.nil?
  fail ArgumentError, 'id is nil' if id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'id' => id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

Gets a triggered web job's history by its ID for an app, , or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web Job. @param id [String] History ID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [TriggeredJobHistory] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 33122
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.

Gets a triggered web job's history by its ID for an app, , or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web Job. @param id [String] History ID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'id' => id,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

Gets a triggered web job's history by its ID for an app, , or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web Job. @param id [String] History ID. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 33146
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36263
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.

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

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [TriggeredWebJob] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32779
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.

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

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32800
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35938
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36704
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36741
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37181
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37222
def get_vnet_connection_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
  fail ArgumentError, 'gateway_name is nil' if gateway_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34118
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34163
def get_vnet_connection_gateway_slot_async(resource_group_name, name, vnet_name, gateway_name, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
  fail ArgumentError, 'gateway_name is nil' if gateway_name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34141
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37202
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 33613
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 33654
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 33634
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36723
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37664
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37701
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34635
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34676
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34656
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37683
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4924
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4959
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20389
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20428
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20409
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4942
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 258
def get_with_http_info(resource_group_name, name, custom_headers:nil)
  get_async(resource_group_name, name, custom_headers:custom_headers).value!
end
install_site_extension(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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15405
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15421
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::V2018_02_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.

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

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param site_extension_id [String] Site extension name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [SiteExtensionInfo] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31377
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 deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] promise which provides async access to http response.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31395
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10873
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10908
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 26689
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 26728
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 26709
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10891
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.

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/2018-02-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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1713
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1748
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17224
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17263
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17244
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1731
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46593
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.

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/2018-02-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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2165
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2200
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17708
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17749
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17729
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2183
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1313
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1364
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16799
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16854
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16827
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1339
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 990
def list_backups(resource_group_name, name, custom_headers:nil)
  first_page = list_backups_as_lazy(resource_group_name, name, custom_headers:custom_headers)
  first_page.get_all_items
end
list_backups_as_lazy(resource_group_name, name, custom_headers:nil) click to toggle source

Gets existing backups of an app.

Gets existing backups of an app.

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

@return [BackupItemCollection] which provide lazy access to pages of the response.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46645
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1025
def list_backups_async(resource_group_name, name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41410
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41443
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41427
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16455
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47209
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16494
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43468
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43501
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43485
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16475
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1008
def list_backups_with_http_info(resource_group_name, name, custom_headers:nil)
  list_backups_async(resource_group_name, name, custom_headers:custom_headers).value!
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 131
def list_by_resource_group(resource_group_name, include_slots:nil, custom_headers:nil)
  first_page = list_by_resource_group_as_lazy(resource_group_name, include_slots:include_slots, custom_headers:custom_headers)
  first_page.get_all_items
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46620
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 170
def list_by_resource_group_async(resource_group_name, include_slots:nil, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
      query_params: {'includeSlots' => include_slots,'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41314
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41347
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41331
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 151
def list_by_resource_group_with_http_info(resource_group_name, include_slots:nil, custom_headers:nil)
  list_by_resource_group_async(resource_group_name, include_slots:include_slots, custom_headers:custom_headers).value!
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4605
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46697
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4644
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41604
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41641
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41623
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20049
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47265
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20092
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43662
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43699
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43681
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20071
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4625
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1490
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46670
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1525
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::V2018_02_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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41506
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41539
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::V2018_02_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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41523
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16987
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47236
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17026
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::V2018_02_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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43564
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43597
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::V2018_02_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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43581
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17007
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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1508
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2709
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2744
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18289
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18328
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18309
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2727
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5150
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46722
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5185
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41704
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41737
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41721
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20629
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47292
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20668
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43762
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43795
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43779
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20649
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5168
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6102
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6143
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21644
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21689
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21667
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6123
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5663
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46747
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5698
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41800
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41833
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41817
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21177
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47319
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21216
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43858
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43891
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43875
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21197
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5681
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6341
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46772
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6376
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41896
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41929
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41913
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21897
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47346
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21936
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43954
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43987
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43971
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21917
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6359
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_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7667
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7704
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::V2018_02_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.

Get function secrets for a function in a web site, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [FunctionSecrets] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23308
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.

Get function secrets for a function in a web site, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23349
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::V2018_02_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.

Get function secrets for a function in a web site, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param function_name [String] Function name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23329
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7686
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7188
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46797
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7223
def list_functions_async(resource_group_name, name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41992
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42025
def list_functions_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42009
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7206
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_name_bindings(resource_group_name, name, custom_headers:nil) click to toggle source

Get hostname bindings for an app or a deployment slot.

Get hostname bindings for an app or a deployment slot.

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

@return [Array<HostNameBinding>] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7776
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46822
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7811
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42088
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42121
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42105
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23424
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47400
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23463
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44146
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44179
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44163
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 23444
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 7794
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_connection_keys(resource_group_name, name, namespace_name, relay_name, custom_headers:nil) click to toggle source

Gets the send key name and value for a Hybrid Connection.

Gets the send key name and value for a Hybrid Connection.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [HybridConnectionKey] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8690
def list_hybrid_connection_keys(resource_group_name, name, namespace_name, relay_name, custom_headers:nil)
  response = list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers:nil) click to toggle source

Gets the send key name and value for a Hybrid Connection.

Gets the send key name and value for a Hybrid Connection.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

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

    result
  end

  promise.execute
end
list_hybrid_connection_keys_slot(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:nil) click to toggle source

Gets the send key name and value for a Hybrid Connection.

Gets the send key name and value for a Hybrid Connection.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param slot [String] The name of the slot for the web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [HybridConnectionKey] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24381
def list_hybrid_connection_keys_slot(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:nil)
  response = list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:nil) click to toggle source

Gets the send key name and value for a Hybrid Connection.

Gets the send key name and value for a Hybrid Connection.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param slot [String] The name of the slot for the web app. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

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

    result
  end

  promise.execute
end
list_hybrid_connection_keys_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:nil) click to toggle source

Gets the send key name and value for a Hybrid Connection.

Gets the send key name and value for a Hybrid Connection.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param slot [String] The name of the slot for the web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24402
def list_hybrid_connection_keys_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:nil)
  list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers:custom_headers).value!
end
list_hybrid_connection_keys_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers:nil) click to toggle source

Gets the send key name and value for a Hybrid Connection.

Gets the send key name and value for a Hybrid Connection.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] The name of the web app. @param namespace_name [String] The namespace for this hybrid connection. @param relay_name [String] The relay name for this hybrid connection. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8710
def list_hybrid_connection_keys_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers:nil)
  list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers:custom_headers).value!
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8802
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8837
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24497
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24534
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24516
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8820
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.

List the functions for a web site, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array<FunctionEnvelope>] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22797
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.

List the functions for a web site, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [FunctionEnvelopeCollection] which provide lazy access to pages of the response.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47373
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.

List the functions for a web site, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44050
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44083
def list_instance_functions_slot_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44067
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.

List the functions for a web site, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22817
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.

Gets all scale-out instances of an app.

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

@return [Array<SiteInstance>] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9489
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.

Gets all scale-out instances of an app.

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

@return [WebAppInstanceCollection] which provide lazy access to pages of the response.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46847
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9524
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::V2018_02_01::Models::WebAppInstanceCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
list_instance_identifiers_next(next_page_link, custom_headers:nil) click to toggle source

Gets all scale-out instances of an app.

Gets all scale-out instances of an app.

@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [WebAppInstanceCollection] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42184
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42217
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::V2018_02_01::Models::WebAppInstanceCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42201
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.

Gets all scale-out instances of an app.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array<SiteInstance>] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25224
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.

Gets all scale-out instances of an app.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [WebAppInstanceCollection] which provide lazy access to pages of the response.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47427
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25263
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::V2018_02_01::Models::WebAppInstanceCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
list_instance_identifiers_slot_next(next_page_link, custom_headers:nil) click to toggle source

Gets all scale-out instances of an app.

Gets all scale-out instances of an app.

@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [WebAppInstanceCollection] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44242
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44275
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::V2018_02_01::Models::WebAppInstanceCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44259
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25244
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9507
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10367
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46908
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10414
def list_instance_process_modules_async(resource_group_name, name, process_id, instance_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, 'instance_id is nil' if instance_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42384
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42421
def list_instance_process_modules_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42403
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 26155
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47492
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 26206
def list_instance_process_modules_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, 'instance_id is nil' if instance_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44442
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44479
def list_instance_process_modules_slot_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44461
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 26181
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10391
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10623
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46939
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10670
def list_instance_process_threads_async(resource_group_name, name, process_id, instance_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, 'instance_id is nil' if instance_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42486
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42523
def list_instance_process_threads_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42505
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 26425
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47525
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 26476
def list_instance_process_threads_slot_async(resource_group_name, name, process_id, slot, instance_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, 'instance_id is nil' if instance_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44544
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44581
def list_instance_process_threads_slot_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44563
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 26451
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10647
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9870
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46877
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9915
def list_instance_processes_async(resource_group_name, name, instance_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'instance_id is nil' if instance_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42282
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42319
def list_instance_processes_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42301
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25630
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47459
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25679
def list_instance_processes_slot_async(resource_group_name, name, slot, instance_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, 'instance_id is nil' if instance_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44340
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44377
def list_instance_processes_slot_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44359
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25655
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9893
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3161
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3196
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18769
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18808
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18789
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3179
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_metric_definitions(resource_group_name, name, custom_headers:nil) click to toggle source

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

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

@return [Array<ResourceMetricDefinition>] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11085
def list_metric_definitions(resource_group_name, name, custom_headers:nil)
  first_page = list_metric_definitions_as_lazy(resource_group_name, name, custom_headers:custom_headers)
  first_page.get_all_items
end
list_metric_definitions_as_lazy(resource_group_name, name, custom_headers:nil) click to toggle source

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

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

@return [ResourceMetricDefinitionCollection] which provide lazy access to pages of the response.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46964
def list_metric_definitions_as_lazy(resource_group_name, name, custom_headers:nil)
  response = list_metric_definitions_async(resource_group_name, name, custom_headers:custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_metric_definitions_next_async(next_page_link, custom_headers:custom_headers)
    end
    page
  end
end
list_metric_definitions_async(resource_group_name, name, custom_headers:nil) click to toggle source

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

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

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

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

    result
  end

  promise.execute
end
list_metric_definitions_next(next_page_link, custom_headers:nil) click to toggle source

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ResourceMetricDefinitionCollection] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42586
def list_metric_definitions_next(next_page_link, custom_headers:nil)
  response = list_metric_definitions_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
list_metric_definitions_next_async(next_page_link, custom_headers:nil) click to toggle source

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42619
def list_metric_definitions_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

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

    result
  end

  promise.execute
end
list_metric_definitions_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42603
def list_metric_definitions_next_with_http_info(next_page_link, custom_headers:nil)
  list_metric_definitions_next_async(next_page_link, custom_headers:custom_headers).value!
end
list_metric_definitions_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get metric definitions of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array<ResourceMetricDefinition>] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 26915
def list_metric_definitions_slot(resource_group_name, name, slot, custom_headers:nil)
  first_page = list_metric_definitions_slot_as_lazy(resource_group_name, name, slot, custom_headers:custom_headers)
  first_page.get_all_items
end
list_metric_definitions_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get metric definitions of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ResourceMetricDefinitionCollection] which provide lazy access to pages of the response.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47552
def list_metric_definitions_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil)
  response = list_metric_definitions_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_metric_definitions_slot_next_async(next_page_link, custom_headers:custom_headers)
    end
    page
  end
end
list_metric_definitions_slot_async(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get metric definitions of the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

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

    result
  end

  promise.execute
end
list_metric_definitions_slot_next(next_page_link, custom_headers:nil) click to toggle source

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ResourceMetricDefinitionCollection] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44644
def list_metric_definitions_slot_next(next_page_link, custom_headers:nil)
  response = list_metric_definitions_slot_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
list_metric_definitions_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44677
def list_metric_definitions_slot_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

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

    result
  end

  promise.execute
end
list_metric_definitions_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44661
def list_metric_definitions_slot_next_with_http_info(next_page_link, custom_headers:nil)
  list_metric_definitions_slot_next_async(next_page_link, custom_headers:custom_headers).value!
end
list_metric_definitions_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get metric definitions of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 26935
def list_metric_definitions_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil)
  list_metric_definitions_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
end
list_metric_definitions_with_http_info(resource_group_name, name, custom_headers:nil) click to toggle source

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

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

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11103
def list_metric_definitions_with_http_info(resource_group_name, name, custom_headers:nil)
  list_metric_definitions_async(resource_group_name, name, custom_headers:custom_headers).value!
end
list_metrics(resource_group_name, name, details:nil, filter:nil, custom_headers:nil) click to toggle source

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param details [Boolean] Specify “true” to include metric details in the response. It is “false” by default. @param filter [String] Return only metrics specified in the filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array<ResourceMetric>] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11197
def list_metrics(resource_group_name, name, details:nil, filter:nil, custom_headers:nil)
  first_page = list_metrics_as_lazy(resource_group_name, name, details:details, filter:filter, custom_headers:custom_headers)
  first_page.get_all_items
end
list_metrics_as_lazy(resource_group_name, name, details:nil, filter:nil, custom_headers:nil) click to toggle source

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param details [Boolean] Specify “true” to include metric details in the response. It is “false” by default. @param filter [String] Return only metrics specified in the filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ResourceMetricCollection] which provide lazy access to pages of the response.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46995
def list_metrics_as_lazy(resource_group_name, name, details:nil, filter:nil, custom_headers:nil)
  response = list_metrics_async(resource_group_name, name, details:details, filter:filter, custom_headers:custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_metrics_next_async(next_page_link, custom_headers:custom_headers)
    end
    page
  end
end
list_metrics_async(resource_group_name, name, details:nil, filter:nil, custom_headers:nil) click to toggle source

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param details [Boolean] Specify “true” to include metric details in the response. It is “false” by default. @param filter [String] Return only metrics specified in the filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration’'. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'details' => details,'api-version' => @client.api_version},
      skip_encoding_query_params: {'$filter' => filter},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

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

    result
  end

  promise.execute
end
list_metrics_next(next_page_link, custom_headers:nil) click to toggle source

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ResourceMetricCollection] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42682
def list_metrics_next(next_page_link, custom_headers:nil)
  response = list_metrics_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
list_metrics_next_async(next_page_link, custom_headers:nil) click to toggle source

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42715
def list_metrics_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

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

    result
  end

  promise.execute
end
list_metrics_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42699
def list_metrics_next_with_http_info(next_page_link, custom_headers:nil)
  list_metrics_next_async(next_page_link, custom_headers:custom_headers).value!
end
list_metrics_slot(resource_group_name, name, slot, details:nil, filter:nil, custom_headers:nil) click to toggle source

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get metrics of the production slot. @param details [Boolean] Specify “true” to include metric details in the response. It is “false” by default. @param filter [String] Return only metrics specified in the filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array<ResourceMetric>] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27034
def list_metrics_slot(resource_group_name, name, slot, details:nil, filter:nil, custom_headers:nil)
  first_page = list_metrics_slot_as_lazy(resource_group_name, name, slot, details:details, filter:filter, custom_headers:custom_headers)
  first_page.get_all_items
end
list_metrics_slot_as_lazy(resource_group_name, name, slot, details:nil, filter:nil, custom_headers:nil) click to toggle source

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get metrics of the production slot. @param details [Boolean] Specify “true” to include metric details in the response. It is “false” by default. @param filter [String] Return only metrics specified in the filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ResourceMetricCollection] which provide lazy access to pages of the response.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47585
def list_metrics_slot_as_lazy(resource_group_name, name, slot, details:nil, filter:nil, custom_headers:nil)
  response = list_metrics_slot_async(resource_group_name, name, slot, details:details, filter:filter, custom_headers:custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_metrics_slot_next_async(next_page_link, custom_headers:custom_headers)
    end
    page
  end
end
list_metrics_slot_async(resource_group_name, name, slot, details:nil, filter:nil, custom_headers:nil) click to toggle source

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get metrics of the production slot. @param details [Boolean] Specify “true” to include metric details in the response. It is “false” by default. @param filter [String] Return only metrics specified in the filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration’'. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'details' => details,'api-version' => @client.api_version},
      skip_encoding_query_params: {'$filter' => filter},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

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

    result
  end

  promise.execute
end
list_metrics_slot_next(next_page_link, custom_headers:nil) click to toggle source

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ResourceMetricCollection] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44740
def list_metrics_slot_next(next_page_link, custom_headers:nil)
  response = list_metrics_slot_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
list_metrics_slot_next_async(next_page_link, custom_headers:nil) click to toggle source

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44773
def list_metrics_slot_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

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

    result
  end

  promise.execute
end
list_metrics_slot_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44757
def list_metrics_slot_next_with_http_info(next_page_link, custom_headers:nil)
  list_metrics_slot_next_async(next_page_link, custom_headers:custom_headers).value!
end
list_metrics_slot_with_http_info(resource_group_name, name, slot, details:nil, filter:nil, custom_headers:nil) click to toggle source

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will get metrics of the production slot. @param details [Boolean] Specify “true” to include metric details in the response. It is “false” by default. @param filter [String] Return only metrics specified in the filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27060
def list_metrics_slot_with_http_info(resource_group_name, name, slot, details:nil, filter:nil, custom_headers:nil)
  list_metrics_slot_async(resource_group_name, name, slot, details:details, filter:filter, custom_headers:custom_headers).value!
end
list_metrics_with_http_info(resource_group_name, name, details:nil, filter:nil, custom_headers:nil) click to toggle source

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param details [Boolean] Specify “true” to include metric details in the response. It is “false” by default. @param filter [String] Return only metrics specified in the filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11221
def list_metrics_with_http_info(resource_group_name, name, details:nil, filter:nil, custom_headers:nil)
  list_metrics_async(resource_group_name, name, details:details, filter:filter, custom_headers:custom_headers).value!
end
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11532
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11571
def list_network_features_async(resource_group_name, name, view, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'view is nil' if view.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'view' => view,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27278
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27321
def list_network_features_slot_async(resource_group_name, name, view, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'view is nil' if view.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'view' => view,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27300
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11552
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41218
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41251
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 41235
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12308
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47024
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12351
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42778
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42811
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42795
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28092
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47616
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28139
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44836
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44869
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44853
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28116
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12330
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12529
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12564
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28327
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28366
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28347
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12547
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13786
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47079
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13827
def list_process_modules_async(resource_group_name, name, process_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42978
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43015
def list_process_modules_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42997
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29655
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47675
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29700
def list_process_modules_slot_async(resource_group_name, name, process_id, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45036
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45073
def list_process_modules_slot_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45055
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29678
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13807
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14022
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47107
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14063
def list_process_threads_async(resource_group_name, name, process_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43080
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43117
def list_process_threads_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43099
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29905
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47705
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29950
def list_process_threads_slot_async(resource_group_name, name, process_id, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'process_id is nil' if process_id.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'processId' => process_id,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45138
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45175
def list_process_threads_slot_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45157
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29928
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14043
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13329
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47051
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13368
def list_processes_async(resource_group_name, name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42876
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42913
def list_processes_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 42895
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29170
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47645
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29213
def list_processes_slot_async(resource_group_name, name, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44934
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44971
def list_processes_slot_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 44953
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29192
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13349
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14255
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47132
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14290
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43180
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43213
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43197
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30152
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47732
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30191
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45238
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45271
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45255
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30172
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14273
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3267
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3282
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18882
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18899
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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14703
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14744
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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30628
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30673
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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30651
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14724
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8910
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8949
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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24610
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24653
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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24632
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8930
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_extensions(resource_group_name, name, custom_headers:nil) click to toggle source

Get list of siteextensions for a web site, or a deployment slot.

Get list of siteextensions for a web site, or a deployment slot.

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

@return [Array<SiteExtensionInfo>] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15182
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47157
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15217
def list_site_extensions_async(resource_group_name, name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43276
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43309
def list_site_extensions_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43293
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.

Get list of siteextensions for a web site, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array<SiteExtensionInfo>] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31140
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.

Get list of siteextensions for a web site, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [SiteExtensionInfoCollection] which provide lazy access to pages of the response.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47759
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.

Get list of siteextensions for a web site, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45334
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45367
def list_site_extensions_slot_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45351
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.

Get list of siteextensions for a web site, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31160
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15200
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3430
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3465
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19056
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19095
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19076
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3448
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3538
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3577
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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3558
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34751
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47956
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34790
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46012
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46045
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46029
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34771
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31536
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47788
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31579
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45430
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45463
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45447
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31558
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15551
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47182
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15586
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43372
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43405
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 43389
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15569
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34915
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47981
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34950
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::V2018_02_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(next_page_link, custom_headers:nil) click to toggle source

Returns all Snapshots to the user.

Returns all Snapshots to the user.

@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [SnapshotCollection] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46108
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46141
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46125
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31710
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47814
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31747
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45526
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45559
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45543
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31729
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34933
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10979
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11014
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::V2018_02_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.

This is to allow calling via powershell and ARM template.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [FunctionSecrets] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 26802
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.

This is to allow calling via powershell and ARM template.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 26841
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::V2018_02_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.

This is to allow calling via powershell and ARM template.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 26822
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 10997
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_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36128
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 48032
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36165
def list_triggered_web_job_history_async(resource_group_name, name, web_job_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'web_job_name is nil' if web_job_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46300
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46333
def list_triggered_web_job_history_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46317
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.

List a triggered web job's history for an app, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array<TriggeredJobHistory>] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 33002
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.

List a triggered web job's history for an app, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [TriggeredJobHistoryCollection] which provide lazy access to pages of the response.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47869
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.

List a triggered web job's history for an app, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45718
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45751
def list_triggered_web_job_history_slot_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45735
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.

List a triggered web job's history for an app, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 33023
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36147
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35812
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 48006
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35847
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46204
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46237
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46221
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32665
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47841
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32704
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45622
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45655
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45639
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32685
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35830
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36462
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 48063
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36509
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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46398
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46435
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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46417
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 33357
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47902
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 33408
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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45816
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45853
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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45835
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 33383
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36486
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36581
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36616
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 33483
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 33522
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 33503
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36599
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37557
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 48088
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37592
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46498
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46531
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 46515
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34521
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 47929
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34560
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45916
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45949
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 45933
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34541
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37575
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.

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/2018-02-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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11370
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11387
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11319
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11337
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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13207
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13248
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29043
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29086
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 29065
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13228
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4825
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4862
def recover_site_configuration_snapshot_async(resource_group_name, name, snapshot_id, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'snapshot_id is nil' if snapshot_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'snapshotId' => snapshot_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 204
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20283
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20324
def recover_site_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'snapshot_id is nil' if snapshot_id.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'snapshotId' => snapshot_id,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 204
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20304
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4844
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14831
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14870
def reset_production_slot_config_async(resource_group_name, name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14851
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30763
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30806
def reset_slot_configuration_slot_async(resource_group_name, name, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30785
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14936
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14983
def restart_async(resource_group_name, name, soft_restart:nil, synchronous:nil, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'softRestart' => soft_restart,'synchronous' => synchronous,'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30875
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30926
def restart_slot_async(resource_group_name, name, slot, soft_restart:nil, synchronous:nil, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'softRestart' => soft_restart,'synchronous' => synchronous,'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30901
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 14960
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1444
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1461
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15043
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15059
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 30989
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31007
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15088
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15105
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31038
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31057
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16937
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 16956
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15135
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15153
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31089
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31109
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36357
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36394
def run_triggered_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'web_job_name is nil' if web_job_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
run_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.

Run a triggered web job for an app, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 33245
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.

Run a triggered web job for an app, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
run_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.

Run a triggered web job for an app, or a deployment slot.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site name. @param web_job_name [String] Name of Web Job. @param slot [String] Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 33266
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 36376
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35431
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35466
def start_async(resource_group_name, name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
start_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5465
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5502
def start_continuous_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'web_job_name is nil' if web_job_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
start_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20965
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21006
def start_continuous_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'web_job_name is nil' if web_job_name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
start_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 20986
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5484
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_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Starts an app (or deployment slot, if specified).

Starts an app (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will start the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32256
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32295
def start_slot_async(resource_group_name, name, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32276
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11790
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11835
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.

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 [Object] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11918
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11938
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: '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
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.

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 [Object] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27681
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27702
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: '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
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27549
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27596
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27573
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11813
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35449
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35526
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35561
def stop_async(resource_group_name, name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
stop_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5564
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5601
def stop_continuous_web_job_async(resource_group_name, name, web_job_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'web_job_name is nil' if web_job_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
stop_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21071
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21112
def stop_continuous_web_job_slot_async(resource_group_name, name, web_job_name, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'web_job_name is nil' if web_job_name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'webJobName' => web_job_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 404
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
stop_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 21092
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 5583
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_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Stops an app (or deployment slot, if specified).

Stops an app (or deployment slot, if specified).

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will stop the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32358
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32397
def stop_slot_async(resource_group_name, name, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32378
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11975
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12010
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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27740
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27777
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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 27759
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 11993
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35544
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31661
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 31680
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34869
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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34886
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 scale controller

Syncs function trigger metadata to the scale controller

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35716
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 scale controller

Syncs function trigger metadata to the scale controller

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

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 204
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
sync_function_triggers_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Syncs function trigger metadata to the scale controller

Syncs function trigger metadata to the scale controller

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32562
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 scale controller

Syncs function trigger metadata to the scale controller

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

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


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 204
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
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 scale controller

Syncs function trigger metadata to the scale controller

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the app. @param slot [String] Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32582
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 scale controller

Syncs function trigger metadata to the scale controller

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

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35734
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_repository(resource_group_name, name, custom_headers:nil) click to toggle source

Sync web app repository.

Sync web app repository.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35621
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35656
def sync_repository_async(resource_group_name, name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
sync_repository_slot(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Sync web app repository.

Sync web app repository.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32460
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32499
def sync_repository_slot_async(resource_group_name, name, slot, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
sync_repository_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil) click to toggle source

Sync web app repository.

Sync web app repository.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param slot [String] Name of web app slot. If not specified then will default to production slot. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

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

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32480
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35639
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 512
def update(resource_group_name, name, site_envelope, custom_headers:nil)
  response = update_async(resource_group_name, name, site_envelope, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
update_application_settings(resource_group_name, name, app_settings, custom_headers:nil) click to toggle source

Replaces the application settings of an app.

Replaces the application settings of an app.

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

@return [StringDictionary] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1597
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1634
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17101
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17142
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17122
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1616
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 557
def update_async(resource_group_name, name, site_envelope, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'site_envelope is nil' if site_envelope.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_mapper = Azure::Web::Mgmt::V2018_02_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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1821
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1860
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17339
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17382
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17361
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_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 1841
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2047
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2086
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17580
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17625
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17603
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2067
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2272
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2309
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17824
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17865
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 17845
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2291
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4485
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4524
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19922
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19965
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19944
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4505
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2591
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2630
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18164
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18207
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18186
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2611
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2923
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2962
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18517
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18560
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18539
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 2943
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6801
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6848
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22385
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22436
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 22411
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 6825
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_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8564
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8607
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24251
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24296
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 24274
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 8586
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3043
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3082
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18644
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18687
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18666
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3063
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12971
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 13012
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28797
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28842
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 28820
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 12992
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9364
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9409
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::V2018_02_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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25092
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25141
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::V2018_02_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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 25117
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 9387
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_site_push_settings(resource_group_name, name, push_settings, custom_headers:nil) click to toggle source

Updates the Push settings associated with web app.

Updates the Push settings associated with web app.

@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of web app. @param push_settings [PushSettings] Push settings associated with web app. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [PushSettings] operation results.

# File lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3314
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3351
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18933
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18974
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 18954
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3333
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15949
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15998
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::V2018_02_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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3652
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3695
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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 3674
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 15974
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35294
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35333
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::V2018_02_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::V2018_02_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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32112
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32155
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::V2018_02_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::V2018_02_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::V2018_02_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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 32134
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 35314
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4121
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4172
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::V2018_02_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}/config/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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19537
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19592
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::V2018_02_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}/config/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::V2018_02_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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 19565
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 4147
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37053
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37098
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::V2018_02_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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37431
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37476
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::V2018_02_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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34386
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34437
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::V2018_02_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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34412
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37454
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 33983
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34032
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::V2018_02_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::V2018_02_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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 34008
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).

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 37076
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.

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/2018-02-01/generated/azure_mgmt_web/web_apps.rb, line 535
def update_with_http_info(resource_group_name, name, site_envelope, custom_headers:nil)
  update_async(resource_group_name, name, site_envelope, custom_headers:custom_headers).value!
end