Class: Azure::Web::Mgmt::V2018_02_01::WebApps

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb

Overview

WebSite Management Client

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ WebApps

Creates and initializes a new instance of the WebApps class.

Parameters:

  • client

    service class for accessing basic functionality.



17
18
19
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb', line 17

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientWebSiteManagementClient (readonly)

Returns reference to the WebSiteManagementClient.

Returns:



22
23
24
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb', line 22

def client
  @client
end

Instance Method Details

#add_premier_add_on(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers: nil) ⇒ PremierAddOn

Updates a named add-on of an app.

Updates a named add-on of an app.

resource belongs. premier add-on. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • premier_add_on (PremierAddOn)

    A JSON representation of the edited

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PremierAddOn)

    operation results.



12748
12749
12750
12751
# 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) ⇒ Concurrent::Promise

Updates a named add-on of an app.

Updates a named add-on of an app.

resource belongs. premier add-on. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • premier_add_on (PremierAddOn)

    A JSON representation of the edited

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
# 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) ⇒ PremierAddOn

Updates a named add-on of an app.

Updates a named add-on of an app.

resource belongs. premier add-on. the API will update the named add-on for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • premier_add_on (PremierAddOn)

    A JSON representation of the edited

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PremierAddOn)

    operation results.



28560
28561
28562
28563
# 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) ⇒ Concurrent::Promise

Updates a named add-on of an app.

Updates a named add-on of an app.

resource belongs. premier add-on. the API will update the named add-on for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • premier_add_on (PremierAddOn)

    A JSON representation of the edited

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



28605
28606
28607
28608
28609
28610
28611
28612
28613
28614
28615
28616
28617
28618
28619
28620
28621
28622
28623
28624
28625
28626
28627
28628
28629
28630
28631
28632
28633
28634
28635
28636
28637
28638
28639
28640
28641
28642
28643
28644
28645
28646
28647
28648
28649
28650
28651
28652
28653
28654
28655
28656
28657
28658
28659
28660
28661
28662
28663
28664
28665
28666
28667
28668
28669
28670
28671
# 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) ⇒ MsRestAzure::AzureOperationResponse

Updates a named add-on of an app.

Updates a named add-on of an app.

resource belongs. premier add-on. the API will update the named add-on for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • premier_add_on (PremierAddOn)

    A JSON representation of the edited

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



28583
28584
28585
# 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) ⇒ MsRestAzure::AzureOperationResponse

Updates a named add-on of an app.

Updates a named add-on of an app.

resource belongs. premier add-on. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • premier_add_on (PremierAddOn)

    A JSON representation of the edited

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



12769
12770
12771
# 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) ⇒ CustomHostnameAnalysisResult

Analyze a custom hostname.

Analyze a custom hostname.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • host_name (String) (defaults to: nil)

    Custom hostname.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (CustomHostnameAnalysisResult)

    operation results.



647
648
649
650
# 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) ⇒ Concurrent::Promise

Analyze a custom hostname.

Analyze a custom hostname.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • host_name (String) (defaults to: nil)

    Custom hostname.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
# 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) ⇒ CustomHostnameAnalysisResult

Analyze a custom hostname.

Analyze a custom hostname.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • host_name (String) (defaults to: nil)

    Custom hostname.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (CustomHostnameAnalysisResult)

    operation results.



16091
16092
16093
16094
# 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) ⇒ Concurrent::Promise

Analyze a custom hostname.

Analyze a custom hostname.

resource belongs. to production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • host_name (String) (defaults to: nil)

    Custom hostname.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
# 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) ⇒ MsRestAzure::AzureOperationResponse

Analyze a custom hostname.

Analyze a custom hostname.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • host_name (String) (defaults to: nil)

    Custom hostname.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



16112
16113
16114
# 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) ⇒ MsRestAzure::AzureOperationResponse

Analyze a custom hostname.

Analyze a custom hostname.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • host_name (String) (defaults to: nil)

    Custom hostname.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



666
667
668
# 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) ⇒ Object

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

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

resource belongs. slot name. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



758
759
760
761
# 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) ⇒ Concurrent::Promise

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

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

resource belongs. slot name. See example. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
# 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) ⇒ MsRestAzure::AzureOperationResponse

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

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

resource belongs. slot name. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



780
781
782
# 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) ⇒ Object

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

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

resource belongs. slot name. See example. production slot is used as the source slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • slot (String)

    Name of the source slot. If a slot is not specified, the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



16209
16210
16211
16212
# 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) ⇒ Concurrent::Promise

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

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

resource belongs. slot name. See example. production slot is used as the source slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • slot (String)

    Name of the source slot. If a slot is not specified, the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
# 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) ⇒ MsRestAzure::AzureOperationResponse

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

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

resource belongs. slot name. See example. production slot is used as the source slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • slot (String)

    Name of the source slot. If a slot is not specified, the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



16233
16234
16235
# 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) ⇒ BackupItem

Creates a backup of an app.

Creates a backup of an app.

resource belongs. response from the POST action as input here. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (BackupRequest)

    Backup configuration. You can use the JSON

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BackupItem)

    operation results.



872
873
874
875
# 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) ⇒ Concurrent::Promise

Creates a backup of an app.

Creates a backup of an app.

resource belongs. response from the POST action as input here. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (BackupRequest)

    Backup configuration. You can use the JSON

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
# 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) ⇒ BackupItem

Creates a backup of an app.

Creates a backup of an app.

resource belongs. response from the POST action as input here. the API will create a backup for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (BackupRequest)

    Backup configuration. You can use the JSON

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BackupItem)

    operation results.



16330
16331
16332
16333
# 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) ⇒ Concurrent::Promise

Creates a backup of an app.

Creates a backup of an app.

resource belongs. response from the POST action as input here. the API will create a backup for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (BackupRequest)

    Backup configuration. You can use the JSON

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
# 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) ⇒ MsRestAzure::AzureOperationResponse

Creates a backup of an app.

Creates a backup of an app.

resource belongs. response from the POST action as input here. the API will create a backup for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (BackupRequest)

    Backup configuration. You can use the JSON

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



16352
16353
16354
# 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) ⇒ MsRestAzure::AzureOperationResponse

Creates a backup of an app.

Creates a backup of an app.

resource belongs. response from the POST action as input here. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (BackupRequest)

    Backup configuration. You can use the JSON

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



892
893
894
# 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) ⇒ FunctionEnvelope

Create function for web site, or a deployment slot.

Create function for web site, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • function_envelope (FunctionEnvelope)

    Function details.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (FunctionEnvelope)

    operation results.



38247
38248
38249
38250
# 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) ⇒ Concurrent::Promise

Create function for web site, or a deployment slot.

Create function for web site, or a deployment slot.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • function_envelope (FunctionEnvelope)

    Function details.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



38286
38287
38288
38289
38290
38291
38292
38293
38294
38295
38296
38297
38298
38299
38300
38301
38302
38303
38304
38305
38306
38307
38308
38309
38310
38311
38312
38313
38314
38315
38316
38317
38318
38319
38320
38321
38322
38323
38324
38325
38326
38327
38328
38329
38330
38331
38332
38333
38334
38335
38336
38337
38338
38339
38340
38341
38342
38343
38344
38345
38346
38347
38348
38349
38350
38351
# 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) ⇒ MsRestAzure::AzureOperationResponse

Create function for web site, or a deployment slot.

Create function for web site, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • function_envelope (FunctionEnvelope)

    Function details.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



38267
38268
38269
# 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) ⇒ FunctionEnvelope

Create function for web site, or a deployment slot.

Create function for web site, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • function_envelope (FunctionEnvelope)

    Function details.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (FunctionEnvelope)

    operation results.



39829
39830
39831
39832
# 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) ⇒ Concurrent::Promise

Create function for web site, or a deployment slot.

Create function for web site, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • function_envelope (FunctionEnvelope)

    Function details.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



39872
39873
39874
39875
39876
39877
39878
39879
39880
39881
39882
39883
39884
39885
39886
39887
39888
39889
39890
39891
39892
39893
39894
39895
39896
39897
39898
39899
39900
39901
39902
39903
39904
39905
39906
39907
39908
39909
39910
39911
39912
39913
39914
39915
39916
39917
39918
39919
39920
39921
39922
39923
39924
39925
39926
39927
39928
39929
39930
39931
39932
39933
39934
39935
39936
39937
39938
# 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) ⇒ MsRestAzure::AzureOperationResponse

Create function for web site, or a deployment slot.

Create function for web site, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • function_envelope (FunctionEnvelope)

    Function details.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



39851
39852
39853
# 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) ⇒ MSDeployStatus

Invoke the MSDeploy web app extension.

Invoke the MSDeploy web app extension.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • instance_id (String)

    ID of web app instance.

  • msdeploy (MSDeploy)

    Details of MSDeploy operation

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MSDeployStatus)

    operation results.



38368
38369
38370
38371
# 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) ⇒ Concurrent::Promise

Invoke the MSDeploy web app extension.

Invoke the MSDeploy web app extension.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • instance_id (String)

    ID of web app instance.

  • msdeploy (MSDeploy)

    Details of MSDeploy operation

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



38407
38408
38409
38410
38411
38412
38413
38414
38415
38416
38417
38418
38419
38420
38421
38422
38423
38424
38425
38426
38427
38428
38429
38430
38431
38432
38433
38434
38435
38436
38437
38438
38439
38440
38441
38442
38443
38444
38445
38446
38447
38448
38449
38450
38451
38452
38453
38454
38455
38456
38457
38458
38459
38460
38461
38462
38463
38464
38465
38466
38467
38468
38469
38470
38471
38472
# 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) ⇒ MSDeployStatus

Invoke the MSDeploy web app extension.

Invoke the MSDeploy web app extension.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • instance_id (String)

    ID of web app instance.

  • msdeploy (MSDeploy)

    Details of MSDeploy operation

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MSDeployStatus)

    operation results.



39957
39958
39959
39960
# 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) ⇒ Concurrent::Promise

Invoke the MSDeploy web app extension.

Invoke the MSDeploy web app extension.

resource belongs. to production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • instance_id (String)

    ID of web app instance.

  • msdeploy (MSDeploy)

    Details of MSDeploy operation

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



40000
40001
40002
40003
40004
40005
40006
40007
40008
40009
40010
40011
40012
40013
40014
40015
40016
40017
40018
40019
40020
40021
40022
40023
40024
40025
40026
40027
40028
40029
40030
40031
40032
40033
40034
40035
40036
40037
40038
40039
40040
40041
40042
40043
40044
40045
40046
40047
40048
40049
40050
40051
40052
40053
40054
40055
40056
40057
40058
40059
40060
40061
40062
40063
40064
40065
40066
# 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) ⇒ MsRestAzure::AzureOperationResponse

Invoke the MSDeploy web app extension.

Invoke the MSDeploy web app extension.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • instance_id (String)

    ID of web app instance.

  • msdeploy (MSDeploy)

    Details of MSDeploy operation

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



39979
39980
39981
# 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) ⇒ MsRestAzure::AzureOperationResponse

Invoke the MSDeploy web app extension.

Invoke the MSDeploy web app extension.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • instance_id (String)

    ID of web app instance.

  • msdeploy (MSDeploy)

    Details of MSDeploy operation

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



38388
38389
38390
# 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) ⇒ MSDeployStatus

Invoke the MSDeploy web app extension.

Invoke the MSDeploy web app extension.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • msdeploy (MSDeploy)

    Details of MSDeploy operation

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MSDeployStatus)

    operation results.



38129
38130
38131
38132
# 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) ⇒ Concurrent::Promise

Invoke the MSDeploy web app extension.

Invoke the MSDeploy web app extension.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • msdeploy (MSDeploy)

    Details of MSDeploy operation

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



38166
38167
38168
38169
38170
38171
38172
38173
38174
38175
38176
38177
38178
38179
38180
38181
38182
38183
38184
38185
38186
38187
38188
38189
38190
38191
38192
38193
38194
38195
38196
38197
38198
38199
38200
38201
38202
38203
38204
38205
38206
38207
38208
38209
38210
38211
38212
38213
38214
38215
38216
38217
38218
38219
38220
38221
38222
38223
38224
38225
38226
38227
38228
38229
38230
# 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) ⇒ MSDeployStatus

Invoke the MSDeploy web app extension.

Invoke the MSDeploy web app extension.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • msdeploy (MSDeploy)

    Details of MSDeploy operation

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MSDeployStatus)

    operation results.



39704
39705
39706
39707
# 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) ⇒ Concurrent::Promise

Invoke the MSDeploy web app extension.

Invoke the MSDeploy web app extension.

resource belongs. to production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • msdeploy (MSDeploy)

    Details of MSDeploy operation

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



39745
39746
39747
39748
39749
39750
39751
39752
39753
39754
39755
39756
39757
39758
39759
39760
39761
39762
39763
39764
39765
39766
39767
39768
39769
39770
39771
39772
39773
39774
39775
39776
39777
39778
39779
39780
39781
39782
39783
39784
39785
39786
39787
39788
39789
39790
39791
39792
39793
39794
39795
39796
39797
39798
39799
39800
39801
39802
39803
39804
39805
39806
39807
39808
39809
39810
# 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) ⇒ MsRestAzure::AzureOperationResponse

Invoke the MSDeploy web app extension.

Invoke the MSDeploy web app extension.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • msdeploy (MSDeploy)

    Details of MSDeploy operation

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



39725
39726
39727
# 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) ⇒ MsRestAzure::AzureOperationResponse

Invoke the MSDeploy web app extension.

Invoke the MSDeploy web app extension.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • msdeploy (MSDeploy)

    Details of MSDeploy operation

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



38148
38149
38150
# 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) ⇒ Site

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.

resource belongs. update a deployment slot, use the slot parameter. example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Unique name of the app to create or update. To create or

  • site_envelope (Site)

    A JSON representation of the app properties. See

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Site)

    operation results.



37778
37779
37780
37781
# 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) ⇒ Concurrent::Promise

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.

resource belongs. update a deployment slot, use the slot parameter. example. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Unique name of the app to create or update. To create or

  • site_envelope (Site)

    A JSON representation of the app properties. See

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



37823
37824
37825
37826
37827
37828
37829
37830
37831
37832
37833
37834
37835
37836
37837
37838
37839
37840
37841
37842
37843
37844
37845
37846
37847
37848
37849
37850
37851
37852
37853
37854
37855
37856
37857
37858
37859
37860
37861
37862
37863
37864
37865
37866
37867
37868
37869
37870
37871
37872
37873
37874
37875
37876
37877
37878
37879
37880
37881
37882
37883
37884
37885
37886
37887
37888
37889
37890
37891
37892
37893
37894
37895
37896
37897
# 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) ⇒ Site

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.

resource belongs. update a deployment slot, use the slot parameter. example. default, this API attempts to create or modify the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Unique name of the app to create or update. To create or

  • site_envelope (Site)

    A JSON representation of the app properties. See

  • slot (String)

    Name of the deployment slot to create or update. By

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Site)

    operation results.



39332
39333
39334
39335
# 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) ⇒ Concurrent::Promise

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.

resource belongs. update a deployment slot, use the slot parameter. example. default, this API attempts to create or modify the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Unique name of the app to create or update. To create or

  • site_envelope (Site)

    A JSON representation of the app properties. See

  • slot (String)

    Name of the deployment slot to create or update. By

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



39381
39382
39383
39384
39385
39386
39387
39388
39389
39390
39391
39392
39393
39394
39395
39396
39397
39398
39399
39400
39401
39402
39403
39404
39405
39406
39407
39408
39409
39410
39411
39412
39413
39414
39415
39416
39417
39418
39419
39420
39421
39422
39423
39424
39425
39426
39427
39428
39429
39430
39431
39432
39433
39434
39435
39436
39437
39438
39439
39440
39441
39442
39443
39444
39445
39446
39447
39448
39449
39450
39451
39452
39453
39454
39455
39456
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. update a deployment slot, use the slot parameter. example. default, this API attempts to create or modify the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Unique name of the app to create or update. To create or

  • site_envelope (Site)

    A JSON representation of the app properties. See

  • slot (String)

    Name of the deployment slot to create or update. By

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



39357
39358
39359
# 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) ⇒ SiteSourceControl

Updates the source control configuration of an app.

Updates the source control configuration of an app.

resource belongs. SiteSourceControl object. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_source_control (SiteSourceControl)

    JSON representation of a

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteSourceControl)

    operation results.



41081
41082
41083
41084
# 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) ⇒ Concurrent::Promise

Updates the source control configuration of an app.

Updates the source control configuration of an app.

resource belongs. SiteSourceControl object. See example. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_source_control (SiteSourceControl)

    JSON representation of a

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



41120
41121
41122
41123
41124
41125
41126
41127
41128
41129
41130
41131
41132
41133
41134
41135
41136
41137
41138
41139
41140
41141
41142
41143
41144
41145
41146
41147
41148
41149
41150
41151
41152
41153
41154
41155
41156
41157
41158
41159
41160
41161
41162
41163
41164
41165
41166
41167
41168
41169
41170
41171
41172
41173
41174
41175
41176
41177
41178
41179
41180
41181
41182
41183
41184
41185
41186
41187
41188
41189
41190
41191
41192
41193
41194
41195
41196
41197
41198
41199
41200
41201
41202
41203
41204
# 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) ⇒ SiteSourceControl

Updates the source control configuration of an app.

Updates the source control configuration of an app.

resource belongs. SiteSourceControl object. See example. the API will update the source control configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_source_control (SiteSourceControl)

    JSON representation of a

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteSourceControl)

    operation results.



40827
40828
40829
40830
# 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) ⇒ Concurrent::Promise

Updates the source control configuration of an app.

Updates the source control configuration of an app.

resource belongs. SiteSourceControl object. See example. the API will update the source control configuration for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_source_control (SiteSourceControl)

    JSON representation of a

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



40870
40871
40872
40873
40874
40875
40876
40877
40878
40879
40880
40881
40882
40883
40884
40885
40886
40887
40888
40889
40890
40891
40892
40893
40894
40895
40896
40897
40898
40899
40900
40901
40902
40903
40904
40905
40906
40907
40908
40909
40910
40911
40912
40913
40914
40915
40916
40917
40918
40919
40920
40921
40922
40923
40924
40925
40926
40927
40928
40929
40930
40931
40932
40933
40934
40935
40936
40937
40938
40939
40940
40941
40942
40943
40944
40945
40946
40947
40948
40949
40950
40951
40952
40953
40954
40955
# 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) ⇒ MsRestAzure::AzureOperationResponse

Updates the source control configuration of an app.

Updates the source control configuration of an app.

resource belongs. SiteSourceControl object. See example. the API will update the source control configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_source_control (SiteSourceControl)

    JSON representation of a

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



40849
40850
40851
# 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) ⇒ MsRestAzure::AzureOperationResponse

Updates the source control configuration of an app.

Updates the source control configuration of an app.

resource belongs. SiteSourceControl object. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_source_control (SiteSourceControl)

    JSON representation of a

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



41101
41102
41103
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. update a deployment slot, use the slot parameter. example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Unique name of the app to create or update. To create or

  • site_envelope (Site)

    A JSON representation of the app properties. See

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



37801
37802
37803
# 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) ⇒ SiteExtensionInfo

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

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

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • site_extension_id (String)

    Site extension name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteExtensionInfo)

    operation results.



39206
39207
39208
39209
# 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) ⇒ Concurrent::Promise

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

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

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • site_extension_id (String)

    Site extension name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



39243
39244
39245
39246
39247
39248
39249
39250
39251
39252
39253
39254
39255
39256
39257
39258
39259
39260
39261
39262
39263
39264
39265
39266
39267
39268
39269
39270
39271
39272
39273
39274
39275
39276
39277
39278
39279
39280
39281
39282
39283
39284
39285
39286
39287
39288
39289
39290
39291
39292
39293
39294
39295
39296
39297
39298
39299
39300
39301
39302
39303
39304
39305
39306
39307
39308
39309
39310
# 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) ⇒ SiteExtensionInfo

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

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

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • site_extension_id (String)

    Site extension name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteExtensionInfo)

    operation results.



40583
40584
40585
40586
# 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) ⇒ Concurrent::Promise

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

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

resource belongs. the API deletes a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • site_extension_id (String)

    Site extension name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



40624
40625
40626
40627
40628
40629
40630
40631
40632
40633
40634
40635
40636
40637
40638
40639
40640
40641
40642
40643
40644
40645
40646
40647
40648
40649
40650
40651
40652
40653
40654
40655
40656
40657
40658
40659
40660
40661
40662
40663
40664
40665
40666
40667
40668
40669
40670
40671
40672
40673
40674
40675
40676
40677
40678
40679
40680
40681
40682
40683
40684
40685
40686
40687
40688
40689
40690
40691
40692
# 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) ⇒ MsRestAzure::AzureOperationResponse

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

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

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • site_extension_id (String)

    Site extension name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



40604
40605
40606
# 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) ⇒ MsRestAzure::AzureOperationResponse

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

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

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • site_extension_id (String)

    Site extension name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



39225
39226
39227
# 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) ⇒ User

Gets the Git/FTP publishing credentials of an app.

Gets the Git/FTP publishing credentials of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (User)

    operation results.



38022
38023
38024
38025
# 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) ⇒ Concurrent::Promise

Gets the Git/FTP publishing credentials of an app.

Gets the Git/FTP publishing credentials of an app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



38057
38058
38059
38060
38061
38062
38063
38064
38065
38066
38067
38068
38069
38070
38071
38072
38073
38074
38075
38076
38077
38078
38079
38080
38081
38082
38083
38084
38085
38086
38087
38088
38089
38090
38091
38092
38093
38094
38095
38096
38097
38098
38099
38100
38101
38102
38103
38104
38105
38106
38107
38108
38109
38110
38111
38112
38113
# 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) ⇒ User

Gets the Git/FTP publishing credentials of an app.

Gets the Git/FTP publishing credentials of an app.

resource belongs. the API will get the publishing credentials for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (User)

    operation results.



39590
39591
39592
39593
# 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) ⇒ Concurrent::Promise

Gets the Git/FTP publishing credentials of an app.

Gets the Git/FTP publishing credentials of an app.

resource belongs. the API will get the publishing credentials for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



39629
39630
39631
39632
39633
39634
39635
39636
39637
39638
39639
39640
39641
39642
39643
39644
39645
39646
39647
39648
39649
39650
39651
39652
39653
39654
39655
39656
39657
39658
39659
39660
39661
39662
39663
39664
39665
39666
39667
39668
39669
39670
39671
39672
39673
39674
39675
39676
39677
39678
39679
39680
39681
39682
39683
39684
39685
39686
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the Git/FTP publishing credentials of an app.

Gets the Git/FTP publishing credentials of an app.

resource belongs. the API will get the publishing credentials for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



39610
39611
39612
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the Git/FTP publishing credentials of an app.

Gets the Git/FTP publishing credentials of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



38040
38041
38042
# 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) ⇒ Operation

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

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

resource belongs. options. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • migration_request_envelope (MigrateMySqlRequest)

    MySql migration

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Operation)

    operation results.



38613
38614
38615
38616
# 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) ⇒ Concurrent::Promise

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

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

resource belongs. options. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • migration_request_envelope (MigrateMySqlRequest)

    MySql migration

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



38652
38653
38654
38655
38656
38657
38658
38659
38660
38661
38662
38663
38664
38665
38666
38667
38668
38669
38670
38671
38672
38673
38674
38675
38676
38677
38678
38679
38680
38681
38682
38683
38684
38685
38686
38687
38688
38689
38690
38691
38692
38693
38694
38695
38696
38697
38698
38699
38700
38701
38702
38703
38704
38705
38706
38707
38708
38709
38710
38711
38712
38713
38714
38715
38716
# 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) ⇒ MsRestAzure::AzureOperationResponse

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

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

resource belongs. options. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • migration_request_envelope (MigrateMySqlRequest)

    MySql migration

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



38633
38634
38635
# 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) ⇒ StorageMigrationResponse

Restores a web app.

Restores a web app.

resource belongs. migrationOptions. will be added to the HTTP request.

Parameters:

  • subscription_name (String)

    Azure subscription.

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • migration_options (StorageMigrationOptions)

    Migration

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (StorageMigrationResponse)

    operation results.



38490
38491
38492
38493
# 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) ⇒ Concurrent::Promise

Restores a web app.

Restores a web app.

resource belongs. migrationOptions. to the HTTP request.

Parameters:

  • subscription_name (String)

    Azure subscription.

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • migration_options (StorageMigrationOptions)

    Migration

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



38531
38532
38533
38534
38535
38536
38537
38538
38539
38540
38541
38542
38543
38544
38545
38546
38547
38548
38549
38550
38551
38552
38553
38554
38555
38556
38557
38558
38559
38560
38561
38562
38563
38564
38565
38566
38567
38568
38569
38570
38571
38572
38573
38574
38575
38576
38577
38578
38579
38580
38581
38582
38583
38584
38585
38586
38587
38588
38589
38590
38591
38592
38593
38594
38595
38596
# 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) ⇒ MsRestAzure::AzureOperationResponse

Restores a web app.

Restores a web app.

resource belongs. migrationOptions. will be added to the HTTP request.

Parameters:

  • subscription_name (String)

    Azure subscription.

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • migration_options (StorageMigrationOptions)

    Migration

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



38511
38512
38513
# 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) ⇒ Object

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

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

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • backup_id (String)

    ID of the backup.

  • request (RestoreRequest)

    Information on restore request .

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



37913
37914
37915
37916
# 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) ⇒ Concurrent::Promise

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

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

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • backup_id (String)

    ID of the backup.

  • request (RestoreRequest)

    Information on restore request .

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



37952
37953
37954
37955
37956
37957
37958
37959
37960
37961
37962
37963
37964
37965
37966
37967
37968
37969
37970
37971
37972
37973
37974
37975
37976
37977
37978
37979
37980
37981
37982
37983
37984
37985
37986
37987
37988
37989
37990
37991
37992
37993
37994
37995
37996
37997
37998
37999
38000
38001
38002
38003
38004
38005
38006
38007
# 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) ⇒ Object

Restores an app from a backup blob in Azure Storage.

Restores an app from a backup blob in Azure Storage.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (RestoreRequest)

    Information on restore request .

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



38878
38879
38880
38881
# 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) ⇒ Concurrent::Promise

Restores an app from a backup blob in Azure Storage.

Restores an app from a backup blob in Azure Storage.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (RestoreRequest)

    Information on restore request .

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



38915
38916
38917
38918
38919
38920
38921
38922
38923
38924
38925
38926
38927
38928
38929
38930
38931
38932
38933
38934
38935
38936
38937
38938
38939
38940
38941
38942
38943
38944
38945
38946
38947
38948
38949
38950
38951
38952
38953
38954
38955
38956
38957
38958
38959
38960
38961
38962
38963
38964
38965
38966
38967
38968
38969
# 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) ⇒ Object

Restores an app from a backup blob in Azure Storage.

Restores an app from a backup blob in Azure Storage.

resource belongs. the API will restore a backup of the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (RestoreRequest)

    Information on restore request .

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



40234
40235
40236
40237
# 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) ⇒ Concurrent::Promise

Restores an app from a backup blob in Azure Storage.

Restores an app from a backup blob in Azure Storage.

resource belongs. the API will restore a backup of the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (RestoreRequest)

    Information on restore request .

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



40275
40276
40277
40278
40279
40280
40281
40282
40283
40284
40285
40286
40287
40288
40289
40290
40291
40292
40293
40294
40295
40296
40297
40298
40299
40300
40301
40302
40303
40304
40305
40306
40307
40308
40309
40310
40311
40312
40313
40314
40315
40316
40317
40318
40319
40320
40321
40322
40323
40324
40325
40326
40327
40328
40329
40330
# 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) ⇒ MsRestAzure::AzureOperationResponse

Restores an app from a backup blob in Azure Storage.

Restores an app from a backup blob in Azure Storage.

resource belongs. the API will restore a backup of the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (RestoreRequest)

    Information on restore request .

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



40255
40256
40257
# 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) ⇒ MsRestAzure::AzureOperationResponse

Restores an app from a backup blob in Azure Storage.

Restores an app from a backup blob in Azure Storage.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (RestoreRequest)

    Information on restore request .

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



38897
38898
38899
# 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) ⇒ Object

Restores a deleted web app to this web app.

Restores a deleted web app to this web app.

resource belongs. information. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • restore_request (DeletedAppRestoreRequest)

    Deleted web app restore

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



38985
38986
38987
38988
# 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) ⇒ Concurrent::Promise

Restores a deleted web app to this web app.

Restores a deleted web app to this web app.

resource belongs. information. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • restore_request (DeletedAppRestoreRequest)

    Deleted web app restore

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



39024
39025
39026
39027
39028
39029
39030
39031
39032
39033
39034
39035
39036
39037
39038
39039
39040
39041
39042
39043
39044
39045
39046
39047
39048
39049
39050
39051
39052
39053
39054
39055
39056
39057
39058
39059
39060
39061
39062
39063
39064
39065
39066
39067
39068
39069
39070
39071
39072
39073
39074
39075
39076
39077
39078
# 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) ⇒ Object

Restores a deleted web app to this web app.

Restores a deleted web app to this web app.

resource belongs. information. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • restore_request (DeletedAppRestoreRequest)

    Deleted web app restore

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



40348
40349
40350
40351
# 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) ⇒ Concurrent::Promise

Restores a deleted web app to this web app.

Restores a deleted web app to this web app.

resource belongs. information. to production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • restore_request (DeletedAppRestoreRequest)

    Deleted web app restore

  • slot (String)

    Name of web app slot. If not specified then will default

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



40391
40392
40393
40394
40395
40396
40397
40398
40399
40400
40401
40402
40403
40404
40405
40406
40407
40408
40409
40410
40411
40412
40413
40414
40415
40416
40417
40418
40419
40420
40421
40422
40423
40424
40425
40426
40427
40428
40429
40430
40431
40432
40433
40434
40435
40436
40437
40438
40439
40440
40441
40442
40443
40444
40445
40446
# 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) ⇒ MsRestAzure::AzureOperationResponse

Restores a deleted web app to this web app.

Restores a deleted web app to this web app.

resource belongs. information. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • restore_request (DeletedAppRestoreRequest)

    Deleted web app restore

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



40370
40371
40372
# 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) ⇒ MsRestAzure::AzureOperationResponse

Restores a deleted web app to this web app.

Restores a deleted web app to this web app.

resource belongs. information. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • restore_request (DeletedAppRestoreRequest)

    Deleted web app restore

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



39005
39006
39007
# 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) ⇒ Object

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

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

resource belongs. the API will restore a backup of the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • backup_id (String)

    ID of the backup.

  • request (RestoreRequest)

    Information on restore request .

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



39474
39475
39476
39477
# 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) ⇒ Concurrent::Promise

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

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

resource belongs. the API will restore a backup of the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • backup_id (String)

    ID of the backup.

  • request (RestoreRequest)

    Information on restore request .

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



39517
39518
39519
39520
39521
39522
39523
39524
39525
39526
39527
39528
39529
39530
39531
39532
39533
39534
39535
39536
39537
39538
39539
39540
39541
39542
39543
39544
39545
39546
39547
39548
39549
39550
39551
39552
39553
39554
39555
39556
39557
39558
39559
39560
39561
39562
39563
39564
39565
39566
39567
39568
39569
39570
39571
39572
39573
# 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) ⇒ MsRestAzure::AzureOperationResponse

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

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

resource belongs. the API will restore a backup of the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • backup_id (String)

    ID of the backup.

  • request (RestoreRequest)

    Information on restore request .

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



39496
39497
39498
# 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) ⇒ Object

Restores a web app from a snapshot.

Restores a web app from a snapshot.

resource belongs. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • restore_request (SnapshotRestoreRequest)

    Snapshot restore settings.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



39095
39096
39097
39098
# 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) ⇒ Concurrent::Promise

Restores a web app from a snapshot.

Restores a web app from a snapshot.

resource belongs. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • restore_request (SnapshotRestoreRequest)

    Snapshot restore settings.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



39136
39137
39138
39139
39140
39141
39142
39143
39144
39145
39146
39147
39148
39149
39150
39151
39152
39153
39154
39155
39156
39157
39158
39159
39160
39161
39162
39163
39164
39165
39166
39167
39168
39169
39170
39171
39172
39173
39174
39175
39176
39177
39178
39179
39180
39181
39182
39183
39184
39185
39186
39187
39188
39189
39190
# 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) ⇒ Object

Restores a web app from a snapshot.

Restores a web app from a snapshot.

resource belongs. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • restore_request (SnapshotRestoreRequest)

    Snapshot restore settings.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



40465
40466
40467
40468
# 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) ⇒ Concurrent::Promise

Restores a web app from a snapshot.

Restores a web app from a snapshot.

resource belongs. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. to production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • restore_request (SnapshotRestoreRequest)

    Snapshot restore settings.

  • slot (String)

    Name of web app slot. If not specified then will default

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



40510
40511
40512
40513
40514
40515
40516
40517
40518
40519
40520
40521
40522
40523
40524
40525
40526
40527
40528
40529
40530
40531
40532
40533
40534
40535
40536
40537
40538
40539
40540
40541
40542
40543
40544
40545
40546
40547
40548
40549
40550
40551
40552
40553
40554
40555
40556
40557
40558
40559
40560
40561
40562
40563
40564
40565
# 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) ⇒ MsRestAzure::AzureOperationResponse

Restores a web app from a snapshot.

Restores a web app from a snapshot.

resource belongs. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • restore_request (SnapshotRestoreRequest)

    Snapshot restore settings.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



40488
40489
40490
# 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) ⇒ MsRestAzure::AzureOperationResponse

Restores a web app from a snapshot.

Restores a web app from a snapshot.

resource belongs. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • restore_request (SnapshotRestoreRequest)

    Snapshot restore settings.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



39116
39117
39118
# 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) ⇒ MsRestAzure::AzureOperationResponse

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

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

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • backup_id (String)

    ID of the backup.

  • request (RestoreRequest)

    Information on restore request .

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



37933
37934
37935
# 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) ⇒ Object

Start capturing network packets for the site.

Start capturing network packets for the site.

resource belongs. seconds. (Optional). will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • duration_in_seconds (Integer) (defaults to: nil)

    The duration to keep capturing in

  • max_frame_length (Integer) (defaults to: nil)

    The maximum frame length in bytes

  • sas_url (String) (defaults to: nil)

    The Blob URL to store capture file.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



38736
38737
38738
38739
# 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) ⇒ Concurrent::Promise

Start capturing network packets for the site.

Start capturing network packets for the site.

resource belongs. seconds. (Optional). to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • duration_in_seconds (Integer) (defaults to: nil)

    The duration to keep capturing in

  • max_frame_length (Integer) (defaults to: nil)

    The maximum frame length in bytes

  • sas_url (String) (defaults to: nil)

    The Blob URL to store capture file.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



38781
38782
38783
38784
38785
38786
38787
38788
38789
38790
38791
38792
38793
38794
38795
38796
38797
38798
38799
38800
38801
38802
38803
38804
38805
38806
38807
38808
38809
38810
38811
38812
38813
38814
38815
38816
38817
38818
38819
38820
38821
38822
38823
38824
38825
38826
38827
38828
38829
38830
38831
38832
38833
38834
38835
38836
38837
38838
38839
38840
38841
38842
38843
38844
38845
38846
38847
38848
38849
38850
38851
38852
38853
38854
38855
38856
38857
38858
38859
38860
38861
38862
38863
# 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) ⇒ Object

Start capturing network packets for the site.

Start capturing network packets for the site.

resource belongs. seconds. (Optional). will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • slot (String)

    The name of the slot for this web app.

  • duration_in_seconds (Integer) (defaults to: nil)

    The duration to keep capturing in

  • max_frame_length (Integer) (defaults to: nil)

    The maximum frame length in bytes

  • sas_url (String) (defaults to: nil)

    The Blob URL to store capture file.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



40087
40088
40089
40090
# 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) ⇒ Concurrent::Promise

Start capturing network packets for the site.

Start capturing network packets for the site.

resource belongs. seconds. (Optional). to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • slot (String)

    The name of the slot for this web app.

  • duration_in_seconds (Integer) (defaults to: nil)

    The duration to keep capturing in

  • max_frame_length (Integer) (defaults to: nil)

    The maximum frame length in bytes

  • sas_url (String) (defaults to: nil)

    The Blob URL to store capture file.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



40134
40135
40136
40137
40138
40139
40140
40141
40142
40143
40144
40145
40146
40147
40148
40149
40150
40151
40152
40153
40154
40155
40156
40157
40158
40159
40160
40161
40162
40163
40164
40165
40166
40167
40168
40169
40170
40171
40172
40173
40174
40175
40176
40177
40178
40179
40180
40181
40182
40183
40184
40185
40186
40187
40188
40189
40190
40191
40192
40193
40194
40195
40196
40197
40198
40199
40200
40201
40202
40203
40204
40205
40206
40207
40208
40209
40210
40211
40212
40213
40214
40215
40216
40217
# 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) ⇒ MsRestAzure::AzureOperationResponse

Start capturing network packets for the site.

Start capturing network packets for the site.

resource belongs. seconds. (Optional). will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • slot (String)

    The name of the slot for this web app.

  • duration_in_seconds (Integer) (defaults to: nil)

    The duration to keep capturing in

  • max_frame_length (Integer) (defaults to: nil)

    The maximum frame length in bytes

  • sas_url (String) (defaults to: nil)

    The Blob URL to store capture file.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



40111
40112
40113
# 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) ⇒ MsRestAzure::AzureOperationResponse

Start capturing network packets for the site.

Start capturing network packets for the site.

resource belongs. seconds. (Optional). will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • duration_in_seconds (Integer) (defaults to: nil)

    The duration to keep capturing in

  • max_frame_length (Integer) (defaults to: nil)

    The maximum frame length in bytes

  • sas_url (String) (defaults to: nil)

    The Blob URL to store capture file.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



38759
38760
38761
# 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) ⇒ Object

Swaps two deployment slots of an app.

Swaps two deployment slots of an app.

resource belongs. slot name. See example. production slot is used as the source slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • slot (String)

    Name of the source slot. If a slot is not specified, the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



40710
40711
40712
40713
# 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) ⇒ Concurrent::Promise

Swaps two deployment slots of an app.

Swaps two deployment slots of an app.

resource belongs. slot name. See example. production slot is used as the source slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • slot (String)

    Name of the source slot. If a slot is not specified, the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



40753
40754
40755
40756
40757
40758
40759
40760
40761
40762
40763
40764
40765
40766
40767
40768
40769
40770
40771
40772
40773
40774
40775
40776
40777
40778
40779
40780
40781
40782
40783
40784
40785
40786
40787
40788
40789
40790
40791
40792
40793
40794
40795
40796
40797
40798
40799
40800
40801
40802
40803
40804
40805
40806
40807
40808
# 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) ⇒ MsRestAzure::AzureOperationResponse

Swaps two deployment slots of an app.

Swaps two deployment slots of an app.

resource belongs. slot name. See example. production slot is used as the source slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • slot (String)

    Name of the source slot. If a slot is not specified, the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



40732
40733
40734
# 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) ⇒ Object

Swaps two deployment slots of an app.

Swaps two deployment slots of an app.

resource belongs. slot name. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



40971
40972
40973
40974
# 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) ⇒ Concurrent::Promise

Swaps two deployment slots of an app.

Swaps two deployment slots of an app.

resource belongs. slot name. See example. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



41010
41011
41012
41013
41014
41015
41016
41017
41018
41019
41020
41021
41022
41023
41024
41025
41026
41027
41028
41029
41030
41031
41032
41033
41034
41035
41036
41037
41038
41039
41040
41041
41042
41043
41044
41045
41046
41047
41048
41049
41050
41051
41052
41053
41054
41055
41056
41057
41058
41059
41060
41061
41062
41063
41064
# 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) ⇒ MsRestAzure::AzureOperationResponse

Swaps two deployment slots of an app.

Swaps two deployment slots of an app.

resource belongs. slot name. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



40991
40992
40993
# 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) ⇒ Deployment

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

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

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    ID of an existing deployment.

  • deployment (Deployment)

    Deployment details.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Deployment)

    operation results.



5881
5882
5883
5884
# 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) ⇒ Concurrent::Promise

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

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

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    ID of an existing deployment.

  • deployment (Deployment)

    Deployment details.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
# 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) ⇒ Deployment

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

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

resource belongs. the API creates a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    ID of an existing deployment.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • deployment (Deployment)

    Deployment details.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Deployment)

    operation results.



21409
21410
21411
21412
# 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) ⇒ Concurrent::Promise

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

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

resource belongs. the API creates a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    ID of an existing deployment.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • deployment (Deployment)

    Deployment details.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



21452
21453
21454
21455
21456
21457
21458
21459
21460
21461
21462
21463
21464
21465
21466
21467
21468
21469
21470
21471
21472
21473
21474
21475
21476
21477
21478
21479
21480
21481
21482
21483
21484
21485
21486
21487
21488
21489
21490
21491
21492
21493
21494
21495
21496
21497
21498
21499
21500
21501
21502
21503
21504
21505
21506
21507
21508
21509
21510
21511
21512
21513
21514
21515
21516
21517
21518
# 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) ⇒ MsRestAzure::AzureOperationResponse

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

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

resource belongs. the API creates a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    ID of an existing deployment.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • deployment (Deployment)

    Deployment details.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



21431
21432
21433
# 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) ⇒ MsRestAzure::AzureOperationResponse

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

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

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    ID of an existing deployment.

  • deployment (Deployment)

    Deployment details.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



5901
5902
5903
# 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) ⇒ FunctionEnvelope

Create function for web site, or a deployment slot.

Create function for web site, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • function_envelope (FunctionEnvelope)

    Function details.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (FunctionEnvelope)

    operation results.



7519
7520
7521
7522
# 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) ⇒ Concurrent::Promise

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • function_envelope (FunctionEnvelope)

    Function details.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
# 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) ⇒ FunctionEnvelope

Create function for web site, or a deployment slot.

Create function for web site, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • function_envelope (FunctionEnvelope)

    Function details.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (FunctionEnvelope)

    operation results.



23149
23150
23151
23152
# 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) ⇒ Concurrent::Promise

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • function_envelope (FunctionEnvelope)

    Function details.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



23168
23169
23170
23171
23172
23173
23174
23175
23176
23177
23178
23179
23180
23181
23182
23183
23184
# 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) ⇒ MSDeployStatus

Invoke the MSDeploy web app extension.

Invoke the MSDeploy web app extension.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • instance_id (String)

    ID of web app instance.

  • msdeploy (MSDeploy)

    Details of MSDeploy operation

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MSDeployStatus)

    operation results.



9707
9708
9709
9710
# 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) ⇒ Concurrent::Promise

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • instance_id (String)

    ID of web app instance.

  • msdeploy (MSDeploy)

    Details of MSDeploy operation

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
# 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) ⇒ MSDeployStatus

Invoke the MSDeploy web app extension.

Invoke the MSDeploy web app extension.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • instance_id (String)

    ID of web app instance.

  • msdeploy (MSDeploy)

    Details of MSDeploy operation

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MSDeployStatus)

    operation results.



25456
25457
25458
25459
# 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) ⇒ Concurrent::Promise

resource belongs. to production slot. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • instance_id (String)

    ID of web app instance.

  • msdeploy (MSDeploy)

    Details of MSDeploy operation

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



25475
25476
25477
25478
25479
25480
25481
25482
25483
25484
25485
25486
25487
25488
25489
25490
25491
# 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) ⇒ MSDeployStatus

Invoke the MSDeploy web app extension.

Invoke the MSDeploy web app extension.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • msdeploy (MSDeploy)

    Details of MSDeploy operation

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MSDeployStatus)

    operation results.



7035
7036
7037
7038
# 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) ⇒ Concurrent::Promise

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • msdeploy (MSDeploy)

    Details of MSDeploy operation

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
# 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) ⇒ MSDeployStatus

Invoke the MSDeploy web app extension.

Invoke the MSDeploy web app extension.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • msdeploy (MSDeploy)

    Details of MSDeploy operation

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MSDeployStatus)

    operation results.



22633
22634
22635
22636
# 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) ⇒ Concurrent::Promise

resource belongs. to production slot. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • msdeploy (MSDeploy)

    Details of MSDeploy operation

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



22651
22652
22653
22654
22655
22656
22657
22658
22659
22660
22661
22662
22663
22664
22665
22666
22667
# 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) ⇒ Site

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.

resource belongs. update a deployment slot, use the slot parameter. example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Unique name of the app to create or update. To create or

  • site_envelope (Site)

    A JSON representation of the app properties. See

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Site)

    operation results.



351
352
353
354
# 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) ⇒ Concurrent::Promise

resource belongs. update a deployment slot, use the slot parameter. example. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Unique name of the app to create or update. To create or

  • site_envelope (Site)

    A JSON representation of the app properties. See

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
# 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) ⇒ SiteConfigResource

Updates the configuration of an app.

Updates the configuration of an app.

resource belongs. object. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_config (SiteConfigResource)

    JSON representation of a SiteConfig

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteConfigResource)

    operation results.



4365
4366
4367
4368
# 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) ⇒ Concurrent::Promise

Updates the configuration of an app.

Updates the configuration of an app.

resource belongs. object. See example. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_config (SiteConfigResource)

    JSON representation of a SiteConfig

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
# 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) ⇒ SiteConfigResource

Updates the configuration of an app.

Updates the configuration of an app.

resource belongs. object. See example. the API will update configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_config (SiteConfigResource)

    JSON representation of a SiteConfig

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteConfigResource)

    operation results.



19795
19796
19797
19798
# 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) ⇒ Concurrent::Promise

Updates the configuration of an app.

Updates the configuration of an app.

resource belongs. object. See example. the API will update configuration for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_config (SiteConfigResource)

    JSON representation of a SiteConfig

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



19838
19839
19840
19841
19842
19843
19844
19845
19846
19847
19848
19849
19850
19851
19852
19853
19854
19855
19856
19857
19858
19859
19860
19861
19862
19863
19864
19865
19866
19867
19868
19869
19870
19871
19872
19873
19874
19875
19876
19877
19878
19879
19880
19881
19882
19883
19884
19885
19886
19887
19888
19889
19890
19891
19892
19893
19894
19895
19896
19897
19898
19899
19900
19901
19902
19903
# 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) ⇒ MsRestAzure::AzureOperationResponse

Updates the configuration of an app.

Updates the configuration of an app.

resource belongs. object. See example. the API will update configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_config (SiteConfigResource)

    JSON representation of a SiteConfig

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



19817
19818
19819
# 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) ⇒ MsRestAzure::AzureOperationResponse

Updates the configuration of an app.

Updates the configuration of an app.

resource belongs. object. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_config (SiteConfigResource)

    JSON representation of a SiteConfig

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



4385
4386
4387
# 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) ⇒ Identifier

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.

resource belongs. identifier. domain ownership properties. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • domain_ownership_identifier (Identifier)

    A JSON representation of the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Identifier)

    operation results.



6566
6567
6568
6569
# 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) ⇒ Concurrent::Promise

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.

resource belongs. identifier. domain ownership properties. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • domain_ownership_identifier (Identifier)

    A JSON representation of the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
# 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) ⇒ Identifier

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.

resource belongs. identifier. domain ownership properties. the API will delete the binding for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • domain_ownership_identifier (Identifier)

    A JSON representation of the

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Identifier)

    operation results.



22136
22137
22138
22139
# 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) ⇒ Concurrent::Promise

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.

resource belongs. identifier. domain ownership properties. the API will delete the binding for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • domain_ownership_identifier (Identifier)

    A JSON representation of the

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



22187
22188
22189
22190
22191
22192
22193
22194
22195
22196
22197
22198
22199
22200
22201
22202
22203
22204
22205
22206
22207
22208
22209
22210
22211
22212
22213
22214
22215
22216
22217
22218
22219
22220
22221
22222
22223
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
22235
22236
22237
22238
22239
22240
22241
22242
22243
22244
22245
22246
22247
22248
22249
22250
22251
22252
22253
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. identifier. domain ownership properties. the API will delete the binding for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • domain_ownership_identifier (Identifier)

    A JSON representation of the

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



22162
22163
22164
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. identifier. domain ownership properties. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • domain_ownership_identifier (Identifier)

    A JSON representation of the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



6590
6591
6592
# 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) ⇒ HostNameBinding

Creates a hostname binding for an app.

Creates a hostname binding for an app.

resource belongs. representation of a HostNameBinding object. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • host_name (String)

    Hostname in the hostname binding.

  • host_name_binding (HostNameBinding)

    Binding details. This is the JSON

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (HostNameBinding)

    operation results.



7995
7996
7997
7998
# 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) ⇒ Concurrent::Promise

Creates a hostname binding for an app.

Creates a hostname binding for an app.

resource belongs. representation of a HostNameBinding object. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • host_name (String)

    Hostname in the hostname binding.

  • host_name_binding (HostNameBinding)

    Binding details. This is the JSON

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
# 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) ⇒ HostNameBinding

Creates a hostname binding for an app.

Creates a hostname binding for an app.

resource belongs. representation of a HostNameBinding object. the API will create a binding for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • host_name (String)

    Hostname in the hostname binding.

  • host_name_binding (HostNameBinding)

    Binding details. This is the JSON

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (HostNameBinding)

    operation results.



23657
23658
23659
23660
# 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) ⇒ Concurrent::Promise

Creates a hostname binding for an app.

Creates a hostname binding for an app.

resource belongs. representation of a HostNameBinding object. the API will create a binding for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • host_name (String)

    Hostname in the hostname binding.

  • host_name_binding (HostNameBinding)

    Binding details. This is the JSON

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



23702
23703
23704
23705
23706
23707
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
23722
23723
23724
23725
23726
23727
23728
23729
23730
23731
23732
23733
23734
23735
23736
23737
23738
23739
23740
23741
23742
23743
23744
23745
23746
23747
23748
23749
23750
23751
23752
23753
23754
23755
23756
23757
23758
23759
23760
23761
23762
23763
23764
23765
23766
23767
23768
# 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) ⇒ MsRestAzure::AzureOperationResponse

Creates a hostname binding for an app.

Creates a hostname binding for an app.

resource belongs. representation of a HostNameBinding object. the API will create a binding for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • host_name (String)

    Hostname in the hostname binding.

  • host_name_binding (HostNameBinding)

    Binding details. This is the JSON

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



23680
23681
23682
# 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) ⇒ MsRestAzure::AzureOperationResponse

Creates a hostname binding for an app.

Creates a hostname binding for an app.

resource belongs. representation of a HostNameBinding object. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • host_name (String)

    Hostname in the hostname binding.

  • host_name_binding (HostNameBinding)

    Binding details. This is the JSON

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



8016
8017
8018
# 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) ⇒ HybridConnection

Creates a new Hybrid Connection using a Service Bus relay.

Creates a new Hybrid Connection using a Service Bus relay.

resource belongs. connection. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • connection_envelope (HybridConnection)

    The details of the hybrid

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (HybridConnection)

    operation results.



8333
8334
8335
8336
# 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) ⇒ Concurrent::Promise

Creates a new Hybrid Connection using a Service Bus relay.

Creates a new Hybrid Connection using a Service Bus relay.

resource belongs. connection. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • connection_envelope (HybridConnection)

    The details of the hybrid

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
# 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) ⇒ HybridConnection

Creates a new Hybrid Connection using a Service Bus relay.

Creates a new Hybrid Connection using a Service Bus relay.

resource belongs. connection. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • connection_envelope (HybridConnection)

    The details of the hybrid

  • slot (String)

    The name of the slot for the web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (HybridConnection)

    operation results.



24012
24013
24014
24015
# 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) ⇒ Concurrent::Promise

Creates a new Hybrid Connection using a Service Bus relay.

Creates a new Hybrid Connection using a Service Bus relay.

resource belongs. connection. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • connection_envelope (HybridConnection)

    The details of the hybrid

  • slot (String)

    The name of the slot for the web app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



24057
24058
24059
24060
24061
24062
24063
24064
24065
24066
24067
24068
24069
24070
24071
24072
24073
24074
24075
24076
24077
24078
24079
24080
24081
24082
24083
24084
24085
24086
24087
24088
24089
24090
24091
24092
24093
24094
24095
24096
24097
24098
24099
24100
24101
24102
24103
24104
24105
24106
24107
24108
24109
24110
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
# 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) ⇒ MsRestAzure::AzureOperationResponse

Creates a new Hybrid Connection using a Service Bus relay.

Creates a new Hybrid Connection using a Service Bus relay.

resource belongs. connection. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • connection_envelope (HybridConnection)

    The details of the hybrid

  • slot (String)

    The name of the slot for the web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



24035
24036
24037
# 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) ⇒ MsRestAzure::AzureOperationResponse

Creates a new Hybrid Connection using a Service Bus relay.

Creates a new Hybrid Connection using a Service Bus relay.

resource belongs. connection. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • connection_envelope (HybridConnection)

    The details of the hybrid

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



8355
8356
8357
# 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) ⇒ PublicCertificate

Creates a hostname binding for an app.

Creates a hostname binding for an app.

resource belongs. This is the JSON representation of a PublicCertificate object. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • public_certificate_name (String)

    Public certificate name.

  • public_certificate (PublicCertificate)

    Public certificate details.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PublicCertificate)

    operation results.



14480
14481
14482
14483
# 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) ⇒ Concurrent::Promise

Creates a hostname binding for an app.

Creates a hostname binding for an app.

resource belongs. This is the JSON representation of a PublicCertificate object. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • public_certificate_name (String)

    Public certificate name.

  • public_certificate (PublicCertificate)

    Public certificate details.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
# 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) ⇒ PublicCertificate

Creates a hostname binding for an app.

Creates a hostname binding for an app.

resource belongs. This is the JSON representation of a PublicCertificate object. the API will create a binding for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • public_certificate_name (String)

    Public certificate name.

  • public_certificate (PublicCertificate)

    Public certificate details.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PublicCertificate)

    operation results.



30391
30392
30393
30394
# 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) ⇒ Concurrent::Promise

Creates a hostname binding for an app.

Creates a hostname binding for an app.

resource belongs. This is the JSON representation of a PublicCertificate object. the API will create a binding for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • public_certificate_name (String)

    Public certificate name.

  • public_certificate (PublicCertificate)

    Public certificate details.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



30436
30437
30438
30439
30440
30441
30442
30443
30444
30445
30446
30447
30448
30449
30450
30451
30452
30453
30454
30455
30456
30457
30458
30459
30460
30461
30462
30463
30464
30465
30466
30467
30468
30469
30470
30471
30472
30473
30474
30475
30476
30477
30478
30479
30480
30481
30482
30483
30484
30485
30486
30487
30488
30489
30490
30491
30492
30493
30494
30495
30496
30497
30498
30499
30500
30501
30502
# 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) ⇒ MsRestAzure::AzureOperationResponse

Creates a hostname binding for an app.

Creates a hostname binding for an app.

resource belongs. This is the JSON representation of a PublicCertificate object. the API will create a binding for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • public_certificate_name (String)

    Public certificate name.

  • public_certificate (PublicCertificate)

    Public certificate details.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



30414
30415
30416
# 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) ⇒ MsRestAzure::AzureOperationResponse

Creates a hostname binding for an app.

Creates a hostname binding for an app.

resource belongs. This is the JSON representation of a PublicCertificate object. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • public_certificate_name (String)

    Public certificate name.

  • public_certificate (PublicCertificate)

    Public certificate details.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



14501
14502
14503
# 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) ⇒ RelayServiceConnectionEntity

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).

resource belongs. hybrid connection configuration. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection configuration.

  • connection_envelope (RelayServiceConnectionEntity)

    Details of the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (RelayServiceConnectionEntity)

    operation results.



9135
9136
9137
9138
# 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) ⇒ Concurrent::Promise

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).

resource belongs. hybrid connection configuration. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection configuration.

  • connection_envelope (RelayServiceConnectionEntity)

    Details of the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
# 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) ⇒ RelayServiceConnectionEntity

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).

resource belongs. hybrid connection configuration. the API will create or update a hybrid connection for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection configuration.

  • connection_envelope (RelayServiceConnectionEntity)

    Details of the

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (RelayServiceConnectionEntity)

    operation results.



24849
24850
24851
24852
# 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) ⇒ Concurrent::Promise

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).

resource belongs. hybrid connection configuration. the API will create or update a hybrid connection for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection configuration.

  • connection_envelope (RelayServiceConnectionEntity)

    Details of the

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



24898
24899
24900
24901
24902
24903
24904
24905
24906
24907
24908
24909
24910
24911
24912
24913
24914
24915
24916
24917
24918
24919
24920
24921
24922
24923
24924
24925
24926
24927
24928
24929
24930
24931
24932
24933
24934
24935
24936
24937
24938
24939
24940
24941
24942
24943
24944
24945
24946
24947
24948
24949
24950
24951
24952
24953
24954
24955
24956
24957
24958
24959
24960
24961
24962
24963
24964
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. hybrid connection configuration. the API will create or update a hybrid connection for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection configuration.

  • connection_envelope (RelayServiceConnectionEntity)

    Details of the

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



24874
24875
24876
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. hybrid connection configuration. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection configuration.

  • connection_envelope (RelayServiceConnectionEntity)

    Details of the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



9158
9159
9160
# 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) ⇒ Site

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.

resource belongs. update a deployment slot, use the slot parameter. example. default, this API attempts to create or modify the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Unique name of the app to create or update. To create or

  • site_envelope (Site)

    A JSON representation of the app properties. See

  • slot (String)

    Name of the deployment slot to create or update. By

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Site)

    operation results.



15777
15778
15779
15780
# 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) ⇒ Concurrent::Promise

resource belongs. update a deployment slot, use the slot parameter. example. default, this API attempts to create or modify the production slot. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Unique name of the app to create or update. To create or

  • site_envelope (Site)

    A JSON representation of the app properties. See

  • slot (String)

    Name of the deployment slot to create or update. By

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
# 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) ⇒ SiteSourceControl

Updates the source control configuration of an app.

Updates the source control configuration of an app.

resource belongs. SiteSourceControl object. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_source_control (SiteSourceControl)

    JSON representation of a

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteSourceControl)

    operation results.



35149
35150
35151
35152
# 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) ⇒ Concurrent::Promise

resource belongs. SiteSourceControl object. See example. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_source_control (SiteSourceControl)

    JSON representation of a

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



35166
35167
35168
35169
35170
35171
35172
35173
35174
35175
35176
35177
35178
35179
35180
35181
35182
# 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) ⇒ SiteSourceControl

Updates the source control configuration of an app.

Updates the source control configuration of an app.

resource belongs. SiteSourceControl object. See example. the API will update the source control configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_source_control (SiteSourceControl)

    JSON representation of a

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteSourceControl)

    operation results.



31956
31957
31958
31959
# 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) ⇒ Concurrent::Promise

resource belongs. SiteSourceControl object. See example. the API will update the source control configuration for the production slot. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_source_control (SiteSourceControl)

    JSON representation of a

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



31975
31976
31977
31978
31979
31980
31981
31982
31983
31984
31985
31986
31987
31988
31989
31990
31991
# 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) ⇒ SwiftVirtualNetwork

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.

resource belongs. Network connection. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • connection_envelope (SwiftVirtualNetwork)

    Properties of the Virtual

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SwiftVirtualNetwork)

    operation results.



3888
3889
3890
3891
# 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) ⇒ Concurrent::Promise

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.

resource belongs. Network connection. See example. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • connection_envelope (SwiftVirtualNetwork)

    Properties of the Virtual

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
# 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) ⇒ SwiftVirtualNetwork

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.

resource belongs. Network connection. See example. the API will add or update connections for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • connection_envelope (SwiftVirtualNetwork)

    Properties of the Virtual

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SwiftVirtualNetwork)

    operation results.



19290
19291
19292
19293
# 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) ⇒ Concurrent::Promise

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.

resource belongs. Network connection. See example. the API will add or update connections for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • connection_envelope (SwiftVirtualNetwork)

    Properties of the Virtual

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



19345
19346
19347
19348
19349
19350
19351
19352
19353
19354
19355
19356
19357
19358
19359
19360
19361
19362
19363
19364
19365
19366
19367
19368
19369
19370
19371
19372
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386
19387
19388
19389
19390
19391
19392
19393
19394
19395
19396
19397
19398
19399
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. Network connection. See example. the API will add or update connections for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • connection_envelope (SwiftVirtualNetwork)

    Properties of the Virtual

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



19318
19319
19320
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. Network connection. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • connection_envelope (SwiftVirtualNetwork)

    Properties of the Virtual

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3914
3915
3916
# 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) ⇒ VnetInfo

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).

resource belongs. connection. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of an existing Virtual Network.

  • connection_envelope (VnetInfo)

    Properties of the Virtual Network

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (VnetInfo)

    operation results.



36818
36819
36820
36821
# 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) ⇒ Concurrent::Promise

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).

resource belongs. connection. See example. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of an existing Virtual Network.

  • connection_envelope (VnetInfo)

    Properties of the Virtual Network

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



36863
36864
36865
36866
36867
36868
36869
36870
36871
36872
36873
36874
36875
36876
36877
36878
36879
36880
36881
36882
36883
36884
36885
36886
36887
36888
36889
36890
36891
36892
36893
36894
36895
36896
36897
36898
36899
36900
36901
36902
36903
36904
36905
36906
36907
36908
36909
36910
36911
36912
36913
36914
36915
36916
36917
36918
36919
36920
36921
36922
36923
36924
36925
36926
36927
36928
# 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) ⇒ VnetGateway

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).

resource belongs. supported string is “primary”. gateway with. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the Virtual Network.

  • gateway_name (String)

    Name of the gateway. Currently, the only

  • connection_envelope (VnetGateway)

    The properties to update this

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (VnetGateway)

    operation results.



37300
37301
37302
37303
# 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) ⇒ Concurrent::Promise

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).

resource belongs. supported string is “primary”. gateway with. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the Virtual Network.

  • gateway_name (String)

    Name of the gateway. Currently, the only

  • connection_envelope (VnetGateway)

    The properties to update this

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



37345
37346
37347
37348
37349
37350
37351
37352
37353
37354
37355
37356
37357
37358
37359
37360
37361
37362
37363
37364
37365
37366
37367
37368
37369
37370
37371
37372
37373
37374
37375
37376
37377
37378
37379
37380
37381
37382
37383
37384
37385
37386
37387
37388
37389
37390
37391
37392
37393
37394
37395
37396
37397
37398
37399
37400
37401
37402
37403
37404
37405
37406
37407
37408
37409
37410
37411
# 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) ⇒ VnetGateway

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).

resource belongs. supported string is “primary”. gateway with. the API will add or update a gateway for the production slot’s Virtual Network. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the Virtual Network.

  • gateway_name (String)

    Name of the gateway. Currently, the only

  • connection_envelope (VnetGateway)

    The properties to update this

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (VnetGateway)

    operation results.



34245
34246
34247
34248
# 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) ⇒ Concurrent::Promise

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).

resource belongs. supported string is “primary”. gateway with. the API will add or update a gateway for the production slot’s Virtual Network. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the Virtual Network.

  • gateway_name (String)

    Name of the gateway. Currently, the only

  • connection_envelope (VnetGateway)

    The properties to update this

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



34296
34297
34298
34299
34300
34301
34302
34303
34304
34305
34306
34307
34308
34309
34310
34311
34312
34313
34314
34315
34316
34317
34318
34319
34320
34321
34322
34323
34324
34325
34326
34327
34328
34329
34330
34331
34332
34333
34334
34335
34336
34337
34338
34339
34340
34341
34342
34343
34344
34345
34346
34347
34348
34349
34350
34351
34352
34353
34354
34355
34356
34357
34358
34359
34360
34361
34362
34363
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. supported string is “primary”. gateway with. the API will add or update a gateway for the production slot’s Virtual Network. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the Virtual Network.

  • gateway_name (String)

    Name of the gateway. Currently, the only

  • connection_envelope (VnetGateway)

    The properties to update this

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



34271
34272
34273
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. supported string is “primary”. gateway with. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the Virtual Network.

  • gateway_name (String)

    Name of the gateway. Currently, the only

  • connection_envelope (VnetGateway)

    The properties to update this

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



37323
37324
37325
# 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) ⇒ VnetInfo

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).

resource belongs. connection. See example. the API will add or update connections for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of an existing Virtual Network.

  • connection_envelope (VnetInfo)

    Properties of the Virtual Network

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (VnetInfo)

    operation results.



33734
33735
33736
33737
# 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) ⇒ Concurrent::Promise

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).

resource belongs. connection. See example. the API will add or update connections for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of an existing Virtual Network.

  • connection_envelope (VnetInfo)

    Properties of the Virtual Network

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



33783
33784
33785
33786
33787
33788
33789
33790
33791
33792
33793
33794
33795
33796
33797
33798
33799
33800
33801
33802
33803
33804
33805
33806
33807
33808
33809
33810
33811
33812
33813
33814
33815
33816
33817
33818
33819
33820
33821
33822
33823
33824
33825
33826
33827
33828
33829
33830
33831
33832
33833
33834
33835
33836
33837
33838
33839
33840
33841
33842
33843
33844
33845
33846
33847
33848
33849
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. connection. See example. the API will add or update connections for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of an existing Virtual Network.

  • connection_envelope (VnetInfo)

    Properties of the Virtual Network

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



33759
33760
33761
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. connection. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of an existing Virtual Network.

  • connection_envelope (VnetInfo)

    Properties of the Virtual Network

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



36841
36842
36843
# 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) ⇒ Object

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.

resource belongs. 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. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app to delete.

  • delete_metrics (Boolean) (defaults to: nil)

    If true, web app metrics are also deleted.

  • delete_empty_server_farm (Boolean) (defaults to: nil)

    Specify true if the App Service

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



403
404
405
406
# 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) ⇒ Concurrent::Promise

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.

resource belongs. 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. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app to delete.

  • delete_metrics (Boolean) (defaults to: nil)

    If true, web app metrics are also deleted.

  • delete_empty_server_farm (Boolean) (defaults to: nil)

    Specify true if the App Service

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
# 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) ⇒ Object

Deletes a backup of an app by its ID.

Deletes a backup of an app by its ID.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • backup_id (String)

    ID of the backup.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



1206
1207
1208
1209
# 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) ⇒ Concurrent::Promise

Deletes a backup of an app by its ID.

Deletes a backup of an app by its ID.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • backup_id (String)

    ID of the backup.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
# 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) ⇒ Object

Deletes the backup configuration of an app.

Deletes the backup configuration of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



2387
2388
2389
2390
# 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) ⇒ Concurrent::Promise

Deletes the backup configuration of an app.

Deletes the backup configuration of an app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
# 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) ⇒ Object

Deletes the backup configuration of an app.

Deletes the backup configuration of an app.

resource belongs. the API will delete the backup configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



17946
17947
17948
17949
# 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) ⇒ Concurrent::Promise

Deletes the backup configuration of an app.

Deletes the backup configuration of an app.

resource belongs. the API will delete the backup configuration for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
# 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) ⇒ MsRestAzure::AzureOperationResponse

Deletes the backup configuration of an app.

Deletes the backup configuration of an app.

resource belongs. the API will delete the backup configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



17966
17967
17968
# 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) ⇒ MsRestAzure::AzureOperationResponse

Deletes the backup configuration of an app.

Deletes the backup configuration of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2405
2406
2407
# 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) ⇒ Object

Deletes a backup of an app by its ID.

Deletes a backup of an app by its ID.

resource belongs. the API will delete a backup of the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • backup_id (String)

    ID of the backup.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



16685
16686
16687
16688
# 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) ⇒ Concurrent::Promise

Deletes a backup of an app by its ID.

Deletes a backup of an app by its ID.

resource belongs. the API will delete a backup of the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • backup_id (String)

    ID of the backup.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
# 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) ⇒ MsRestAzure::AzureOperationResponse

Deletes a backup of an app by its ID.

Deletes a backup of an app by its ID.

resource belongs. the API will delete a backup of the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • backup_id (String)

    ID of the backup.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



16706
16707
16708
# 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) ⇒ MsRestAzure::AzureOperationResponse

Deletes a backup of an app by its ID.

Deletes a backup of an app by its ID.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • backup_id (String)

    ID of the backup.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1225
1226
1227
# 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) ⇒ Object

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



5366
5367
5368
5369
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
# 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) ⇒ Object

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.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



20859
20860
20861
20862
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API deletes a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



20900
20901
20902
20903
20904
20905
20906
20907
20908
20909
20910
20911
20912
20913
20914
20915
20916
20917
20918
20919
20920
20921
20922
20923
20924
20925
20926
20927
20928
20929
20930
20931
20932
20933
20934
20935
20936
20937
20938
20939
20940
20941
20942
20943
20944
20945
20946
20947
20948
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



20880
20881
20882
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



5385
5386
5387
# 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) ⇒ Object

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    Deployment ID.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



6000
6001
6002
6003
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    Deployment ID.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
# 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) ⇒ Object

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.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    Deployment ID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



21535
21536
21537
21538
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API deletes a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    Deployment ID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



21576
21577
21578
21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
21607
21608
21609
21610
21611
21612
21613
21614
21615
21616
21617
21618
21619
21620
21621
21622
21623
21624
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    Deployment ID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



21556
21557
21558
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    Deployment ID.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



6019
6020
6021
# 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) ⇒ Object

Deletes a domain ownership identifier for a web app.

Deletes a domain ownership identifier for a web app.

resource belongs. identifier. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



6694
6695
6696
6697
# 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) ⇒ Concurrent::Promise

Deletes a domain ownership identifier for a web app.

Deletes a domain ownership identifier for a web app.

resource belongs. identifier. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
# 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) ⇒ Object

Deletes a domain ownership identifier for a web app.

Deletes a domain ownership identifier for a web app.

resource belongs. identifier. the API will delete the binding for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



22271
22272
22273
22274
# 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) ⇒ Concurrent::Promise

Deletes a domain ownership identifier for a web app.

Deletes a domain ownership identifier for a web app.

resource belongs. identifier. the API will delete the binding for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



22314
22315
22316
22317
22318
22319
22320
22321
22322
22323
22324
22325
22326
22327
22328
22329
22330
22331
22332
22333
22334
22335
22336
22337
22338
22339
22340
22341
22342
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353
22354
22355
22356
22357
22358
22359
22360
22361
22362
# 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) ⇒ MsRestAzure::AzureOperationResponse

Deletes a domain ownership identifier for a web app.

Deletes a domain ownership identifier for a web app.

resource belongs. identifier. the API will delete the binding for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



22293
22294
22295
# 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) ⇒ MsRestAzure::AzureOperationResponse

Deletes a domain ownership identifier for a web app.

Deletes a domain ownership identifier for a web app.

resource belongs. identifier. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



6714
6715
6716
# 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) ⇒ Object

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

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

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



7567
7568
7569
7570
# 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) ⇒ Concurrent::Promise

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

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

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
# 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) ⇒ MsRestAzure::AzureOperationResponse

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

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

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



7586
7587
7588
# 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) ⇒ Object

Deletes a hostname binding for an app.

Deletes a hostname binding for an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • host_name (String)

    Hostname in the hostname binding.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



8116
8117
8118
8119
# 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) ⇒ Concurrent::Promise

Deletes a hostname binding for an app.

Deletes a hostname binding for an app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • host_name (String)

    Hostname in the hostname binding.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
# 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) ⇒ Object

Deletes a hostname binding for an app.

Deletes a hostname binding for an app.

resource belongs. the API will delete the binding for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • host_name (String)

    Hostname in the hostname binding.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



23785
23786
23787
23788
# 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) ⇒ Concurrent::Promise

Deletes a hostname binding for an app.

Deletes a hostname binding for an app.

resource belongs. the API will delete the binding for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • host_name (String)

    Hostname in the hostname binding.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



23826
23827
23828
23829
23830
23831
23832
23833
23834
23835
23836
23837
23838
23839
23840
23841
23842
23843
23844
23845
23846
23847
23848
23849
23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
23860
23861
23862
23863
23864
23865
23866
23867
23868
23869
23870
23871
23872
23873
23874
# 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) ⇒ MsRestAzure::AzureOperationResponse

Deletes a hostname binding for an app.

Deletes a hostname binding for an app.

resource belongs. the API will delete the binding for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • host_name (String)

    Hostname in the hostname binding.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



23806
23807
23808
# 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) ⇒ MsRestAzure::AzureOperationResponse

Deletes a hostname binding for an app.

Deletes a hostname binding for an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • host_name (String)

    Hostname in the hostname binding.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



8135
8136
8137
# 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) ⇒ Object

Removes a Hybrid Connection from this site.

Removes a Hybrid Connection from this site.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



8458
8459
8460
8461
# 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) ⇒ Concurrent::Promise

Removes a Hybrid Connection from this site.

Removes a Hybrid Connection from this site.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
# 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) ⇒ Object

Removes a Hybrid Connection from this site.

Removes a Hybrid Connection from this site.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • slot (String)

    The name of the slot for the web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



24141
24142
24143
24144
# 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) ⇒ Concurrent::Promise

Removes a Hybrid Connection from this site.

Removes a Hybrid Connection from this site.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • slot (String)

    The name of the slot for the web app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



24182
24183
24184
24185
24186
24187
24188
24189
24190
24191
24192
24193
24194
24195
24196
24197
24198
24199
24200
24201
24202
24203
24204
24205
24206
24207
24208
24209
24210
24211
24212
24213
24214
24215
24216
24217
24218
24219
24220
24221
24222
24223
24224
24225
24226
24227
24228
24229
24230
24231
# 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) ⇒ MsRestAzure::AzureOperationResponse

Removes a Hybrid Connection from this site.

Removes a Hybrid Connection from this site.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • slot (String)

    The name of the slot for the web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



24162
24163
24164
# 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) ⇒ MsRestAzure::AzureOperationResponse

Removes a Hybrid Connection from this site.

Removes a Hybrid Connection from this site.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



8478
8479
8480
# 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) ⇒ Object

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

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

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



23201
23202
23203
23204
# 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) ⇒ Concurrent::Promise

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

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

resource belongs. the API deletes a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



23242
23243
23244
23245
23246
23247
23248
23249
23250
23251
23252
23253
23254
23255
23256
23257
23258
23259
23260
23261
23262
23263
23264
23265
23266
23267
23268
23269
23270
23271
23272
23273
23274
23275
23276
23277
23278
23279
23280
23281
23282
23283
23284
23285
23286
23287
23288
23289
23290
# 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) ⇒ MsRestAzure::AzureOperationResponse

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

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

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



23222
23223
23224
# 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) ⇒ Object

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



10118
10119
10120
10121
# 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) ⇒ Concurrent::Promise

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
# 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) ⇒ Object

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



25892
25893
25894
25895
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



25943
25944
25945
25946
25947
25948
25949
25950
25951
25952
25953
25954
25955
25956
25957
25958
25959
25960
25961
25962
25963
25964
25965
25966
25967
25968
25969
25970
25971
25972
25973
25974
25975
25976
25977
25978
25979
25980
25981
25982
25983
25984
25985
25986
25987
25988
25989
25990
25991
25992
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



25918
25919
25920
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



10142
10143
10144
# 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) ⇒ Object

Delete a premier add-on from an app.

Delete a premier add-on from an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



12869
12870
12871
12872
# 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) ⇒ Concurrent::Promise

Delete a premier add-on from an app.

Delete a premier add-on from an app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
# 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) ⇒ Object

Delete a premier add-on from an app.

Delete a premier add-on from an app.

resource belongs. the API will delete the named add-on for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



28688
28689
28690
28691
# 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) ⇒ Concurrent::Promise

Delete a premier add-on from an app.

Delete a premier add-on from an app.

resource belongs. the API will delete the named add-on for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



28729
28730
28731
28732
28733
28734
28735
28736
28737
28738
28739
28740
28741
28742
28743
28744
28745
28746
28747
28748
28749
28750
28751
28752
28753
28754
28755
28756
28757
28758
28759
28760
28761
28762
28763
28764
28765
28766
28767
28768
28769
28770
28771
28772
28773
28774
28775
28776
28777
# 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) ⇒ MsRestAzure::AzureOperationResponse

Delete a premier add-on from an app.

Delete a premier add-on from an app.

resource belongs. the API will delete the named add-on for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



28709
28710
28711
# 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) ⇒ MsRestAzure::AzureOperationResponse

Delete a premier add-on from an app.

Delete a premier add-on from an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



12888
12889
12890
# 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) ⇒ Object

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



13557
13558
13559
13560
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
# 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) ⇒ Object

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.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



29412
29413
29414
29415
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API returns deployments for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



29457
29458
29459
29460
29461
29462
29463
29464
29465
29466
29467
29468
29469
29470
29471
29472
29473
29474
29475
29476
29477
29478
29479
29480
29481
29482
29483
29484
29485
29486
29487
29488
29489
29490
29491
29492
29493
29494
29495
29496
29497
29498
29499
29500
29501
29502
29503
29504
29505
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



29435
29436
29437
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



13578
13579
13580
# 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) ⇒ Object

Deletes a hostname binding for an app.

Deletes a hostname binding for an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • public_certificate_name (String)

    Public certificate name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



14601
14602
14603
14604
# 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) ⇒ Concurrent::Promise

Deletes a hostname binding for an app.

Deletes a hostname binding for an app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • public_certificate_name (String)

    Public certificate name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
# 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) ⇒ Object

Deletes a hostname binding for an app.

Deletes a hostname binding for an app.

resource belongs. the API will delete the binding for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • public_certificate_name (String)

    Public certificate name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



30519
30520
30521
30522
# 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) ⇒ Concurrent::Promise

Deletes a hostname binding for an app.

Deletes a hostname binding for an app.

resource belongs. the API will delete the binding for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • public_certificate_name (String)

    Public certificate name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



30560
30561
30562
30563
30564
30565
30566
30567
30568
30569
30570
30571
30572
30573
30574
30575
30576
30577
30578
30579
30580
30581
30582
30583
30584
30585
30586
30587
30588
30589
30590
30591
30592
30593
30594
30595
30596
30597
30598
30599
30600
30601
30602
30603
30604
30605
30606
30607
30608
# 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) ⇒ MsRestAzure::AzureOperationResponse

Deletes a hostname binding for an app.

Deletes a hostname binding for an app.

resource belongs. the API will delete the binding for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • public_certificate_name (String)

    Public certificate name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



30540
30541
30542
# 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) ⇒ MsRestAzure::AzureOperationResponse

Deletes a hostname binding for an app.

Deletes a hostname binding for an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • public_certificate_name (String)

    Public certificate name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



14620
14621
14622
# 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) ⇒ Object

Deletes a relay service connection by its name.

Deletes a relay service connection by its name.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection configuration.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



9260
9261
9262
9263
# 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) ⇒ Concurrent::Promise

Deletes a relay service connection by its name.

Deletes a relay service connection by its name.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection configuration.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
# 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) ⇒ Object

Deletes a relay service connection by its name.

Deletes a relay service connection by its name.

resource belongs. the API will delete a hybrid connection for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection configuration.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



24981
24982
24983
24984
# 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) ⇒ Concurrent::Promise

Deletes a relay service connection by its name.

Deletes a relay service connection by its name.

resource belongs. the API will delete a hybrid connection for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection configuration.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



25022
25023
25024
25025
25026
25027
25028
25029
25030
25031
25032
25033
25034
25035
25036
25037
25038
25039
25040
25041
25042
25043
25044
25045
25046
25047
25048
25049
25050
25051
25052
25053
25054
25055
25056
25057
25058
25059
25060
25061
25062
25063
25064
25065
25066
25067
25068
25069
25070
# 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) ⇒ MsRestAzure::AzureOperationResponse

Deletes a relay service connection by its name.

Deletes a relay service connection by its name.

resource belongs. the API will delete a hybrid connection for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection configuration.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



25002
25003
25004
# 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) ⇒ MsRestAzure::AzureOperationResponse

Deletes a relay service connection by its name.

Deletes a relay service connection by its name.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection configuration.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



9279
9280
9281
# 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) ⇒ Object

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

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

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • site_extension_id (String)

    Site extension name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



15452
15453
15454
15455
# 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) ⇒ Concurrent::Promise

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

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

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • site_extension_id (String)

    Site extension name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
# 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) ⇒ Object

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

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

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • site_extension_id (String)

    Site extension name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



31428
31429
31430
31431
# 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) ⇒ Concurrent::Promise

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

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

resource belongs. the API deletes a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • site_extension_id (String)

    Site extension name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



31469
31470
31471
31472
31473
31474
31475
31476
31477
31478
31479
31480
31481
31482
31483
31484
31485
31486
31487
31488
31489
31490
31491
31492
31493
31494
31495
31496
31497
31498
31499
31500
31501
31502
31503
31504
31505
31506
31507
31508
31509
31510
31511
31512
31513
31514
31515
31516
31517
# 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) ⇒ MsRestAzure::AzureOperationResponse

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

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

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • site_extension_id (String)

    Site extension name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



31449
31450
31451
# 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) ⇒ MsRestAzure::AzureOperationResponse

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

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

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • site_extension_id (String)

    Site extension name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



15471
15472
15473
# 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) ⇒ Object

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.

resource belongs. API deletes the production slot. 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. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app to delete.

  • slot (String)

    Name of the deployment slot to delete. By default, the

  • delete_metrics (Boolean) (defaults to: nil)

    If true, web app metrics are also deleted.

  • delete_empty_server_farm (Boolean) (defaults to: nil)

    Specify true if the App Service

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



15833
15834
15835
15836
# 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) ⇒ Concurrent::Promise

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.

resource belongs. API deletes the production slot. 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. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app to delete.

  • slot (String)

    Name of the deployment slot to delete. By default, the

  • delete_metrics (Boolean) (defaults to: nil)

    If true, web app metrics are also deleted.

  • delete_empty_server_farm (Boolean) (defaults to: nil)

    Specify true if the App Service

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. API deletes the production slot. 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. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app to delete.

  • slot (String)

    Name of the deployment slot to delete. By default, the

  • delete_metrics (Boolean) (defaults to: nil)

    If true, web app metrics are also deleted.

  • delete_empty_server_farm (Boolean) (defaults to: nil)

    Specify true if the App Service

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



15857
15858
15859
# 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) ⇒ Object

Deletes the source control configuration of an app.

Deletes the source control configuration of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



35196
35197
35198
35199
# 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) ⇒ Concurrent::Promise

Deletes the source control configuration of an app.

Deletes the source control configuration of an app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



35231
35232
35233
35234
35235
35236
35237
35238
35239
35240
35241
35242
35243
35244
35245
35246
35247
35248
35249
35250
35251
35252
35253
35254
35255
35256
35257
35258
35259
35260
35261
35262
35263
35264
35265
35266
35267
35268
35269
35270
35271
35272
35273
35274
35275
35276
35277
# 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) ⇒ Object

Deletes the source control configuration of an app.

Deletes the source control configuration of an app.

resource belongs. the API will delete the source control configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



32007
32008
32009
32010
# 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) ⇒ Concurrent::Promise

Deletes the source control configuration of an app.

Deletes the source control configuration of an app.

resource belongs. the API will delete the source control configuration for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



32046
32047
32048
32049
32050
32051
32052
32053
32054
32055
32056
32057
32058
32059
32060
32061
32062
32063
32064
32065
32066
32067
32068
32069
32070
32071
32072
32073
32074
32075
32076
32077
32078
32079
32080
32081
32082
32083
32084
32085
32086
32087
32088
32089
32090
32091
32092
32093
# 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) ⇒ MsRestAzure::AzureOperationResponse

Deletes the source control configuration of an app.

Deletes the source control configuration of an app.

resource belongs. the API will delete the source control configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



32027
32028
32029
# 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) ⇒ MsRestAzure::AzureOperationResponse

Deletes the source control configuration of an app.

Deletes the source control configuration of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



35214
35215
35216
# 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) ⇒ Object

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

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

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



4017
4018
4019
4020
# 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) ⇒ Concurrent::Promise

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

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

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
# 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) ⇒ Object

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

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

resource belongs. the API will delete the connection for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



19426
19427
19428
19429
# 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) ⇒ Concurrent::Promise

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

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

resource belongs. the API will delete the connection for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



19465
19466
19467
19468
19469
19470
19471
19472
19473
19474
19475
19476
19477
19478
19479
19480
19481
19482
19483
19484
19485
19486
19487
19488
19489
19490
19491
19492
19493
19494
19495
19496
19497
19498
19499
19500
19501
19502
19503
19504
19505
19506
19507
19508
19509
19510
19511
19512
# 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) ⇒ MsRestAzure::AzureOperationResponse

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

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

resource belongs. the API will delete the connection for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



19446
19447
19448
# 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) ⇒ MsRestAzure::AzureOperationResponse

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

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

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



4035
4036
4037
# 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) ⇒ Object

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



36028
36029
36030
36031
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



36065
36066
36067
36068
36069
36070
36071
36072
36073
36074
36075
36076
36077
36078
36079
36080
36081
36082
36083
36084
36085
36086
36087
36088
36089
36090
36091
36092
36093
36094
36095
36096
36097
36098
36099
36100
36101
36102
36103
36104
36105
36106
36107
36108
36109
36110
36111
36112
# 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) ⇒ Object

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.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



32895
32896
32897
32898
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API deletes a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



32936
32937
32938
32939
32940
32941
32942
32943
32944
32945
32946
32947
32948
32949
32950
32951
32952
32953
32954
32955
32956
32957
32958
32959
32960
32961
32962
32963
32964
32965
32966
32967
32968
32969
32970
32971
32972
32973
32974
32975
32976
32977
32978
32979
32980
32981
32982
32983
32984
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



32916
32917
32918
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



36047
36048
36049
# 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) ⇒ Object

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the virtual network.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



36945
36946
36947
36948
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the virtual network.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



36986
36987
36988
36989
36990
36991
36992
36993
36994
36995
36996
36997
36998
36999
37000
37001
37002
37003
37004
37005
37006
37007
37008
37009
37010
37011
37012
37013
37014
37015
37016
37017
37018
37019
37020
37021
37022
37023
37024
37025
37026
37027
37028
37029
37030
37031
37032
37033
# 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) ⇒ Object

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.

resource belongs. the API will delete the connection for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the virtual network.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



33868
33869
33870
33871
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API will delete the connection for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the virtual network.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



33913
33914
33915
33916
33917
33918
33919
33920
33921
33922
33923
33924
33925
33926
33927
33928
33929
33930
33931
33932
33933
33934
33935
33936
33937
33938
33939
33940
33941
33942
33943
33944
33945
33946
33947
33948
33949
33950
33951
33952
33953
33954
33955
33956
33957
33958
33959
33960
33961
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API will delete the connection for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the virtual network.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



33891
33892
33893
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the virtual network.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



36966
36967
36968
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. 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. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app to delete.

  • delete_metrics (Boolean) (defaults to: nil)

    If true, web app metrics are also deleted.

  • delete_empty_server_farm (Boolean) (defaults to: nil)

    Specify true if the App Service

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



425
426
427
# 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) ⇒ RestoreRequest

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.

resource belongs. storage URL and blog name for discovery of backup. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (RestoreRequest)

    A RestoreRequest object that includes Azure

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (RestoreRequest)

    operation results.



6219
6220
6221
6222
# 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) ⇒ Concurrent::Promise

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.

resource belongs. storage URL and blog name for discovery of backup. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (RestoreRequest)

    A RestoreRequest object that includes Azure

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
# 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) ⇒ RestoreRequest

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.

resource belongs. storage URL and blog name for discovery of backup. the API will perform discovery for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (RestoreRequest)

    A RestoreRequest object that includes Azure

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (RestoreRequest)

    operation results.



21768
21769
21770
21771
# 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) ⇒ Concurrent::Promise

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.

resource belongs. storage URL and blog name for discovery of backup. the API will perform discovery for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (RestoreRequest)

    A RestoreRequest object that includes Azure

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



21815
21816
21817
21818
21819
21820
21821
21822
21823
21824
21825
21826
21827
21828
21829
21830
21831
21832
21833
21834
21835
21836
21837
21838
21839
21840
21841
21842
21843
21844
21845
21846
21847
21848
21849
21850
21851
21852
21853
21854
21855
21856
21857
21858
21859
21860
21861
21862
21863
21864
21865
21866
21867
21868
21869
21870
21871
21872
21873
21874
21875
21876
21877
21878
21879
21880
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. storage URL and blog name for discovery of backup. the API will perform discovery for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (RestoreRequest)

    A RestoreRequest object that includes Azure

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



21792
21793
21794
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. storage URL and blog name for discovery of backup. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (RestoreRequest)

    A RestoreRequest object that includes Azure

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



6241
6242
6243
# 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) ⇒ Object

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).

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



12204
12205
12206
12207
# 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) ⇒ Concurrent::Promise

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).

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
# 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) ⇒ Object

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).

resource belongs. the API generate a new publishing password for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



27981
27982
27983
27984
# 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) ⇒ Concurrent::Promise

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).

resource belongs. the API generate a new publishing password for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



28024
28025
28026
28027
28028
28029
28030
28031
28032
28033
28034
28035
28036
28037
28038
28039
28040
28041
28042
28043
28044
28045
28046
28047
28048
28049
28050
28051
28052
28053
28054
28055
28056
28057
28058
28059
28060
28061
28062
28063
28064
28065
28066
28067
28068
28069
28070
28071
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. the API generate a new publishing password for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



28003
28004
28005
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



12224
12225
12226
# 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) ⇒ Site

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

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

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Site)

    operation results.



240
241
242
243
# 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) ⇒ Concurrent::Promise

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

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

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
# 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) ⇒ SiteAuthSettings

Gets the Authentication/Authorization settings of an app.

Gets the Authentication/Authorization settings of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteAuthSettings)

    operation results.



1939
1940
1941
1942
# 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) ⇒ Concurrent::Promise

Gets the Authentication/Authorization settings of an app.

Gets the Authentication/Authorization settings of an app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
# 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) ⇒ SiteAuthSettings

Gets the Authentication/Authorization settings of an app.

Gets the Authentication/Authorization settings of an app.

resource belongs. the API will get the settings for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteAuthSettings)

    operation results.



17464
17465
17466
17467
# 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) ⇒ Concurrent::Promise

Gets the Authentication/Authorization settings of an app.

Gets the Authentication/Authorization settings of an app.

resource belongs. the API will get the settings for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the Authentication/Authorization settings of an app.

Gets the Authentication/Authorization settings of an app.

resource belongs. the API will get the settings for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



17484
17485
17486
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the Authentication/Authorization settings of an app.

Gets the Authentication/Authorization settings of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1957
1958
1959
# 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) ⇒ BackupRequest

Gets the backup configuration of an app.

Gets the backup configuration of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BackupRequest)

    operation results.



2483
2484
2485
2486
# 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) ⇒ Concurrent::Promise

Gets the backup configuration of an app.

Gets the backup configuration of an app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
# 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) ⇒ BackupRequest

Gets the backup configuration of an app.

Gets the backup configuration of an app.

resource belongs. the API will get the backup configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BackupRequest)

    operation results.



18049
18050
18051
18052
# 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) ⇒ Concurrent::Promise

Gets the backup configuration of an app.

Gets the backup configuration of an app.

resource belongs. the API will get the backup configuration for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the backup configuration of an app.

Gets the backup configuration of an app.

resource belongs. the API will get the backup configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



18069
18070
18071
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the backup configuration of an app.

Gets the backup configuration of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2501
2502
2503
# 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) ⇒ BackupItem

Gets a backup of an app by its ID.

Gets a backup of an app by its ID.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • backup_id (String)

    ID of the backup.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BackupItem)

    operation results.



1097
1098
1099
1100
# 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) ⇒ Concurrent::Promise

Gets a backup of an app by its ID.

Gets a backup of an app by its ID.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • backup_id (String)

    ID of the backup.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
# 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) ⇒ BackupItem

Gets a backup of an app by its ID.

Gets a backup of an app by its ID.

resource belongs. the API will get a backup of the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • backup_id (String)

    ID of the backup.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BackupItem)

    operation results.



16569
16570
16571
16572
# 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) ⇒ Concurrent::Promise

Gets a backup of an app by its ID.

Gets a backup of an app by its ID.

resource belongs. the API will get a backup of the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • backup_id (String)

    ID of the backup.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets a backup of an app by its ID.

Gets a backup of an app by its ID.

resource belongs. the API will get a backup of the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • backup_id (String)

    ID of the backup.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



16590
16591
16592
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets a backup of an app by its ID.

Gets a backup of an app by its ID.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • backup_id (String)

    ID of the backup.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1116
1117
1118
# 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) ⇒ SiteConfigResource

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteConfigResource)

    operation results.



4253
4254
4255
4256
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
# 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) ⇒ SiteConfigResource

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.

resource belongs. the API will return configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteConfigResource)

    operation results.



19676
19677
19678
19679
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API will return configuration for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



19719
19720
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730
19731
19732
19733
19734
19735
19736
19737
19738
19739
19740
19741
19742
19743
19744
19745
19746
19747
19748
19749
19750
19751
19752
19753
19754
19755
19756
19757
19758
19759
19760
19761
19762
19763
19764
19765
19766
19767
19768
19769
19770
19771
19772
19773
19774
19775
19776
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API will return configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



19698
19699
19700
# 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) ⇒ SiteConfigResource

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • snapshot_id (String)

    The ID of the snapshot to read.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteConfigResource)

    operation results.



4716
4717
4718
4719
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • snapshot_id (String)

    The ID of the snapshot to read.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
# 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) ⇒ SiteConfigResource

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.

resource belongs. the API will return configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • snapshot_id (String)

    The ID of the snapshot to read.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteConfigResource)

    operation results.



20167
20168
20169
20170
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API will return configuration for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • snapshot_id (String)

    The ID of the snapshot to read.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



20208
20209
20210
20211
20212
20213
20214
20215
20216
20217
20218
20219
20220
20221
20222
20223
20224
20225
20226
20227
20228
20229
20230
20231
20232
20233
20234
20235
20236
20237
20238
20239
20240
20241
20242
20243
20244
20245
20246
20247
20248
20249
20250
20251
20252
20253
20254
20255
20256
20257
20258
20259
20260
20261
20262
20263
20264
20265
20266
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API will return configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • snapshot_id (String)

    The ID of the snapshot to read.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



20188
20189
20190
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • snapshot_id (String)

    The ID of the snapshot to read.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



4735
4736
4737
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



4273
4274
4275
# 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) ⇒ NOT_IMPLEMENTED

Gets the ZIP archived docker log files for the given site

Gets the ZIP archived docker log files for the given site

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (NOT_IMPLEMENTED)

    operation results.



5037
5038
5039
5040
# 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) ⇒ Concurrent::Promise

Gets the ZIP archived docker log files for the given site

Gets the ZIP archived docker log files for the given site

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
# 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) ⇒ NOT_IMPLEMENTED

Gets the ZIP archived docker log files for the given site

Gets the ZIP archived docker log files for the given site

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (NOT_IMPLEMENTED)

    operation results.



20509
20510
20511
20512
# 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) ⇒ Concurrent::Promise

Gets the ZIP archived docker log files for the given site

Gets the ZIP archived docker log files for the given site

resource belongs. to production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559
20560
20561
20562
20563
20564
20565
20566
20567
20568
20569
20570
20571
20572
20573
20574
20575
20576
20577
20578
20579
20580
20581
20582
20583
20584
20585
20586
20587
20588
20589
20590
20591
20592
20593
20594
20595
20596
20597
20598
20599
20600
20601
20602
20603
20604
20605
20606
20607
20608
20609
20610
20611
20612
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the ZIP archived docker log files for the given site

Gets the ZIP archived docker log files for the given site

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



20529
20530
20531
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the ZIP archived docker log files for the given site

Gets the ZIP archived docker log files for the given site

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



5055
5056
5057
# 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) ⇒ ContinuousWebJob

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ContinuousWebJob)

    operation results.



5257
5258
5259
5260
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
# 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) ⇒ ContinuousWebJob

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.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ContinuousWebJob)

    operation results.



20743
20744
20745
20746
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API deletes a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



20784
20785
20786
20787
20788
20789
20790
20791
20792
20793
20794
20795
20796
20797
20798
20799
20800
20801
20802
20803
20804
20805
20806
20807
20808
20809
20810
20811
20812
20813
20814
20815
20816
20817
20818
20819
20820
20821
20822
20823
20824
20825
20826
20827
20828
20829
20830
20831
20832
20833
20834
20835
20836
20837
20838
20839
20840
20841
20842
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



20764
20765
20766
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



5276
5277
5278
# 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) ⇒ Deployment

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    Deployment ID.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Deployment)

    operation results.



5770
5771
5772
5773
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    Deployment ID.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
# 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) ⇒ Deployment

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.

resource belongs. the API gets a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    Deployment ID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Deployment)

    operation results.



21291
21292
21293
21294
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API gets a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    Deployment ID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



21332
21333
21334
21335
21336
21337
21338
21339
21340
21341
21342
21343
21344
21345
21346
21347
21348
21349
21350
21351
21352
21353
21354
21355
21356
21357
21358
21359
21360
21361
21362
21363
21364
21365
21366
21367
21368
21369
21370
21371
21372
21373
21374
21375
21376
21377
21378
21379
21380
21381
21382
21383
21384
21385
21386
21387
21388
21389
21390
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API gets a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    Deployment ID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



21312
21313
21314
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    Deployment ID.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



5789
5790
5791
# 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) ⇒ SiteLogsConfig

Gets the logging configuration of an app.

Gets the logging configuration of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteLogsConfig)

    operation results.



2815
2816
2817
2818
# 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) ⇒ Concurrent::Promise

Gets the logging configuration of an app.

Gets the logging configuration of an app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
# 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) ⇒ SiteLogsConfig

Gets the logging configuration of an app.

Gets the logging configuration of an app.

resource belongs. the API will get the logging configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteLogsConfig)

    operation results.



18402
18403
18404
18405
# 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) ⇒ Concurrent::Promise

Gets the logging configuration of an app.

Gets the logging configuration of an app.

resource belongs. the API will get the logging configuration for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
18453
18454
18455
18456
18457
18458
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the logging configuration of an app.

Gets the logging configuration of an app.

resource belongs. the API will get the logging configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



18422
18423
18424
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the logging configuration of an app.

Gets the logging configuration of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2833
2834
2835
# 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) ⇒ Identifier

Get domain ownership identifier for web app.

Get domain ownership identifier for web app.

resource belongs. identifier. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Identifier)

    operation results.



6449
6450
6451
6452
# 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) ⇒ Concurrent::Promise

Get domain ownership identifier for web app.

Get domain ownership identifier for web app.

resource belongs. identifier. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
# 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) ⇒ Identifier

Get domain ownership identifier for web app.

Get domain ownership identifier for web app.

resource belongs. identifier. the API will delete the binding for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Identifier)

    operation results.



22012
22013
22014
22015
# 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) ⇒ Concurrent::Promise

Get domain ownership identifier for web app.

Get domain ownership identifier for web app.

resource belongs. identifier. the API will delete the binding for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



22055
22056
22057
22058
22059
22060
22061
22062
22063
22064
22065
22066
22067
22068
22069
22070
22071
22072
22073
22074
22075
22076
22077
22078
22079
22080
22081
22082
22083
22084
22085
22086
22087
22088
22089
22090
22091
22092
22093
22094
22095
22096
22097
22098
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
22111
22112
22113
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get domain ownership identifier for web app.

Get domain ownership identifier for web app.

resource belongs. identifier. the API will delete the binding for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



22034
22035
22036
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get domain ownership identifier for web app.

Get domain ownership identifier for web app.

resource belongs. identifier. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



6469
6470
6471
# 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) ⇒ FunctionEnvelope

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (FunctionEnvelope)

    operation results.



7408
7409
7410
7411
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



7427
7428
7429
# 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) ⇒ String

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (String)

    operation results.



7294
7295
7296
7297
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
# 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) ⇒ String

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.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (String)

    operation results.



22910
22911
22912
22913
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



22949
22950
22951
22952
22953
22954
22955
22956
22957
22958
22959
22960
22961
22962
22963
22964
22965
22966
22967
22968
22969
22970
22971
22972
22973
22974
22975
22976
22977
22978
22979
22980
22981
22982
22983
22984
22985
22986
22987
22988
22989
22990
22991
22992
22993
22994
22995
22996
22997
22998
22999
23000
23001
23002
23003
23004
23005
23006
23007
23008
23009
23010
23011
23012
23013
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



22930
22931
22932
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



7312
7313
7314
# 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) ⇒ HostNameBinding

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).

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • host_name (String)

    Hostname in the hostname binding.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (HostNameBinding)

    operation results.



7883
7884
7885
7886
# 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) ⇒ Concurrent::Promise

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).

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • host_name (String)

    Hostname in the hostname binding.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
# 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) ⇒ HostNameBinding

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).

resource belongs. the API the named binding for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • host_name (String)

    Hostname in the hostname binding.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (HostNameBinding)

    operation results.



23538
23539
23540
23541
# 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) ⇒ Concurrent::Promise

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).

resource belongs. the API the named binding for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • host_name (String)

    Hostname in the hostname binding.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



23579
23580
23581
23582
23583
23584
23585
23586
23587
23588
23589
23590
23591
23592
23593
23594
23595
23596
23597
23598
23599
23600
23601
23602
23603
23604
23605
23606
23607
23608
23609
23610
23611
23612
23613
23614
23615
23616
23617
23618
23619
23620
23621
23622
23623
23624
23625
23626
23627
23628
23629
23630
23631
23632
23633
23634
23635
23636
23637
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. the API the named binding for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • host_name (String)

    Hostname in the hostname binding.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



23559
23560
23561
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • host_name (String)

    Hostname in the hostname binding.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



7902
7903
7904
# 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) ⇒ HybridConnection

Retrieves a specific Service Bus Hybrid Connection used by this Web App.

Retrieves a specific Service Bus Hybrid Connection used by this Web App.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (HybridConnection)

    operation results.



8217
8218
8219
8220
# 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) ⇒ Concurrent::Promise

Retrieves a specific Service Bus Hybrid Connection used by this Web App.

Retrieves a specific Service Bus Hybrid Connection used by this Web App.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
# 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) ⇒ HybridConnection

Retrieves a specific Service Bus Hybrid Connection used by this Web App.

Retrieves a specific Service Bus Hybrid Connection used by this Web App.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • slot (String)

    The name of the slot for the web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (HybridConnection)

    operation results.



23892
23893
23894
23895
# 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) ⇒ Concurrent::Promise

Retrieves a specific Service Bus Hybrid Connection used by this Web App.

Retrieves a specific Service Bus Hybrid Connection used by this Web App.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • slot (String)

    The name of the slot for the web app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



23933
23934
23935
23936
23937
23938
23939
23940
23941
23942
23943
23944
23945
23946
23947
23948
23949
23950
23951
23952
23953
23954
23955
23956
23957
23958
23959
23960
23961
23962
23963
23964
23965
23966
23967
23968
23969
23970
23971
23972
23973
23974
23975
23976
23977
23978
23979
23980
23981
23982
23983
23984
23985
23986
23987
23988
23989
23990
23991
23992
# 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) ⇒ MsRestAzure::AzureOperationResponse

Retrieves a specific Service Bus Hybrid Connection used by this Web App.

Retrieves a specific Service Bus Hybrid Connection used by this Web App.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • slot (String)

    The name of the slot for the web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



23913
23914
23915
# 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) ⇒ MsRestAzure::AzureOperationResponse

Retrieves a specific Service Bus Hybrid Connection used by this Web App.

Retrieves a specific Service Bus Hybrid Connection used by this Web App.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



8237
8238
8239
# 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) ⇒ FunctionEnvelope

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.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (FunctionEnvelope)

    operation results.



23031
23032
23033
23034
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API deletes a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



23072
23073
23074
23075
23076
23077
23078
23079
23080
23081
23082
23083
23084
23085
23086
23087
23088
23089
23090
23091
23092
23093
23094
23095
23096
23097
23098
23099
23100
23101
23102
23103
23104
23105
23106
23107
23108
23109
23110
23111
23112
23113
23114
23115
23116
23117
23118
23119
23120
23121
23122
23123
23124
23125
23126
23127
23128
23129
23130
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



23052
23053
23054
# 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) ⇒ MSDeployStatus

Get the status of the last MSDeploy operation.

Get the status of the last MSDeploy operation.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • instance_id (String)

    ID of web app instance.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MSDeployStatus)

    operation results.



9596
9597
9598
9599
# 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) ⇒ Concurrent::Promise

Get the status of the last MSDeploy operation.

Get the status of the last MSDeploy operation.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • instance_id (String)

    ID of web app instance.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
# 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) ⇒ MSDeployStatus

Get the status of the last MSDeploy operation.

Get the status of the last MSDeploy operation.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • instance_id (String)

    ID of web app instance.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MSDeployStatus)

    operation results.



25338
25339
25340
25341
# 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) ⇒ Concurrent::Promise

Get the status of the last MSDeploy operation.

Get the status of the last MSDeploy operation.

resource belongs. to production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • instance_id (String)

    ID of web app instance.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



25379
25380
25381
25382
25383
25384
25385
25386
25387
25388
25389
25390
25391
25392
25393
25394
25395
25396
25397
25398
25399
25400
25401
25402
25403
25404
25405
25406
25407
25408
25409
25410
25411
25412
25413
25414
25415
25416
25417
25418
25419
25420
25421
25422
25423
25424
25425
25426
25427
25428
25429
25430
25431
25432
25433
25434
25435
25436
25437
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get the status of the last MSDeploy operation.

Get the status of the last MSDeploy operation.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • instance_id (String)

    ID of web app instance.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



25359
25360
25361
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get the status of the last MSDeploy operation.

Get the status of the last MSDeploy operation.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • instance_id (String)

    ID of web app instance.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



9615
9616
9617
# 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) ⇒ MSDeployLog

Get the MSDeploy Log for the last MSDeploy operation.

Get the MSDeploy Log for the last MSDeploy operation.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • instance_id (String)

    ID of web app instance.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MSDeployLog)

    operation results.



9756
9757
9758
9759
# 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) ⇒ Concurrent::Promise

Get the MSDeploy Log for the last MSDeploy operation.

Get the MSDeploy Log for the last MSDeploy operation.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • instance_id (String)

    ID of web app instance.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
# 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) ⇒ MSDeployLog

Get the MSDeploy Log for the last MSDeploy operation.

Get the MSDeploy Log for the last MSDeploy operation.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • instance_id (String)

    ID of web app instance.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MSDeployLog)

    operation results.



25509
25510
25511
25512
# 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) ⇒ Concurrent::Promise

Get the MSDeploy Log for the last MSDeploy operation.

Get the MSDeploy Log for the last MSDeploy operation.

resource belongs. to production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • instance_id (String)

    ID of web app instance.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



25550
25551
25552
25553
25554
25555
25556
25557
25558
25559
25560
25561
25562
25563
25564
25565
25566
25567
25568
25569
25570
25571
25572
25573
25574
25575
25576
25577
25578
25579
25580
25581
25582
25583
25584
25585
25586
25587
25588
25589
25590
25591
25592
25593
25594
25595
25596
25597
25598
25599
25600
25601
25602
25603
25604
25605
25606
25607
25608
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get the MSDeploy Log for the last MSDeploy operation.

Get the MSDeploy Log for the last MSDeploy operation.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • instance_id (String)

    ID of web app instance.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



25530
25531
25532
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get the MSDeploy Log for the last MSDeploy operation.

Get the MSDeploy Log for the last MSDeploy operation.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • instance_id (String)

    ID of web app instance.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



9775
9776
9777
# 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) ⇒ ProcessInfo

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessInfo)

    operation results.



9993
9994
9995
9996
# 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) ⇒ Concurrent::Promise

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
# 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) ⇒ NOT_IMPLEMENTED

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (NOT_IMPLEMENTED)

    operation results.



10234
10235
10236
10237
# 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) ⇒ Concurrent::Promise

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
# 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) ⇒ NOT_IMPLEMENTED

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (NOT_IMPLEMENTED)

    operation results.



26015
26016
26017
26018
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



26066
26067
26068
26069
26070
26071
26072
26073
26074
26075
26076
26077
26078
26079
26080
26081
26082
26083
26084
26085
26086
26087
26088
26089
26090
26091
26092
26093
26094
26095
26096
26097
26098
26099
26100
26101
26102
26103
26104
26105
26106
26107
26108
26109
26110
26111
26112
26113
26114
26115
26116
26117
26118
26119
26120
26121
26122
26123
26124
26125
26126
26127
26128
26129
26130
26131
26132
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



26041
26042
26043
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



10258
10259
10260
# 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) ⇒ ProcessModuleInfo

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • base_address (String)

    Module base address.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessModuleInfo)

    operation results.



10494
10495
10496
10497
# 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) ⇒ Concurrent::Promise

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • base_address (String)

    Module base address.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
# 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) ⇒ ProcessModuleInfo

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • base_address (String)

    Module base address.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessModuleInfo)

    operation results.



26289
26290
26291
26292
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • base_address (String)

    Module base address.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



26342
26343
26344
26345
26346
26347
26348
26349
26350
26351
26352
26353
26354
26355
26356
26357
26358
26359
26360
26361
26362
26363
26364
26365
26366
26367
26368
26369
26370
26371
26372
26373
26374
26375
26376
26377
26378
26379
26380
26381
26382
26383
26384
26385
26386
26387
26388
26389
26390
26391
26392
26393
26394
26395
26396
26397
26398
26399
26400
26401
26402
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • base_address (String)

    Module base address.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



26316
26317
26318
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • base_address (String)

    Module base address.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



10519
10520
10521
# 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) ⇒ ProcessInfo

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessInfo)

    operation results.



25760
25761
25762
25763
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



25811
25812
25813
25814
25815
25816
25817
25818
25819
25820
25821
25822
25823
25824
25825
25826
25827
25828
25829
25830
25831
25832
25833
25834
25835
25836
25837
25838
25839
25840
25841
25842
25843
25844
25845
25846
25847
25848
25849
25850
25851
25852
25853
25854
25855
25856
25857
25858
25859
25860
25861
25862
25863
25864
25865
25866
25867
25868
25869
25870
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



25786
25787
25788
# 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) ⇒ ProcessThreadInfo

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • thread_id (String)

    TID.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessThreadInfo)

    operation results.



10750
10751
10752
10753
# 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) ⇒ Concurrent::Promise

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • thread_id (String)

    TID.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
# 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) ⇒ ProcessThreadInfo

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • thread_id (String)

    TID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessThreadInfo)

    operation results.



26559
26560
26561
26562
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • thread_id (String)

    TID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



26612
26613
26614
26615
26616
26617
26618
26619
26620
26621
26622
26623
26624
26625
26626
26627
26628
26629
26630
26631
26632
26633
26634
26635
26636
26637
26638
26639
26640
26641
26642
26643
26644
26645
26646
26647
26648
26649
26650
26651
26652
26653
26654
26655
26656
26657
26658
26659
26660
26661
26662
26663
26664
26665
26666
26667
26668
26669
26670
26671
26672
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • thread_id (String)

    TID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



26586
26587
26588
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • thread_id (String)

    TID.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



10775
10776
10777
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



10017
10018
10019
# 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) ⇒ MigrateMySqlStatus

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

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MigrateMySqlStatus)

    operation results.



11420
11421
11422
11423
# 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) ⇒ Concurrent::Promise

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

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
# 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) ⇒ MigrateMySqlStatus

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

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of the deployment slot.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MigrateMySqlStatus)

    operation results.



27161
27162
27163
27164
# 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) ⇒ Concurrent::Promise

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

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of the deployment slot.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



27202
27203
27204
27205
27206
27207
27208
27209
27210
27211
27212
27213
27214
27215
27216
27217
27218
27219
27220
27221
27222
27223
27224
27225
27226
27227
27228
27229
27230
27231
27232
27233
27234
27235
27236
27237
27238
27239
27240
27241
27242
27243
27244
27245
27246
27247
27248
27249
27250
27251
27252
27253
27254
27255
27256
27257
27258
27259
# 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) ⇒ MsRestAzure::AzureOperationResponse

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

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of the deployment slot.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



27182
27183
27184
# 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) ⇒ MsRestAzure::AzureOperationResponse

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

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



11440
11441
11442
# 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) ⇒ MSDeployLog

Get the MSDeploy Log for the last MSDeploy operation.

Get the MSDeploy Log for the last MSDeploy operation.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MSDeployLog)

    operation results.



7082
7083
7084
7085
# 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) ⇒ Concurrent::Promise

Get the MSDeploy Log for the last MSDeploy operation.

Get the MSDeploy Log for the last MSDeploy operation.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
# 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) ⇒ MSDeployLog

Get the MSDeploy Log for the last MSDeploy operation.

Get the MSDeploy Log for the last MSDeploy operation.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MSDeployLog)

    operation results.



22684
22685
22686
22687
# 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) ⇒ Concurrent::Promise

Get the MSDeploy Log for the last MSDeploy operation.

Get the MSDeploy Log for the last MSDeploy operation.

resource belongs. to production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



22723
22724
22725
22726
22727
22728
22729
22730
22731
22732
22733
22734
22735
22736
22737
22738
22739
22740
22741
22742
22743
22744
22745
22746
22747
22748
22749
22750
22751
22752
22753
22754
22755
22756
22757
22758
22759
22760
22761
22762
22763
22764
22765
22766
22767
22768
22769
22770
22771
22772
22773
22774
22775
22776
22777
22778
22779
22780
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get the MSDeploy Log for the last MSDeploy operation.

Get the MSDeploy Log for the last MSDeploy operation.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



22704
22705
22706
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get the MSDeploy Log for the last MSDeploy operation.

Get the MSDeploy Log for the last MSDeploy operation.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



7100
7101
7102
# 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) ⇒ MSDeployStatus

Get the status of the last MSDeploy operation.

Get the status of the last MSDeploy operation.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MSDeployStatus)

    operation results.



6928
6929
6930
6931
# 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) ⇒ Concurrent::Promise

Get the status of the last MSDeploy operation.

Get the status of the last MSDeploy operation.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
# 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) ⇒ MSDeployStatus

Get the status of the last MSDeploy operation.

Get the status of the last MSDeploy operation.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MSDeployStatus)

    operation results.



22519
22520
22521
22522
# 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) ⇒ Concurrent::Promise

Get the status of the last MSDeploy operation.

Get the status of the last MSDeploy operation.

resource belongs. to production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



22558
22559
22560
22561
22562
22563
22564
22565
22566
22567
22568
22569
22570
22571
22572
22573
22574
22575
22576
22577
22578
22579
22580
22581
22582
22583
22584
22585
22586
22587
22588
22589
22590
22591
22592
22593
22594
22595
22596
22597
22598
22599
22600
22601
22602
22603
22604
22605
22606
22607
22608
22609
22610
22611
22612
22613
22614
22615
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get the status of the last MSDeploy operation.

Get the status of the last MSDeploy operation.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



22539
22540
22541
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get the status of the last MSDeploy operation.

Get the status of the last MSDeploy operation.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



6946
6947
6948
# 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) ⇒ Object

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).

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • operation_id (String)

    GUID of the operation.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



11646
11647
11648
11649
# 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) ⇒ Concurrent::Promise

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).

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • operation_id (String)

    GUID of the operation.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
# 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) ⇒ Object

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).

resource belongs. the API will get an operation for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • operation_id (String)

    GUID of the operation.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



27399
27400
27401
27402
# 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) ⇒ Concurrent::Promise

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).

resource belongs. the API will get an operation for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • operation_id (String)

    GUID of the operation.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



27444
27445
27446
27447
27448
27449
27450
27451
27452
27453
27454
27455
27456
27457
27458
27459
27460
27461
27462
27463
27464
27465
27466
27467
27468
27469
27470
27471
27472
27473
27474
27475
27476
27477
27478
27479
27480
27481
27482
27483
27484
27485
27486
27487
27488
27489
27490
27491
27492
27493
27494
27495
27496
27497
27498
27499
27500
27501
27502
27503
27504
27505
27506
27507
27508
27509
27510
27511
27512
27513
27514
27515
27516
27517
27518
27519
27520
27521
27522
27523
27524
27525
27526
27527
27528
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. the API will get an operation for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • operation_id (String)

    GUID of the operation.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



27422
27423
27424
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • operation_id (String)

    GUID of the operation.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



11667
11668
11669
# 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) ⇒ Array

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).

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • operation_id (String)

    GUID of the operation.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array)

    operation results.



12074
12075
12076
12077
# 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) ⇒ Concurrent::Promise

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).

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • operation_id (String)

    GUID of the operation.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
# 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) ⇒ Array

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).

resource belongs. the API will get an operation for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • operation_id (String)

    GUID of the operation.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array)

    operation results.



27844
27845
27846
27847
# 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) ⇒ Concurrent::Promise

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).

resource belongs. the API will get an operation for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • operation_id (String)

    GUID of the operation.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



27889
27890
27891
27892
27893
27894
27895
27896
27897
27898
27899
27900
27901
27902
27903
27904
27905
27906
27907
27908
27909
27910
27911
27912
27913
27914
27915
27916
27917
27918
27919
27920
27921
27922
27923
27924
27925
27926
27927
27928
27929
27930
27931
27932
27933
27934
27935
27936
27937
27938
27939
27940
27941
27942
27943
27944
27945
27946
27947
27948
27949
27950
27951
27952
27953
27954
27955
27956
27957
27958
27959
27960
27961
27962
27963
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. the API will get an operation for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • operation_id (String)

    GUID of the operation.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



27867
27868
27869
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • operation_id (String)

    GUID of the operation.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



12095
12096
12097
# 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) ⇒ PremierAddOn

Gets a named add-on of an app.

Gets a named add-on of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PremierAddOn)

    operation results.



12636
12637
12638
12639
# 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) ⇒ Concurrent::Promise

Gets a named add-on of an app.

Gets a named add-on of an app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
# 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) ⇒ PremierAddOn

Gets a named add-on of an app.

Gets a named add-on of an app.

resource belongs. the API will get the named add-on for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PremierAddOn)

    operation results.



28441
28442
28443
28444
# 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) ⇒ Concurrent::Promise

Gets a named add-on of an app.

Gets a named add-on of an app.

resource belongs. the API will get the named add-on for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



28482
28483
28484
28485
28486
28487
28488
28489
28490
28491
28492
28493
28494
28495
28496
28497
28498
28499
28500
28501
28502
28503
28504
28505
28506
28507
28508
28509
28510
28511
28512
28513
28514
28515
28516
28517
28518
28519
28520
28521
28522
28523
28524
28525
28526
28527
28528
28529
28530
28531
28532
28533
28534
28535
28536
28537
28538
28539
28540
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets a named add-on of an app.

Gets a named add-on of an app.

resource belongs. the API will get the named add-on for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



28462
28463
28464
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets a named add-on of an app.

Gets a named add-on of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



12655
12656
12657
# 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) ⇒ PrivateAccess

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PrivateAccess)

    operation results.



13094
13095
13096
13097
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
# 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) ⇒ PrivateAccess

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • slot (String)

    The name of the slot for the web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PrivateAccess)

    operation results.



28926
28927
28928
28929
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • slot (String)

    The name of the slot for the web app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



28967
28968
28969
28970
28971
28972
28973
28974
28975
28976
28977
28978
28979
28980
28981
28982
28983
28984
28985
28986
28987
28988
28989
28990
28991
28992
28993
28994
28995
28996
28997
28998
28999
29000
29001
29002
29003
29004
29005
29006
29007
29008
29009
29010
29011
29012
29013
29014
29015
29016
29017
29018
29019
29020
29021
29022
29023
29024
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • slot (String)

    The name of the slot for the web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



28947
28948
28949
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



13114
13115
13116
# 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) ⇒ ProcessInfo

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessInfo)

    operation results.



13442
13443
13444
13445
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
# 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) ⇒ NOT_IMPLEMENTED

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (NOT_IMPLEMENTED)

    operation results.



13663
13664
13665
13666
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
# 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) ⇒ NOT_IMPLEMENTED

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.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (NOT_IMPLEMENTED)

    operation results.



29525
29526
29527
29528
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API returns deployments for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



29570
29571
29572
29573
29574
29575
29576
29577
29578
29579
29580
29581
29582
29583
29584
29585
29586
29587
29588
29589
29590
29591
29592
29593
29594
29595
29596
29597
29598
29599
29600
29601
29602
29603
29604
29605
29606
29607
29608
29609
29610
29611
29612
29613
29614
29615
29616
29617
29618
29619
29620
29621
29622
29623
29624
29625
29626
29627
29628
29629
29630
29631
29632
29633
29634
29635
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



29548
29549
29550
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



13684
13685
13686
# 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) ⇒ ProcessModuleInfo

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • base_address (String)

    Module base address.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessModuleInfo)

    operation results.



13903
13904
13905
13906
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • base_address (String)

    Module base address.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
# 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) ⇒ ProcessModuleInfo

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.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • base_address (String)

    Module base address.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessModuleInfo)

    operation results.



29779
29780
29781
29782
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API returns deployments for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • base_address (String)

    Module base address.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



29826
29827
29828
29829
29830
29831
29832
29833
29834
29835
29836
29837
29838
29839
29840
29841
29842
29843
29844
29845
29846
29847
29848
29849
29850
29851
29852
29853
29854
29855
29856
29857
29858
29859
29860
29861
29862
29863
29864
29865
29866
29867
29868
29869
29870
29871
29872
29873
29874
29875
29876
29877
29878
29879
29880
29881
29882
29883
29884
29885
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • base_address (String)

    Module base address.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



29803
29804
29805
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • base_address (String)

    Module base address.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



13925
13926
13927
# 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) ⇒ ProcessInfo

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.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessInfo)

    operation results.



29290
29291
29292
29293
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API returns deployments for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



29335
29336
29337
29338
29339
29340
29341
29342
29343
29344
29345
29346
29347
29348
29349
29350
29351
29352
29353
29354
29355
29356
29357
29358
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368
29369
29370
29371
29372
29373
29374
29375
29376
29377
29378
29379
29380
29381
29382
29383
29384
29385
29386
29387
29388
29389
29390
29391
29392
29393
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



29313
29314
29315
# 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) ⇒ ProcessThreadInfo

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • thread_id (String)

    TID.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessThreadInfo)

    operation results.



14139
14140
14141
14142
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • thread_id (String)

    TID.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
# 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) ⇒ ProcessThreadInfo

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.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • thread_id (String)

    TID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessThreadInfo)

    operation results.



30029
30030
30031
30032
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API returns deployments for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • thread_id (String)

    TID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



30076
30077
30078
30079
30080
30081
30082
30083
30084
30085
30086
30087
30088
30089
30090
30091
30092
30093
30094
30095
30096
30097
30098
30099
30100
30101
30102
30103
30104
30105
30106
30107
30108
30109
30110
30111
30112
30113
30114
30115
30116
30117
30118
30119
30120
30121
30122
30123
30124
30125
30126
30127
30128
30129
30130
30131
30132
30133
30134
30135
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • thread_id (String)

    TID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



30053
30054
30055
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • thread_id (String)

    TID.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



14161
14162
14163
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



13463
13464
13465
# 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) ⇒ PublicCertificate

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).

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • public_certificate_name (String)

    Public certificate name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PublicCertificate)

    operation results.



14364
14365
14366
14367
# 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) ⇒ Concurrent::Promise

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).

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • public_certificate_name (String)

    Public certificate name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
# 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) ⇒ PublicCertificate

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).

resource belongs. the API the named binding for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • public_certificate_name (String)

    Public certificate name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PublicCertificate)

    operation results.



30268
30269
30270
30271
# 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) ⇒ Concurrent::Promise

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).

resource belongs. the API the named binding for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • public_certificate_name (String)

    Public certificate name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



30313
30314
30315
30316
30317
30318
30319
30320
30321
30322
30323
30324
30325
30326
30327
30328
30329
30330
30331
30332
30333
30334
30335
30336
30337
30338
30339
30340
30341
30342
30343
30344
30345
30346
30347
30348
30349
30350
30351
30352
30353
30354
30355
30356
30357
30358
30359
30360
30361
30362
30363
30364
30365
30366
30367
30368
30369
30370
30371
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. the API the named binding for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • public_certificate_name (String)

    Public certificate name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



30291
30292
30293
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • public_certificate_name (String)

    Public certificate name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



14385
14386
14387
# 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) ⇒ RelayServiceConnectionEntity

Gets a hybrid connection configuration by its name.

Gets a hybrid connection configuration by its name.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (RelayServiceConnectionEntity)

    operation results.



9021
9022
9023
9024
# 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) ⇒ Concurrent::Promise

Gets a hybrid connection configuration by its name.

Gets a hybrid connection configuration by its name.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
# 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) ⇒ RelayServiceConnectionEntity

Gets a hybrid connection configuration by its name.

Gets a hybrid connection configuration by its name.

resource belongs. the API will get a hybrid connection for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (RelayServiceConnectionEntity)

    operation results.



24728
24729
24730
24731
# 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) ⇒ Concurrent::Promise

Gets a hybrid connection configuration by its name.

Gets a hybrid connection configuration by its name.

resource belongs. the API will get a hybrid connection for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



24769
24770
24771
24772
24773
24774
24775
24776
24777
24778
24779
24780
24781
24782
24783
24784
24785
24786
24787
24788
24789
24790
24791
24792
24793
24794
24795
24796
24797
24798
24799
24800
24801
24802
24803
24804
24805
24806
24807
24808
24809
24810
24811
24812
24813
24814
24815
24816
24817
24818
24819
24820
24821
24822
24823
24824
24825
24826
24827
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets a hybrid connection configuration by its name.

Gets a hybrid connection configuration by its name.

resource belongs. the API will get a hybrid connection for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



24749
24750
24751
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets a hybrid connection configuration by its name.

Gets a hybrid connection configuration by its name.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



9040
9041
9042
# 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) ⇒ SiteExtensionInfo

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • site_extension_id (String)

    Site extension name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteExtensionInfo)

    operation results.



15291
15292
15293
15294
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • site_extension_id (String)

    Site extension name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
# 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) ⇒ SiteExtensionInfo

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.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • site_extension_id (String)

    Site extension name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteExtensionInfo)

    operation results.



31256
31257
31258
31259
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API deletes a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • site_extension_id (String)

    Site extension name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



31301
31302
31303
31304
31305
31306
31307
31308
31309
31310
31311
31312
31313
31314
31315
31316
31317
31318
31319
31320
31321
31322
31323
31324
31325
31326
31327
31328
31329
31330
31331
31332
31333
31334
31335
31336
31337
31338
31339
31340
31341
31342
31343
31344
31345
31346
31347
31348
31349
31350
31351
31352
31353
31354
31355
31356
31357
31358
31359
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • site_extension_id (String)

    Site extension name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



31279
31280
31281
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • site_extension_id (String)

    Site extension name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



15312
15313
15314
# 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) ⇒ SitePhpErrorLogFlag

Gets web app’s event logs.

Gets web app’s event logs.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SitePhpErrorLogFlag)

    operation results.



12423
12424
12425
12426
# 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) ⇒ Concurrent::Promise

Gets web app’s event logs.

Gets web app’s event logs.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
# 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) ⇒ SitePhpErrorLogFlag

Gets web app’s event logs.

Gets web app’s event logs.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SitePhpErrorLogFlag)

    operation results.



28214
28215
28216
28217
# 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) ⇒ Concurrent::Promise

Gets web app’s event logs.

Gets web app’s event logs.

resource belongs. to production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



28253
28254
28255
28256
28257
28258
28259
28260
28261
28262
28263
28264
28265
28266
28267
28268
28269
28270
28271
28272
28273
28274
28275
28276
28277
28278
28279
28280
28281
28282
28283
28284
28285
28286
28287
28288
28289
28290
28291
28292
28293
28294
28295
28296
28297
28298
28299
28300
28301
28302
28303
28304
28305
28306
28307
28308
28309
28310
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets web app’s event logs.

Gets web app’s event logs.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



28234
28235
28236
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets web app’s event logs.

Gets web app’s event logs.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



12441
12442
12443
# 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) ⇒ Site

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

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

resource belongs. returns the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. By default, this API

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Site)

    operation results.



15659
15660
15661
15662
# 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) ⇒ Concurrent::Promise

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

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

resource belongs. returns the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. By default, this API

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
# 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) ⇒ MsRestAzure::AzureOperationResponse

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

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

resource belongs. returns the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. By default, this API

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



15679
15680
15681
# 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) ⇒ SiteSourceControl

Gets the source control configuration of an app.

Gets the source control configuration of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteSourceControl)

    operation results.



35021
35022
35023
35024
# 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) ⇒ Concurrent::Promise

Gets the source control configuration of an app.

Gets the source control configuration of an app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



35056
35057
35058
35059
35060
35061
35062
35063
35064
35065
35066
35067
35068
35069
35070
35071
35072
35073
35074
35075
35076
35077
35078
35079
35080
35081
35082
35083
35084
35085
35086
35087
35088
35089
35090
35091
35092
35093
35094
35095
35096
35097
35098
35099
35100
35101
35102
35103
35104
35105
35106
35107
35108
35109
35110
35111
35112
35113
35114
35115
35116
35117
35118
35119
35120
35121
35122
35123
35124
35125
35126
35127
35128
35129
35130
35131
35132
# 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) ⇒ SiteSourceControl

Gets the source control configuration of an app.

Gets the source control configuration of an app.

resource belongs. the API will get the source control configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteSourceControl)

    operation results.



31821
31822
31823
31824
# 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) ⇒ Concurrent::Promise

Gets the source control configuration of an app.

Gets the source control configuration of an app.

resource belongs. the API will get the source control configuration for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



31860
31861
31862
31863
31864
31865
31866
31867
31868
31869
31870
31871
31872
31873
31874
31875
31876
31877
31878
31879
31880
31881
31882
31883
31884
31885
31886
31887
31888
31889
31890
31891
31892
31893
31894
31895
31896
31897
31898
31899
31900
31901
31902
31903
31904
31905
31906
31907
31908
31909
31910
31911
31912
31913
31914
31915
31916
31917
31918
31919
31920
31921
31922
31923
31924
31925
31926
31927
31928
31929
31930
31931
31932
31933
31934
31935
31936
31937
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the source control configuration of an app.

Gets the source control configuration of an app.

resource belongs. the API will get the source control configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



31841
31842
31843
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the source control configuration of an app.

Gets the source control configuration of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



35039
35040
35041
# 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) ⇒ SwiftVirtualNetwork

Gets a Swift Virtual Network connection.

Gets a Swift Virtual Network connection.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SwiftVirtualNetwork)

    operation results.



3774
3775
3776
3777
# 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) ⇒ Concurrent::Promise

Gets a Swift Virtual Network connection.

Gets a Swift Virtual Network connection.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
# 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) ⇒ SwiftVirtualNetwork

Gets a Swift Virtual Network connection.

Gets a Swift Virtual Network connection.

resource belongs. the API will get a gateway for the production slot’s Virtual Network. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SwiftVirtualNetwork)

    operation results.



19169
19170
19171
19172
# 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) ⇒ Concurrent::Promise

Gets a Swift Virtual Network connection.

Gets a Swift Virtual Network connection.

resource belongs. the API will get a gateway for the production slot’s Virtual Network. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



19208
19209
19210
19211
19212
19213
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224
19225
19226
19227
19228
19229
19230
19231
19232
19233
19234
19235
19236
19237
19238
19239
19240
19241
19242
19243
19244
19245
19246
19247
19248
19249
19250
19251
19252
19253
19254
19255
19256
19257
19258
19259
19260
19261
19262
19263
19264
19265
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets a Swift Virtual Network connection.

Gets a Swift Virtual Network connection.

resource belongs. the API will get a gateway for the production slot’s Virtual Network. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



19189
19190
19191
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets a Swift Virtual Network connection.

Gets a Swift Virtual Network connection.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3792
3793
3794
# 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) ⇒ TriggeredWebJob

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (TriggeredWebJob)

    operation results.



35919
35920
35921
35922
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



35956
35957
35958
35959
35960
35961
35962
35963
35964
35965
35966
35967
35968
35969
35970
35971
35972
35973
35974
35975
35976
35977
35978
35979
35980
35981
35982
35983
35984
35985
35986
35987
35988
35989
35990
35991
35992
35993
35994
35995
35996
35997
35998
35999
36000
36001
36002
36003
36004
36005
36006
36007
36008
36009
36010
36011
36012
36013
# 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) ⇒ TriggeredJobHistory

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • id (String)

    History ID.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (TriggeredJobHistory)

    operation results.



36241
36242
36243
36244
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • id (String)

    History ID.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



36284
36285
36286
36287
36288
36289
36290
36291
36292
36293
36294
36295
36296
36297
36298
36299
36300
36301
36302
36303
36304
36305
36306
36307
36308
36309
36310
36311
36312
36313
36314
36315
36316
36317
36318
36319
36320
36321
36322
36323
36324
36325
36326
36327
36328
36329
36330
36331
36332
36333
36334
36335
36336
36337
36338
36339
36340
36341
36342
# 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) ⇒ TriggeredJobHistory

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.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • id (String)

    History ID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (TriggeredJobHistory)

    operation results.



33122
33123
33124
33125
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API deletes a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • id (String)

    History ID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



33169
33170
33171
33172
33173
33174
33175
33176
33177
33178
33179
33180
33181
33182
33183
33184
33185
33186
33187
33188
33189
33190
33191
33192
33193
33194
33195
33196
33197
33198
33199
33200
33201
33202
33203
33204
33205
33206
33207
33208
33209
33210
33211
33212
33213
33214
33215
33216
33217
33218
33219
33220
33221
33222
33223
33224
33225
33226
33227
33228
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • id (String)

    History ID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



33146
33147
33148
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • id (String)

    History ID.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



36263
36264
36265
# 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) ⇒ TriggeredWebJob

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.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (TriggeredWebJob)

    operation results.



32779
32780
32781
32782
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API deletes a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



32820
32821
32822
32823
32824
32825
32826
32827
32828
32829
32830
32831
32832
32833
32834
32835
32836
32837
32838
32839
32840
32841
32842
32843
32844
32845
32846
32847
32848
32849
32850
32851
32852
32853
32854
32855
32856
32857
32858
32859
32860
32861
32862
32863
32864
32865
32866
32867
32868
32869
32870
32871
32872
32873
32874
32875
32876
32877
32878
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



32800
32801
32802
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



35938
35939
35940
# 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) ⇒ VnetInfo

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the virtual network.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (VnetInfo)

    operation results.



36704
36705
36706
36707
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the virtual network.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



36741
36742
36743
36744
36745
36746
36747
36748
36749
36750
36751
36752
36753
36754
36755
36756
36757
36758
36759
36760
36761
36762
36763
36764
36765
36766
36767
36768
36769
36770
36771
36772
36773
36774
36775
36776
36777
36778
36779
36780
36781
36782
36783
36784
36785
36786
36787
36788
36789
36790
36791
36792
36793
36794
36795
36796
36797
36798
# 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) ⇒ VnetGateway

Gets an app’s Virtual Network gateway.

Gets an app’s Virtual Network gateway.

resource belongs. supported string is “primary”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the Virtual Network.

  • gateway_name (String)

    Name of the gateway. Currently, the only

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (VnetGateway)

    operation results.



37181
37182
37183
37184
# 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) ⇒ Concurrent::Promise

Gets an app’s Virtual Network gateway.

Gets an app’s Virtual Network gateway.

resource belongs. supported string is “primary”. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the Virtual Network.

  • gateway_name (String)

    Name of the gateway. Currently, the only

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



37222
37223
37224
37225
37226
37227
37228
37229
37230
37231
37232
37233
37234
37235
37236
37237
37238
37239
37240
37241
37242
37243
37244
37245
37246
37247
37248
37249
37250
37251
37252
37253
37254
37255
37256
37257
37258
37259
37260
37261
37262
37263
37264
37265
37266
37267
37268
37269
37270
37271
37272
37273
37274
37275
37276
37277
37278
37279
37280
# 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) ⇒ VnetGateway

Gets an app’s Virtual Network gateway.

Gets an app’s Virtual Network gateway.

resource belongs. supported string is “primary”. the API will get a gateway for the production slot’s Virtual Network. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the Virtual Network.

  • gateway_name (String)

    Name of the gateway. Currently, the only

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (VnetGateway)

    operation results.



34118
34119
34120
34121
# 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) ⇒ Concurrent::Promise

Gets an app’s Virtual Network gateway.

Gets an app’s Virtual Network gateway.

resource belongs. supported string is “primary”. the API will get a gateway for the production slot’s Virtual Network. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the Virtual Network.

  • gateway_name (String)

    Name of the gateway. Currently, the only

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



34163
34164
34165
34166
34167
34168
34169
34170
34171
34172
34173
34174
34175
34176
34177
34178
34179
34180
34181
34182
34183
34184
34185
34186
34187
34188
34189
34190
34191
34192
34193
34194
34195
34196
34197
34198
34199
34200
34201
34202
34203
34204
34205
34206
34207
34208
34209
34210
34211
34212
34213
34214
34215
34216
34217
34218
34219
34220
34221
34222
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets an app’s Virtual Network gateway.

Gets an app’s Virtual Network gateway.

resource belongs. supported string is “primary”. the API will get a gateway for the production slot’s Virtual Network. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the Virtual Network.

  • gateway_name (String)

    Name of the gateway. Currently, the only

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



34141
34142
34143
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets an app’s Virtual Network gateway.

Gets an app’s Virtual Network gateway.

resource belongs. supported string is “primary”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the Virtual Network.

  • gateway_name (String)

    Name of the gateway. Currently, the only

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



37202
37203
37204
# 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) ⇒ VnetInfo

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.

resource belongs. the API will get the named virtual network for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the virtual network.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (VnetInfo)

    operation results.



33613
33614
33615
33616
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API will get the named virtual network for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the virtual network.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



33654
33655
33656
33657
33658
33659
33660
33661
33662
33663
33664
33665
33666
33667
33668
33669
33670
33671
33672
33673
33674
33675
33676
33677
33678
33679
33680
33681
33682
33683
33684
33685
33686
33687
33688
33689
33690
33691
33692
33693
33694
33695
33696
33697
33698
33699
33700
33701
33702
33703
33704
33705
33706
33707
33708
33709
33710
33711
33712
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API will get the named virtual network for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the virtual network.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



33634
33635
33636
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the virtual network.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



36723
36724
36725
# 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) ⇒ WebJob

Get webjob information for an app, or a deployment slot.

Get webjob information for an app, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of the web job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (WebJob)

    operation results.



37664
37665
37666
37667
# 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) ⇒ Concurrent::Promise

Get webjob information for an app, or a deployment slot.

Get webjob information for an app, or a deployment slot.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of the web job.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



37701
37702
37703
37704
37705
37706
37707
37708
37709
37710
37711
37712
37713
37714
37715
37716
37717
37718
37719
37720
37721
37722
37723
37724
37725
37726
37727
37728
37729
37730
37731
37732
37733
37734
37735
37736
37737
37738
37739
37740
37741
37742
37743
37744
37745
37746
37747
37748
37749
37750
37751
37752
37753
37754
37755
37756
37757
37758
# 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) ⇒ WebJob

Get webjob information for an app, or a deployment slot.

Get webjob information for an app, or a deployment slot.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of the web job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (WebJob)

    operation results.



34635
34636
34637
34638
# 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) ⇒ Concurrent::Promise

Get webjob information for an app, or a deployment slot.

Get webjob information for an app, or a deployment slot.

resource belongs. the API returns deployments for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of the web job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



34676
34677
34678
34679
34680
34681
34682
34683
34684
34685
34686
34687
34688
34689
34690
34691
34692
34693
34694
34695
34696
34697
34698
34699
34700
34701
34702
34703
34704
34705
34706
34707
34708
34709
34710
34711
34712
34713
34714
34715
34716
34717
34718
34719
34720
34721
34722
34723
34724
34725
34726
34727
34728
34729
34730
34731
34732
34733
34734
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get webjob information for an app, or a deployment slot.

Get webjob information for an app, or a deployment slot.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of the web job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



34656
34657
34658
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get webjob information for an app, or a deployment slot.

Get webjob information for an app, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of the web job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



37683
37684
37685
# 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) ⇒ NOT_IMPLEMENTED

Gets the last lines of docker logs for the given site

Gets the last lines of docker logs for the given site

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (NOT_IMPLEMENTED)

    operation results.



4924
4925
4926
4927
# 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) ⇒ Concurrent::Promise

Gets the last lines of docker logs for the given site

Gets the last lines of docker logs for the given site

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
# 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) ⇒ NOT_IMPLEMENTED

Gets the last lines of docker logs for the given site

Gets the last lines of docker logs for the given site

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (NOT_IMPLEMENTED)

    operation results.



20389
20390
20391
20392
# 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) ⇒ Concurrent::Promise

Gets the last lines of docker logs for the given site

Gets the last lines of docker logs for the given site

resource belongs. to production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



20428
20429
20430
20431
20432
20433
20434
20435
20436
20437
20438
20439
20440
20441
20442
20443
20444
20445
20446
20447
20448
20449
20450
20451
20452
20453
20454
20455
20456
20457
20458
20459
20460
20461
20462
20463
20464
20465
20466
20467
20468
20469
20470
20471
20472
20473
20474
20475
20476
20477
20478
20479
20480
20481
20482
20483
20484
20485
20486
20487
20488
20489
20490
20491
20492
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the last lines of docker logs for the given site

Gets the last lines of docker logs for the given site

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



20409
20410
20411
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the last lines of docker logs for the given site

Gets the last lines of docker logs for the given site

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



4942
4943
4944
# 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) ⇒ MsRestAzure::AzureOperationResponse

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

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

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



258
259
260
# 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) ⇒ SiteExtensionInfo

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

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

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • site_extension_id (String)

    Site extension name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteExtensionInfo)

    operation results.



15405
15406
15407
15408
# 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) ⇒ Concurrent::Promise

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • site_extension_id (String)

    Site extension name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
# 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) ⇒ SiteExtensionInfo

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

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

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • site_extension_id (String)

    Site extension name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteExtensionInfo)

    operation results.



31377
31378
31379
31380
# 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) ⇒ Concurrent::Promise

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • site_extension_id (String)

    Site extension name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



31395
31396
31397
31398
31399
31400
31401
31402
31403
31404
31405
31406
31407
31408
31409
31410
31411
# 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) ⇒ SiteCloneability

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteCloneability)

    operation results.



10873
10874
10875
10876
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
# 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) ⇒ SiteCloneability

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.

resource belongs. returns information on the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. By default, this API

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteCloneability)

    operation results.



26689
26690
26691
26692
# 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) ⇒ Concurrent::Promise

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.

resource belongs. returns information on the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. By default, this API

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



26728
26729
26730
26731
26732
26733
26734
26735
26736
26737
26738
26739
26740
26741
26742
26743
26744
26745
26746
26747
26748
26749
26750
26751
26752
26753
26754
26755
26756
26757
26758
26759
26760
26761
26762
26763
26764
26765
26766
26767
26768
26769
26770
26771
26772
26773
26774
26775
26776
26777
26778
26779
26780
26781
26782
26783
26784
26785
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. returns information on the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. By default, this API

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



26709
26710
26711
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



10891
10892
10893
# 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) ⇒ Array<Site>

Get all apps for a subscription.

Get all apps for a subscription.

will be added to the HTTP request.

Parameters:

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<Site>)

    operation results.



34
35
36
37
# 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) ⇒ StringDictionary

Gets the application settings of an app.

Gets the application settings of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (StringDictionary)

    operation results.



1713
1714
1715
1716
# 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) ⇒ Concurrent::Promise

Gets the application settings of an app.

Gets the application settings of an app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
# 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) ⇒ StringDictionary

Gets the application settings of an app.

Gets the application settings of an app.

resource belongs. the API will get the application settings for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (StringDictionary)

    operation results.



17224
17225
17226
17227
# 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) ⇒ Concurrent::Promise

Gets the application settings of an app.

Gets the application settings of an app.

resource belongs. the API will get the application settings for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the application settings of an app.

Gets the application settings of an app.

resource belongs. the API will get the application settings for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



17244
17245
17246
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the application settings of an app.

Gets the application settings of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1731
1732
1733
# 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) ⇒ WebAppCollection

Get all apps for a subscription.

Get all apps for a subscription.

will be added to the HTTP request.

response.

Parameters:

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (WebAppCollection)

    which provide lazy access to pages of the



46593
46594
46595
46596
46597
46598
46599
46600
46601
46602
# 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) ⇒ Concurrent::Promise

Get all apps for a subscription.

Get all apps for a subscription.

to the HTTP request.

Parameters:

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# 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) ⇒ AzureStoragePropertyDictionaryResource

Gets the Azure storage account configurations of an app.

Gets the Azure storage account configurations of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (AzureStoragePropertyDictionaryResource)

    operation results.



2165
2166
2167
2168
# 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) ⇒ Concurrent::Promise

Gets the Azure storage account configurations of an app.

Gets the Azure storage account configurations of an app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
# 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) ⇒ AzureStoragePropertyDictionaryResource

Gets the Azure storage account configurations of an app.

Gets the Azure storage account configurations of an app.

resource belongs. the API will update the Azure storage account configurations for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (AzureStoragePropertyDictionaryResource)

    operation results.



17708
17709
17710
17711
# 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) ⇒ Concurrent::Promise

Gets the Azure storage account configurations of an app.

Gets the Azure storage account configurations of an app.

resource belongs. the API will update the Azure storage account configurations for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
17802
17803
17804
17805
17806
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the Azure storage account configurations of an app.

Gets the Azure storage account configurations of an app.

resource belongs. the API will update the Azure storage account configurations for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



17729
17730
17731
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the Azure storage account configurations of an app.

Gets the Azure storage account configurations of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2183
2184
2185
# 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) ⇒ BackupItem

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • backup_id (String)

    ID of backup.

  • request (BackupRequest)

    Information on backup request.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BackupItem)

    operation results.



1313
1314
1315
1316
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • backup_id (String)

    ID of backup.

  • request (BackupRequest)

    Information on backup request.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
# 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) ⇒ BackupItem

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.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • backup_id (String)

    ID of backup.

  • request (BackupRequest)

    Information on backup request.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BackupItem)

    operation results.



16799
16800
16801
16802
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • backup_id (String)

    ID of backup.

  • request (BackupRequest)

    Information on backup request.

  • slot (String)

    Name of web app slot. If not specified then will default

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • backup_id (String)

    ID of backup.

  • request (BackupRequest)

    Information on backup request.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



16827
16828
16829
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • backup_id (String)

    ID of backup.

  • request (BackupRequest)

    Information on backup request.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1339
1340
1341
# 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) ⇒ Array<BackupItem>

Gets existing backups of an app.

Gets existing backups of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<BackupItem>)

    operation results.



990
991
992
993
# 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) ⇒ BackupItemCollection

Gets existing backups of an app.

Gets existing backups of an app.

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BackupItemCollection)

    which provide lazy access to pages of the



46645
46646
46647
46648
46649
46650
46651
46652
46653
46654
# 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) ⇒ Concurrent::Promise

Gets existing backups of an app.

Gets existing backups of an app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
# 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) ⇒ BackupItemCollection

Gets existing backups of an app.

Gets existing backups of an app.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BackupItemCollection)

    operation results.



41410
41411
41412
41413
# 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) ⇒ Concurrent::Promise

Gets existing backups of an app.

Gets existing backups of an app.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



41443
41444
41445
41446
41447
41448
41449
41450
41451
41452
41453
41454
41455
41456
41457
41458
41459
41460
41461
41462
41463
41464
41465
41466
41467
41468
41469
41470
41471
41472
41473
41474
41475
41476
41477
41478
41479
41480
41481
41482
41483
41484
41485
41486
41487
41488
41489
41490
41491
41492
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets existing backups of an app.

Gets existing backups of an app.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



41427
41428
41429
# 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) ⇒ Array<BackupItem>

Gets existing backups of an app.

Gets existing backups of an app.

resource belongs. the API will get backups of the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<BackupItem>)

    operation results.



16455
16456
16457
16458
# 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) ⇒ BackupItemCollection

Gets existing backups of an app.

Gets existing backups of an app.

resource belongs. the API will get backups of the production slot. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BackupItemCollection)

    which provide lazy access to pages of the



47209
47210
47211
47212
47213
47214
47215
47216
47217
47218
# 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) ⇒ Concurrent::Promise

Gets existing backups of an app.

Gets existing backups of an app.

resource belongs. the API will get backups of the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
# 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) ⇒ BackupItemCollection

Gets existing backups of an app.

Gets existing backups of an app.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BackupItemCollection)

    operation results.



43468
43469
43470
43471
# 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) ⇒ Concurrent::Promise

Gets existing backups of an app.

Gets existing backups of an app.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



43501
43502
43503
43504
43505
43506
43507
43508
43509
43510
43511
43512
43513
43514
43515
43516
43517
43518
43519
43520
43521
43522
43523
43524
43525
43526
43527
43528
43529
43530
43531
43532
43533
43534
43535
43536
43537
43538
43539
43540
43541
43542
43543
43544
43545
43546
43547
43548
43549
43550
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets existing backups of an app.

Gets existing backups of an app.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



43485
43486
43487
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets existing backups of an app.

Gets existing backups of an app.

resource belongs. the API will get backups of the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



16475
16476
16477
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets existing backups of an app.

Gets existing backups of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1008
1009
1010
# 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) ⇒ Array<Site>

Gets all web, mobile, and API apps in the specified resource group.

Gets all web, mobile, and API apps in the specified resource group.

resource belongs. deployment slots in results. The default is false, which only gives you the production slot of all apps. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • include_slots (Boolean) (defaults to: nil)

    Specify <strong>true</strong> to include

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<Site>)

    operation results.



131
132
133
134
# 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) ⇒ WebAppCollection

Gets all web, mobile, and API apps in the specified resource group.

Gets all web, mobile, and API apps in the specified resource group.

resource belongs. deployment slots in results. The default is false, which only gives you the production slot of all apps. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • include_slots (Boolean) (defaults to: nil)

    Specify <strong>true</strong> to include

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (WebAppCollection)

    which provide lazy access to pages of the



46620
46621
46622
46623
46624
46625
46626
46627
46628
46629
# 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) ⇒ Concurrent::Promise

Gets all web, mobile, and API apps in the specified resource group.

Gets all web, mobile, and API apps in the specified resource group.

resource belongs. deployment slots in results. The default is false, which only gives you the production slot of all apps. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • include_slots (Boolean) (defaults to: nil)

    Specify <strong>true</strong> to include

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# 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) ⇒ WebAppCollection

Gets all web, mobile, and API apps in the specified resource group.

Gets all web, mobile, and API apps in the specified resource group.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (WebAppCollection)

    operation results.



41314
41315
41316
41317
# 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) ⇒ Concurrent::Promise

Gets all web, mobile, and API apps in the specified resource group.

Gets all web, mobile, and API apps in the specified resource group.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



41347
41348
41349
41350
41351
41352
41353
41354
41355
41356
41357
41358
41359
41360
41361
41362
41363
41364
41365
41366
41367
41368
41369
41370
41371
41372
41373
41374
41375
41376
41377
41378
41379
41380
41381
41382
41383
41384
41385
41386
41387
41388
41389
41390
41391
41392
41393
41394
41395
41396
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets all web, mobile, and API apps in the specified resource group.

Gets all web, mobile, and API apps in the specified resource group.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



41331
41332
41333
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets all web, mobile, and API apps in the specified resource group.

Gets all web, mobile, and API apps in the specified resource group.

resource belongs. deployment slots in results. The default is false, which only gives you the production slot of all apps. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • include_slots (Boolean) (defaults to: nil)

    Specify <strong>true</strong> to include

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



151
152
153
# 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) ⇒ Array<SiteConfigurationSnapshotInfo>

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<SiteConfigurationSnapshotInfo>)

    operation results.



4605
4606
4607
4608
# 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) ⇒ SiteConfigurationSnapshotInfoCollection

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.

resource belongs. will be added to the HTTP request.

to pages of the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteConfigurationSnapshotInfoCollection)

    which provide lazy access



46697
46698
46699
46700
46701
46702
46703
46704
46705
46706
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
# 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) ⇒ SiteConfigurationSnapshotInfoCollection

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteConfigurationSnapshotInfoCollection)

    operation results.



41604
41605
41606
41607
# 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) ⇒ Concurrent::Promise

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.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



41641
41642
41643
41644
41645
41646
41647
41648
41649
41650
41651
41652
41653
41654
41655
41656
41657
41658
41659
41660
41661
41662
41663
41664
41665
41666
41667
41668
41669
41670
41671
41672
41673
41674
41675
41676
41677
41678
41679
41680
41681
41682
41683
41684
41685
41686
41687
41688
41689
41690
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



41623
41624
41625
# 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) ⇒ Array<SiteConfigurationSnapshotInfo>

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.

resource belongs. the API will return configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<SiteConfigurationSnapshotInfo>)

    operation results.



20049
20050
20051
20052
# 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) ⇒ SiteConfigurationSnapshotInfoCollection

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.

resource belongs. the API will return configuration for the production slot. will be added to the HTTP request.

to pages of the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteConfigurationSnapshotInfoCollection)

    which provide lazy access



47265
47266
47267
47268
47269
47270
47271
47272
47273
47274
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API will return configuration for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



20092
20093
20094
20095
20096
20097
20098
20099
20100
20101
20102
20103
20104
20105
20106
20107
20108
20109
20110
20111
20112
20113
20114
20115
20116
20117
20118
20119
20120
20121
20122
20123
20124
20125
20126
20127
20128
20129
20130
20131
20132
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147
20148
20149
# 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) ⇒ SiteConfigurationSnapshotInfoCollection

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteConfigurationSnapshotInfoCollection)

    operation results.



43662
43663
43664
43665
# 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) ⇒ Concurrent::Promise

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.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



43699
43700
43701
43702
43703
43704
43705
43706
43707
43708
43709
43710
43711
43712
43713
43714
43715
43716
43717
43718
43719
43720
43721
43722
43723
43724
43725
43726
43727
43728
43729
43730
43731
43732
43733
43734
43735
43736
43737
43738
43739
43740
43741
43742
43743
43744
43745
43746
43747
43748
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



43681
43682
43683
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API will return configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



20071
20072
20073
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



4625
4626
4627
# 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) ⇒ Array<SiteConfigResource>

List the configurations of an app

List the configurations of an app

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<SiteConfigResource>)

    operation results.



1490
1491
1492
1493
# 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) ⇒ SiteConfigResourceCollection

List the configurations of an app

List the configurations of an app

resource belongs. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteConfigResourceCollection)

    which provide lazy access to pages of



46670
46671
46672
46673
46674
46675
46676
46677
46678
46679
# 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) ⇒ Concurrent::Promise

List the configurations of an app

List the configurations of an app

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
# 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) ⇒ SiteConfigResourceCollection

List the configurations of an app

List the configurations of an app

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteConfigResourceCollection)

    operation results.



41506
41507
41508
41509
# 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) ⇒ Concurrent::Promise

List the configurations of an app

List the configurations of an app

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



41539
41540
41541
41542
41543
41544
41545
41546
41547
41548
41549
41550
41551
41552
41553
41554
41555
41556
41557
41558
41559
41560
41561
41562
41563
41564
41565
41566
41567
41568
41569
41570
41571
41572
41573
41574
41575
41576
41577
41578
41579
41580
41581
41582
41583
41584
41585
41586
41587
41588
# 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) ⇒ MsRestAzure::AzureOperationResponse

List the configurations of an app

List the configurations of an app

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



41523
41524
41525
# 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) ⇒ Array<SiteConfigResource>

List the configurations of an app

List the configurations of an app

resource belongs. the API will return configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<SiteConfigResource>)

    operation results.



16987
16988
16989
16990
# 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) ⇒ SiteConfigResourceCollection

List the configurations of an app

List the configurations of an app

resource belongs. the API will return configuration for the production slot. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteConfigResourceCollection)

    which provide lazy access to pages of



47236
47237
47238
47239
47240
47241
47242
47243
47244
47245
# 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) ⇒ Concurrent::Promise

List the configurations of an app

List the configurations of an app

resource belongs. the API will return configuration for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
# 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) ⇒ SiteConfigResourceCollection

List the configurations of an app

List the configurations of an app

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteConfigResourceCollection)

    operation results.



43564
43565
43566
43567
# 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) ⇒ Concurrent::Promise

List the configurations of an app

List the configurations of an app

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



43597
43598
43599
43600
43601
43602
43603
43604
43605
43606
43607
43608
43609
43610
43611
43612
43613
43614
43615
43616
43617
43618
43619
43620
43621
43622
43623
43624
43625
43626
43627
43628
43629
43630
43631
43632
43633
43634
43635
43636
43637
43638
43639
43640
43641
43642
43643
43644
43645
43646
# 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) ⇒ MsRestAzure::AzureOperationResponse

List the configurations of an app

List the configurations of an app

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



43581
43582
43583
# 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) ⇒ MsRestAzure::AzureOperationResponse

List the configurations of an app

List the configurations of an app

resource belongs. the API will return configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



17007
17008
17009
# 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) ⇒ MsRestAzure::AzureOperationResponse

List the configurations of an app

List the configurations of an app

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1508
1509
1510
# 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) ⇒ ConnectionStringDictionary

Gets the connection strings of an app.

Gets the connection strings of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ConnectionStringDictionary)

    operation results.



2709
2710
2711
2712
# 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) ⇒ Concurrent::Promise

Gets the connection strings of an app.

Gets the connection strings of an app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
# 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) ⇒ ConnectionStringDictionary

Gets the connection strings of an app.

Gets the connection strings of an app.

resource belongs. the API will get the connection settings for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ConnectionStringDictionary)

    operation results.



18289
18290
18291
18292
# 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) ⇒ Concurrent::Promise

Gets the connection strings of an app.

Gets the connection strings of an app.

resource belongs. the API will get the connection settings for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



18328
18329
18330
18331
18332
18333
18334
18335
18336
18337
18338
18339
18340
18341
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373
18374
18375
18376
18377
18378
18379
18380
18381
18382
18383
18384
18385
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the connection strings of an app.

Gets the connection strings of an app.

resource belongs. the API will get the connection settings for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



18309
18310
18311
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the connection strings of an app.

Gets the connection strings of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2727
2728
2729
# 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) ⇒ Array<ContinuousWebJob>

List continuous web jobs for an app, or a deployment slot.

List continuous web jobs for an app, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<ContinuousWebJob>)

    operation results.



5150
5151
5152
5153
# 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) ⇒ ContinuousWebJobCollection

List continuous web jobs for an app, or a deployment slot.

List continuous web jobs for an app, or a deployment slot.

resource belongs. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ContinuousWebJobCollection)

    which provide lazy access to pages of



46722
46723
46724
46725
46726
46727
46728
46729
46730
46731
# 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) ⇒ Concurrent::Promise

List continuous web jobs for an app, or a deployment slot.

List continuous web jobs for an app, or a deployment slot.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
# 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) ⇒ ContinuousWebJobCollection

List continuous web jobs for an app, or a deployment slot.

List continuous web jobs for an app, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ContinuousWebJobCollection)

    operation results.



41704
41705
41706
41707
# 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) ⇒ Concurrent::Promise

List continuous web jobs for an app, or a deployment slot.

List continuous web jobs for an app, or a deployment slot.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



41737
41738
41739
41740
41741
41742
41743
41744
41745
41746
41747
41748
41749
41750
41751
41752
41753
41754
41755
41756
41757
41758
41759
41760
41761
41762
41763
41764
41765
41766
41767
41768
41769
41770
41771
41772
41773
41774
41775
41776
41777
41778
41779
41780
41781
41782
41783
41784
41785
41786
# 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) ⇒ MsRestAzure::AzureOperationResponse

List continuous web jobs for an app, or a deployment slot.

List continuous web jobs for an app, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



41721
41722
41723
# 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) ⇒ Array<ContinuousWebJob>

List continuous web jobs for an app, or a deployment slot.

List continuous web jobs for an app, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<ContinuousWebJob>)

    operation results.



20629
20630
20631
20632
# 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) ⇒ ContinuousWebJobCollection

List continuous web jobs for an app, or a deployment slot.

List continuous web jobs for an app, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ContinuousWebJobCollection)

    which provide lazy access to pages of



47292
47293
47294
47295
47296
47297
47298
47299
47300
47301
# 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) ⇒ Concurrent::Promise

List continuous web jobs for an app, or a deployment slot.

List continuous web jobs for an app, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



20668
20669
20670
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680
20681
20682
20683
20684
20685
20686
20687
20688
20689
20690
20691
20692
20693
20694
20695
20696
20697
20698
20699
20700
20701
20702
20703
20704
20705
20706
20707
20708
20709
20710
20711
20712
20713
20714
20715
20716
20717
20718
20719
20720
20721
20722
20723
20724
20725
# 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) ⇒ ContinuousWebJobCollection

List continuous web jobs for an app, or a deployment slot.

List continuous web jobs for an app, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ContinuousWebJobCollection)

    operation results.



43762
43763
43764
43765
# 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) ⇒ Concurrent::Promise

List continuous web jobs for an app, or a deployment slot.

List continuous web jobs for an app, or a deployment slot.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



43795
43796
43797
43798
43799
43800
43801
43802
43803
43804
43805
43806
43807
43808
43809
43810
43811
43812
43813
43814
43815
43816
43817
43818
43819
43820
43821
43822
43823
43824
43825
43826
43827
43828
43829
43830
43831
43832
43833
43834
43835
43836
43837
43838
43839
43840
43841
43842
43843
43844
# 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) ⇒ MsRestAzure::AzureOperationResponse

List continuous web jobs for an app, or a deployment slot.

List continuous web jobs for an app, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



43779
43780
43781
# 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) ⇒ MsRestAzure::AzureOperationResponse

List continuous web jobs for an app, or a deployment slot.

List continuous web jobs for an app, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



20649
20650
20651
# 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) ⇒ MsRestAzure::AzureOperationResponse

List continuous web jobs for an app, or a deployment slot.

List continuous web jobs for an app, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



5168
5169
5170
# 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) ⇒ Deployment

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.

resource belongs. name property in the JSON response from “GET /api/sites/siteName/deployments”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    The ID of a specific deployment. This is the value of the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Deployment)

    operation results.



6102
6103
6104
6105
# 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) ⇒ Concurrent::Promise

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.

resource belongs. name property in the JSON response from “GET /api/sites/siteName/deployments”. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    The ID of a specific deployment. This is the value of the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
# 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) ⇒ Deployment

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.

resource belongs. name property in the JSON response from “GET /api/sites/siteName/deployments”. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    The ID of a specific deployment. This is the value of the

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Deployment)

    operation results.



21644
21645
21646
21647
# 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) ⇒ Concurrent::Promise

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.

resource belongs. name property in the JSON response from “GET /api/sites/siteName/deployments”. the API returns deployments for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    The ID of a specific deployment. This is the value of the

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



21689
21690
21691
21692
21693
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706
21707
21708
21709
21710
21711
21712
21713
21714
21715
21716
21717
21718
21719
21720
21721
21722
21723
21724
21725
21726
21727
21728
21729
21730
21731
21732
21733
21734
21735
21736
21737
21738
21739
21740
21741
21742
21743
21744
21745
21746
21747
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. name property in the JSON response from “GET /api/sites/siteName/deployments”. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    The ID of a specific deployment. This is the value of the

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



21667
21668
21669
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. name property in the JSON response from “GET /api/sites/siteName/deployments”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • id (String)

    The ID of a specific deployment. This is the value of the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



6123
6124
6125
# 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) ⇒ Array<Deployment>

List deployments for an app, or a deployment slot.

List deployments for an app, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<Deployment>)

    operation results.



5663
5664
5665
5666
# 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) ⇒ DeploymentCollection

List deployments for an app, or a deployment slot.

List deployments for an app, or a deployment slot.

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (DeploymentCollection)

    which provide lazy access to pages of the



46747
46748
46749
46750
46751
46752
46753
46754
46755
46756
# 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) ⇒ Concurrent::Promise

List deployments for an app, or a deployment slot.

List deployments for an app, or a deployment slot.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
# 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) ⇒ DeploymentCollection

List deployments for an app, or a deployment slot.

List deployments for an app, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (DeploymentCollection)

    operation results.



41800
41801
41802
41803
# 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) ⇒ Concurrent::Promise

List deployments for an app, or a deployment slot.

List deployments for an app, or a deployment slot.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



41833
41834
41835
41836
41837
41838
41839
41840
41841
41842
41843
41844
41845
41846
41847
41848
41849
41850
41851
41852
41853
41854
41855
41856
41857
41858
41859
41860
41861
41862
41863
41864
41865
41866
41867
41868
41869
41870
41871
41872
41873
41874
41875
41876
41877
41878
41879
41880
41881
41882
# 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) ⇒ MsRestAzure::AzureOperationResponse

List deployments for an app, or a deployment slot.

List deployments for an app, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



41817
41818
41819
# 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) ⇒ Array<Deployment>

List deployments for an app, or a deployment slot.

List deployments for an app, or a deployment slot.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<Deployment>)

    operation results.



21177
21178
21179
21180
# 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) ⇒ DeploymentCollection

List deployments for an app, or a deployment slot.

List deployments for an app, or a deployment slot.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (DeploymentCollection)

    which provide lazy access to pages of the



47319
47320
47321
47322
47323
47324
47325
47326
47327
47328
# 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) ⇒ Concurrent::Promise

List deployments for an app, or a deployment slot.

List deployments for an app, or a deployment slot.

resource belongs. the API returns deployments for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



21216
21217
21218
21219
21220
21221
21222
21223
21224
21225
21226
21227
21228
21229
21230
21231
21232
21233
21234
21235
21236
21237
21238
21239
21240
21241
21242
21243
21244
21245
21246
21247
21248
21249
21250
21251
21252
21253
21254
21255
21256
21257
21258
21259
21260
21261
21262
21263
21264
21265
21266
21267
21268
21269
21270
21271
21272
21273
# 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) ⇒ DeploymentCollection

List deployments for an app, or a deployment slot.

List deployments for an app, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (DeploymentCollection)

    operation results.



43858
43859
43860
43861
# 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) ⇒ Concurrent::Promise

List deployments for an app, or a deployment slot.

List deployments for an app, or a deployment slot.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



43891
43892
43893
43894
43895
43896
43897
43898
43899
43900
43901
43902
43903
43904
43905
43906
43907
43908
43909
43910
43911
43912
43913
43914
43915
43916
43917
43918
43919
43920
43921
43922
43923
43924
43925
43926
43927
43928
43929
43930
43931
43932
43933
43934
43935
43936
43937
43938
43939
43940
# 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) ⇒ MsRestAzure::AzureOperationResponse

List deployments for an app, or a deployment slot.

List deployments for an app, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



43875
43876
43877
# 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) ⇒ MsRestAzure::AzureOperationResponse

List deployments for an app, or a deployment slot.

List deployments for an app, or a deployment slot.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



21197
21198
21199
# 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) ⇒ MsRestAzure::AzureOperationResponse

List deployments for an app, or a deployment slot.

List deployments for an app, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



5681
5682
5683
# 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) ⇒ Array<Identifier>

Lists ownership identifiers for domain associated with web app.

Lists ownership identifiers for domain associated with web app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<Identifier>)

    operation results.



6341
6342
6343
6344
# 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) ⇒ IdentifierCollection

Lists ownership identifiers for domain associated with web app.

Lists ownership identifiers for domain associated with web app.

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (IdentifierCollection)

    which provide lazy access to pages of the



46772
46773
46774
46775
46776
46777
46778
46779
46780
46781
# 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) ⇒ Concurrent::Promise

Lists ownership identifiers for domain associated with web app.

Lists ownership identifiers for domain associated with web app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
# 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) ⇒ IdentifierCollection

Lists ownership identifiers for domain associated with web app.

Lists ownership identifiers for domain associated with web app.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (IdentifierCollection)

    operation results.



41896
41897
41898
41899
# 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) ⇒ Concurrent::Promise

Lists ownership identifiers for domain associated with web app.

Lists ownership identifiers for domain associated with web app.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



41929
41930
41931
41932
41933
41934
41935
41936
41937
41938
41939
41940
41941
41942
41943
41944
41945
41946
41947
41948
41949
41950
41951
41952
41953
41954
41955
41956
41957
41958
41959
41960
41961
41962
41963
41964
41965
41966
41967
41968
41969
41970
41971
41972
41973
41974
41975
41976
41977
41978
# 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) ⇒ MsRestAzure::AzureOperationResponse

Lists ownership identifiers for domain associated with web app.

Lists ownership identifiers for domain associated with web app.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



41913
41914
41915
# 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) ⇒ Array<Identifier>

Lists ownership identifiers for domain associated with web app.

Lists ownership identifiers for domain associated with web app.

resource belongs. the API will delete the binding for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<Identifier>)

    operation results.



21897
21898
21899
21900
# 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) ⇒ IdentifierCollection

Lists ownership identifiers for domain associated with web app.

Lists ownership identifiers for domain associated with web app.

resource belongs. the API will delete the binding for the production slot. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (IdentifierCollection)

    which provide lazy access to pages of the



47346
47347
47348
47349
47350
47351
47352
47353
47354
47355
# 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) ⇒ Concurrent::Promise

Lists ownership identifiers for domain associated with web app.

Lists ownership identifiers for domain associated with web app.

resource belongs. the API will delete the binding for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



21936
21937
21938
21939
21940
21941
21942
21943
21944
21945
21946
21947
21948
21949
21950
21951
21952
21953
21954
21955
21956
21957
21958
21959
21960
21961
21962
21963
21964
21965
21966
21967
21968
21969
21970
21971
21972
21973
21974
21975
21976
21977
21978
21979
21980
21981
21982
21983
21984
21985
21986
21987
21988
21989
21990
21991
21992
21993
# 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) ⇒ IdentifierCollection

Lists ownership identifiers for domain associated with web app.

Lists ownership identifiers for domain associated with web app.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (IdentifierCollection)

    operation results.



43954
43955
43956
43957
# 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) ⇒ Concurrent::Promise

Lists ownership identifiers for domain associated with web app.

Lists ownership identifiers for domain associated with web app.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



43987
43988
43989
43990
43991
43992
43993
43994
43995
43996
43997
43998
43999
44000
44001
44002
44003
44004
44005
44006
44007
44008
44009
44010
44011
44012
44013
44014
44015
44016
44017
44018
44019
44020
44021
44022
44023
44024
44025
44026
44027
44028
44029
44030
44031
44032
44033
44034
44035
44036
# 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) ⇒ MsRestAzure::AzureOperationResponse

Lists ownership identifiers for domain associated with web app.

Lists ownership identifiers for domain associated with web app.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



43971
43972
43973
# 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) ⇒ MsRestAzure::AzureOperationResponse

Lists ownership identifiers for domain associated with web app.

Lists ownership identifiers for domain associated with web app.

resource belongs. the API will delete the binding for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



21917
21918
21919
# 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) ⇒ MsRestAzure::AzureOperationResponse

Lists ownership identifiers for domain associated with web app.

Lists ownership identifiers for domain associated with web app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



6359
6360
6361
# 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) ⇒ FunctionSecrets

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (FunctionSecrets)

    operation results.



7667
7668
7669
7670
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
# 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) ⇒ FunctionSecrets

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.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (FunctionSecrets)

    operation results.



23308
23309
23310
23311
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API deletes a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



23349
23350
23351
23352
23353
23354
23355
23356
23357
23358
23359
23360
23361
23362
23363
23364
23365
23366
23367
23368
23369
23370
23371
23372
23373
23374
23375
23376
23377
23378
23379
23380
23381
23382
23383
23384
23385
23386
23387
23388
23389
23390
23391
23392
23393
23394
23395
23396
23397
23398
23399
23400
23401
23402
23403
23404
23405
23406
23407
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



23329
23330
23331
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • function_name (String)

    Function name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



7686
7687
7688
# 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) ⇒ Array<FunctionEnvelope>

List the functions for a web site, or a deployment slot.

List the functions for a web site, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<FunctionEnvelope>)

    operation results.



7188
7189
7190
7191
# 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) ⇒ FunctionEnvelopeCollection

List the functions for a web site, or a deployment slot.

List the functions for a web site, or a deployment slot.

resource belongs. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (FunctionEnvelopeCollection)

    which provide lazy access to pages of



46797
46798
46799
46800
46801
46802
46803
46804
46805
46806
# 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) ⇒ Concurrent::Promise

List the functions for a web site, or a deployment slot.

List the functions for a web site, or a deployment slot.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
# 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) ⇒ FunctionEnvelopeCollection

List the functions for a web site, or a deployment slot.

List the functions for a web site, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (FunctionEnvelopeCollection)

    operation results.



41992
41993
41994
41995
# 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) ⇒ Concurrent::Promise

List the functions for a web site, or a deployment slot.

List the functions for a web site, or a deployment slot.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



42025
42026
42027
42028
42029
42030
42031
42032
42033
42034
42035
42036
42037
42038
42039
42040
42041
42042
42043
42044
42045
42046
42047
42048
42049
42050
42051
42052
42053
42054
42055
42056
42057
42058
42059
42060
42061
42062
42063
42064
42065
42066
42067
42068
42069
42070
42071
42072
42073
42074
# 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) ⇒ MsRestAzure::AzureOperationResponse

List the functions for a web site, or a deployment slot.

List the functions for a web site, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



42009
42010
42011
# 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) ⇒ MsRestAzure::AzureOperationResponse

List the functions for a web site, or a deployment slot.

List the functions for a web site, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



7206
7207
7208
# 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) ⇒ Array<HostNameBinding>

Get hostname bindings for an app or a deployment slot.

Get hostname bindings for an app or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<HostNameBinding>)

    operation results.



7776
7777
7778
7779
# 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) ⇒ HostNameBindingCollection

Get hostname bindings for an app or a deployment slot.

Get hostname bindings for an app or a deployment slot.

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (HostNameBindingCollection)

    which provide lazy access to pages of the



46822
46823
46824
46825
46826
46827
46828
46829
46830
46831
# 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) ⇒ Concurrent::Promise

Get hostname bindings for an app or a deployment slot.

Get hostname bindings for an app or a deployment slot.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
# 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) ⇒ HostNameBindingCollection

Get hostname bindings for an app or a deployment slot.

Get hostname bindings for an app or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (HostNameBindingCollection)

    operation results.



42088
42089
42090
42091
# 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) ⇒ Concurrent::Promise

Get hostname bindings for an app or a deployment slot.

Get hostname bindings for an app or a deployment slot.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



42121
42122
42123
42124
42125
42126
42127
42128
42129
42130
42131
42132
42133
42134
42135
42136
42137
42138
42139
42140
42141
42142
42143
42144
42145
42146
42147
42148
42149
42150
42151
42152
42153
42154
42155
42156
42157
42158
42159
42160
42161
42162
42163
42164
42165
42166
42167
42168
42169
42170
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get hostname bindings for an app or a deployment slot.

Get hostname bindings for an app or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



42105
42106
42107
# 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) ⇒ Array<HostNameBinding>

Get hostname bindings for an app or a deployment slot.

Get hostname bindings for an app or a deployment slot.

resource belongs. the API gets hostname bindings for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<HostNameBinding>)

    operation results.



23424
23425
23426
23427
# 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) ⇒ HostNameBindingCollection

Get hostname bindings for an app or a deployment slot.

Get hostname bindings for an app or a deployment slot.

resource belongs. the API gets hostname bindings for the production slot. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (HostNameBindingCollection)

    which provide lazy access to pages of the



47400
47401
47402
47403
47404
47405
47406
47407
47408
47409
# 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) ⇒ Concurrent::Promise

Get hostname bindings for an app or a deployment slot.

Get hostname bindings for an app or a deployment slot.

resource belongs. the API gets hostname bindings for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



23463
23464
23465
23466
23467
23468
23469
23470
23471
23472
23473
23474
23475
23476
23477
23478
23479
23480
23481
23482
23483
23484
23485
23486
23487
23488
23489
23490
23491
23492
23493
23494
23495
23496
23497
23498
23499
23500
23501
23502
23503
23504
23505
23506
23507
23508
23509
23510
23511
23512
23513
23514
23515
23516
23517
23518
23519
23520
# 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) ⇒ HostNameBindingCollection

Get hostname bindings for an app or a deployment slot.

Get hostname bindings for an app or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (HostNameBindingCollection)

    operation results.



44146
44147
44148
44149
# 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) ⇒ Concurrent::Promise

Get hostname bindings for an app or a deployment slot.

Get hostname bindings for an app or a deployment slot.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



44179
44180
44181
44182
44183
44184
44185
44186
44187
44188
44189
44190
44191
44192
44193
44194
44195
44196
44197
44198
44199
44200
44201
44202
44203
44204
44205
44206
44207
44208
44209
44210
44211
44212
44213
44214
44215
44216
44217
44218
44219
44220
44221
44222
44223
44224
44225
44226
44227
44228
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get hostname bindings for an app or a deployment slot.

Get hostname bindings for an app or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



44163
44164
44165
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get hostname bindings for an app or a deployment slot.

Get hostname bindings for an app or a deployment slot.

resource belongs. the API gets hostname bindings for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



23444
23445
23446
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get hostname bindings for an app or a deployment slot.

Get hostname bindings for an app or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



7794
7795
7796
# 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) ⇒ HybridConnectionKey

Gets the send key name and value for a Hybrid Connection.

Gets the send key name and value for a Hybrid Connection.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (HybridConnectionKey)

    operation results.



8690
8691
8692
8693
# 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) ⇒ Concurrent::Promise

Gets the send key name and value for a Hybrid Connection.

Gets the send key name and value for a Hybrid Connection.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
# 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) ⇒ HybridConnectionKey

Gets the send key name and value for a Hybrid Connection.

Gets the send key name and value for a Hybrid Connection.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • slot (String)

    The name of the slot for the web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (HybridConnectionKey)

    operation results.



24381
24382
24383
24384
# 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) ⇒ Concurrent::Promise

Gets the send key name and value for a Hybrid Connection.

Gets the send key name and value for a Hybrid Connection.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • slot (String)

    The name of the slot for the web app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



24422
24423
24424
24425
24426
24427
24428
24429
24430
24431
24432
24433
24434
24435
24436
24437
24438
24439
24440
24441
24442
24443
24444
24445
24446
24447
24448
24449
24450
24451
24452
24453
24454
24455
24456
24457
24458
24459
24460
24461
24462
24463
24464
24465
24466
24467
24468
24469
24470
24471
24472
24473
24474
24475
24476
24477
24478
24479
24480
24481
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the send key name and value for a Hybrid Connection.

Gets the send key name and value for a Hybrid Connection.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • slot (String)

    The name of the slot for the web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



24402
24403
24404
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the send key name and value for a Hybrid Connection.

Gets the send key name and value for a Hybrid Connection.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



8710
8711
8712
# 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) ⇒ HybridConnection

Retrieves all Service Bus Hybrid Connections used by this Web App.

Retrieves all Service Bus Hybrid Connections used by this Web App.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (HybridConnection)

    operation results.



8802
8803
8804
8805
# 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) ⇒ Concurrent::Promise

Retrieves all Service Bus Hybrid Connections used by this Web App.

Retrieves all Service Bus Hybrid Connections used by this Web App.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
# 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) ⇒ HybridConnection

Retrieves all Service Bus Hybrid Connections used by this Web App.

Retrieves all Service Bus Hybrid Connections used by this Web App.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • slot (String)

    The name of the slot for the web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (HybridConnection)

    operation results.



24497
24498
24499
24500
# 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) ⇒ Concurrent::Promise

Retrieves all Service Bus Hybrid Connections used by this Web App.

Retrieves all Service Bus Hybrid Connections used by this Web App.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • slot (String)

    The name of the slot for the web app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



24534
24535
24536
24537
24538
24539
24540
24541
24542
24543
24544
24545
24546
24547
24548
24549
24550
24551
24552
24553
24554
24555
24556
24557
24558
24559
24560
24561
24562
24563
24564
24565
24566
24567
24568
24569
24570
24571
24572
24573
24574
24575
24576
24577
24578
24579
24580
24581
24582
24583
24584
24585
24586
24587
24588
24589
24590
24591
# 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) ⇒ MsRestAzure::AzureOperationResponse

Retrieves all Service Bus Hybrid Connections used by this Web App.

Retrieves all Service Bus Hybrid Connections used by this Web App.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • slot (String)

    The name of the slot for the web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



24516
24517
24518
# 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) ⇒ MsRestAzure::AzureOperationResponse

Retrieves all Service Bus Hybrid Connections used by this Web App.

Retrieves all Service Bus Hybrid Connections used by this Web App.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



8820
8821
8822
# 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) ⇒ Array<FunctionEnvelope>

List the functions for a web site, or a deployment slot.

List the functions for a web site, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<FunctionEnvelope>)

    operation results.



22797
22798
22799
22800
# 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) ⇒ FunctionEnvelopeCollection

List the functions for a web site, or a deployment slot.

List the functions for a web site, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (FunctionEnvelopeCollection)

    which provide lazy access to pages of



47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
# 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) ⇒ Concurrent::Promise

List the functions for a web site, or a deployment slot.

List the functions for a web site, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



22836
22837
22838
22839
22840
22841
22842
22843
22844
22845
22846
22847
22848
22849
22850
22851
22852
22853
22854
22855
22856
22857
22858
22859
22860
22861
22862
22863
22864
22865
22866
22867
22868
22869
22870
22871
22872
22873
22874
22875
22876
22877
22878
22879
22880
22881
22882
22883
22884
22885
22886
22887
22888
22889
22890
22891
22892
22893
# 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) ⇒ FunctionEnvelopeCollection

List the functions for a web site, or a deployment slot.

List the functions for a web site, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (FunctionEnvelopeCollection)

    operation results.



44050
44051
44052
44053
# 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) ⇒ Concurrent::Promise

List the functions for a web site, or a deployment slot.

List the functions for a web site, or a deployment slot.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



44083
44084
44085
44086
44087
44088
44089
44090
44091
44092
44093
44094
44095
44096
44097
44098
44099
44100
44101
44102
44103
44104
44105
44106
44107
44108
44109
44110
44111
44112
44113
44114
44115
44116
44117
44118
44119
44120
44121
44122
44123
44124
44125
44126
44127
44128
44129
44130
44131
44132
# 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) ⇒ MsRestAzure::AzureOperationResponse

List the functions for a web site, or a deployment slot.

List the functions for a web site, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



44067
44068
44069
# 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) ⇒ MsRestAzure::AzureOperationResponse

List the functions for a web site, or a deployment slot.

List the functions for a web site, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



22817
22818
22819
# 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) ⇒ Array<SiteInstance>

Gets all scale-out instances of an app.

Gets all scale-out instances of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<SiteInstance>)

    operation results.



9489
9490
9491
9492
# 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) ⇒ WebAppInstanceCollection

Gets all scale-out instances of an app.

Gets all scale-out instances of an app.

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (WebAppInstanceCollection)

    which provide lazy access to pages of the



46847
46848
46849
46850
46851
46852
46853
46854
46855
46856
# 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) ⇒ Concurrent::Promise

Gets all scale-out instances of an app.

Gets all scale-out instances of an app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
# 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) ⇒ WebAppInstanceCollection

Gets all scale-out instances of an app.

Gets all scale-out instances of an app.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (WebAppInstanceCollection)

    operation results.



42184
42185
42186
42187
# 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) ⇒ Concurrent::Promise

Gets all scale-out instances of an app.

Gets all scale-out instances of an app.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



42217
42218
42219
42220
42221
42222
42223
42224
42225
42226
42227
42228
42229
42230
42231
42232
42233
42234
42235
42236
42237
42238
42239
42240
42241
42242
42243
42244
42245
42246
42247
42248
42249
42250
42251
42252
42253
42254
42255
42256
42257
42258
42259
42260
42261
42262
42263
42264
42265
42266
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets all scale-out instances of an app.

Gets all scale-out instances of an app.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



42201
42202
42203
# 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) ⇒ Array<SiteInstance>

Gets all scale-out instances of an app.

Gets all scale-out instances of an app.

resource belongs. the API gets the production slot instances. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<SiteInstance>)

    operation results.



25224
25225
25226
25227
# 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) ⇒ WebAppInstanceCollection

Gets all scale-out instances of an app.

Gets all scale-out instances of an app.

resource belongs. the API gets the production slot instances. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (WebAppInstanceCollection)

    which provide lazy access to pages of the



47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
# 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) ⇒ Concurrent::Promise

Gets all scale-out instances of an app.

Gets all scale-out instances of an app.

resource belongs. the API gets the production slot instances. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



25263
25264
25265
25266
25267
25268
25269
25270
25271
25272
25273
25274
25275
25276
25277
25278
25279
25280
25281
25282
25283
25284
25285
25286
25287
25288
25289
25290
25291
25292
25293
25294
25295
25296
25297
25298
25299
25300
25301
25302
25303
25304
25305
25306
25307
25308
25309
25310
25311
25312
25313
25314
25315
25316
25317
25318
25319
25320
# 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) ⇒ WebAppInstanceCollection

Gets all scale-out instances of an app.

Gets all scale-out instances of an app.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (WebAppInstanceCollection)

    operation results.



44242
44243
44244
44245
# 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) ⇒ Concurrent::Promise

Gets all scale-out instances of an app.

Gets all scale-out instances of an app.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



44275
44276
44277
44278
44279
44280
44281
44282
44283
44284
44285
44286
44287
44288
44289
44290
44291
44292
44293
44294
44295
44296
44297
44298
44299
44300
44301
44302
44303
44304
44305
44306
44307
44308
44309
44310
44311
44312
44313
44314
44315
44316
44317
44318
44319
44320
44321
44322
44323
44324
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets all scale-out instances of an app.

Gets all scale-out instances of an app.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



44259
44260
44261
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets all scale-out instances of an app.

Gets all scale-out instances of an app.

resource belongs. the API gets the production slot instances. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



25244
25245
25246
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets all scale-out instances of an app.

Gets all scale-out instances of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



9507
9508
9509
# 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) ⇒ Array<ProcessModuleInfo>

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<ProcessModuleInfo>)

    operation results.



10367
10368
10369
10370
# 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) ⇒ ProcessModuleInfoCollection

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessModuleInfoCollection)

    which provide lazy access to pages of



46908
46909
46910
46911
46912
46913
46914
46915
46916
46917
# 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) ⇒ Concurrent::Promise

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
# 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) ⇒ ProcessModuleInfoCollection

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessModuleInfoCollection)

    operation results.



42384
42385
42386
42387
# 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) ⇒ Concurrent::Promise

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.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



42421
42422
42423
42424
42425
42426
42427
42428
42429
42430
42431
42432
42433
42434
42435
42436
42437
42438
42439
42440
42441
42442
42443
42444
42445
42446
42447
42448
42449
42450
42451
42452
42453
42454
42455
42456
42457
42458
42459
42460
42461
42462
42463
42464
42465
42466
42467
42468
42469
42470
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



42403
42404
42405
# 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) ⇒ Array<ProcessModuleInfo>

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<ProcessModuleInfo>)

    operation results.



26155
26156
26157
26158
# 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) ⇒ ProcessModuleInfoCollection

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessModuleInfoCollection)

    which provide lazy access to pages of



47492
47493
47494
47495
47496
47497
47498
47499
47500
47501
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



26206
26207
26208
26209
26210
26211
26212
26213
26214
26215
26216
26217
26218
26219
26220
26221
26222
26223
26224
26225
26226
26227
26228
26229
26230
26231
26232
26233
26234
26235
26236
26237
26238
26239
26240
26241
26242
26243
26244
26245
26246
26247
26248
26249
26250
26251
26252
26253
26254
26255
26256
26257
26258
26259
26260
26261
26262
26263
26264
26265
# 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) ⇒ ProcessModuleInfoCollection

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessModuleInfoCollection)

    operation results.



44442
44443
44444
44445
# 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) ⇒ Concurrent::Promise

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.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



44479
44480
44481
44482
44483
44484
44485
44486
44487
44488
44489
44490
44491
44492
44493
44494
44495
44496
44497
44498
44499
44500
44501
44502
44503
44504
44505
44506
44507
44508
44509
44510
44511
44512
44513
44514
44515
44516
44517
44518
44519
44520
44521
44522
44523
44524
44525
44526
44527
44528
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



44461
44462
44463
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



26181
26182
26183
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



10391
10392
10393
# 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) ⇒ Array<ProcessThreadInfo>

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<ProcessThreadInfo>)

    operation results.



10623
10624
10625
10626
# 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) ⇒ ProcessThreadInfoCollection

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessThreadInfoCollection)

    which provide lazy access to pages of



46939
46940
46941
46942
46943
46944
46945
46946
46947
46948
# 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) ⇒ Concurrent::Promise

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
# 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) ⇒ ProcessThreadInfoCollection

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessThreadInfoCollection)

    operation results.



42486
42487
42488
42489
# 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) ⇒ Concurrent::Promise

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.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



42523
42524
42525
42526
42527
42528
42529
42530
42531
42532
42533
42534
42535
42536
42537
42538
42539
42540
42541
42542
42543
42544
42545
42546
42547
42548
42549
42550
42551
42552
42553
42554
42555
42556
42557
42558
42559
42560
42561
42562
42563
42564
42565
42566
42567
42568
42569
42570
42571
42572
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



42505
42506
42507
# 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) ⇒ Array<ProcessThreadInfo>

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<ProcessThreadInfo>)

    operation results.



26425
26426
26427
26428
# 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) ⇒ ProcessThreadInfoCollection

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessThreadInfoCollection)

    which provide lazy access to pages of



47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



26476
26477
26478
26479
26480
26481
26482
26483
26484
26485
26486
26487
26488
26489
26490
26491
26492
26493
26494
26495
26496
26497
26498
26499
26500
26501
26502
26503
26504
26505
26506
26507
26508
26509
26510
26511
26512
26513
26514
26515
26516
26517
26518
26519
26520
26521
26522
26523
26524
26525
26526
26527
26528
26529
26530
26531
26532
26533
26534
26535
# 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) ⇒ ProcessThreadInfoCollection

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessThreadInfoCollection)

    operation results.



44544
44545
44546
44547
# 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) ⇒ Concurrent::Promise

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.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



44581
44582
44583
44584
44585
44586
44587
44588
44589
44590
44591
44592
44593
44594
44595
44596
44597
44598
44599
44600
44601
44602
44603
44604
44605
44606
44607
44608
44609
44610
44611
44612
44613
44614
44615
44616
44617
44618
44619
44620
44621
44622
44623
44624
44625
44626
44627
44628
44629
44630
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



44563
44564
44565
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



26451
26452
26453
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



10647
10648
10649
# 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) ⇒ Array<ProcessInfo>

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<ProcessInfo>)

    operation results.



9870
9871
9872
9873
# 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) ⇒ ProcessInfoCollection

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessInfoCollection)

    which provide lazy access to pages of the



46877
46878
46879
46880
46881
46882
46883
46884
46885
46886
# 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) ⇒ Concurrent::Promise

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
# 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) ⇒ ProcessInfoCollection

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessInfoCollection)

    operation results.



42282
42283
42284
42285
# 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) ⇒ Concurrent::Promise

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.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



42319
42320
42321
42322
42323
42324
42325
42326
42327
42328
42329
42330
42331
42332
42333
42334
42335
42336
42337
42338
42339
42340
42341
42342
42343
42344
42345
42346
42347
42348
42349
42350
42351
42352
42353
42354
42355
42356
42357
42358
42359
42360
42361
42362
42363
42364
42365
42366
42367
42368
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



42301
42302
42303
# 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) ⇒ Array<ProcessInfo>

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<ProcessInfo>)

    operation results.



25630
25631
25632
25633
# 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) ⇒ ProcessInfoCollection

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessInfoCollection)

    which provide lazy access to pages of the



47459
47460
47461
47462
47463
47464
47465
47466
47467
47468
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



25679
25680
25681
25682
25683
25684
25685
25686
25687
25688
25689
25690
25691
25692
25693
25694
25695
25696
25697
25698
25699
25700
25701
25702
25703
25704
25705
25706
25707
25708
25709
25710
25711
25712
25713
25714
25715
25716
25717
25718
25719
25720
25721
25722
25723
25724
25725
25726
25727
25728
25729
25730
25731
25732
25733
25734
25735
25736
25737
# 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) ⇒ ProcessInfoCollection

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessInfoCollection)

    operation results.



44340
44341
44342
44343
# 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) ⇒ Concurrent::Promise

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.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



44377
44378
44379
44380
44381
44382
44383
44384
44385
44386
44387
44388
44389
44390
44391
44392
44393
44394
44395
44396
44397
44398
44399
44400
44401
44402
44403
44404
44405
44406
44407
44408
44409
44410
44411
44412
44413
44414
44415
44416
44417
44418
44419
44420
44421
44422
44423
44424
44425
44426
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



44359
44360
44361
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API returns deployments for the production slot. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



25655
25656
25657
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. value of the name property in the JSON response from “GET api/sites/siteName/instances”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • instance_id (String)

    ID of a specific scaled-out instance. This is the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



9893
9894
9895
# 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) ⇒ StringDictionary

Gets the metadata of an app.

Gets the metadata of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (StringDictionary)

    operation results.



3161
3162
3163
3164
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb', line 3161

def (resource_group_name, name, custom_headers:nil)
  response = (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) ⇒ Concurrent::Promise

Gets the metadata of an app.

Gets the metadata of an app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb', line 3196

def (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) ⇒ StringDictionary

Gets the metadata of an app.

Gets the metadata of an app.

resource belongs. the API will get the metadata for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (StringDictionary)

    operation results.



18769
18770
18771
18772
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb', line 18769

def (resource_group_name, name, slot, custom_headers:nil)
  response = (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) ⇒ Concurrent::Promise

Gets the metadata of an app.

Gets the metadata of an app.

resource belongs. the API will get the metadata for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



18808
18809
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
18825
18826
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856
18857
18858
18859
18860
18861
18862
18863
18864
18865
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb', line 18808

def (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) ⇒ MsRestAzure::AzureOperationResponse

Gets the metadata of an app.

Gets the metadata of an app.

resource belongs. the API will get the metadata for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



18789
18790
18791
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb', line 18789

def (resource_group_name, name, slot, custom_headers:nil)
  (resource_group_name, name, slot, custom_headers:custom_headers).value!
end

#list_metadata_with_http_info(resource_group_name, name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets the metadata of an app.

Gets the metadata of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3179
3180
3181
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb', line 3179

def (resource_group_name, name, custom_headers:nil)
  (resource_group_name, name, custom_headers:custom_headers).value!
end

#list_metric_definitions(resource_group_name, name, custom_headers: nil) ⇒ Array<ResourceMetricDefinition>

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<ResourceMetricDefinition>)

    operation results.



11085
11086
11087
11088
# 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) ⇒ ResourceMetricDefinitionCollection

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

resource belongs. will be added to the HTTP request.

pages of the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ResourceMetricDefinitionCollection)

    which provide lazy access to



46964
46965
46966
46967
46968
46969
46970
46971
46972
46973
# 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) ⇒ Concurrent::Promise

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
# 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) ⇒ ResourceMetricDefinitionCollection

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ResourceMetricDefinitionCollection)

    operation results.



42586
42587
42588
42589
# 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) ⇒ Concurrent::Promise

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



42619
42620
42621
42622
42623
42624
42625
42626
42627
42628
42629
42630
42631
42632
42633
42634
42635
42636
42637
42638
42639
42640
42641
42642
42643
42644
42645
42646
42647
42648
42649
42650
42651
42652
42653
42654
42655
42656
42657
42658
42659
42660
42661
42662
42663
42664
42665
42666
42667
42668
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



42603
42604
42605
# 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) ⇒ Array<ResourceMetricDefinition>

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

resource belongs. the API will get metric definitions of the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<ResourceMetricDefinition>)

    operation results.



26915
26916
26917
26918
# 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) ⇒ ResourceMetricDefinitionCollection

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

resource belongs. the API will get metric definitions of the production slot. will be added to the HTTP request.

pages of the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ResourceMetricDefinitionCollection)

    which provide lazy access to



47552
47553
47554
47555
47556
47557
47558
47559
47560
47561
# 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) ⇒ Concurrent::Promise

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

resource belongs. the API will get metric definitions of the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



26954
26955
26956
26957
26958
26959
26960
26961
26962
26963
26964
26965
26966
26967
26968
26969
26970
26971
26972
26973
26974
26975
26976
26977
26978
26979
26980
26981
26982
26983
26984
26985
26986
26987
26988
26989
26990
26991
26992
26993
26994
26995
26996
26997
26998
26999
27000
27001
27002
27003
27004
27005
27006
27007
27008
27009
27010
27011
# 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) ⇒ ResourceMetricDefinitionCollection

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ResourceMetricDefinitionCollection)

    operation results.



44644
44645
44646
44647
# 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) ⇒ Concurrent::Promise

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



44677
44678
44679
44680
44681
44682
44683
44684
44685
44686
44687
44688
44689
44690
44691
44692
44693
44694
44695
44696
44697
44698
44699
44700
44701
44702
44703
44704
44705
44706
44707
44708
44709
44710
44711
44712
44713
44714
44715
44716
44717
44718
44719
44720
44721
44722
44723
44724
44725
44726
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



44661
44662
44663
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

resource belongs. the API will get metric definitions of the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



26935
26936
26937
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets all metric definitions of an app (or deployment slot, if specified).

Gets all metric definitions of an app (or deployment slot, if specified).

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



11103
11104
11105
# 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) ⇒ Array<ResourceMetric>

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

resource belongs. response. It is “false” by default. 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’‘. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • details (Boolean) (defaults to: nil)

    Specify “true” to include metric details in the

  • filter (String) (defaults to: nil)

    Return only metrics specified in the filter (using

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<ResourceMetric>)

    operation results.



11197
11198
11199
11200
# 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) ⇒ ResourceMetricCollection

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

resource belongs. response. It is “false” by default. 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’‘. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • details (Boolean) (defaults to: nil)

    Specify “true” to include metric details in the

  • filter (String) (defaults to: nil)

    Return only metrics specified in the filter (using

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ResourceMetricCollection)

    which provide lazy access to pages of the



46995
46996
46997
46998
46999
47000
47001
47002
47003
47004
# 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) ⇒ Concurrent::Promise

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

resource belongs. response. It is “false” by default. 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’‘. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • details (Boolean) (defaults to: nil)

    Specify “true” to include metric details in the

  • filter (String) (defaults to: nil)

    Return only metrics specified in the filter (using

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
# 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) ⇒ ResourceMetricCollection

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ResourceMetricCollection)

    operation results.



42682
42683
42684
42685
# 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) ⇒ Concurrent::Promise

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



42715
42716
42717
42718
42719
42720
42721
42722
42723
42724
42725
42726
42727
42728
42729
42730
42731
42732
42733
42734
42735
42736
42737
42738
42739
42740
42741
42742
42743
42744
42745
42746
42747
42748
42749
42750
42751
42752
42753
42754
42755
42756
42757
42758
42759
42760
42761
42762
42763
42764
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



42699
42700
42701
# 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) ⇒ Array<ResourceMetric>

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

resource belongs. the API will get metrics of the production slot. response. It is “false” by default. 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’‘. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • details (Boolean) (defaults to: nil)

    Specify “true” to include metric details in the

  • filter (String) (defaults to: nil)

    Return only metrics specified in the filter (using

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<ResourceMetric>)

    operation results.



27034
27035
27036
27037
# 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) ⇒ ResourceMetricCollection

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

resource belongs. the API will get metrics of the production slot. response. It is “false” by default. 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’‘. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • details (Boolean) (defaults to: nil)

    Specify “true” to include metric details in the

  • filter (String) (defaults to: nil)

    Return only metrics specified in the filter (using

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ResourceMetricCollection)

    which provide lazy access to pages of the



47585
47586
47587
47588
47589
47590
47591
47592
47593
47594
# 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) ⇒ Concurrent::Promise

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

resource belongs. the API will get metrics of the production slot. response. It is “false” by default. 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’‘. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • details (Boolean) (defaults to: nil)

    Specify “true” to include metric details in the

  • filter (String) (defaults to: nil)

    Return only metrics specified in the filter (using

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



27085
27086
27087
27088
27089
27090
27091
27092
27093
27094
27095
27096
27097
27098
27099
27100
27101
27102
27103
27104
27105
27106
27107
27108
27109
27110
27111
27112
27113
27114
27115
27116
27117
27118
27119
27120
27121
27122
27123
27124
27125
27126
27127
27128
27129
27130
27131
27132
27133
27134
27135
27136
27137
27138
27139
27140
27141
27142
27143
# 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) ⇒ ResourceMetricCollection

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ResourceMetricCollection)

    operation results.



44740
44741
44742
44743
# 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) ⇒ Concurrent::Promise

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



44773
44774
44775
44776
44777
44778
44779
44780
44781
44782
44783
44784
44785
44786
44787
44788
44789
44790
44791
44792
44793
44794
44795
44796
44797
44798
44799
44800
44801
44802
44803
44804
44805
44806
44807
44808
44809
44810
44811
44812
44813
44814
44815
44816
44817
44818
44819
44820
44821
44822
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



44757
44758
44759
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

resource belongs. the API will get metrics of the production slot. response. It is “false” by default. 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’‘. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • details (Boolean) (defaults to: nil)

    Specify “true” to include metric details in the

  • filter (String) (defaults to: nil)

    Return only metrics specified in the filter (using

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



27060
27061
27062
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets performance metrics of an app (or deployment slot, if specified).

Gets performance metrics of an app (or deployment slot, if specified).

resource belongs. response. It is “false” by default. 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’‘. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • details (Boolean) (defaults to: nil)

    Specify “true” to include metric details in the

  • filter (String) (defaults to: nil)

    Return only metrics specified in the filter (using

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



11221
11222
11223
# 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) ⇒ NetworkFeatures

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).

resource belongs. “detailed”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • view (String)

    The type of view. This can either be “summary” or

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (NetworkFeatures)

    operation results.



11532
11533
11534
11535
# 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) ⇒ Concurrent::Promise

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).

resource belongs. “detailed”. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • view (String)

    The type of view. This can either be “summary” or

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
# 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) ⇒ NetworkFeatures

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).

resource belongs. “detailed”. the API will get network features for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • view (String)

    The type of view. This can either be “summary” or

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (NetworkFeatures)

    operation results.



27278
27279
27280
27281
# 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) ⇒ Concurrent::Promise

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).

resource belongs. “detailed”. the API will get network features for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • view (String)

    The type of view. This can either be “summary” or

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



27321
27322
27323
27324
27325
27326
27327
27328
27329
27330
27331
27332
27333
27334
27335
27336
27337
27338
27339
27340
27341
27342
27343
27344
27345
27346
27347
27348
27349
27350
27351
27352
27353
27354
27355
27356
27357
27358
27359
27360
27361
27362
27363
27364
27365
27366
27367
27368
27369
27370
27371
27372
27373
27374
27375
27376
27377
27378
27379
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. “detailed”. the API will get network features for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • view (String)

    The type of view. This can either be “summary” or

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



27300
27301
27302
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. “detailed”. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • view (String)

    The type of view. This can either be “summary” or

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



11552
11553
11554
# 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) ⇒ WebAppCollection

Get all apps for a subscription.

Get all apps for a subscription.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (WebAppCollection)

    operation results.



41218
41219
41220
41221
# 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) ⇒ Concurrent::Promise

Get all apps for a subscription.

Get all apps for a subscription.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



41251
41252
41253
41254
41255
41256
41257
41258
41259
41260
41261
41262
41263
41264
41265
41266
41267
41268
41269
41270
41271
41272
41273
41274
41275
41276
41277
41278
41279
41280
41281
41282
41283
41284
41285
41286
41287
41288
41289
41290
41291
41292
41293
41294
41295
41296
41297
41298
41299
41300
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get all apps for a subscription.

Get all apps for a subscription.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



41235
41236
41237
# 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) ⇒ Array<PerfMonResponse>

Gets perfmon counters for web app.

Gets perfmon counters for web app.

resource belongs. 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’‘. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<PerfMonResponse>)

    operation results.



12308
12309
12310
12311
# 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) ⇒ PerfMonCounterCollection

Gets perfmon counters for web app.

Gets perfmon counters for web app.

resource belongs. 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’‘. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PerfMonCounterCollection)

    which provide lazy access to pages of the



47024
47025
47026
47027
47028
47029
47030
47031
47032
47033
# 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) ⇒ Concurrent::Promise

Gets perfmon counters for web app.

Gets perfmon counters for web app.

resource belongs. 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’‘. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
# 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) ⇒ PerfMonCounterCollection

Gets perfmon counters for web app.

Gets perfmon counters for web app.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PerfMonCounterCollection)

    operation results.



42778
42779
42780
42781
# 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) ⇒ Concurrent::Promise

Gets perfmon counters for web app.

Gets perfmon counters for web app.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



42811
42812
42813
42814
42815
42816
42817
42818
42819
42820
42821
42822
42823
42824
42825
42826
42827
42828
42829
42830
42831
42832
42833
42834
42835
42836
42837
42838
42839
42840
42841
42842
42843
42844
42845
42846
42847
42848
42849
42850
42851
42852
42853
42854
42855
42856
42857
42858
42859
42860
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets perfmon counters for web app.

Gets perfmon counters for web app.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



42795
42796
42797
# 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) ⇒ Array<PerfMonResponse>

Gets perfmon counters for web app.

Gets perfmon counters for web app.

resource belongs. to production slot. 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’‘. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<PerfMonResponse>)

    operation results.



28092
28093
28094
28095
# 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) ⇒ PerfMonCounterCollection

Gets perfmon counters for web app.

Gets perfmon counters for web app.

resource belongs. to production slot. 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’‘. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PerfMonCounterCollection)

    which provide lazy access to pages of the



47616
47617
47618
47619
47620
47621
47622
47623
47624
47625
# 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) ⇒ Concurrent::Promise

Gets perfmon counters for web app.

Gets perfmon counters for web app.

resource belongs. to production slot. 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’‘. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



28139
28140
28141
28142
28143
28144
28145
28146
28147
28148
28149
28150
28151
28152
28153
28154
28155
28156
28157
28158
28159
28160
28161
28162
28163
28164
28165
28166
28167
28168
28169
28170
28171
28172
28173
28174
28175
28176
28177
28178
28179
28180
28181
28182
28183
28184
28185
28186
28187
28188
28189
28190
28191
28192
28193
28194
28195
28196
28197
# 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) ⇒ PerfMonCounterCollection

Gets perfmon counters for web app.

Gets perfmon counters for web app.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PerfMonCounterCollection)

    operation results.



44836
44837
44838
44839
# 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) ⇒ Concurrent::Promise

Gets perfmon counters for web app.

Gets perfmon counters for web app.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



44869
44870
44871
44872
44873
44874
44875
44876
44877
44878
44879
44880
44881
44882
44883
44884
44885
44886
44887
44888
44889
44890
44891
44892
44893
44894
44895
44896
44897
44898
44899
44900
44901
44902
44903
44904
44905
44906
44907
44908
44909
44910
44911
44912
44913
44914
44915
44916
44917
44918
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets perfmon counters for web app.

Gets perfmon counters for web app.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



44853
44854
44855
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets perfmon counters for web app.

Gets perfmon counters for web app.

resource belongs. to production slot. 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’‘. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



28116
28117
28118
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets perfmon counters for web app.

Gets perfmon counters for web app.

resource belongs. 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’‘. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



12330
12331
12332
# 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) ⇒ PremierAddOn

Gets the premier add-ons of an app.

Gets the premier add-ons of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PremierAddOn)

    operation results.



12529
12530
12531
12532
# 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) ⇒ Concurrent::Promise

Gets the premier add-ons of an app.

Gets the premier add-ons of an app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
# 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) ⇒ PremierAddOn

Gets the premier add-ons of an app.

Gets the premier add-ons of an app.

resource belongs. the API will get the premier add-ons for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PremierAddOn)

    operation results.



28327
28328
28329
28330
# 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) ⇒ Concurrent::Promise

Gets the premier add-ons of an app.

Gets the premier add-ons of an app.

resource belongs. the API will get the premier add-ons for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



28366
28367
28368
28369
28370
28371
28372
28373
28374
28375
28376
28377
28378
28379
28380
28381
28382
28383
28384
28385
28386
28387
28388
28389
28390
28391
28392
28393
28394
28395
28396
28397
28398
28399
28400
28401
28402
28403
28404
28405
28406
28407
28408
28409
28410
28411
28412
28413
28414
28415
28416
28417
28418
28419
28420
28421
28422
28423
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the premier add-ons of an app.

Gets the premier add-ons of an app.

resource belongs. the API will get the premier add-ons for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



28347
28348
28349
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the premier add-ons of an app.

Gets the premier add-ons of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



12547
12548
12549
# 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) ⇒ Array<ProcessModuleInfo>

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<ProcessModuleInfo>)

    operation results.



13786
13787
13788
13789
# 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) ⇒ ProcessModuleInfoCollection

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.

resource belongs. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessModuleInfoCollection)

    which provide lazy access to pages of



47079
47080
47081
47082
47083
47084
47085
47086
47087
47088
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
# 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) ⇒ ProcessModuleInfoCollection

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessModuleInfoCollection)

    operation results.



42978
42979
42980
42981
# 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) ⇒ Concurrent::Promise

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.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



43015
43016
43017
43018
43019
43020
43021
43022
43023
43024
43025
43026
43027
43028
43029
43030
43031
43032
43033
43034
43035
43036
43037
43038
43039
43040
43041
43042
43043
43044
43045
43046
43047
43048
43049
43050
43051
43052
43053
43054
43055
43056
43057
43058
43059
43060
43061
43062
43063
43064
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



42997
42998
42999
# 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) ⇒ Array<ProcessModuleInfo>

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.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<ProcessModuleInfo>)

    operation results.



29655
29656
29657
29658
# 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) ⇒ ProcessModuleInfoCollection

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.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessModuleInfoCollection)

    which provide lazy access to pages of



47675
47676
47677
47678
47679
47680
47681
47682
47683
47684
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API returns deployments for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



29700
29701
29702
29703
29704
29705
29706
29707
29708
29709
29710
29711
29712
29713
29714
29715
29716
29717
29718
29719
29720
29721
29722
29723
29724
29725
29726
29727
29728
29729
29730
29731
29732
29733
29734
29735
29736
29737
29738
29739
29740
29741
29742
29743
29744
29745
29746
29747
29748
29749
29750
29751
29752
29753
29754
29755
29756
29757
29758
# 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) ⇒ ProcessModuleInfoCollection

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessModuleInfoCollection)

    operation results.



45036
45037
45038
45039
# 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) ⇒ Concurrent::Promise

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.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



45073
45074
45075
45076
45077
45078
45079
45080
45081
45082
45083
45084
45085
45086
45087
45088
45089
45090
45091
45092
45093
45094
45095
45096
45097
45098
45099
45100
45101
45102
45103
45104
45105
45106
45107
45108
45109
45110
45111
45112
45113
45114
45115
45116
45117
45118
45119
45120
45121
45122
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



45055
45056
45057
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



29678
29679
29680
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



13807
13808
13809
# 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) ⇒ Array<ProcessThreadInfo>

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<ProcessThreadInfo>)

    operation results.



14022
14023
14024
14025
# 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) ⇒ ProcessThreadInfoCollection

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.

resource belongs. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessThreadInfoCollection)

    which provide lazy access to pages of



47107
47108
47109
47110
47111
47112
47113
47114
47115
47116
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
# 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) ⇒ ProcessThreadInfoCollection

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessThreadInfoCollection)

    operation results.



43080
43081
43082
43083
# 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) ⇒ Concurrent::Promise

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.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



43117
43118
43119
43120
43121
43122
43123
43124
43125
43126
43127
43128
43129
43130
43131
43132
43133
43134
43135
43136
43137
43138
43139
43140
43141
43142
43143
43144
43145
43146
43147
43148
43149
43150
43151
43152
43153
43154
43155
43156
43157
43158
43159
43160
43161
43162
43163
43164
43165
43166
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



43099
43100
43101
# 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) ⇒ Array<ProcessThreadInfo>

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.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<ProcessThreadInfo>)

    operation results.



29905
29906
29907
29908
# 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) ⇒ ProcessThreadInfoCollection

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.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessThreadInfoCollection)

    which provide lazy access to pages of



47705
47706
47707
47708
47709
47710
47711
47712
47713
47714
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API returns deployments for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



29950
29951
29952
29953
29954
29955
29956
29957
29958
29959
29960
29961
29962
29963
29964
29965
29966
29967
29968
29969
29970
29971
29972
29973
29974
29975
29976
29977
29978
29979
29980
29981
29982
29983
29984
29985
29986
29987
29988
29989
29990
29991
29992
29993
29994
29995
29996
29997
29998
29999
30000
30001
30002
30003
30004
30005
30006
30007
30008
# 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) ⇒ ProcessThreadInfoCollection

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessThreadInfoCollection)

    operation results.



45138
45139
45140
45141
# 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) ⇒ Concurrent::Promise

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.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



45175
45176
45177
45178
45179
45180
45181
45182
45183
45184
45185
45186
45187
45188
45189
45190
45191
45192
45193
45194
45195
45196
45197
45198
45199
45200
45201
45202
45203
45204
45205
45206
45207
45208
45209
45210
45211
45212
45213
45214
45215
45216
45217
45218
45219
45220
45221
45222
45223
45224
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



45157
45158
45159
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



29928
29929
29930
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • process_id (String)

    PID.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



14043
14044
14045
# 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) ⇒ Array<ProcessInfo>

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<ProcessInfo>)

    operation results.



13329
13330
13331
13332
# 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) ⇒ ProcessInfoCollection

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.

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessInfoCollection)

    which provide lazy access to pages of the



47051
47052
47053
47054
47055
47056
47057
47058
47059
47060
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
# 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) ⇒ ProcessInfoCollection

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessInfoCollection)

    operation results.



42876
42877
42878
42879
# 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) ⇒ Concurrent::Promise

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.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



42913
42914
42915
42916
42917
42918
42919
42920
42921
42922
42923
42924
42925
42926
42927
42928
42929
42930
42931
42932
42933
42934
42935
42936
42937
42938
42939
42940
42941
42942
42943
42944
42945
42946
42947
42948
42949
42950
42951
42952
42953
42954
42955
42956
42957
42958
42959
42960
42961
42962
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



42895
42896
42897
# 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) ⇒ Array<ProcessInfo>

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.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<ProcessInfo>)

    operation results.



29170
29171
29172
29173
# 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) ⇒ ProcessInfoCollection

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.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessInfoCollection)

    which provide lazy access to pages of the



47645
47646
47647
47648
47649
47650
47651
47652
47653
47654
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API returns deployments for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



29213
29214
29215
29216
29217
29218
29219
29220
29221
29222
29223
29224
29225
29226
29227
29228
29229
29230
29231
29232
29233
29234
29235
29236
29237
29238
29239
29240
29241
29242
29243
29244
29245
29246
29247
29248
29249
29250
29251
29252
29253
29254
29255
29256
29257
29258
29259
29260
29261
29262
29263
29264
29265
29266
29267
29268
29269
29270
# 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) ⇒ ProcessInfoCollection

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProcessInfoCollection)

    operation results.



44934
44935
44936
44937
# 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) ⇒ Concurrent::Promise

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.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



44971
44972
44973
44974
44975
44976
44977
44978
44979
44980
44981
44982
44983
44984
44985
44986
44987
44988
44989
44990
44991
44992
44993
44994
44995
44996
44997
44998
44999
45000
45001
45002
45003
45004
45005
45006
45007
45008
45009
45010
45011
45012
45013
45014
45015
45016
45017
45018
45019
45020
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



44953
44954
44955
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



29192
29193
29194
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



13349
13350
13351
# 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) ⇒ Array<PublicCertificate>

Get public certificates for an app or a deployment slot.

Get public certificates for an app or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<PublicCertificate>)

    operation results.



14255
14256
14257
14258
# 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) ⇒ PublicCertificateCollection

Get public certificates for an app or a deployment slot.

Get public certificates for an app or a deployment slot.

resource belongs. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PublicCertificateCollection)

    which provide lazy access to pages of



47132
47133
47134
47135
47136
47137
47138
47139
47140
47141
# 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) ⇒ Concurrent::Promise

Get public certificates for an app or a deployment slot.

Get public certificates for an app or a deployment slot.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
# 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) ⇒ PublicCertificateCollection

Get public certificates for an app or a deployment slot.

Get public certificates for an app or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PublicCertificateCollection)

    operation results.



43180
43181
43182
43183
# 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) ⇒ Concurrent::Promise

Get public certificates for an app or a deployment slot.

Get public certificates for an app or a deployment slot.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



43213
43214
43215
43216
43217
43218
43219
43220
43221
43222
43223
43224
43225
43226
43227
43228
43229
43230
43231
43232
43233
43234
43235
43236
43237
43238
43239
43240
43241
43242
43243
43244
43245
43246
43247
43248
43249
43250
43251
43252
43253
43254
43255
43256
43257
43258
43259
43260
43261
43262
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get public certificates for an app or a deployment slot.

Get public certificates for an app or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



43197
43198
43199
# 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) ⇒ Array<PublicCertificate>

Get public certificates for an app or a deployment slot.

Get public certificates for an app or a deployment slot.

resource belongs. the API gets hostname bindings for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<PublicCertificate>)

    operation results.



30152
30153
30154
30155
# 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) ⇒ PublicCertificateCollection

Get public certificates for an app or a deployment slot.

Get public certificates for an app or a deployment slot.

resource belongs. the API gets hostname bindings for the production slot. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PublicCertificateCollection)

    which provide lazy access to pages of



47732
47733
47734
47735
47736
47737
47738
47739
47740
47741
# 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) ⇒ Concurrent::Promise

Get public certificates for an app or a deployment slot.

Get public certificates for an app or a deployment slot.

resource belongs. the API gets hostname bindings for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



30191
30192
30193
30194
30195
30196
30197
30198
30199
30200
30201
30202
30203
30204
30205
30206
30207
30208
30209
30210
30211
30212
30213
30214
30215
30216
30217
30218
30219
30220
30221
30222
30223
30224
30225
30226
30227
30228
30229
30230
30231
30232
30233
30234
30235
30236
30237
30238
30239
30240
30241
30242
30243
30244
30245
30246
30247
30248
# 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) ⇒ PublicCertificateCollection

Get public certificates for an app or a deployment slot.

Get public certificates for an app or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PublicCertificateCollection)

    operation results.



45238
45239
45240
45241
# 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) ⇒ Concurrent::Promise

Get public certificates for an app or a deployment slot.

Get public certificates for an app or a deployment slot.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



45271
45272
45273
45274
45275
45276
45277
45278
45279
45280
45281
45282
45283
45284
45285
45286
45287
45288
45289
45290
45291
45292
45293
45294
45295
45296
45297
45298
45299
45300
45301
45302
45303
45304
45305
45306
45307
45308
45309
45310
45311
45312
45313
45314
45315
45316
45317
45318
45319
45320
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get public certificates for an app or a deployment slot.

Get public certificates for an app or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



45255
45256
45257
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get public certificates for an app or a deployment slot.

Get public certificates for an app or a deployment slot.

resource belongs. the API gets hostname bindings for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



30172
30173
30174
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get public certificates for an app or a deployment slot.

Get public certificates for an app or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



14273
14274
14275
# 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) ⇒ User

Gets the Git/FTP publishing credentials of an app.

Gets the Git/FTP publishing credentials of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (User)

    operation results.



3267
3268
3269
3270
# 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) ⇒ Concurrent::Promise

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
# 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) ⇒ User

Gets the Git/FTP publishing credentials of an app.

Gets the Git/FTP publishing credentials of an app.

resource belongs. the API will get the publishing credentials for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (User)

    operation results.



18882
18883
18884
18885
# 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) ⇒ Concurrent::Promise

resource belongs. the API will get the publishing credentials for the production slot. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



18899
18900
18901
18902
18903
18904
18905
18906
18907
18908
18909
18910
18911
18912
18913
18914
18915
# 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) ⇒ NOT_IMPLEMENTED

Gets the publishing profile for an app (or deployment slot, if specified).

Gets the publishing profile for an app (or deployment slot, if specified).

resource belongs. publishingProfileOptions for publishing profile. For example, use “FileZilla3” to get a FileZilla publishing profile. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • publishing_profile_options (CsmPublishingProfileOptions)

    Specifies

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (NOT_IMPLEMENTED)

    operation results.



14703
14704
14705
14706
# 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) ⇒ Concurrent::Promise

Gets the publishing profile for an app (or deployment slot, if specified).

Gets the publishing profile for an app (or deployment slot, if specified).

resource belongs. publishingProfileOptions for publishing profile. For example, use “FileZilla3” to get a FileZilla publishing profile. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • publishing_profile_options (CsmPublishingProfileOptions)

    Specifies

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
# 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) ⇒ NOT_IMPLEMENTED

Gets the publishing profile for an app (or deployment slot, if specified).

Gets the publishing profile for an app (or deployment slot, if specified).

resource belongs. publishingProfileOptions for publishing profile. For example, use “FileZilla3” to get a FileZilla publishing profile. the API will get the publishing profile for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • publishing_profile_options (CsmPublishingProfileOptions)

    Specifies

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (NOT_IMPLEMENTED)

    operation results.



30628
30629
30630
30631
# 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) ⇒ Concurrent::Promise

Gets the publishing profile for an app (or deployment slot, if specified).

Gets the publishing profile for an app (or deployment slot, if specified).

resource belongs. publishingProfileOptions for publishing profile. For example, use “FileZilla3” to get a FileZilla publishing profile. the API will get the publishing profile for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • publishing_profile_options (CsmPublishingProfileOptions)

    Specifies

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



30673
30674
30675
30676
30677
30678
30679
30680
30681
30682
30683
30684
30685
30686
30687
30688
30689
30690
30691
30692
30693
30694
30695
30696
30697
30698
30699
30700
30701
30702
30703
30704
30705
30706
30707
30708
30709
30710
30711
30712
30713
30714
30715
30716
30717
30718
30719
30720
30721
30722
30723
30724
30725
30726
30727
30728
30729
30730
30731
30732
30733
30734
30735
30736
30737
30738
30739
30740
30741
30742
30743
30744
30745
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the publishing profile for an app (or deployment slot, if specified).

Gets the publishing profile for an app (or deployment slot, if specified).

resource belongs. publishingProfileOptions for publishing profile. For example, use “FileZilla3” to get a FileZilla publishing profile. the API will get the publishing profile for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • publishing_profile_options (CsmPublishingProfileOptions)

    Specifies

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



30651
30652
30653
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the publishing profile for an app (or deployment slot, if specified).

Gets the publishing profile for an app (or deployment slot, if specified).

resource belongs. publishingProfileOptions for publishing profile. For example, use “FileZilla3” to get a FileZilla publishing profile. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • publishing_profile_options (CsmPublishingProfileOptions)

    Specifies

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



14724
14725
14726
# 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) ⇒ RelayServiceConnectionEntity

Gets hybrid connections configured for an app (or deployment slot, if specified).

Gets hybrid connections configured for an app (or deployment slot, if specified).

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (RelayServiceConnectionEntity)

    operation results.



8910
8911
8912
8913
# 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) ⇒ Concurrent::Promise

Gets hybrid connections configured for an app (or deployment slot, if specified).

Gets hybrid connections configured for an app (or deployment slot, if specified).

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
# 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) ⇒ RelayServiceConnectionEntity

Gets hybrid connections configured for an app (or deployment slot, if specified).

Gets hybrid connections configured for an app (or deployment slot, if specified).

resource belongs. the API will get hybrid connections for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (RelayServiceConnectionEntity)

    operation results.



24610
24611
24612
24613
# 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) ⇒ Concurrent::Promise

Gets hybrid connections configured for an app (or deployment slot, if specified).

Gets hybrid connections configured for an app (or deployment slot, if specified).

resource belongs. the API will get hybrid connections for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



24653
24654
24655
24656
24657
24658
24659
24660
24661
24662
24663
24664
24665
24666
24667
24668
24669
24670
24671
24672
24673
24674
24675
24676
24677
24678
24679
24680
24681
24682
24683
24684
24685
24686
24687
24688
24689
24690
24691
24692
24693
24694
24695
24696
24697
24698
24699
24700
24701
24702
24703
24704
24705
24706
24707
24708
24709
24710
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets hybrid connections configured for an app (or deployment slot, if specified).

Gets hybrid connections configured for an app (or deployment slot, if specified).

resource belongs. the API will get hybrid connections for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



24632
24633
24634
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets hybrid connections configured for an app (or deployment slot, if specified).

Gets hybrid connections configured for an app (or deployment slot, if specified).

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



8930
8931
8932
# 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) ⇒ Array<SiteExtensionInfo>

Get list of siteextensions for a web site, or a deployment slot.

Get list of siteextensions for a web site, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<SiteExtensionInfo>)

    operation results.



15182
15183
15184
15185
# 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) ⇒ SiteExtensionInfoCollection

Get list of siteextensions for a web site, or a deployment slot.

Get list of siteextensions for a web site, or a deployment slot.

resource belongs. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteExtensionInfoCollection)

    which provide lazy access to pages of



47157
47158
47159
47160
47161
47162
47163
47164
47165
47166
# 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) ⇒ Concurrent::Promise

Get list of siteextensions for a web site, or a deployment slot.

Get list of siteextensions for a web site, or a deployment slot.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
# 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) ⇒ SiteExtensionInfoCollection

Get list of siteextensions for a web site, or a deployment slot.

Get list of siteextensions for a web site, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteExtensionInfoCollection)

    operation results.



43276
43277
43278
43279
# 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) ⇒ Concurrent::Promise

Get list of siteextensions for a web site, or a deployment slot.

Get list of siteextensions for a web site, or a deployment slot.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



43309
43310
43311
43312
43313
43314
43315
43316
43317
43318
43319
43320
43321
43322
43323
43324
43325
43326
43327
43328
43329
43330
43331
43332
43333
43334
43335
43336
43337
43338
43339
43340
43341
43342
43343
43344
43345
43346
43347
43348
43349
43350
43351
43352
43353
43354
43355
43356
43357
43358
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get list of siteextensions for a web site, or a deployment slot.

Get list of siteextensions for a web site, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



43293
43294
43295
# 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) ⇒ Array<SiteExtensionInfo>

Get list of siteextensions for a web site, or a deployment slot.

Get list of siteextensions for a web site, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<SiteExtensionInfo>)

    operation results.



31140
31141
31142
31143
# 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) ⇒ SiteExtensionInfoCollection

Get list of siteextensions for a web site, or a deployment slot.

Get list of siteextensions for a web site, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteExtensionInfoCollection)

    which provide lazy access to pages of



47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
# 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) ⇒ Concurrent::Promise

Get list of siteextensions for a web site, or a deployment slot.

Get list of siteextensions for a web site, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



31179
31180
31181
31182
31183
31184
31185
31186
31187
31188
31189
31190
31191
31192
31193
31194
31195
31196
31197
31198
31199
31200
31201
31202
31203
31204
31205
31206
31207
31208
31209
31210
31211
31212
31213
31214
31215
31216
31217
31218
31219
31220
31221
31222
31223
31224
31225
31226
31227
31228
31229
31230
31231
31232
31233
31234
31235
31236
# 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) ⇒ SiteExtensionInfoCollection

Get list of siteextensions for a web site, or a deployment slot.

Get list of siteextensions for a web site, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteExtensionInfoCollection)

    operation results.



45334
45335
45336
45337
# 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) ⇒ Concurrent::Promise

Get list of siteextensions for a web site, or a deployment slot.

Get list of siteextensions for a web site, or a deployment slot.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



45367
45368
45369
45370
45371
45372
45373
45374
45375
45376
45377
45378
45379
45380
45381
45382
45383
45384
45385
45386
45387
45388
45389
45390
45391
45392
45393
45394
45395
45396
45397
45398
45399
45400
45401
45402
45403
45404
45405
45406
45407
45408
45409
45410
45411
45412
45413
45414
45415
45416
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get list of siteextensions for a web site, or a deployment slot.

Get list of siteextensions for a web site, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



45351
45352
45353
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get list of siteextensions for a web site, or a deployment slot.

Get list of siteextensions for a web site, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



31160
31161
31162
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get list of siteextensions for a web site, or a deployment slot.

Get list of siteextensions for a web site, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



15200
15201
15202
# 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) ⇒ PushSettings

Gets the Push settings associated with web app.

Gets the Push settings associated with web app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PushSettings)

    operation results.



3430
3431
3432
3433
# 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) ⇒ Concurrent::Promise

Gets the Push settings associated with web app.

Gets the Push settings associated with web app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
# 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) ⇒ PushSettings

Gets the Push settings associated with web app.

Gets the Push settings associated with web app.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PushSettings)

    operation results.



19056
19057
19058
19059
# 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) ⇒ Concurrent::Promise

Gets the Push settings associated with web app.

Gets the Push settings associated with web app.

resource belongs. to production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



19095
19096
19097
19098
19099
19100
19101
19102
19103
19104
19105
19106
19107
19108
19109
19110
19111
19112
19113
19114
19115
19116
19117
19118
19119
19120
19121
19122
19123
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147
19148
19149
19150
19151
19152
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the Push settings associated with web app.

Gets the Push settings associated with web app.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



19076
19077
19078
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the Push settings associated with web app.

Gets the Push settings associated with web app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3448
3449
3450
# 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) ⇒ SlotConfigNamesResource

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).

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SlotConfigNamesResource)

    operation results.



3538
3539
3540
3541
# 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) ⇒ Concurrent::Promise

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).

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3558
3559
3560
# 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) ⇒ Array<SlotDifference>

Get the difference in configuration settings between two web app slots.

Get the difference in configuration settings between two web app slots.

resource belongs. slot name. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<SlotDifference>)

    operation results.



34751
34752
34753
34754
# 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) ⇒ SlotDifferenceCollection

Get the difference in configuration settings between two web app slots.

Get the difference in configuration settings between two web app slots.

resource belongs. slot name. See example. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SlotDifferenceCollection)

    which provide lazy access to pages of the



47956
47957
47958
47959
47960
47961
47962
47963
47964
47965
# 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) ⇒ Concurrent::Promise

Get the difference in configuration settings between two web app slots.

Get the difference in configuration settings between two web app slots.

resource belongs. slot name. See example. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



34790
34791
34792
34793
34794
34795
34796
34797
34798
34799
34800
34801
34802
34803
34804
34805
34806
34807
34808
34809
34810
34811
34812
34813
34814
34815
34816
34817
34818
34819
34820
34821
34822
34823
34824
34825
34826
34827
34828
34829
34830
34831
34832
34833
34834
34835
34836
34837
34838
34839
34840
34841
34842
34843
34844
34845
34846
34847
34848
34849
34850
34851
34852
34853
34854
# 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) ⇒ SlotDifferenceCollection

Get the difference in configuration settings between two web app slots.

Get the difference in configuration settings between two web app slots.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SlotDifferenceCollection)

    operation results.



46012
46013
46014
46015
# 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) ⇒ Concurrent::Promise

Get the difference in configuration settings between two web app slots.

Get the difference in configuration settings between two web app slots.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



46045
46046
46047
46048
46049
46050
46051
46052
46053
46054
46055
46056
46057
46058
46059
46060
46061
46062
46063
46064
46065
46066
46067
46068
46069
46070
46071
46072
46073
46074
46075
46076
46077
46078
46079
46080
46081
46082
46083
46084
46085
46086
46087
46088
46089
46090
46091
46092
46093
46094
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get the difference in configuration settings between two web app slots.

Get the difference in configuration settings between two web app slots.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



46029
46030
46031
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get the difference in configuration settings between two web app slots.

Get the difference in configuration settings between two web app slots.

resource belongs. slot name. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



34771
34772
34773
# 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) ⇒ Array<SlotDifference>

Get the difference in configuration settings between two web app slots.

Get the difference in configuration settings between two web app slots.

resource belongs. slot name. See example. production slot is used as the source slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • slot (String)

    Name of the source slot. If a slot is not specified, the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<SlotDifference>)

    operation results.



31536
31537
31538
31539
# 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) ⇒ SlotDifferenceCollection

Get the difference in configuration settings between two web app slots.

Get the difference in configuration settings between two web app slots.

resource belongs. slot name. See example. production slot is used as the source slot. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • slot (String)

    Name of the source slot. If a slot is not specified, the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SlotDifferenceCollection)

    which provide lazy access to pages of the



47788
47789
47790
47791
47792
47793
47794
47795
47796
47797
# 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) ⇒ Concurrent::Promise

Get the difference in configuration settings between two web app slots.

Get the difference in configuration settings between two web app slots.

resource belongs. slot name. See example. production slot is used as the source slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • slot (String)

    Name of the source slot. If a slot is not specified, the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



31579
31580
31581
31582
31583
31584
31585
31586
31587
31588
31589
31590
31591
31592
31593
31594
31595
31596
31597
31598
31599
31600
31601
31602
31603
31604
31605
31606
31607
31608
31609
31610
31611
31612
31613
31614
31615
31616
31617
31618
31619
31620
31621
31622
31623
31624
31625
31626
31627
31628
31629
31630
31631
31632
31633
31634
31635
31636
31637
31638
31639
31640
31641
31642
31643
31644
# 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) ⇒ SlotDifferenceCollection

Get the difference in configuration settings between two web app slots.

Get the difference in configuration settings between two web app slots.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SlotDifferenceCollection)

    operation results.



45430
45431
45432
45433
# 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) ⇒ Concurrent::Promise

Get the difference in configuration settings between two web app slots.

Get the difference in configuration settings between two web app slots.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



45463
45464
45465
45466
45467
45468
45469
45470
45471
45472
45473
45474
45475
45476
45477
45478
45479
45480
45481
45482
45483
45484
45485
45486
45487
45488
45489
45490
45491
45492
45493
45494
45495
45496
45497
45498
45499
45500
45501
45502
45503
45504
45505
45506
45507
45508
45509
45510
45511
45512
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get the difference in configuration settings between two web app slots.

Get the difference in configuration settings between two web app slots.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



45447
45448
45449
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get the difference in configuration settings between two web app slots.

Get the difference in configuration settings between two web app slots.

resource belongs. slot name. See example. production slot is used as the source slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • slot (String)

    Name of the source slot. If a slot is not specified, the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



31558
31559
31560
# 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) ⇒ Array<Site>

Gets an app’s deployment slots.

Gets an app’s deployment slots.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<Site>)

    operation results.



15551
15552
15553
15554
# 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) ⇒ WebAppCollection

Gets an app’s deployment slots.

Gets an app’s deployment slots.

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (WebAppCollection)

    which provide lazy access to pages of the



47182
47183
47184
47185
47186
47187
47188
47189
47190
47191
# 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) ⇒ Concurrent::Promise

Gets an app’s deployment slots.

Gets an app’s deployment slots.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
# 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) ⇒ WebAppCollection

Gets an app’s deployment slots.

Gets an app’s deployment slots.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (WebAppCollection)

    operation results.



43372
43373
43374
43375
# 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) ⇒ Concurrent::Promise

Gets an app’s deployment slots.

Gets an app’s deployment slots.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



43405
43406
43407
43408
43409
43410
43411
43412
43413
43414
43415
43416
43417
43418
43419
43420
43421
43422
43423
43424
43425
43426
43427
43428
43429
43430
43431
43432
43433
43434
43435
43436
43437
43438
43439
43440
43441
43442
43443
43444
43445
43446
43447
43448
43449
43450
43451
43452
43453
43454
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets an app’s deployment slots.

Gets an app’s deployment slots.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



43389
43390
43391
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets an app’s deployment slots.

Gets an app’s deployment slots.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



15569
15570
15571
# 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) ⇒ Array<Snapshot>

Returns all Snapshots to the user.

Returns all Snapshots to the user.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Website Name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<Snapshot>)

    operation results.



34915
34916
34917
34918
# 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) ⇒ SnapshotCollection

Returns all Snapshots to the user.

Returns all Snapshots to the user.

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Website Name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SnapshotCollection)

    which provide lazy access to pages of the



47981
47982
47983
47984
47985
47986
47987
47988
47989
47990
# 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) ⇒ Concurrent::Promise

Returns all Snapshots to the user.

Returns all Snapshots to the user.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Website Name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



34950
34951
34952
34953
34954
34955
34956
34957
34958
34959
34960
34961
34962
34963
34964
34965
34966
34967
34968
34969
34970
34971
34972
34973
34974
34975
34976
34977
34978
34979
34980
34981
34982
34983
34984
34985
34986
34987
34988
34989
34990
34991
34992
34993
34994
34995
34996
34997
34998
34999
35000
35001
35002
35003
35004
35005
35006
# 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) ⇒ SnapshotCollection

Returns all Snapshots to the user.

Returns all Snapshots to the user.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SnapshotCollection)

    operation results.



46108
46109
46110
46111
# 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) ⇒ Concurrent::Promise

Returns all Snapshots to the user.

Returns all Snapshots to the user.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



46141
46142
46143
46144
46145
46146
46147
46148
46149
46150
46151
46152
46153
46154
46155
46156
46157
46158
46159
46160
46161
46162
46163
46164
46165
46166
46167
46168
46169
46170
46171
46172
46173
46174
46175
46176
46177
46178
46179
46180
46181
46182
46183
46184
46185
46186
46187
46188
46189
46190
# 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) ⇒ MsRestAzure::AzureOperationResponse

Returns all Snapshots to the user.

Returns all Snapshots to the user.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



46125
46126
46127
# 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) ⇒ Array<Snapshot>

Returns all Snapshots to the user.

Returns all Snapshots to the user.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Website Name.

  • slot (String)

    Website Slot.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<Snapshot>)

    operation results.



31710
31711
31712
31713
# 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) ⇒ SnapshotCollection

Returns all Snapshots to the user.

Returns all Snapshots to the user.

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Website Name.

  • slot (String)

    Website Slot.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SnapshotCollection)

    which provide lazy access to pages of the



47814
47815
47816
47817
47818
47819
47820
47821
47822
47823
# 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) ⇒ Concurrent::Promise

Returns all Snapshots to the user.

Returns all Snapshots to the user.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Website Name.

  • slot (String)

    Website Slot.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



31747
31748
31749
31750
31751
31752
31753
31754
31755
31756
31757
31758
31759
31760
31761
31762
31763
31764
31765
31766
31767
31768
31769
31770
31771
31772
31773
31774
31775
31776
31777
31778
31779
31780
31781
31782
31783
31784
31785
31786
31787
31788
31789
31790
31791
31792
31793
31794
31795
31796
31797
31798
31799
31800
31801
31802
31803
31804
# 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) ⇒ SnapshotCollection

Returns all Snapshots to the user.

Returns all Snapshots to the user.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SnapshotCollection)

    operation results.



45526
45527
45528
45529
# 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) ⇒ Concurrent::Promise

Returns all Snapshots to the user.

Returns all Snapshots to the user.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



45559
45560
45561
45562
45563
45564
45565
45566
45567
45568
45569
45570
45571
45572
45573
45574
45575
45576
45577
45578
45579
45580
45581
45582
45583
45584
45585
45586
45587
45588
45589
45590
45591
45592
45593
45594
45595
45596
45597
45598
45599
45600
45601
45602
45603
45604
45605
45606
45607
45608
# 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) ⇒ MsRestAzure::AzureOperationResponse

Returns all Snapshots to the user.

Returns all Snapshots to the user.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



45543
45544
45545
# 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) ⇒ MsRestAzure::AzureOperationResponse

Returns all Snapshots to the user.

Returns all Snapshots to the user.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Website Name.

  • slot (String)

    Website Slot.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



31729
31730
31731
# 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) ⇒ MsRestAzure::AzureOperationResponse

Returns all Snapshots to the user.

Returns all Snapshots to the user.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Website Name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



34933
34934
34935
# 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) ⇒ FunctionSecrets

This is to allow calling via powershell and ARM template.

This is to allow calling via powershell and ARM template.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (FunctionSecrets)

    operation results.



10979
10980
10981
10982
# 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) ⇒ Concurrent::Promise

This is to allow calling via powershell and ARM template.

This is to allow calling via powershell and ARM template.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
# 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) ⇒ FunctionSecrets

This is to allow calling via powershell and ARM template.

This is to allow calling via powershell and ARM template.

resource belongs. the API will restore a backup of the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (FunctionSecrets)

    operation results.



26802
26803
26804
26805
# 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) ⇒ Concurrent::Promise

This is to allow calling via powershell and ARM template.

This is to allow calling via powershell and ARM template.

resource belongs. the API will restore a backup of the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



26841
26842
26843
26844
26845
26846
26847
26848
26849
26850
26851
26852
26853
26854
26855
26856
26857
26858
26859
26860
26861
26862
26863
26864
26865
26866
26867
26868
26869
26870
26871
26872
26873
26874
26875
26876
26877
26878
26879
26880
26881
26882
26883
26884
26885
26886
26887
26888
26889
26890
26891
26892
26893
26894
26895
26896
26897
26898
# 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) ⇒ MsRestAzure::AzureOperationResponse

This is to allow calling via powershell and ARM template.

This is to allow calling via powershell and ARM template.

resource belongs. the API will restore a backup of the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



26822
26823
26824
# 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) ⇒ MsRestAzure::AzureOperationResponse

This is to allow calling via powershell and ARM template.

This is to allow calling via powershell and ARM template.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



10997
10998
10999
# 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) ⇒ Array<TriggeredJobHistory>

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<TriggeredJobHistory>)

    operation results.



36128
36129
36130
36131
# 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) ⇒ TriggeredJobHistoryCollection

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.

resource belongs. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (TriggeredJobHistoryCollection)

    which provide lazy access to pages of



48032
48033
48034
48035
48036
48037
48038
48039
48040
48041
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



36165
36166
36167
36168
36169
36170
36171
36172
36173
36174
36175
36176
36177
36178
36179
36180
36181
36182
36183
36184
36185
36186
36187
36188
36189
36190
36191
36192
36193
36194
36195
36196
36197
36198
36199
36200
36201
36202
36203
36204
36205
36206
36207
36208
36209
36210
36211
36212
36213
36214
36215
36216
36217
36218
36219
36220
36221
36222
# 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) ⇒ TriggeredJobHistoryCollection

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (TriggeredJobHistoryCollection)

    operation results.



46300
46301
46302
46303
# 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) ⇒ Concurrent::Promise

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.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



46333
46334
46335
46336
46337
46338
46339
46340
46341
46342
46343
46344
46345
46346
46347
46348
46349
46350
46351
46352
46353
46354
46355
46356
46357
46358
46359
46360
46361
46362
46363
46364
46365
46366
46367
46368
46369
46370
46371
46372
46373
46374
46375
46376
46377
46378
46379
46380
46381
46382
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



46317
46318
46319
# 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) ⇒ Array<TriggeredJobHistory>

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.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<TriggeredJobHistory>)

    operation results.



33002
33003
33004
33005
# 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) ⇒ TriggeredJobHistoryCollection

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.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (TriggeredJobHistoryCollection)

    which provide lazy access to pages of



47869
47870
47871
47872
47873
47874
47875
47876
47877
47878
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API deletes a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



33043
33044
33045
33046
33047
33048
33049
33050
33051
33052
33053
33054
33055
33056
33057
33058
33059
33060
33061
33062
33063
33064
33065
33066
33067
33068
33069
33070
33071
33072
33073
33074
33075
33076
33077
33078
33079
33080
33081
33082
33083
33084
33085
33086
33087
33088
33089
33090
33091
33092
33093
33094
33095
33096
33097
33098
33099
33100
33101
# 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) ⇒ TriggeredJobHistoryCollection

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (TriggeredJobHistoryCollection)

    operation results.



45718
45719
45720
45721
# 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) ⇒ Concurrent::Promise

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.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



45751
45752
45753
45754
45755
45756
45757
45758
45759
45760
45761
45762
45763
45764
45765
45766
45767
45768
45769
45770
45771
45772
45773
45774
45775
45776
45777
45778
45779
45780
45781
45782
45783
45784
45785
45786
45787
45788
45789
45790
45791
45792
45793
45794
45795
45796
45797
45798
45799
45800
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



45735
45736
45737
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



33023
33024
33025
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



36147
36148
36149
# 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) ⇒ Array<TriggeredWebJob>

List triggered web jobs for an app, or a deployment slot.

List triggered web jobs for an app, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<TriggeredWebJob>)

    operation results.



35812
35813
35814
35815
# 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) ⇒ TriggeredWebJobCollection

List triggered web jobs for an app, or a deployment slot.

List triggered web jobs for an app, or a deployment slot.

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (TriggeredWebJobCollection)

    which provide lazy access to pages of the



48006
48007
48008
48009
48010
48011
48012
48013
48014
48015
# 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) ⇒ Concurrent::Promise

List triggered web jobs for an app, or a deployment slot.

List triggered web jobs for an app, or a deployment slot.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



35847
35848
35849
35850
35851
35852
35853
35854
35855
35856
35857
35858
35859
35860
35861
35862
35863
35864
35865
35866
35867
35868
35869
35870
35871
35872
35873
35874
35875
35876
35877
35878
35879
35880
35881
35882
35883
35884
35885
35886
35887
35888
35889
35890
35891
35892
35893
35894
35895
35896
35897
35898
35899
35900
35901
35902
35903
# 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) ⇒ TriggeredWebJobCollection

List triggered web jobs for an app, or a deployment slot.

List triggered web jobs for an app, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (TriggeredWebJobCollection)

    operation results.



46204
46205
46206
46207
# 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) ⇒ Concurrent::Promise

List triggered web jobs for an app, or a deployment slot.

List triggered web jobs for an app, or a deployment slot.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



46237
46238
46239
46240
46241
46242
46243
46244
46245
46246
46247
46248
46249
46250
46251
46252
46253
46254
46255
46256
46257
46258
46259
46260
46261
46262
46263
46264
46265
46266
46267
46268
46269
46270
46271
46272
46273
46274
46275
46276
46277
46278
46279
46280
46281
46282
46283
46284
46285
46286
# 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) ⇒ MsRestAzure::AzureOperationResponse

List triggered web jobs for an app, or a deployment slot.

List triggered web jobs for an app, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



46221
46222
46223
# 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) ⇒ Array<TriggeredWebJob>

List triggered web jobs for an app, or a deployment slot.

List triggered web jobs for an app, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<TriggeredWebJob>)

    operation results.



32665
32666
32667
32668
# 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) ⇒ TriggeredWebJobCollection

List triggered web jobs for an app, or a deployment slot.

List triggered web jobs for an app, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (TriggeredWebJobCollection)

    which provide lazy access to pages of the



47841
47842
47843
47844
47845
47846
47847
47848
47849
47850
# 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) ⇒ Concurrent::Promise

List triggered web jobs for an app, or a deployment slot.

List triggered web jobs for an app, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



32704
32705
32706
32707
32708
32709
32710
32711
32712
32713
32714
32715
32716
32717
32718
32719
32720
32721
32722
32723
32724
32725
32726
32727
32728
32729
32730
32731
32732
32733
32734
32735
32736
32737
32738
32739
32740
32741
32742
32743
32744
32745
32746
32747
32748
32749
32750
32751
32752
32753
32754
32755
32756
32757
32758
32759
32760
32761
# 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) ⇒ TriggeredWebJobCollection

List triggered web jobs for an app, or a deployment slot.

List triggered web jobs for an app, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (TriggeredWebJobCollection)

    operation results.



45622
45623
45624
45625
# 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) ⇒ Concurrent::Promise

List triggered web jobs for an app, or a deployment slot.

List triggered web jobs for an app, or a deployment slot.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



45655
45656
45657
45658
45659
45660
45661
45662
45663
45664
45665
45666
45667
45668
45669
45670
45671
45672
45673
45674
45675
45676
45677
45678
45679
45680
45681
45682
45683
45684
45685
45686
45687
45688
45689
45690
45691
45692
45693
45694
45695
45696
45697
45698
45699
45700
45701
45702
45703
45704
# 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) ⇒ MsRestAzure::AzureOperationResponse

List triggered web jobs for an app, or a deployment slot.

List triggered web jobs for an app, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



45639
45640
45641
# 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) ⇒ MsRestAzure::AzureOperationResponse

List triggered web jobs for an app, or a deployment slot.

List triggered web jobs for an app, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



32685
32686
32687
# 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) ⇒ MsRestAzure::AzureOperationResponse

List triggered web jobs for an app, or a deployment slot.

List triggered web jobs for an app, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



35830
35831
35832
# 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) ⇒ Array<CsmUsageQuota>

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).

resource belongs. 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’‘. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • filter (String) (defaults to: nil)

    Return only information specified in the filter (using

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<CsmUsageQuota>)

    operation results.



36462
36463
36464
36465
# 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) ⇒ CsmUsageQuotaCollection

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).

resource belongs. 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’‘. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • filter (String) (defaults to: nil)

    Return only information specified in the filter (using

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (CsmUsageQuotaCollection)

    which provide lazy access to pages of the



48063
48064
48065
48066
48067
48068
48069
48070
48071
48072
# 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) ⇒ Concurrent::Promise

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).

resource belongs. 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’‘. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • filter (String) (defaults to: nil)

    Return only information specified in the filter (using

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



36509
36510
36511
36512
36513
36514
36515
36516
36517
36518
36519
36520
36521
36522
36523
36524
36525
36526
36527
36528
36529
36530
36531
36532
36533
36534
36535
36536
36537
36538
36539
36540
36541
36542
36543
36544
36545
36546
36547
36548
36549
36550
36551
36552
36553
36554
36555
36556
36557
36558
36559
36560
36561
36562
36563
36564
36565
36566
# 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) ⇒ CsmUsageQuotaCollection

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).

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (CsmUsageQuotaCollection)

    operation results.



46398
46399
46400
46401
# 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) ⇒ Concurrent::Promise

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).

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



46435
46436
46437
46438
46439
46440
46441
46442
46443
46444
46445
46446
46447
46448
46449
46450
46451
46452
46453
46454
46455
46456
46457
46458
46459
46460
46461
46462
46463
46464
46465
46466
46467
46468
46469
46470
46471
46472
46473
46474
46475
46476
46477
46478
46479
46480
46481
46482
46483
46484
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



46417
46418
46419
# 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) ⇒ Array<CsmUsageQuota>

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).

resource belongs. the API will get quota information of the production slot. 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’‘. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • filter (String) (defaults to: nil)

    Return only information specified in the filter (using

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<CsmUsageQuota>)

    operation results.



33357
33358
33359
33360
# 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) ⇒ CsmUsageQuotaCollection

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).

resource belongs. the API will get quota information of the production slot. 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’‘. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • filter (String) (defaults to: nil)

    Return only information specified in the filter (using

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (CsmUsageQuotaCollection)

    which provide lazy access to pages of the



47902
47903
47904
47905
47906
47907
47908
47909
47910
47911
# 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) ⇒ Concurrent::Promise

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).

resource belongs. the API will get quota information of the production slot. 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’‘. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • filter (String) (defaults to: nil)

    Return only information specified in the filter (using

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



33408
33409
33410
33411
33412
33413
33414
33415
33416
33417
33418
33419
33420
33421
33422
33423
33424
33425
33426
33427
33428
33429
33430
33431
33432
33433
33434
33435
33436
33437
33438
33439
33440
33441
33442
33443
33444
33445
33446
33447
33448
33449
33450
33451
33452
33453
33454
33455
33456
33457
33458
33459
33460
33461
33462
33463
33464
33465
33466
# 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) ⇒ CsmUsageQuotaCollection

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).

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (CsmUsageQuotaCollection)

    operation results.



45816
45817
45818
45819
# 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) ⇒ Concurrent::Promise

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).

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



45853
45854
45855
45856
45857
45858
45859
45860
45861
45862
45863
45864
45865
45866
45867
45868
45869
45870
45871
45872
45873
45874
45875
45876
45877
45878
45879
45880
45881
45882
45883
45884
45885
45886
45887
45888
45889
45890
45891
45892
45893
45894
45895
45896
45897
45898
45899
45900
45901
45902
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



45835
45836
45837
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. the API will get quota information of the production slot. 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’‘. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • filter (String) (defaults to: nil)

    Return only information specified in the filter (using

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



33383
33384
33385
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. 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’‘. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • filter (String) (defaults to: nil)

    Return only information specified in the filter (using

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



36486
36487
36488
# 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) ⇒ Array

Gets the virtual networks the app (or deployment slot) is connected to.

Gets the virtual networks the app (or deployment slot) is connected to.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array)

    operation results.



36581
36582
36583
36584
# 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) ⇒ Concurrent::Promise

Gets the virtual networks the app (or deployment slot) is connected to.

Gets the virtual networks the app (or deployment slot) is connected to.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



36616
36617
36618
36619
36620
36621
36622
36623
36624
36625
36626
36627
36628
36629
36630
36631
36632
36633
36634
36635
36636
36637
36638
36639
36640
36641
36642
36643
36644
36645
36646
36647
36648
36649
36650
36651
36652
36653
36654
36655
36656
36657
36658
36659
36660
36661
36662
36663
36664
36665
36666
36667
36668
36669
36670
36671
36672
36673
36674
36675
36676
36677
36678
36679
36680
36681
36682
36683
36684
36685
36686
36687
36688
# 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) ⇒ Array

Gets the virtual networks the app (or deployment slot) is connected to.

Gets the virtual networks the app (or deployment slot) is connected to.

resource belongs. the API will get virtual network connections for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array)

    operation results.



33483
33484
33485
33486
# 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) ⇒ Concurrent::Promise

Gets the virtual networks the app (or deployment slot) is connected to.

Gets the virtual networks the app (or deployment slot) is connected to.

resource belongs. the API will get virtual network connections for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



33522
33523
33524
33525
33526
33527
33528
33529
33530
33531
33532
33533
33534
33535
33536
33537
33538
33539
33540
33541
33542
33543
33544
33545
33546
33547
33548
33549
33550
33551
33552
33553
33554
33555
33556
33557
33558
33559
33560
33561
33562
33563
33564
33565
33566
33567
33568
33569
33570
33571
33572
33573
33574
33575
33576
33577
33578
33579
33580
33581
33582
33583
33584
33585
33586
33587
33588
33589
33590
33591
33592
33593
33594
33595
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the virtual networks the app (or deployment slot) is connected to.

Gets the virtual networks the app (or deployment slot) is connected to.

resource belongs. the API will get virtual network connections for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



33503
33504
33505
# 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) ⇒ MsRestAzure::AzureOperationResponse

Gets the virtual networks the app (or deployment slot) is connected to.

Gets the virtual networks the app (or deployment slot) is connected to.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



36599
36600
36601
# 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) ⇒ Array<WebJob>

List webjobs for an app, or a deployment slot.

List webjobs for an app, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<WebJob>)

    operation results.



37557
37558
37559
37560
# 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) ⇒ WebJobCollection

List webjobs for an app, or a deployment slot.

List webjobs for an app, or a deployment slot.

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (WebJobCollection)

    which provide lazy access to pages of the



48088
48089
48090
48091
48092
48093
48094
48095
48096
48097
# 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) ⇒ Concurrent::Promise

List webjobs for an app, or a deployment slot.

List webjobs for an app, or a deployment slot.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



37592
37593
37594
37595
37596
37597
37598
37599
37600
37601
37602
37603
37604
37605
37606
37607
37608
37609
37610
37611
37612
37613
37614
37615
37616
37617
37618
37619
37620
37621
37622
37623
37624
37625
37626
37627
37628
37629
37630
37631
37632
37633
37634
37635
37636
37637
37638
37639
37640
37641
37642
37643
37644
37645
37646
37647
37648
# 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) ⇒ WebJobCollection

List webjobs for an app, or a deployment slot.

List webjobs for an app, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (WebJobCollection)

    operation results.



46498
46499
46500
46501
# 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) ⇒ Concurrent::Promise

List webjobs for an app, or a deployment slot.

List webjobs for an app, or a deployment slot.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



46531
46532
46533
46534
46535
46536
46537
46538
46539
46540
46541
46542
46543
46544
46545
46546
46547
46548
46549
46550
46551
46552
46553
46554
46555
46556
46557
46558
46559
46560
46561
46562
46563
46564
46565
46566
46567
46568
46569
46570
46571
46572
46573
46574
46575
46576
46577
46578
46579
46580
# 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) ⇒ MsRestAzure::AzureOperationResponse

List webjobs for an app, or a deployment slot.

List webjobs for an app, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



46515
46516
46517
# 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) ⇒ Array<WebJob>

List webjobs for an app, or a deployment slot.

List webjobs for an app, or a deployment slot.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<WebJob>)

    operation results.



34521
34522
34523
34524
# 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) ⇒ WebJobCollection

List webjobs for an app, or a deployment slot.

List webjobs for an app, or a deployment slot.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (WebJobCollection)

    which provide lazy access to pages of the



47929
47930
47931
47932
47933
47934
47935
47936
47937
47938
# 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) ⇒ Concurrent::Promise

List webjobs for an app, or a deployment slot.

List webjobs for an app, or a deployment slot.

resource belongs. the API returns deployments for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



34560
34561
34562
34563
34564
34565
34566
34567
34568
34569
34570
34571
34572
34573
34574
34575
34576
34577
34578
34579
34580
34581
34582
34583
34584
34585
34586
34587
34588
34589
34590
34591
34592
34593
34594
34595
34596
34597
34598
34599
34600
34601
34602
34603
34604
34605
34606
34607
34608
34609
34610
34611
34612
34613
34614
34615
34616
34617
# 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) ⇒ WebJobCollection

List webjobs for an app, or a deployment slot.

List webjobs for an app, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (WebJobCollection)

    operation results.



45916
45917
45918
45919
# 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) ⇒ Concurrent::Promise

List webjobs for an app, or a deployment slot.

List webjobs for an app, or a deployment slot.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



45949
45950
45951
45952
45953
45954
45955
45956
45957
45958
45959
45960
45961
45962
45963
45964
45965
45966
45967
45968
45969
45970
45971
45972
45973
45974
45975
45976
45977
45978
45979
45980
45981
45982
45983
45984
45985
45986
45987
45988
45989
45990
45991
45992
45993
45994
45995
45996
45997
45998
# 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) ⇒ MsRestAzure::AzureOperationResponse

List webjobs for an app, or a deployment slot.

List webjobs for an app, or a deployment slot.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



45933
45934
45935
# 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) ⇒ MsRestAzure::AzureOperationResponse

List webjobs for an app, or a deployment slot.

List webjobs for an app, or a deployment slot.

resource belongs. the API returns deployments for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



34541
34542
34543
# 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) ⇒ MsRestAzure::AzureOperationResponse

List webjobs for an app, or a deployment slot.

List webjobs for an app, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



37575
37576
37577
# 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) ⇒ MsRestAzure::AzureOperationResponse

Get all apps for a subscription.

Get all apps for a subscription.

will be added to the HTTP request.

Parameters:

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



49
50
51
# 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) ⇒ Operation

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

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

resource belongs. options. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • migration_request_envelope (MigrateMySqlRequest)

    MySql migration

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Operation)

    operation results.



11370
11371
11372
11373
# 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) ⇒ Concurrent::Promise

resource belongs. options. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • migration_request_envelope (MigrateMySqlRequest)

    MySql migration

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
# 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) ⇒ StorageMigrationResponse

Restores a web app.

Restores a web app.

resource belongs. migrationOptions. will be added to the HTTP request.

Parameters:

  • subscription_name (String)

    Azure subscription.

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • migration_options (StorageMigrationOptions)

    Migration

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (StorageMigrationResponse)

    operation results.



11319
11320
11321
11322
# 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) ⇒ Concurrent::Promise

resource belongs. migrationOptions. will be added to the HTTP request.

response.

Parameters:

  • subscription_name (String)

    Azure subscription.

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • migration_options (StorageMigrationOptions)

    Migration

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
# 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) ⇒ PrivateAccess

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • access (PrivateAccess)

    The information for the private access

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PrivateAccess)

    operation results.



13207
13208
13209
13210
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • access (PrivateAccess)

    The information for the private access

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
# 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) ⇒ PrivateAccess

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • access (PrivateAccess)

    The information for the private access

  • slot (String)

    The name of the slot for the web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PrivateAccess)

    operation results.



29043
29044
29045
29046
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • access (PrivateAccess)

    The information for the private access

  • slot (String)

    The name of the slot for the web app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



29086
29087
29088
29089
29090
29091
29092
29093
29094
29095
29096
29097
29098
29099
29100
29101
29102
29103
29104
29105
29106
29107
29108
29109
29110
29111
29112
29113
29114
29115
29116
29117
29118
29119
29120
29121
29122
29123
29124
29125
29126
29127
29128
29129
29130
29131
29132
29133
29134
29135
29136
29137
29138
29139
29140
29141
29142
29143
29144
29145
29146
29147
29148
29149
29150
29151
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • access (PrivateAccess)

    The information for the private access

  • slot (String)

    The name of the slot for the web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



29065
29066
29067
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • access (PrivateAccess)

    The information for the private access

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



13228
13229
13230
# 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) ⇒ Object

Reverts the configuration of an app to a previous snapshot.

Reverts the configuration of an app to a previous snapshot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • snapshot_id (String)

    The ID of the snapshot to read.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



4825
4826
4827
4828
# 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) ⇒ Concurrent::Promise

Reverts the configuration of an app to a previous snapshot.

Reverts the configuration of an app to a previous snapshot.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • snapshot_id (String)

    The ID of the snapshot to read.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
# 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) ⇒ Object

Reverts the configuration of an app to a previous snapshot.

Reverts the configuration of an app to a previous snapshot.

resource belongs. the API will return configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • snapshot_id (String)

    The ID of the snapshot to read.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



20283
20284
20285
20286
# 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) ⇒ Concurrent::Promise

Reverts the configuration of an app to a previous snapshot.

Reverts the configuration of an app to a previous snapshot.

resource belongs. the API will return configuration for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • snapshot_id (String)

    The ID of the snapshot to read.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



20324
20325
20326
20327
20328
20329
20330
20331
20332
20333
20334
20335
20336
20337
20338
20339
20340
20341
20342
20343
20344
20345
20346
20347
20348
20349
20350
20351
20352
20353
20354
20355
20356
20357
20358
20359
20360
20361
20362
20363
20364
20365
20366
20367
20368
20369
20370
20371
20372
# 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) ⇒ MsRestAzure::AzureOperationResponse

Reverts the configuration of an app to a previous snapshot.

Reverts the configuration of an app to a previous snapshot.

resource belongs. the API will return configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • snapshot_id (String)

    The ID of the snapshot to read.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



20304
20305
20306
# 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) ⇒ MsRestAzure::AzureOperationResponse

Reverts the configuration of an app to a previous snapshot.

Reverts the configuration of an app to a previous snapshot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • snapshot_id (String)

    The ID of the snapshot to read.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



4844
4845
4846
# 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) ⇒ Object

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



14831
14832
14833
14834
# 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) ⇒ Concurrent::Promise

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.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



14851
14852
14853
# 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) ⇒ Object

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.

resource belongs. the API resets configuration settings for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



30763
30764
30765
30766
# 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) ⇒ Concurrent::Promise

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.

resource belongs. the API resets configuration settings for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



30806
30807
30808
30809
30810
30811
30812
30813
30814
30815
30816
30817
30818
30819
30820
30821
30822
30823
30824
30825
30826
30827
30828
30829
30830
30831
30832
30833
30834
30835
30836
30837
30838
30839
30840
30841
30842
30843
30844
30845
30846
30847
30848
30849
30850
30851
30852
30853
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. the API resets configuration settings for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



30785
30786
30787
# 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) ⇒ Object

Restarts an app (or deployment slot, if specified).

Restarts an app (or deployment slot, if specified).

resource belongs. settings and restarts the app only if necessary. By default, the API always restarts and reprovisions the app. restarted. By default, it is set to false, and the API responds immediately (asynchronous). will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • soft_restart (Boolean) (defaults to: nil)

    Specify true to apply the configuration

  • synchronous (Boolean) (defaults to: nil)

    Specify true to block until the app is

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



14936
14937
14938
14939
# 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) ⇒ Concurrent::Promise

Restarts an app (or deployment slot, if specified).

Restarts an app (or deployment slot, if specified).

resource belongs. settings and restarts the app only if necessary. By default, the API always restarts and reprovisions the app. restarted. By default, it is set to false, and the API responds immediately (asynchronous). to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • soft_restart (Boolean) (defaults to: nil)

    Specify true to apply the configuration

  • synchronous (Boolean) (defaults to: nil)

    Specify true to block until the app is

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
# 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) ⇒ Object

Restarts an app (or deployment slot, if specified).

Restarts an app (or deployment slot, if specified).

resource belongs. the API will restart the production slot. settings and restarts the app only if necessary. By default, the API always restarts and reprovisions the app. restarted. By default, it is set to false, and the API responds immediately (asynchronous). will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • soft_restart (Boolean) (defaults to: nil)

    Specify true to apply the configuration

  • synchronous (Boolean) (defaults to: nil)

    Specify true to block until the app is

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



30875
30876
30877
30878
# 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) ⇒ Concurrent::Promise

Restarts an app (or deployment slot, if specified).

Restarts an app (or deployment slot, if specified).

resource belongs. the API will restart the production slot. settings and restarts the app only if necessary. By default, the API always restarts and reprovisions the app. restarted. By default, it is set to false, and the API responds immediately (asynchronous). to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • soft_restart (Boolean) (defaults to: nil)

    Specify true to apply the configuration

  • synchronous (Boolean) (defaults to: nil)

    Specify true to block until the app is

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



30926
30927
30928
30929
30930
30931
30932
30933
30934
30935
30936
30937
30938
30939
30940
30941
30942
30943
30944
30945
30946
30947
30948
30949
30950
30951
30952
30953
30954
30955
30956
30957
30958
30959
30960
30961
30962
30963
30964
30965
30966
30967
30968
30969
30970
30971
30972
30973
# 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) ⇒ MsRestAzure::AzureOperationResponse

Restarts an app (or deployment slot, if specified).

Restarts an app (or deployment slot, if specified).

resource belongs. the API will restart the production slot. settings and restarts the app only if necessary. By default, the API always restarts and reprovisions the app. restarted. By default, it is set to false, and the API responds immediately (asynchronous). will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • soft_restart (Boolean) (defaults to: nil)

    Specify true to apply the configuration

  • synchronous (Boolean) (defaults to: nil)

    Specify true to block until the app is

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



30901
30902
30903
# 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) ⇒ MsRestAzure::AzureOperationResponse

Restarts an app (or deployment slot, if specified).

Restarts an app (or deployment slot, if specified).

resource belongs. settings and restarts the app only if necessary. By default, the API always restarts and reprovisions the app. restarted. By default, it is set to false, and the API responds immediately (asynchronous). will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • soft_restart (Boolean) (defaults to: nil)

    Specify true to apply the configuration

  • synchronous (Boolean) (defaults to: nil)

    Specify true to block until the app is

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



14960
14961
14962
# 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) ⇒ Object

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

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

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • backup_id (String)

    ID of the backup.

  • request (RestoreRequest)

    Information on restore request .

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



1444
1445
1446
1447
# 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) ⇒ Concurrent::Promise

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • backup_id (String)

    ID of the backup.

  • request (RestoreRequest)

    Information on restore request .

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
# 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) ⇒ Object

Restores an app from a backup blob in Azure Storage.

Restores an app from a backup blob in Azure Storage.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (RestoreRequest)

    Information on restore request .

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



15043
15044
15045
15046
# 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) ⇒ Concurrent::Promise

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (RestoreRequest)

    Information on restore request .

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
# 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) ⇒ Object

Restores an app from a backup blob in Azure Storage.

Restores an app from a backup blob in Azure Storage.

resource belongs. the API will restore a backup of the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (RestoreRequest)

    Information on restore request .

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



30989
30990
30991
30992
# 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) ⇒ Concurrent::Promise

resource belongs. the API will restore a backup of the production slot. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (RestoreRequest)

    Information on restore request .

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



31007
31008
31009
31010
31011
31012
31013
31014
31015
31016
31017
31018
31019
31020
31021
# 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) ⇒ Object

Restores a deleted web app to this web app.

Restores a deleted web app to this web app.

resource belongs. information. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • restore_request (DeletedAppRestoreRequest)

    Deleted web app restore

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



15088
15089
15090
15091
# 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) ⇒ Concurrent::Promise

resource belongs. information. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • restore_request (DeletedAppRestoreRequest)

    Deleted web app restore

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
# 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) ⇒ Object

Restores a deleted web app to this web app.

Restores a deleted web app to this web app.

resource belongs. information. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • restore_request (DeletedAppRestoreRequest)

    Deleted web app restore

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



31038
31039
31040
31041
# 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) ⇒ Concurrent::Promise

resource belongs. information. to production slot. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • restore_request (DeletedAppRestoreRequest)

    Deleted web app restore

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



31057
31058
31059
31060
31061
31062
31063
31064
31065
31066
31067
31068
31069
31070
31071
# 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) ⇒ Object

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

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

resource belongs. the API will restore a backup of the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • backup_id (String)

    ID of the backup.

  • request (RestoreRequest)

    Information on restore request .

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



16937
16938
16939
16940
# 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) ⇒ Concurrent::Promise

resource belongs. the API will restore a backup of the production slot. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • backup_id (String)

    ID of the backup.

  • request (RestoreRequest)

    Information on restore request .

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
# 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) ⇒ Object

Restores a web app from a snapshot.

Restores a web app from a snapshot.

resource belongs. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • restore_request (SnapshotRestoreRequest)

    Snapshot restore settings.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



15135
15136
15137
15138
# 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) ⇒ Concurrent::Promise

resource belongs. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • restore_request (SnapshotRestoreRequest)

    Snapshot restore settings.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
# 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) ⇒ Object

Restores a web app from a snapshot.

Restores a web app from a snapshot.

resource belongs. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • restore_request (SnapshotRestoreRequest)

    Snapshot restore settings.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



31089
31090
31091
31092
# 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) ⇒ Concurrent::Promise

resource belongs. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. to production slot. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • restore_request (SnapshotRestoreRequest)

    Snapshot restore settings.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



31109
31110
31111
31112
31113
31114
31115
31116
31117
31118
31119
31120
31121
31122
31123
# 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) ⇒ Object

Run a triggered web job for an app, or a deployment slot.

Run a triggered web job for an app, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



36357
36358
36359
36360
# 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) ⇒ Concurrent::Promise

Run a triggered web job for an app, or a deployment slot.

Run a triggered web job for an app, or a deployment slot.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



36394
36395
36396
36397
36398
36399
36400
36401
36402
36403
36404
36405
36406
36407
36408
36409
36410
36411
36412
36413
36414
36415
36416
36417
36418
36419
36420
36421
36422
36423
36424
36425
36426
36427
36428
36429
36430
36431
36432
36433
36434
36435
36436
36437
36438
36439
36440
36441
# 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) ⇒ Object

Run a triggered web job for an app, or a deployment slot.

Run a triggered web job for an app, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



33245
33246
33247
33248
# 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) ⇒ Concurrent::Promise

Run a triggered web job for an app, or a deployment slot.

Run a triggered web job for an app, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



33286
33287
33288
33289
33290
33291
33292
33293
33294
33295
33296
33297
33298
33299
33300
33301
33302
33303
33304
33305
33306
33307
33308
33309
33310
33311
33312
33313
33314
33315
33316
33317
33318
33319
33320
33321
33322
33323
33324
33325
33326
33327
33328
33329
33330
33331
33332
33333
33334
# 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) ⇒ MsRestAzure::AzureOperationResponse

Run a triggered web job for an app, or a deployment slot.

Run a triggered web job for an app, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



33266
33267
33268
# 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) ⇒ MsRestAzure::AzureOperationResponse

Run a triggered web job for an app, or a deployment slot.

Run a triggered web job for an app, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



36376
36377
36378
# 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) ⇒ Object

Starts an app (or deployment slot, if specified).

Starts an app (or deployment slot, if specified).

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



35431
35432
35433
35434
# 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) ⇒ Concurrent::Promise

Starts an app (or deployment slot, if specified).

Starts an app (or deployment slot, if specified).

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



35466
35467
35468
35469
35470
35471
35472
35473
35474
35475
35476
35477
35478
35479
35480
35481
35482
35483
35484
35485
35486
35487
35488
35489
35490
35491
35492
35493
35494
35495
35496
35497
35498
35499
35500
35501
35502
35503
35504
35505
35506
35507
35508
35509
35510
35511
35512
# 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) ⇒ Object

Start a continuous web job for an app, or a deployment slot.

Start a continuous web job for an app, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



5465
5466
5467
5468
# 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) ⇒ Concurrent::Promise

Start a continuous web job for an app, or a deployment slot.

Start a continuous web job for an app, or a deployment slot.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
# 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) ⇒ Object

Start a continuous web job for an app, or a deployment slot.

Start a continuous web job for an app, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



20965
20966
20967
20968
# 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) ⇒ Concurrent::Promise

Start a continuous web job for an app, or a deployment slot.

Start a continuous web job for an app, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



21006
21007
21008
21009
21010
21011
21012
21013
21014
21015
21016
21017
21018
21019
21020
21021
21022
21023
21024
21025
21026
21027
21028
21029
21030
21031
21032
21033
21034
21035
21036
21037
21038
21039
21040
21041
21042
21043
21044
21045
21046
21047
21048
21049
21050
21051
21052
21053
21054
# 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) ⇒ MsRestAzure::AzureOperationResponse

Start a continuous web job for an app, or a deployment slot.

Start a continuous web job for an app, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



20986
20987
20988
# 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) ⇒ MsRestAzure::AzureOperationResponse

Start a continuous web job for an app, or a deployment slot.

Start a continuous web job for an app, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



5484
5485
5486
# 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) ⇒ Object

Starts an app (or deployment slot, if specified).

Starts an app (or deployment slot, if specified).

resource belongs. the API will start the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



32256
32257
32258
32259
# 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) ⇒ Concurrent::Promise

Starts an app (or deployment slot, if specified).

Starts an app (or deployment slot, if specified).

resource belongs. the API will start the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



32295
32296
32297
32298
32299
32300
32301
32302
32303
32304
32305
32306
32307
32308
32309
32310
32311
32312
32313
32314
32315
32316
32317
32318
32319
32320
32321
32322
32323
32324
32325
32326
32327
32328
32329
32330
32331
32332
32333
32334
32335
32336
32337
32338
32339
32340
32341
32342
# 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) ⇒ MsRestAzure::AzureOperationResponse

Starts an app (or deployment slot, if specified).

Starts an app (or deployment slot, if specified).

resource belongs. the API will start the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



32276
32277
32278
# 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) ⇒ String

Start capturing network packets for the site (To be deprecated).

Start capturing network packets for the site (To be deprecated).

resource belongs. seconds. (Optional). will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • duration_in_seconds (Integer) (defaults to: nil)

    The duration to keep capturing in

  • max_frame_length (Integer) (defaults to: nil)

    The maximum frame length in bytes

  • sas_url (String) (defaults to: nil)

    The Blob URL to store capture file.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (String)

    operation results.



11790
11791
11792
11793
# 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) ⇒ Concurrent::Promise

Start capturing network packets for the site (To be deprecated).

Start capturing network packets for the site (To be deprecated).

resource belongs. seconds. (Optional). to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • duration_in_seconds (Integer) (defaults to: nil)

    The duration to keep capturing in

  • max_frame_length (Integer) (defaults to: nil)

    The maximum frame length in bytes

  • sas_url (String) (defaults to: nil)

    The Blob URL to store capture file.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
# 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) ⇒ Object

Start capturing network packets for the site.

Start capturing network packets for the site.

resource belongs. seconds. (Optional). will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • duration_in_seconds (Integer) (defaults to: nil)

    The duration to keep capturing in

  • max_frame_length (Integer) (defaults to: nil)

    The maximum frame length in bytes

  • sas_url (String) (defaults to: nil)

    The Blob URL to store capture file.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



11918
11919
11920
11921
# 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) ⇒ Concurrent::Promise

resource belongs. seconds. (Optional). will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • duration_in_seconds (Integer) (defaults to: nil)

    The duration to keep capturing in

  • max_frame_length (Integer) (defaults to: nil)

    The maximum frame length in bytes

  • sas_url (String) (defaults to: nil)

    The Blob URL to store capture file.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
# 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) ⇒ Object

Start capturing network packets for the site.

Start capturing network packets for the site.

resource belongs. seconds. (Optional). will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • slot (String)

    The name of the slot for this web app.

  • duration_in_seconds (Integer) (defaults to: nil)

    The duration to keep capturing in

  • max_frame_length (Integer) (defaults to: nil)

    The maximum frame length in bytes

  • sas_url (String) (defaults to: nil)

    The Blob URL to store capture file.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



27681
27682
27683
27684
# 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) ⇒ Concurrent::Promise

resource belongs. seconds. (Optional). will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • slot (String)

    The name of the slot for this web app.

  • duration_in_seconds (Integer) (defaults to: nil)

    The duration to keep capturing in

  • max_frame_length (Integer) (defaults to: nil)

    The maximum frame length in bytes

  • sas_url (String) (defaults to: nil)

    The Blob URL to store capture file.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



27702
27703
27704
27705
27706
27707
27708
27709
27710
27711
27712
27713
27714
27715
27716
27717
27718
27719
27720
27721
27722
27723
27724
27725
# 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) ⇒ String

Start capturing network packets for the site (To be deprecated).

Start capturing network packets for the site (To be deprecated).

resource belongs. seconds. (Optional). will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • slot (String)

    The name of the slot for this web app.

  • duration_in_seconds (Integer) (defaults to: nil)

    The duration to keep capturing in

  • max_frame_length (Integer) (defaults to: nil)

    The maximum frame length in bytes

  • sas_url (String) (defaults to: nil)

    The Blob URL to store capture file.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (String)

    operation results.



27549
27550
27551
27552
# 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) ⇒ Concurrent::Promise

Start capturing network packets for the site (To be deprecated).

Start capturing network packets for the site (To be deprecated).

resource belongs. seconds. (Optional). to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • slot (String)

    The name of the slot for this web app.

  • duration_in_seconds (Integer) (defaults to: nil)

    The duration to keep capturing in

  • max_frame_length (Integer) (defaults to: nil)

    The maximum frame length in bytes

  • sas_url (String) (defaults to: nil)

    The Blob URL to store capture file.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



27596
27597
27598
27599
27600
27601
27602
27603
27604
27605
27606
27607
27608
27609
27610
27611
27612
27613
27614
27615
27616
27617
27618
27619
27620
27621
27622
27623
27624
27625
27626
27627
27628
27629
27630
27631
27632
27633
27634
27635
27636
27637
27638
27639
27640
27641
27642
27643
27644
27645
27646
27647
27648
27649
27650
27651
27652
27653
27654
27655
27656
27657
27658
27659
27660
# 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) ⇒ MsRestAzure::AzureOperationResponse

Start capturing network packets for the site (To be deprecated).

Start capturing network packets for the site (To be deprecated).

resource belongs. seconds. (Optional). will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • slot (String)

    The name of the slot for this web app.

  • duration_in_seconds (Integer) (defaults to: nil)

    The duration to keep capturing in

  • max_frame_length (Integer) (defaults to: nil)

    The maximum frame length in bytes

  • sas_url (String) (defaults to: nil)

    The Blob URL to store capture file.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



27573
27574
27575
# 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) ⇒ MsRestAzure::AzureOperationResponse

Start capturing network packets for the site (To be deprecated).

Start capturing network packets for the site (To be deprecated).

resource belongs. seconds. (Optional). will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • duration_in_seconds (Integer) (defaults to: nil)

    The duration to keep capturing in

  • max_frame_length (Integer) (defaults to: nil)

    The maximum frame length in bytes

  • sas_url (String) (defaults to: nil)

    The Blob URL to store capture file.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



11813
11814
11815
# 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) ⇒ MsRestAzure::AzureOperationResponse

Starts an app (or deployment slot, if specified).

Starts an app (or deployment slot, if specified).

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



35449
35450
35451
# 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) ⇒ Object

Stops an app (or deployment slot, if specified).

Stops an app (or deployment slot, if specified).

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



35526
35527
35528
35529
# 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) ⇒ Concurrent::Promise

Stops an app (or deployment slot, if specified).

Stops an app (or deployment slot, if specified).

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



35561
35562
35563
35564
35565
35566
35567
35568
35569
35570
35571
35572
35573
35574
35575
35576
35577
35578
35579
35580
35581
35582
35583
35584
35585
35586
35587
35588
35589
35590
35591
35592
35593
35594
35595
35596
35597
35598
35599
35600
35601
35602
35603
35604
35605
35606
35607
# 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) ⇒ Object

Stop a continuous web job for an app, or a deployment slot.

Stop a continuous web job for an app, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



5564
5565
5566
5567
# 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) ⇒ Concurrent::Promise

Stop a continuous web job for an app, or a deployment slot.

Stop a continuous web job for an app, or a deployment slot.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
# 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) ⇒ Object

Stop a continuous web job for an app, or a deployment slot.

Stop a continuous web job for an app, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



21071
21072
21073
21074
# 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) ⇒ Concurrent::Promise

Stop a continuous web job for an app, or a deployment slot.

Stop a continuous web job for an app, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



21112
21113
21114
21115
21116
21117
21118
21119
21120
21121
21122
21123
21124
21125
21126
21127
21128
21129
21130
21131
21132
21133
21134
21135
21136
21137
21138
21139
21140
21141
21142
21143
21144
21145
21146
21147
21148
21149
21150
21151
21152
21153
21154
21155
21156
21157
21158
21159
21160
# 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) ⇒ MsRestAzure::AzureOperationResponse

Stop a continuous web job for an app, or a deployment slot.

Stop a continuous web job for an app, or a deployment slot.

resource belongs. the API deletes a deployment for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



21092
21093
21094
# 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) ⇒ MsRestAzure::AzureOperationResponse

Stop a continuous web job for an app, or a deployment slot.

Stop a continuous web job for an app, or a deployment slot.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Site name.

  • web_job_name (String)

    Name of Web Job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



5583
5584
5585
# 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) ⇒ Object

Stops an app (or deployment slot, if specified).

Stops an app (or deployment slot, if specified).

resource belongs. the API will stop the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



32358
32359
32360
32361
# 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) ⇒ Concurrent::Promise

Stops an app (or deployment slot, if specified).

Stops an app (or deployment slot, if specified).

resource belongs. the API will stop the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



32397
32398
32399
32400
32401
32402
32403
32404
32405
32406
32407
32408
32409
32410
32411
32412
32413
32414
32415
32416
32417
32418
32419
32420
32421
32422
32423
32424
32425
32426
32427
32428
32429
32430
32431
32432
32433
32434
32435
32436
32437
32438
32439
32440
32441
32442
32443
32444
# 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) ⇒ MsRestAzure::AzureOperationResponse

Stops an app (or deployment slot, if specified).

Stops an app (or deployment slot, if specified).

resource belongs. the API will stop the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



32378
32379
32380
# 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) ⇒ Object

Stop ongoing capturing network packets for the site.

Stop ongoing capturing network packets for the site.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



11975
11976
11977
11978
# 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) ⇒ Concurrent::Promise

Stop ongoing capturing network packets for the site.

Stop ongoing capturing network packets for the site.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
# 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) ⇒ Object

Stop ongoing capturing network packets for the site.

Stop ongoing capturing network packets for the site.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • slot (String)

    The name of the slot for this web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



27740
27741
27742
27743
# 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) ⇒ Concurrent::Promise

Stop ongoing capturing network packets for the site.

Stop ongoing capturing network packets for the site.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • slot (String)

    The name of the slot for this web app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



27777
27778
27779
27780
27781
27782
27783
27784
27785
27786
27787
27788
27789
27790
27791
27792
27793
27794
27795
27796
27797
27798
27799
27800
27801
27802
27803
27804
27805
27806
27807
27808
27809
27810
27811
27812
27813
27814
27815
27816
27817
27818
27819
27820
27821
27822
27823
27824
# 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) ⇒ MsRestAzure::AzureOperationResponse

Stop ongoing capturing network packets for the site.

Stop ongoing capturing network packets for the site.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • slot (String)

    The name of the slot for this web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



27759
27760
27761
# 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) ⇒ MsRestAzure::AzureOperationResponse

Stop ongoing capturing network packets for the site.

Stop ongoing capturing network packets for the site.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



11993
11994
11995
# 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) ⇒ MsRestAzure::AzureOperationResponse

Stops an app (or deployment slot, if specified).

Stops an app (or deployment slot, if specified).

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



35544
35545
35546
# 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) ⇒ Object

Swaps two deployment slots of an app.

Swaps two deployment slots of an app.

resource belongs. slot name. See example. production slot is used as the source slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • slot (String)

    Name of the source slot. If a slot is not specified, the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



31661
31662
31663
31664
# 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) ⇒ Concurrent::Promise

resource belongs. slot name. See example. production slot is used as the source slot. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • slot (String)

    Name of the source slot. If a slot is not specified, the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



31680
31681
31682
31683
31684
31685
31686
31687
31688
31689
31690
31691
31692
31693
31694
# 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) ⇒ Object

Swaps two deployment slots of an app.

Swaps two deployment slots of an app.

resource belongs. slot name. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



34869
34870
34871
34872
# 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) ⇒ Concurrent::Promise

resource belongs. slot name. See example. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_swap_entity (CsmSlotEntity)

    JSON object that contains the target

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



34886
34887
34888
34889
34890
34891
34892
34893
34894
34895
34896
34897
34898
34899
34900
# 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) ⇒ Object

Syncs function trigger metadata to the scale controller

Syncs function trigger metadata to the scale controller

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



35716
35717
35718
35719
# 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) ⇒ Concurrent::Promise

Syncs function trigger metadata to the scale controller

Syncs function trigger metadata to the scale controller

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



35751
35752
35753
35754
35755
35756
35757
35758
35759
35760
35761
35762
35763
35764
35765
35766
35767
35768
35769
35770
35771
35772
35773
35774
35775
35776
35777
35778
35779
35780
35781
35782
35783
35784
35785
35786
35787
35788
35789
35790
35791
35792
35793
35794
35795
35796
35797
# 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) ⇒ Object

Syncs function trigger metadata to the scale controller

Syncs function trigger metadata to the scale controller

resource belongs. the API will restore a backup of the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



32562
32563
32564
32565
# 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) ⇒ Concurrent::Promise

Syncs function trigger metadata to the scale controller

Syncs function trigger metadata to the scale controller

resource belongs. the API will restore a backup of the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



32601
32602
32603
32604
32605
32606
32607
32608
32609
32610
32611
32612
32613
32614
32615
32616
32617
32618
32619
32620
32621
32622
32623
32624
32625
32626
32627
32628
32629
32630
32631
32632
32633
32634
32635
32636
32637
32638
32639
32640
32641
32642
32643
32644
32645
32646
32647
32648
# 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) ⇒ MsRestAzure::AzureOperationResponse

Syncs function trigger metadata to the scale controller

Syncs function trigger metadata to the scale controller

resource belongs. the API will restore a backup of the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



32582
32583
32584
# 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) ⇒ MsRestAzure::AzureOperationResponse

Syncs function trigger metadata to the scale controller

Syncs function trigger metadata to the scale controller

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



35734
35735
35736
# 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) ⇒ Object

Sync web app repository.

Sync web app repository.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



35621
35622
35623
35624
# 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) ⇒ Concurrent::Promise

Sync web app repository.

Sync web app repository.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



35656
35657
35658
35659
35660
35661
35662
35663
35664
35665
35666
35667
35668
35669
35670
35671
35672
35673
35674
35675
35676
35677
35678
35679
35680
35681
35682
35683
35684
35685
35686
35687
35688
35689
35690
35691
35692
35693
35694
35695
35696
35697
35698
35699
35700
35701
35702
# 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) ⇒ Object

Sync web app repository.

Sync web app repository.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



32460
32461
32462
32463
# 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) ⇒ Concurrent::Promise

Sync web app repository.

Sync web app repository.

resource belongs. to production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



32499
32500
32501
32502
32503
32504
32505
32506
32507
32508
32509
32510
32511
32512
32513
32514
32515
32516
32517
32518
32519
32520
32521
32522
32523
32524
32525
32526
32527
32528
32529
32530
32531
32532
32533
32534
32535
32536
32537
32538
32539
32540
32541
32542
32543
32544
32545
32546
# 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) ⇒ MsRestAzure::AzureOperationResponse

Sync web app repository.

Sync web app repository.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



32480
32481
32482
# 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) ⇒ MsRestAzure::AzureOperationResponse

Sync web app repository.

Sync web app repository.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



35639
35640
35641
# 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) ⇒ Site

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.

resource belongs. update a deployment slot, use the slot parameter. properties. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Unique name of the app to create or update. To create or

  • site_envelope (SitePatchResource)

    A JSON representation of the app

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Site)

    operation results.



512
513
514
515
# 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) ⇒ StringDictionary

Replaces the application settings of an app.

Replaces the application settings of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • app_settings (StringDictionary)

    Application settings of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (StringDictionary)

    operation results.



1597
1598
1599
1600
# 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) ⇒ Concurrent::Promise

Replaces the application settings of an app.

Replaces the application settings of an app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • app_settings (StringDictionary)

    Application settings of the app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
# 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) ⇒ StringDictionary

Replaces the application settings of an app.

Replaces the application settings of an app.

resource belongs. the API will update the application settings for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • app_settings (StringDictionary)

    Application settings of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (StringDictionary)

    operation results.



17101
17102
17103
17104
# 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) ⇒ Concurrent::Promise

Replaces the application settings of an app.

Replaces the application settings of an app.

resource belongs. the API will update the application settings for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • app_settings (StringDictionary)

    Application settings of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
# 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) ⇒ MsRestAzure::AzureOperationResponse

Replaces the application settings of an app.

Replaces the application settings of an app.

resource belongs. the API will update the application settings for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • app_settings (StringDictionary)

    Application settings of the app.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



17122
17123
17124
# 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) ⇒ MsRestAzure::AzureOperationResponse

Replaces the application settings of an app.

Replaces the application settings of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • app_settings (StringDictionary)

    Application settings of the app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1616
1617
1618
# 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) ⇒ Concurrent::Promise

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.

resource belongs. update a deployment slot, use the slot parameter. properties. See example. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Unique name of the app to create or update. To create or

  • site_envelope (SitePatchResource)

    A JSON representation of the app

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
# 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) ⇒ SiteAuthSettings

Updates the Authentication / Authorization settings associated with web app.

Updates the Authentication / Authorization settings associated with web app.

resource belongs. web app. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • site_auth_settings (SiteAuthSettings)

    Auth settings associated with

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteAuthSettings)

    operation results.



1821
1822
1823
1824
# 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) ⇒ Concurrent::Promise

Updates the Authentication / Authorization settings associated with web app.

Updates the Authentication / Authorization settings associated with web app.

resource belongs. web app. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • site_auth_settings (SiteAuthSettings)

    Auth settings associated with

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
# 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) ⇒ SiteAuthSettings

Updates the Authentication / Authorization settings associated with web app.

Updates the Authentication / Authorization settings associated with web app.

resource belongs. web app. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • site_auth_settings (SiteAuthSettings)

    Auth settings associated with

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteAuthSettings)

    operation results.



17339
17340
17341
17342
# 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) ⇒ Concurrent::Promise

Updates the Authentication / Authorization settings associated with web app.

Updates the Authentication / Authorization settings associated with web app.

resource belongs. web app. to production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • site_auth_settings (SiteAuthSettings)

    Auth settings associated with

  • slot (String)

    Name of web app slot. If not specified then will default

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
# 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) ⇒ MsRestAzure::AzureOperationResponse

Updates the Authentication / Authorization settings associated with web app.

Updates the Authentication / Authorization settings associated with web app.

resource belongs. web app. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • site_auth_settings (SiteAuthSettings)

    Auth settings associated with

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



17361
17362
17363
# 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) ⇒ MsRestAzure::AzureOperationResponse

Updates the Authentication / Authorization settings associated with web app.

Updates the Authentication / Authorization settings associated with web app.

resource belongs. web app. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • site_auth_settings (SiteAuthSettings)

    Auth settings associated with

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1841
1842
1843
# 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) ⇒ AzureStoragePropertyDictionaryResource

Updates the Azure storage account configurations of an app.

Updates the Azure storage account configurations of an app.

resource belongs. storage accounts of the app. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • azure_storage_accounts (AzureStoragePropertyDictionaryResource)

    Azure

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (AzureStoragePropertyDictionaryResource)

    operation results.



2047
2048
2049
2050
# 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) ⇒ Concurrent::Promise

Updates the Azure storage account configurations of an app.

Updates the Azure storage account configurations of an app.

resource belongs. storage accounts of the app. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • azure_storage_accounts (AzureStoragePropertyDictionaryResource)

    Azure

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
# 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) ⇒ AzureStoragePropertyDictionaryResource

Updates the Azure storage account configurations of an app.

Updates the Azure storage account configurations of an app.

resource belongs. storage accounts of the app. the API will update the Azure storage account configurations for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • azure_storage_accounts (AzureStoragePropertyDictionaryResource)

    Azure

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (AzureStoragePropertyDictionaryResource)

    operation results.



17580
17581
17582
17583
# 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) ⇒ Concurrent::Promise

Updates the Azure storage account configurations of an app.

Updates the Azure storage account configurations of an app.

resource belongs. storage accounts of the app. the API will update the Azure storage account configurations for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • azure_storage_accounts (AzureStoragePropertyDictionaryResource)

    Azure

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
# 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) ⇒ MsRestAzure::AzureOperationResponse

Updates the Azure storage account configurations of an app.

Updates the Azure storage account configurations of an app.

resource belongs. storage accounts of the app. the API will update the Azure storage account configurations for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • azure_storage_accounts (AzureStoragePropertyDictionaryResource)

    Azure

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



17603
17604
17605
# 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) ⇒ MsRestAzure::AzureOperationResponse

Updates the Azure storage account configurations of an app.

Updates the Azure storage account configurations of an app.

resource belongs. storage accounts of the app. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • azure_storage_accounts (AzureStoragePropertyDictionaryResource)

    Azure

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2067
2068
2069
# 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) ⇒ BackupRequest

Updates the backup configuration of an app.

Updates the backup configuration of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (BackupRequest)

    Edited backup configuration.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BackupRequest)

    operation results.



2272
2273
2274
2275
# 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) ⇒ Concurrent::Promise

Updates the backup configuration of an app.

Updates the backup configuration of an app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (BackupRequest)

    Edited backup configuration.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
# 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) ⇒ BackupRequest

Updates the backup configuration of an app.

Updates the backup configuration of an app.

resource belongs. the API will update the backup configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (BackupRequest)

    Edited backup configuration.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (BackupRequest)

    operation results.



17824
17825
17826
17827
# 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) ⇒ Concurrent::Promise

Updates the backup configuration of an app.

Updates the backup configuration of an app.

resource belongs. the API will update the backup configuration for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (BackupRequest)

    Edited backup configuration.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
# 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) ⇒ MsRestAzure::AzureOperationResponse

Updates the backup configuration of an app.

Updates the backup configuration of an app.

resource belongs. the API will update the backup configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (BackupRequest)

    Edited backup configuration.

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



17845
17846
17847
# 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) ⇒ MsRestAzure::AzureOperationResponse

Updates the backup configuration of an app.

Updates the backup configuration of an app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • request (BackupRequest)

    Edited backup configuration.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2291
2292
2293
# 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) ⇒ SiteConfigResource

Updates the configuration of an app.

Updates the configuration of an app.

resource belongs. object. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_config (SiteConfigResource)

    JSON representation of a SiteConfig

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteConfigResource)

    operation results.



4485
4486
4487
4488
# 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) ⇒ Concurrent::Promise

Updates the configuration of an app.

Updates the configuration of an app.

resource belongs. object. See example. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_config (SiteConfigResource)

    JSON representation of a SiteConfig

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
# 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) ⇒ SiteConfigResource

Updates the configuration of an app.

Updates the configuration of an app.

resource belongs. object. See example. the API will update configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_config (SiteConfigResource)

    JSON representation of a SiteConfig

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteConfigResource)

    operation results.



19922
19923
19924
19925
# 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) ⇒ Concurrent::Promise

Updates the configuration of an app.

Updates the configuration of an app.

resource belongs. object. See example. the API will update configuration for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_config (SiteConfigResource)

    JSON representation of a SiteConfig

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



19965
19966
19967
19968
19969
19970
19971
19972
19973
19974
19975
19976
19977
19978
19979
19980
19981
19982
19983
19984
19985
19986
19987
19988
19989
19990
19991
19992
19993
19994
19995
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007
20008
20009
20010
20011
20012
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
# 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) ⇒ MsRestAzure::AzureOperationResponse

Updates the configuration of an app.

Updates the configuration of an app.

resource belongs. object. See example. the API will update configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_config (SiteConfigResource)

    JSON representation of a SiteConfig

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



19944
19945
19946
# 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) ⇒ MsRestAzure::AzureOperationResponse

Updates the configuration of an app.

Updates the configuration of an app.

resource belongs. object. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_config (SiteConfigResource)

    JSON representation of a SiteConfig

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



4505
4506
4507
# 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) ⇒ ConnectionStringDictionary

Replaces the connection strings of an app.

Replaces the connection strings of an app.

resource belongs. the app or deployment slot. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • connection_strings (ConnectionStringDictionary)

    Connection strings of

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ConnectionStringDictionary)

    operation results.



2591
2592
2593
2594
# 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) ⇒ Concurrent::Promise

Replaces the connection strings of an app.

Replaces the connection strings of an app.

resource belongs. the app or deployment slot. See example. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • connection_strings (ConnectionStringDictionary)

    Connection strings of

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
# 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) ⇒ ConnectionStringDictionary

Replaces the connection strings of an app.

Replaces the connection strings of an app.

resource belongs. the app or deployment slot. See example. the API will update the connection settings for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • connection_strings (ConnectionStringDictionary)

    Connection strings of

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ConnectionStringDictionary)

    operation results.



18164
18165
18166
18167
# 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) ⇒ Concurrent::Promise

Replaces the connection strings of an app.

Replaces the connection strings of an app.

resource belongs. the app or deployment slot. See example. the API will update the connection settings for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • connection_strings (ConnectionStringDictionary)

    Connection strings of

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
# 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) ⇒ MsRestAzure::AzureOperationResponse

Replaces the connection strings of an app.

Replaces the connection strings of an app.

resource belongs. the app or deployment slot. See example. the API will update the connection settings for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • connection_strings (ConnectionStringDictionary)

    Connection strings of

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



18186
18187
18188
# 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) ⇒ MsRestAzure::AzureOperationResponse

Replaces the connection strings of an app.

Replaces the connection strings of an app.

resource belongs. the app or deployment slot. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • connection_strings (ConnectionStringDictionary)

    Connection strings of

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2611
2612
2613
# 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) ⇒ SiteLogsConfig

Updates the logging configuration of an app.

Updates the logging configuration of an app.

resource belongs. contains the logging configuration to change in the “properties” property. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_logs_config (SiteLogsConfig)

    A SiteLogsConfig JSON object that

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteLogsConfig)

    operation results.



2923
2924
2925
2926
# 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) ⇒ Concurrent::Promise

Updates the logging configuration of an app.

Updates the logging configuration of an app.

resource belongs. contains the logging configuration to change in the “properties” property. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_logs_config (SiteLogsConfig)

    A SiteLogsConfig JSON object that

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
# 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) ⇒ SiteLogsConfig

Updates the logging configuration of an app.

Updates the logging configuration of an app.

resource belongs. contains the logging configuration to change in the “properties” property. the API will update the logging configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_logs_config (SiteLogsConfig)

    A SiteLogsConfig JSON object that

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteLogsConfig)

    operation results.



18517
18518
18519
18520
# 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) ⇒ Concurrent::Promise

Updates the logging configuration of an app.

Updates the logging configuration of an app.

resource belongs. contains the logging configuration to change in the “properties” property. the API will update the logging configuration for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_logs_config (SiteLogsConfig)

    A SiteLogsConfig JSON object that

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



18560
18561
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617
18618
18619
18620
18621
18622
18623
18624
18625
# 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) ⇒ MsRestAzure::AzureOperationResponse

Updates the logging configuration of an app.

Updates the logging configuration of an app.

resource belongs. contains the logging configuration to change in the “properties” property. the API will update the logging configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_logs_config (SiteLogsConfig)

    A SiteLogsConfig JSON object that

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



18539
18540
18541
# 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) ⇒ MsRestAzure::AzureOperationResponse

Updates the logging configuration of an app.

Updates the logging configuration of an app.

resource belongs. contains the logging configuration to change in the “properties” property. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_logs_config (SiteLogsConfig)

    A SiteLogsConfig JSON object that

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2943
2944
2945
# 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) ⇒ Identifier

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.

resource belongs. identifier. domain ownership properties. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • domain_ownership_identifier (Identifier)

    A JSON representation of the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Identifier)

    operation results.



6801
6802
6803
6804
# 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) ⇒ Concurrent::Promise

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.

resource belongs. identifier. domain ownership properties. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • domain_ownership_identifier (Identifier)

    A JSON representation of the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
# 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) ⇒ Identifier

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.

resource belongs. identifier. domain ownership properties. the API will delete the binding for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • domain_ownership_identifier (Identifier)

    A JSON representation of the

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Identifier)

    operation results.



22385
22386
22387
22388
# 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) ⇒ Concurrent::Promise

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.

resource belongs. identifier. domain ownership properties. the API will delete the binding for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • domain_ownership_identifier (Identifier)

    A JSON representation of the

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



22436
22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
22452
22453
22454
22455
22456
22457
22458
22459
22460
22461
22462
22463
22464
22465
22466
22467
22468
22469
22470
22471
22472
22473
22474
22475
22476
22477
22478
22479
22480
22481
22482
22483
22484
22485
22486
22487
22488
22489
22490
22491
22492
22493
22494
22495
22496
22497
22498
22499
22500
22501
22502
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. identifier. domain ownership properties. the API will delete the binding for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • domain_ownership_identifier (Identifier)

    A JSON representation of the

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



22411
22412
22413
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. identifier. domain ownership properties. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • domain_ownership_identifier_name (String)

    Name of domain ownership

  • domain_ownership_identifier (Identifier)

    A JSON representation of the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



6825
6826
6827
# 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) ⇒ HybridConnection

Creates a new Hybrid Connection using a Service Bus relay.

Creates a new Hybrid Connection using a Service Bus relay.

resource belongs. connection. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • connection_envelope (HybridConnection)

    The details of the hybrid

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (HybridConnection)

    operation results.



8564
8565
8566
8567
# 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) ⇒ Concurrent::Promise

Creates a new Hybrid Connection using a Service Bus relay.

Creates a new Hybrid Connection using a Service Bus relay.

resource belongs. connection. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • connection_envelope (HybridConnection)

    The details of the hybrid

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
# 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) ⇒ HybridConnection

Creates a new Hybrid Connection using a Service Bus relay.

Creates a new Hybrid Connection using a Service Bus relay.

resource belongs. connection. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • connection_envelope (HybridConnection)

    The details of the hybrid

  • slot (String)

    The name of the slot for the web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (HybridConnection)

    operation results.



24251
24252
24253
24254
# 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) ⇒ Concurrent::Promise

Creates a new Hybrid Connection using a Service Bus relay.

Creates a new Hybrid Connection using a Service Bus relay.

resource belongs. connection. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • connection_envelope (HybridConnection)

    The details of the hybrid

  • slot (String)

    The name of the slot for the web app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



24296
24297
24298
24299
24300
24301
24302
24303
24304
24305
24306
24307
24308
24309
24310
24311
24312
24313
24314
24315
24316
24317
24318
24319
24320
24321
24322
24323
24324
24325
24326
24327
24328
24329
24330
24331
24332
24333
24334
24335
24336
24337
24338
24339
24340
24341
24342
24343
24344
24345
24346
24347
24348
24349
24350
24351
24352
24353
24354
24355
24356
24357
24358
24359
24360
24361
24362
24363
# 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) ⇒ MsRestAzure::AzureOperationResponse

Creates a new Hybrid Connection using a Service Bus relay.

Creates a new Hybrid Connection using a Service Bus relay.

resource belongs. connection. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • connection_envelope (HybridConnection)

    The details of the hybrid

  • slot (String)

    The name of the slot for the web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



24274
24275
24276
# 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) ⇒ MsRestAzure::AzureOperationResponse

Creates a new Hybrid Connection using a Service Bus relay.

Creates a new Hybrid Connection using a Service Bus relay.

resource belongs. connection. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    The name of the web app.

  • namespace_name (String)

    The namespace for this hybrid connection.

  • relay_name (String)

    The relay name for this hybrid connection.

  • connection_envelope (HybridConnection)

    The details of the hybrid

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



8586
8587
8588
# 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) ⇒ StringDictionary

Replaces the metadata of an app.

Replaces the metadata of an app.

resource belongs. slot. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • metadata (StringDictionary)

    Edited metadata of the app or deployment

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (StringDictionary)

    operation results.



3043
3044
3045
3046
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb', line 3043

def (resource_group_name, name, , custom_headers:nil)
  response = (resource_group_name, name, , custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#update_metadata_async(resource_group_name, name, metadata, custom_headers: nil) ⇒ Concurrent::Promise

Replaces the metadata of an app.

Replaces the metadata of an app.

resource belongs. slot. See example. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • metadata (StringDictionary)

    Edited metadata of the app or deployment

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb', line 3082

def (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, 'metadata is nil' if .nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


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

  # Set Headers
  request_headers['x-ms-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,  )
  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) ⇒ StringDictionary

Replaces the metadata of an app.

Replaces the metadata of an app.

resource belongs. slot. See example. the API will update the metadata for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • metadata (StringDictionary)

    Edited metadata of the app or deployment

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (StringDictionary)

    operation results.



18644
18645
18646
18647
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb', line 18644

def (resource_group_name, name, , slot, custom_headers:nil)
  response = (resource_group_name, name, , 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) ⇒ Concurrent::Promise

Replaces the metadata of an app.

Replaces the metadata of an app.

resource belongs. slot. See example. the API will update the metadata for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • metadata (StringDictionary)

    Edited metadata of the app or deployment

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710
18711
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734
18735
18736
18737
18738
18739
18740
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb', line 18687

def (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, 'metadata is nil' if .nil?
  fail ArgumentError, 'slot is nil' if slot.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


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

  # Set Headers
  request_headers['x-ms-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,  )
  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) ⇒ MsRestAzure::AzureOperationResponse

Replaces the metadata of an app.

Replaces the metadata of an app.

resource belongs. slot. See example. the API will update the metadata for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • metadata (StringDictionary)

    Edited metadata of the app or deployment

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



18666
18667
18668
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb', line 18666

def (resource_group_name, name, , slot, custom_headers:nil)
  (resource_group_name, name, , slot, custom_headers:custom_headers).value!
end

#update_metadata_with_http_info(resource_group_name, name, metadata, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Replaces the metadata of an app.

Replaces the metadata of an app.

resource belongs. slot. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • metadata (StringDictionary)

    Edited metadata of the app or deployment

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3063
3064
3065
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb', line 3063

def (resource_group_name, name, , custom_headers:nil)
  (resource_group_name, name, , custom_headers:custom_headers).value!
end

#update_premier_add_on(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers: nil) ⇒ PremierAddOn

Updates a named add-on of an app.

Updates a named add-on of an app.

resource belongs. the edited premier add-on. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • premier_add_on (PremierAddOnPatchResource)

    A JSON representation of

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PremierAddOn)

    operation results.



12971
12972
12973
12974
# 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) ⇒ Concurrent::Promise

Updates a named add-on of an app.

Updates a named add-on of an app.

resource belongs. the edited premier add-on. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • premier_add_on (PremierAddOnPatchResource)

    A JSON representation of

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
# 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) ⇒ PremierAddOn

Updates a named add-on of an app.

Updates a named add-on of an app.

resource belongs. the edited premier add-on. the API will update the named add-on for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • premier_add_on (PremierAddOnPatchResource)

    A JSON representation of

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PremierAddOn)

    operation results.



28797
28798
28799
28800
# 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) ⇒ Concurrent::Promise

Updates a named add-on of an app.

Updates a named add-on of an app.

resource belongs. the edited premier add-on. the API will update the named add-on for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • premier_add_on (PremierAddOnPatchResource)

    A JSON representation of

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



28842
28843
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867
28868
28869
28870
28871
28872
28873
28874
28875
28876
28877
28878
28879
28880
28881
28882
28883
28884
28885
28886
28887
28888
28889
28890
28891
28892
28893
28894
28895
28896
28897
28898
28899
28900
28901
28902
28903
28904
28905
28906
28907
28908
# 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) ⇒ MsRestAzure::AzureOperationResponse

Updates a named add-on of an app.

Updates a named add-on of an app.

resource belongs. the edited premier add-on. the API will update the named add-on for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • premier_add_on (PremierAddOnPatchResource)

    A JSON representation of

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



28820
28821
28822
# 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) ⇒ MsRestAzure::AzureOperationResponse

Updates a named add-on of an app.

Updates a named add-on of an app.

resource belongs. the edited premier add-on. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • premier_add_on_name (String)

    Add-on name.

  • premier_add_on (PremierAddOnPatchResource)

    A JSON representation of

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



12992
12993
12994
# 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) ⇒ RelayServiceConnectionEntity

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).

resource belongs. hybrid connection configuration. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection configuration.

  • connection_envelope (RelayServiceConnectionEntity)

    Details of the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (RelayServiceConnectionEntity)

    operation results.



9364
9365
9366
9367
# 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) ⇒ Concurrent::Promise

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).

resource belongs. hybrid connection configuration. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection configuration.

  • connection_envelope (RelayServiceConnectionEntity)

    Details of the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
# 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) ⇒ RelayServiceConnectionEntity

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).

resource belongs. hybrid connection configuration. the API will create or update a hybrid connection for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection configuration.

  • connection_envelope (RelayServiceConnectionEntity)

    Details of the

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (RelayServiceConnectionEntity)

    operation results.



25092
25093
25094
25095
# 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) ⇒ Concurrent::Promise

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).

resource belongs. hybrid connection configuration. the API will create or update a hybrid connection for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection configuration.

  • connection_envelope (RelayServiceConnectionEntity)

    Details of the

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



25141
25142
25143
25144
25145
25146
25147
25148
25149
25150
25151
25152
25153
25154
25155
25156
25157
25158
25159
25160
25161
25162
25163
25164
25165
25166
25167
25168
25169
25170
25171
25172
25173
25174
25175
25176
25177
25178
25179
25180
25181
25182
25183
25184
25185
25186
25187
25188
25189
25190
25191
25192
25193
25194
25195
25196
25197
25198
25199
25200
25201
25202
25203
25204
25205
25206
25207
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. hybrid connection configuration. the API will create or update a hybrid connection for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection configuration.

  • connection_envelope (RelayServiceConnectionEntity)

    Details of the

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



25117
25118
25119
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. hybrid connection configuration. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • entity_name (String)

    Name of the hybrid connection configuration.

  • connection_envelope (RelayServiceConnectionEntity)

    Details of the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



9387
9388
9389
# 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) ⇒ PushSettings

Updates the Push settings associated with web app.

Updates the Push settings associated with web app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • push_settings (PushSettings)

    Push settings associated with web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PushSettings)

    operation results.



3314
3315
3316
3317
# 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) ⇒ Concurrent::Promise

Updates the Push settings associated with web app.

Updates the Push settings associated with web app.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • push_settings (PushSettings)

    Push settings associated with web app.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
# 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) ⇒ PushSettings

Updates the Push settings associated with web app.

Updates the Push settings associated with web app.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • push_settings (PushSettings)

    Push settings associated with web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (PushSettings)

    operation results.



18933
18934
18935
18936
# 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) ⇒ Concurrent::Promise

Updates the Push settings associated with web app.

Updates the Push settings associated with web app.

resource belongs. to production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • push_settings (PushSettings)

    Push settings associated with web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
19023
19024
19025
19026
19027
19028
19029
19030
19031
19032
19033
19034
19035
19036
19037
19038
19039
# 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) ⇒ MsRestAzure::AzureOperationResponse

Updates the Push settings associated with web app.

Updates the Push settings associated with web app.

resource belongs. to production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • push_settings (PushSettings)

    Push settings associated with web app.

  • slot (String)

    Name of web app slot. If not specified then will default

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



18954
18955
18956
# 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) ⇒ MsRestAzure::AzureOperationResponse

Updates the Push settings associated with web app.

Updates the Push settings associated with web app.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of web app.

  • push_settings (PushSettings)

    Push settings associated with web app.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3333
3334
3335
# 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) ⇒ Site

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.

resource belongs. update a deployment slot, use the slot parameter. properties. See example. default, this API attempts to create or modify the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Unique name of the app to create or update. To create or

  • site_envelope (SitePatchResource)

    A JSON representation of the app

  • slot (String)

    Name of the deployment slot to create or update. By

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Site)

    operation results.



15949
15950
15951
15952
# 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) ⇒ Concurrent::Promise

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.

resource belongs. update a deployment slot, use the slot parameter. properties. See example. default, this API attempts to create or modify the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Unique name of the app to create or update. To create or

  • site_envelope (SitePatchResource)

    A JSON representation of the app

  • slot (String)

    Name of the deployment slot to create or update. By

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
# 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) ⇒ SlotConfigNamesResource

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.

resource belongs. settings and connection strings. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_config_names (SlotConfigNamesResource)

    Names of application

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SlotConfigNamesResource)

    operation results.



3652
3653
3654
3655
# 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) ⇒ Concurrent::Promise

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.

resource belongs. settings and connection strings. See example. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_config_names (SlotConfigNamesResource)

    Names of application

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. settings and connection strings. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • slot_config_names (SlotConfigNamesResource)

    Names of application

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3674
3675
3676
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. update a deployment slot, use the slot parameter. properties. See example. default, this API attempts to create or modify the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Unique name of the app to create or update. To create or

  • site_envelope (SitePatchResource)

    A JSON representation of the app

  • slot (String)

    Name of the deployment slot to create or update. By

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



15974
15975
15976
# 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) ⇒ SiteSourceControl

Updates the source control configuration of an app.

Updates the source control configuration of an app.

resource belongs. SiteSourceControl object. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_source_control (SiteSourceControl)

    JSON representation of a

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteSourceControl)

    operation results.



35294
35295
35296
35297
# 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) ⇒ Concurrent::Promise

Updates the source control configuration of an app.

Updates the source control configuration of an app.

resource belongs. SiteSourceControl object. See example. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_source_control (SiteSourceControl)

    JSON representation of a

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



35333
35334
35335
35336
35337
35338
35339
35340
35341
35342
35343
35344
35345
35346
35347
35348
35349
35350
35351
35352
35353
35354
35355
35356
35357
35358
35359
35360
35361
35362
35363
35364
35365
35366
35367
35368
35369
35370
35371
35372
35373
35374
35375
35376
35377
35378
35379
35380
35381
35382
35383
35384
35385
35386
35387
35388
35389
35390
35391
35392
35393
35394
35395
35396
35397
35398
35399
35400
35401
35402
35403
35404
35405
35406
35407
35408
35409
35410
35411
35412
35413
35414
35415
35416
35417
# 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) ⇒ SiteSourceControl

Updates the source control configuration of an app.

Updates the source control configuration of an app.

resource belongs. SiteSourceControl object. See example. the API will update the source control configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_source_control (SiteSourceControl)

    JSON representation of a

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SiteSourceControl)

    operation results.



32112
32113
32114
32115
# 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) ⇒ Concurrent::Promise

Updates the source control configuration of an app.

Updates the source control configuration of an app.

resource belongs. SiteSourceControl object. See example. the API will update the source control configuration for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_source_control (SiteSourceControl)

    JSON representation of a

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



32155
32156
32157
32158
32159
32160
32161
32162
32163
32164
32165
32166
32167
32168
32169
32170
32171
32172
32173
32174
32175
32176
32177
32178
32179
32180
32181
32182
32183
32184
32185
32186
32187
32188
32189
32190
32191
32192
32193
32194
32195
32196
32197
32198
32199
32200
32201
32202
32203
32204
32205
32206
32207
32208
32209
32210
32211
32212
32213
32214
32215
32216
32217
32218
32219
32220
32221
32222
32223
32224
32225
32226
32227
32228
32229
32230
32231
32232
32233
32234
32235
32236
32237
32238
32239
32240
# 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) ⇒ MsRestAzure::AzureOperationResponse

Updates the source control configuration of an app.

Updates the source control configuration of an app.

resource belongs. SiteSourceControl object. See example. the API will update the source control configuration for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_source_control (SiteSourceControl)

    JSON representation of a

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



32134
32135
32136
# 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) ⇒ MsRestAzure::AzureOperationResponse

Updates the source control configuration of an app.

Updates the source control configuration of an app.

resource belongs. SiteSourceControl object. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • site_source_control (SiteSourceControl)

    JSON representation of a

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



35314
35315
35316
# 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) ⇒ SwiftVirtualNetwork

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.

resource belongs. Network connection. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • connection_envelope (SwiftVirtualNetwork)

    Properties of the Virtual

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SwiftVirtualNetwork)

    operation results.



4121
4122
4123
4124
# 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) ⇒ Concurrent::Promise

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.

resource belongs. Network connection. See example. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • connection_envelope (SwiftVirtualNetwork)

    Properties of the Virtual

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
# 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) ⇒ SwiftVirtualNetwork

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.

resource belongs. Network connection. See example. the API will add or update connections for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • connection_envelope (SwiftVirtualNetwork)

    Properties of the Virtual

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (SwiftVirtualNetwork)

    operation results.



19537
19538
19539
19540
# 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) ⇒ Concurrent::Promise

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.

resource belongs. Network connection. See example. the API will add or update connections for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • connection_envelope (SwiftVirtualNetwork)

    Properties of the Virtual

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



19592
19593
19594
19595
19596
19597
19598
19599
19600
19601
19602
19603
19604
19605
19606
19607
19608
19609
19610
19611
19612
19613
19614
19615
19616
19617
19618
19619
19620
19621
19622
19623
19624
19625
19626
19627
19628
19629
19630
19631
19632
19633
19634
19635
19636
19637
19638
19639
19640
19641
19642
19643
19644
19645
19646
19647
19648
19649
19650
19651
19652
19653
19654
19655
19656
19657
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. Network connection. See example. the API will add or update connections for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • connection_envelope (SwiftVirtualNetwork)

    Properties of the Virtual

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



19565
19566
19567
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. Network connection. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • connection_envelope (SwiftVirtualNetwork)

    Properties of the Virtual

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



4147
4148
4149
# 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) ⇒ VnetInfo

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).

resource belongs. connection. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of an existing Virtual Network.

  • connection_envelope (VnetInfo)

    Properties of the Virtual Network

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (VnetInfo)

    operation results.



37053
37054
37055
37056
# 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) ⇒ Concurrent::Promise

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).

resource belongs. connection. See example. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of an existing Virtual Network.

  • connection_envelope (VnetInfo)

    Properties of the Virtual Network

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



37098
37099
37100
37101
37102
37103
37104
37105
37106
37107
37108
37109
37110
37111
37112
37113
37114
37115
37116
37117
37118
37119
37120
37121
37122
37123
37124
37125
37126
37127
37128
37129
37130
37131
37132
37133
37134
37135
37136
37137
37138
37139
37140
37141
37142
37143
37144
37145
37146
37147
37148
37149
37150
37151
37152
37153
37154
37155
37156
37157
37158
37159
37160
37161
37162
37163
# 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) ⇒ VnetGateway

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).

resource belongs. supported string is “primary”. gateway with. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the Virtual Network.

  • gateway_name (String)

    Name of the gateway. Currently, the only

  • connection_envelope (VnetGateway)

    The properties to update this

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (VnetGateway)

    operation results.



37431
37432
37433
37434
# 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) ⇒ Concurrent::Promise

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).

resource belongs. supported string is “primary”. gateway with. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the Virtual Network.

  • gateway_name (String)

    Name of the gateway. Currently, the only

  • connection_envelope (VnetGateway)

    The properties to update this

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



37476
37477
37478
37479
37480
37481
37482
37483
37484
37485
37486
37487
37488
37489
37490
37491
37492
37493
37494
37495
37496
37497
37498
37499
37500
37501
37502
37503
37504
37505
37506
37507
37508
37509
37510
37511
37512
37513
37514
37515
37516
37517
37518
37519
37520
37521
37522
37523
37524
37525
37526
37527
37528
37529
37530
37531
37532
37533
37534
37535
37536
37537
37538
37539
37540
37541
37542
# 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) ⇒ VnetGateway

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).

resource belongs. supported string is “primary”. gateway with. the API will add or update a gateway for the production slot’s Virtual Network. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the Virtual Network.

  • gateway_name (String)

    Name of the gateway. Currently, the only

  • connection_envelope (VnetGateway)

    The properties to update this

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (VnetGateway)

    operation results.



34386
34387
34388
34389
# 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) ⇒ Concurrent::Promise

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).

resource belongs. supported string is “primary”. gateway with. the API will add or update a gateway for the production slot’s Virtual Network. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the Virtual Network.

  • gateway_name (String)

    Name of the gateway. Currently, the only

  • connection_envelope (VnetGateway)

    The properties to update this

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



34437
34438
34439
34440
34441
34442
34443
34444
34445
34446
34447
34448
34449
34450
34451
34452
34453
34454
34455
34456
34457
34458
34459
34460
34461
34462
34463
34464
34465
34466
34467
34468
34469
34470
34471
34472
34473
34474
34475
34476
34477
34478
34479
34480
34481
34482
34483
34484
34485
34486
34487
34488
34489
34490
34491
34492
34493
34494
34495
34496
34497
34498
34499
34500
34501
34502
34503
34504
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. supported string is “primary”. gateway with. the API will add or update a gateway for the production slot’s Virtual Network. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the Virtual Network.

  • gateway_name (String)

    Name of the gateway. Currently, the only

  • connection_envelope (VnetGateway)

    The properties to update this

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



34412
34413
34414
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. supported string is “primary”. gateway with. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of the Virtual Network.

  • gateway_name (String)

    Name of the gateway. Currently, the only

  • connection_envelope (VnetGateway)

    The properties to update this

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



37454
37455
37456
# 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) ⇒ VnetInfo

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).

resource belongs. connection. See example. the API will add or update connections for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of an existing Virtual Network.

  • connection_envelope (VnetInfo)

    Properties of the Virtual Network

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (VnetInfo)

    operation results.



33983
33984
33985
33986
# 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) ⇒ Concurrent::Promise

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).

resource belongs. connection. See example. the API will add or update connections for the production slot. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of an existing Virtual Network.

  • connection_envelope (VnetInfo)

    Properties of the Virtual Network

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



34032
34033
34034
34035
34036
34037
34038
34039
34040
34041
34042
34043
34044
34045
34046
34047
34048
34049
34050
34051
34052
34053
34054
34055
34056
34057
34058
34059
34060
34061
34062
34063
34064
34065
34066
34067
34068
34069
34070
34071
34072
34073
34074
34075
34076
34077
34078
34079
34080
34081
34082
34083
34084
34085
34086
34087
34088
34089
34090
34091
34092
34093
34094
34095
34096
34097
34098
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. connection. See example. the API will add or update connections for the production slot. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of an existing Virtual Network.

  • connection_envelope (VnetInfo)

    Properties of the Virtual Network

  • slot (String)

    Name of the deployment slot. If a slot is not specified,

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



34008
34009
34010
# 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) ⇒ MsRestAzure::AzureOperationResponse

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).

resource belongs. connection. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the app.

  • vnet_name (String)

    Name of an existing Virtual Network.

  • connection_envelope (VnetInfo)

    Properties of the Virtual Network

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



37076
37077
37078
# 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) ⇒ MsRestAzure::AzureOperationResponse

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.

resource belongs. update a deployment slot, use the slot parameter. properties. See example. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Unique name of the app to create or update. To create or

  • site_envelope (SitePatchResource)

    A JSON representation of the app

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



535
536
537
# 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