Class: Azure::Web::Mgmt::V2016_03_01::WebSiteManagementClient

Inherits:
MsRestAzure::AzureServiceClient
  • Object
show all
Includes:
MsRestAzure, MsRestAzure::Serialization
Defined in:
lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb

Overview

A service client - single point of access to the REST API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(credentials = nil, base_url = nil, options = nil) ⇒ WebSiteManagementClient

Creates initializes a new instance of the WebSiteManagementClient class.

Parameters:

  • credentials (MsRest::ServiceClientCredentials) (defaults to: nil)

    credentials to authorize HTTP requests made by the service client.

  • base_url (String) (defaults to: nil)

    the base URI of the service.

  • options (Array) (defaults to: nil)

    filters to be applied to the HTTP requests.



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 67

def initialize(credentials = nil, base_url = nil, options = nil)
  super(credentials, options)
  @base_url = base_url || 'https://management.azure.com'

  fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
  @credentials = credentials

  @certificates = Certificates.new(self)
  @deleted_web_apps = DeletedWebApps.new(self)
  @diagnostics = Diagnostics.new(self)
  @provider = Provider.new(self)
  @recommendations = Recommendations.new(self)
  @resource_health_metadata_operations = ResourceHealthMetadataOperations.new(self)
  @billing_meters = BillingMeters.new(self)
  @api_version = '2016-03-01'
  @accept_language = 'en-US'
  @long_running_operation_retry_timeout = 30
  @generate_client_request_id = true
  add_telemetry
end

Instance Attribute Details

#accept_languageString

Returns The preferred language for the response.

Returns:

  • (String)

    The preferred language for the response.



28
29
30
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 28

def accept_language
  @accept_language
end

#api_versionString (readonly)

Returns API Version.

Returns:

  • (String)

    API Version



25
26
27
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 25

def api_version
  @api_version
end

#base_urlString

Returns the base URI of the service.

Returns:

  • (String)

    the base URI of the service.



15
16
17
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 15

def base_url
  @base_url
end

#billing_metersBillingMeters (readonly)

Returns billing_meters.

Returns:



59
60
61
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 59

def billing_meters
  @billing_meters
end

#certificatesCertificates (readonly)

Returns certificates.

Returns:



40
41
42
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 40

def certificates
  @certificates
end

#credentialsObject (readonly)

Returns Credentials needed for the client to connect to Azure.

Returns:

  • Credentials needed for the client to connect to Azure.



18
19
20
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 18

def credentials
  @credentials
end

#deleted_web_appsDeletedWebApps (readonly)

Returns deleted_web_apps.

Returns:



43
44
45
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 43

def deleted_web_apps
  @deleted_web_apps
end

#diagnosticsDiagnostics (readonly)

Returns diagnostics.

Returns:



46
47
48
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 46

def diagnostics
  @diagnostics
end

#generate_client_request_idBoolean

generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.

Returns:

  • (Boolean)

    Whether a unique x-ms-client-request-id should be



37
38
39
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 37

def generate_client_request_id
  @generate_client_request_id
end

#long_running_operation_retry_timeoutInteger

Operations. Default value is 30.

Returns:

  • (Integer)

    The retry timeout in seconds for Long Running



32
33
34
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 32

def long_running_operation_retry_timeout
  @long_running_operation_retry_timeout
end

#providerProvider (readonly)

Returns provider.

Returns:



49
50
51
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 49

def provider
  @provider
end

#recommendationsRecommendations (readonly)

Returns recommendations.

Returns:



52
53
54
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 52

def recommendations
  @recommendations
end

#resource_health_metadata_operationsResourceHealthMetadataOperations (readonly)

resource_health_metadata_operations



56
57
58
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 56

def 
  @resource_health_metadata_operations
end

#subscription_idString

string (e.g. 00000000-0000-0000-0000-000000000000).

Returns:

  • (String)

    Your Azure subscription ID. This is a GUID-formatted



22
23
24
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 22

def subscription_id
  @subscription_id
end

Instance Method Details

#check_name_availability(name, type, is_fqdn: nil, custom_headers: nil) ⇒ ResourceNameAvailability

Check if a resource name is available.

Check if a resource name is available.

Possible values include: ‘Site’, ‘Slot’, ‘HostingEnvironment’, ‘PublishingUser’, ‘Microsoft.Web/sites’, ‘Microsoft.Web/sites/slots’, ‘Microsoft.Web/hostingEnvironments’, ‘Microsoft.Web/publishingUsers’ will be added to the HTTP request.

Parameters:

  • name (String)

    Resource name to verify.

  • type (CheckNameResourceTypes)

    Resource type used for verification.

  • is_fqdn (Boolean) (defaults to: nil)

    Is fully qualified domain name.

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

    A hash of custom headers that

Returns:

  • (ResourceNameAvailability)

    operation results.



644
645
646
647
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 644

def check_name_availability(name, type, is_fqdn:nil, custom_headers:nil)
  response = check_name_availability_async(name, type, is_fqdn:is_fqdn, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#check_name_availability_async(name, type, is_fqdn: nil, custom_headers: nil) ⇒ Concurrent::Promise

Check if a resource name is available.

Check if a resource name is available.

Possible values include: ‘Site’, ‘Slot’, ‘HostingEnvironment’, ‘PublishingUser’, ‘Microsoft.Web/sites’, ‘Microsoft.Web/sites/slots’, ‘Microsoft.Web/hostingEnvironments’, ‘Microsoft.Web/publishingUsers’ to the HTTP request.

Parameters:

  • name (String)

    Resource name to verify.

  • type (CheckNameResourceTypes)

    Resource type used for verification.

  • is_fqdn (Boolean) (defaults to: nil)

    Is fully qualified domain name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
741
742
743
744
745
746
747
748
749
750
751
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 685

def check_name_availability_async(name, type, is_fqdn:nil, custom_headers:nil)
  fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
  fail ArgumentError, 'api_version is nil' if api_version.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'type is nil' if type.nil?

  request = ResourceNameAvailabilityRequest.new
  unless name.nil? && type.nil? && is_fqdn.nil?
    request.name = name
    request.type = type
    request.is_fqdn = is_fqdn
  end

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

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

  # Serialize Request
  request_mapper = Azure::Web::Mgmt::V2016_03_01::Models::ResourceNameAvailabilityRequest.mapper()
  request_content = self.serialize(request_mapper,  request)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'

  request_url = @base_url || self.base_url

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

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

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

    result
  end

  promise.execute
end

#check_name_availability_with_http_info(name, type, is_fqdn: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Check if a resource name is available.

Check if a resource name is available.

Possible values include: ‘Site’, ‘Slot’, ‘HostingEnvironment’, ‘PublishingUser’, ‘Microsoft.Web/sites’, ‘Microsoft.Web/sites/slots’, ‘Microsoft.Web/hostingEnvironments’, ‘Microsoft.Web/publishingUsers’ will be added to the HTTP request.

Parameters:

  • name (String)

    Resource name to verify.

  • type (CheckNameResourceTypes)

    Resource type used for verification.

  • is_fqdn (Boolean) (defaults to: nil)

    Is fully qualified domain name.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



665
666
667
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 665

def check_name_availability_with_http_info(name, type, is_fqdn:nil, custom_headers:nil)
  check_name_availability_async(name, type, is_fqdn:is_fqdn, custom_headers:custom_headers).value!
end

#get_publishing_user(custom_headers: nil) ⇒ User

Gets publishing user

Gets publishing user

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:

  • (User)

    operation results.



156
157
158
159
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 156

def get_publishing_user(custom_headers:nil)
  response = get_publishing_user_async(custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#get_publishing_user_async(custom_headers: nil) ⇒ Concurrent::Promise

Gets publishing user

Gets publishing user

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.



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
226
227
228
229
230
231
232
233
234
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 185

def get_publishing_user_async(custom_headers:nil)
  fail ArgumentError, 'api_version is nil' if api_version.nil?


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

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = accept_language unless accept_language.nil?
  path_template = 'providers/Microsoft.Web/publishingUsers/web'

  request_url = @base_url || self.base_url

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

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

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

    result
  end

  promise.execute
end

#get_publishing_user_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets publishing user

Gets publishing user

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.



171
172
173
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 171

def get_publishing_user_with_http_info(custom_headers:nil)
  get_publishing_user_async(custom_headers:custom_headers).value!
end

#get_source_control(source_control_type, custom_headers: nil) ⇒ SourceControl

Gets source control token

Gets source control token

will be added to the HTTP request.

Parameters:

  • source_control_type (String)

    Type of source control

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

    A hash of custom headers that

Returns:

  • (SourceControl)

    operation results.



438
439
440
441
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 438

def get_source_control(source_control_type, custom_headers:nil)
  response = get_source_control_async(source_control_type, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#get_source_control_async(source_control_type, custom_headers: nil) ⇒ Concurrent::Promise

Gets source control token

Gets source control token

to the HTTP request.

Parameters:

  • source_control_type (String)

    Type of source control

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 469

def get_source_control_async(source_control_type, custom_headers:nil)
  fail ArgumentError, 'source_control_type is nil' if source_control_type.nil?
  fail ArgumentError, 'api_version is nil' if api_version.nil?


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

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = accept_language unless accept_language.nil?
  path_template = 'providers/Microsoft.Web/sourcecontrols/{sourceControlType}'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'sourceControlType' => source_control_type},
      query_params: {'api-version' => api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.make_request_async(:get, path_template, options)

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::SourceControl.mapper()
        result.body = self.deserialize(result_mapper, parsed_response)
      rescue Exception => 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_with_http_info(source_control_type, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets source control token

Gets source control token

will be added to the HTTP request.

Parameters:

  • source_control_type (String)

    Type of source control

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



454
455
456
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 454

def get_source_control_with_http_info(source_control_type, custom_headers:nil)
  get_source_control_async(source_control_type, custom_headers:custom_headers).value!
end

#get_subscription_deployment_locations(custom_headers: nil) ⇒ DeploymentLocations

Gets list of available geo regions plus ministamps

Gets list of available geo regions plus ministamps

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:

  • (DeploymentLocations)

    operation results.



763
764
765
766
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 763

def get_subscription_deployment_locations(custom_headers:nil)
  response = get_subscription_deployment_locations_async(custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#get_subscription_deployment_locations_async(custom_headers: nil) ⇒ Concurrent::Promise

Gets list of available geo regions plus ministamps

Gets list of available geo regions plus ministamps

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.



792
793
794
795
796
797
798
799
800
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
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 792

def get_subscription_deployment_locations_async(custom_headers:nil)
  fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
  fail ArgumentError, 'api_version is nil' if api_version.nil?


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

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

  request_url = @base_url || self.base_url

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

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

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

    result
  end

  promise.execute
end

#get_subscription_deployment_locations_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets list of available geo regions plus ministamps

Gets list of available geo regions plus ministamps

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.



778
779
780
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 778

def get_subscription_deployment_locations_with_http_info(custom_headers:nil)
  get_subscription_deployment_locations_async(custom_headers:custom_headers).value!
end

#list_geo_regions(sku: nil, linux_workers_enabled: nil, custom_headers: nil) ⇒ Array<GeoRegion>

Get a list of available geographical regions.

Get a list of available geographical regions.

include: ‘Free’, ‘Shared’, ‘Basic’, ‘Standard’, ‘Premium’, ‘PremiumV2’, ‘Dynamic’, ‘Isolated’ to filter to only regions that support Linux workers. will be added to the HTTP request.

Parameters:

  • sku (SkuName) (defaults to: nil)

    Name of SKU used to filter the regions. Possible values

  • linux_workers_enabled (Boolean) (defaults to: nil)

    Specify true if you want

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

    A hash of custom headers that

Returns:

  • (Array<GeoRegion>)

    operation results.



860
861
862
863
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 860

def list_geo_regions(sku:nil, linux_workers_enabled:nil, custom_headers:nil)
  first_page = list_geo_regions_as_lazy(sku:sku, linux_workers_enabled:linux_workers_enabled, custom_headers:custom_headers)
  first_page.get_all_items
end

#list_geo_regions_as_lazy(sku: nil, linux_workers_enabled: nil, custom_headers: nil) ⇒ GeoRegionCollection

Get a list of available geographical regions.

Get a list of available geographical regions.

include: ‘Free’, ‘Shared’, ‘Basic’, ‘Standard’, ‘Premium’, ‘PremiumV2’, ‘Dynamic’, ‘Isolated’ to filter to only regions that support Linux workers. will be added to the HTTP request.

Parameters:

  • sku (SkuName) (defaults to: nil)

    Name of SKU used to filter the regions. Possible values

  • linux_workers_enabled (Boolean) (defaults to: nil)

    Specify true if you want

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

    A hash of custom headers that

Returns:

  • (GeoRegionCollection)

    operation results.



2157
2158
2159
2160
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2157

def list_geo_regions_as_lazy(sku:nil, linux_workers_enabled:nil, custom_headers:nil)
  first_page = list_geo_regions_as_lazy_as_lazy(sku:sku, linux_workers_enabled:linux_workers_enabled, custom_headers:custom_headers)
  first_page.get_all_items
end

#list_geo_regions_as_lazy_async(sku: nil, linux_workers_enabled: nil, custom_headers: nil) ⇒ Concurrent::Promise

Get a list of available geographical regions.

Get a list of available geographical regions.

include: ‘Free’, ‘Shared’, ‘Basic’, ‘Standard’, ‘Premium’, ‘PremiumV2’, ‘Dynamic’, ‘Isolated’ to filter to only regions that support Linux workers. to the HTTP request.

Parameters:

  • sku (SkuName) (defaults to: nil)

    Name of SKU used to filter the regions. Possible values

  • linux_workers_enabled (Boolean) (defaults to: nil)

    Specify true if you want

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2196
2197
2198
2199
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
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2196

def list_geo_regions_as_lazy_async(sku:nil, linux_workers_enabled:nil, custom_headers:nil)


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
  path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'sku' => sku,'linuxWorkersEnabled' => linux_workers_enabled},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.make_request_async(:get, path_template, options)

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

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

    result
  end

  promise.execute
end

#list_geo_regions_as_lazy_with_http_info(sku: nil, linux_workers_enabled: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Get a list of available geographical regions.

Get a list of available geographical regions.

include: ‘Free’, ‘Shared’, ‘Basic’, ‘Standard’, ‘Premium’, ‘PremiumV2’, ‘Dynamic’, ‘Isolated’ to filter to only regions that support Linux workers. will be added to the HTTP request.

Parameters:

  • sku (SkuName) (defaults to: nil)

    Name of SKU used to filter the regions. Possible values

  • linux_workers_enabled (Boolean) (defaults to: nil)

    Specify true if you want

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2177
2178
2179
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2177

def list_geo_regions_as_lazy_with_http_info(sku:nil, linux_workers_enabled:nil, custom_headers:nil)
  list_geo_regions_as_lazy_async(sku:sku, linux_workers_enabled:linux_workers_enabled, custom_headers:custom_headers).value!
end

#list_geo_regions_async(sku: nil, linux_workers_enabled: nil, custom_headers: nil) ⇒ Concurrent::Promise

Get a list of available geographical regions.

Get a list of available geographical regions.

include: ‘Free’, ‘Shared’, ‘Basic’, ‘Standard’, ‘Premium’, ‘PremiumV2’, ‘Dynamic’, ‘Isolated’ to filter to only regions that support Linux workers. to the HTTP request.

Parameters:

  • sku (SkuName) (defaults to: nil)

    Name of SKU used to filter the regions. Possible values

  • linux_workers_enabled (Boolean) (defaults to: nil)

    Specify true if you want

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



899
900
901
902
903
904
905
906
907
908
909
910
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
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 899

def list_geo_regions_async(sku:nil, linux_workers_enabled:nil, custom_headers:nil)
  fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
  fail ArgumentError, 'api_version is nil' if api_version.nil?


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

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

  request_url = @base_url || self.base_url

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

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

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

    result
  end

  promise.execute
end

#list_geo_regions_next(next_page_link, custom_headers: nil) ⇒ GeoRegionCollection

Get a list of available geographical regions.

Get a list of available geographical regions.

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:

  • (GeoRegionCollection)

    operation results.



1782
1783
1784
1785
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1782

def list_geo_regions_next(next_page_link, custom_headers:nil)
  response = list_geo_regions_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_geo_regions_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise

Get a list of available geographical regions.

Get a list of available geographical regions.

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.



1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1815

def list_geo_regions_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'] = accept_language unless accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || self.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 = self.make_request_async(:get, path_template, options)

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

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

    result
  end

  promise.execute
end

#list_geo_regions_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Get a list of available geographical regions.

Get a list of available geographical regions.

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.



1799
1800
1801
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1799

def list_geo_regions_next_with_http_info(next_page_link, custom_headers:nil)
  list_geo_regions_next_async(next_page_link, custom_headers:custom_headers).value!
end

#list_geo_regions_with_http_info(sku: nil, linux_workers_enabled: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Get a list of available geographical regions.

Get a list of available geographical regions.

include: ‘Free’, ‘Shared’, ‘Basic’, ‘Standard’, ‘Premium’, ‘PremiumV2’, ‘Dynamic’, ‘Isolated’ to filter to only regions that support Linux workers. will be added to the HTTP request.

Parameters:

  • sku (SkuName) (defaults to: nil)

    Name of SKU used to filter the regions. Possible values

  • linux_workers_enabled (Boolean) (defaults to: nil)

    Specify true if you want

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



880
881
882
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 880

def list_geo_regions_with_http_info(sku:nil, linux_workers_enabled:nil, custom_headers:nil)
  list_geo_regions_async(sku:sku, linux_workers_enabled:linux_workers_enabled, custom_headers:custom_headers).value!
end

#list_premier_add_on_offers(custom_headers: nil) ⇒ Array<PremierAddOnOffer>

List all premier add-on offers.

List all premier add-on offers.

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:

  • (Array<PremierAddOnOffer>)

    operation results.



1065
1066
1067
1068
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1065

def list_premier_add_on_offers(custom_headers:nil)
  first_page = list_premier_add_on_offers_as_lazy(custom_headers:custom_headers)
  first_page.get_all_items
end

#list_premier_add_on_offers_as_lazy(custom_headers: nil) ⇒ PremierAddOnOfferCollection

List all premier add-on offers.

List all premier add-on offers.

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:

  • (PremierAddOnOfferCollection)

    operation results.



2347
2348
2349
2350
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2347

def list_premier_add_on_offers_as_lazy(custom_headers:nil)
  first_page = list_premier_add_on_offers_as_lazy_as_lazy(custom_headers:custom_headers)
  first_page.get_all_items
end

#list_premier_add_on_offers_as_lazy_async(custom_headers: nil) ⇒ Concurrent::Promise

List all premier add-on offers.

List all premier add-on offers.

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.



2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2376

def list_premier_add_on_offers_as_lazy_async(custom_headers:nil)


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
  path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.make_request_async(:get, path_template, options)

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::PremierAddOnOfferCollection.mapper()
        result.body = self.deserialize(result_mapper, parsed_response)
      rescue Exception => 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_on_offers_as_lazy_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

List all premier add-on offers.

List all premier add-on offers.

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.



2362
2363
2364
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2362

def list_premier_add_on_offers_as_lazy_with_http_info(custom_headers:nil)
  list_premier_add_on_offers_as_lazy_async(custom_headers:custom_headers).value!
end

#list_premier_add_on_offers_async(custom_headers: nil) ⇒ Concurrent::Promise

List all premier add-on offers.

List all premier add-on offers.

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.



1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1094

def list_premier_add_on_offers_async(custom_headers:nil)
  fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
  fail ArgumentError, 'api_version is nil' if api_version.nil?


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

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

  request_url = @base_url || self.base_url

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

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::PremierAddOnOfferCollection.mapper()
        result.body = self.deserialize(result_mapper, parsed_response)
      rescue Exception => 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_on_offers_next(next_page_link, custom_headers: nil) ⇒ PremierAddOnOfferCollection

List all premier add-on offers.

List all premier add-on offers.

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:

  • (PremierAddOnOfferCollection)

    operation results.



1974
1975
1976
1977
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1974

def list_premier_add_on_offers_next(next_page_link, custom_headers:nil)
  response = list_premier_add_on_offers_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_premier_add_on_offers_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise

List all premier add-on offers.

List all premier add-on offers.

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.



2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2007

def list_premier_add_on_offers_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'] = accept_language unless accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || self.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 = self.make_request_async(:get, path_template, options)

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::PremierAddOnOfferCollection.mapper()
        result.body = self.deserialize(result_mapper, parsed_response)
      rescue Exception => 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_on_offers_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

List all premier add-on offers.

List all premier add-on offers.

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.



1991
1992
1993
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1991

def list_premier_add_on_offers_next_with_http_info(next_page_link, custom_headers:nil)
  list_premier_add_on_offers_next_async(next_page_link, custom_headers:custom_headers).value!
end

#list_premier_add_on_offers_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

List all premier add-on offers.

List all premier add-on offers.

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.



1080
1081
1082
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1080

def list_premier_add_on_offers_with_http_info(custom_headers:nil)
  list_premier_add_on_offers_async(custom_headers:custom_headers).value!
end

#list_site_identifiers_assigned_to_host_name(name_identifier, custom_headers: nil) ⇒ Array<Identifier>

List all apps that are assigned to a hostname.

List all apps that are assigned to a hostname.

will be added to the HTTP request.

Parameters:

  • name_identifier (NameIdentifier)

    Hostname information.

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

    A hash of custom headers that

Returns:

  • (Array<Identifier>)

    operation results.



963
964
965
966
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 963

def list_site_identifiers_assigned_to_host_name(name_identifier, custom_headers:nil)
  first_page = list_site_identifiers_assigned_to_host_name_as_lazy(name_identifier, custom_headers:custom_headers)
  first_page.get_all_items
end

#list_site_identifiers_assigned_to_host_name_as_lazy(name_identifier, custom_headers: nil) ⇒ IdentifierCollection

List all apps that are assigned to a hostname.

List all apps that are assigned to a hostname.

will be added to the HTTP request.

Parameters:

  • name_identifier (NameIdentifier)

    Hostname information.

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

    A hash of custom headers that

Returns:

  • (IdentifierCollection)

    operation results.



2253
2254
2255
2256
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2253

def list_site_identifiers_assigned_to_host_name_as_lazy(name_identifier, custom_headers:nil)
  first_page = list_site_identifiers_assigned_to_host_name_as_lazy_as_lazy(name_identifier, custom_headers:custom_headers)
  first_page.get_all_items
end

#list_site_identifiers_assigned_to_host_name_as_lazy_async(name_identifier, custom_headers: nil) ⇒ Concurrent::Promise

List all apps that are assigned to a hostname.

List all apps that are assigned to a hostname.

to the HTTP request.

Parameters:

  • name_identifier (NameIdentifier)

    Hostname information.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
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
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2284

def list_site_identifiers_assigned_to_host_name_as_lazy_async(name_identifier, custom_headers:nil)
  fail ArgumentError, 'name_identifier is nil' if name_identifier.nil?


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

  # Serialize Request
  request_mapper = Azure::Web::Mgmt::V2016_03_01::Models::NameIdentifier.mapper()
  request_content = self.serialize(request_mapper,  name_identifier)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.make_request_async(:post, path_template, options)

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::IdentifierCollection.mapper()
        result.body = self.deserialize(result_mapper, parsed_response)
      rescue Exception => 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_identifiers_assigned_to_host_name_as_lazy_with_http_info(name_identifier, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

List all apps that are assigned to a hostname.

List all apps that are assigned to a hostname.

will be added to the HTTP request.

Parameters:

  • name_identifier (NameIdentifier)

    Hostname information.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2269
2270
2271
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2269

def list_site_identifiers_assigned_to_host_name_as_lazy_with_http_info(name_identifier, custom_headers:nil)
  list_site_identifiers_assigned_to_host_name_as_lazy_async(name_identifier, custom_headers:custom_headers).value!
end

#list_site_identifiers_assigned_to_host_name_async(name_identifier, custom_headers: nil) ⇒ Concurrent::Promise

List all apps that are assigned to a hostname.

List all apps that are assigned to a hostname.

to the HTTP request.

Parameters:

  • name_identifier (NameIdentifier)

    Hostname information.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
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
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 994

def list_site_identifiers_assigned_to_host_name_async(name_identifier, custom_headers:nil)
  fail ArgumentError, 'name_identifier is nil' if name_identifier.nil?
  fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
  fail ArgumentError, 'api_version is nil' if api_version.nil?


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

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

  # Serialize Request
  request_mapper = Azure::Web::Mgmt::V2016_03_01::Models::NameIdentifier.mapper()
  request_content = self.serialize(request_mapper,  name_identifier)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'

  request_url = @base_url || self.base_url

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

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::IdentifierCollection.mapper()
        result.body = self.deserialize(result_mapper, parsed_response)
      rescue Exception => 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_identifiers_assigned_to_host_name_next(next_page_link, custom_headers: nil) ⇒ IdentifierCollection

List all apps that are assigned to a hostname.

List all apps that are assigned to a hostname.

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.



1878
1879
1880
1881
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1878

def list_site_identifiers_assigned_to_host_name_next(next_page_link, custom_headers:nil)
  response = list_site_identifiers_assigned_to_host_name_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_site_identifiers_assigned_to_host_name_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise

List all apps that are assigned to a hostname.

List all apps that are assigned to a hostname.

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.



1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1911

def list_site_identifiers_assigned_to_host_name_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'] = accept_language unless accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || self.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 = self.make_request_async(:post, path_template, options)

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::IdentifierCollection.mapper()
        result.body = self.deserialize(result_mapper, parsed_response)
      rescue Exception => 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_identifiers_assigned_to_host_name_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

List all apps that are assigned to a hostname.

List all apps that are assigned to a hostname.

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.



1895
1896
1897
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1895

def list_site_identifiers_assigned_to_host_name_next_with_http_info(next_page_link, custom_headers:nil)
  list_site_identifiers_assigned_to_host_name_next_async(next_page_link, custom_headers:custom_headers).value!
end

#list_site_identifiers_assigned_to_host_name_with_http_info(name_identifier, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

List all apps that are assigned to a hostname.

List all apps that are assigned to a hostname.

will be added to the HTTP request.

Parameters:

  • name_identifier (NameIdentifier)

    Hostname information.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



979
980
981
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 979

def list_site_identifiers_assigned_to_host_name_with_http_info(name_identifier, custom_headers:nil)
  list_site_identifiers_assigned_to_host_name_async(name_identifier, custom_headers:custom_headers).value!
end

#list_skus(custom_headers: nil) ⇒ SkuInfos

List all SKUs.

List all SKUs.

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:

  • (SkuInfos)

    operation results.



1157
1158
1159
1160
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1157

def list_skus(custom_headers:nil)
  response = list_skus_async(custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_skus_async(custom_headers: nil) ⇒ Concurrent::Promise

List all SKUs.

List all SKUs.

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.



1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1186

def list_skus_async(custom_headers:nil)
  fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
  fail ArgumentError, 'api_version is nil' if api_version.nil?


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

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

  request_url = @base_url || self.base_url

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

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

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

    result
  end

  promise.execute
end

#list_skus_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

List all SKUs.

List all SKUs.

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.



1172
1173
1174
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1172

def list_skus_with_http_info(custom_headers:nil)
  list_skus_async(custom_headers:custom_headers).value!
end

#list_source_controls(custom_headers: nil) ⇒ Array<SourceControl>

Gets the source controls available for Azure websites.

Gets the source controls available for Azure websites.

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:

  • (Array<SourceControl>)

    operation results.



347
348
349
350
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 347

def list_source_controls(custom_headers:nil)
  first_page = list_source_controls_as_lazy(custom_headers:custom_headers)
  first_page.get_all_items
end

#list_source_controls_as_lazy(custom_headers: nil) ⇒ SourceControlCollection

Gets the source controls available for Azure websites.

Gets the source controls available for Azure websites.

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:

  • (SourceControlCollection)

    operation results.



2068
2069
2070
2071
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2068

def list_source_controls_as_lazy(custom_headers:nil)
  first_page = list_source_controls_as_lazy_as_lazy(custom_headers:custom_headers)
  first_page.get_all_items
end

#list_source_controls_as_lazy_async(custom_headers: nil) ⇒ Concurrent::Promise

Gets the source controls available for Azure websites.

Gets the source controls available for Azure websites.

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.



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
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2097

def list_source_controls_as_lazy_async(custom_headers:nil)


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
  path_template = 'providers/Microsoft.Web/sourcecontrols'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.make_request_async(:get, path_template, options)

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

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

    result
  end

  promise.execute
end

#list_source_controls_as_lazy_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets the source controls available for Azure websites.

Gets the source controls available for Azure websites.

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.



2083
2084
2085
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2083

def list_source_controls_as_lazy_with_http_info(custom_headers:nil)
  list_source_controls_as_lazy_async(custom_headers:custom_headers).value!
end

#list_source_controls_async(custom_headers: nil) ⇒ Concurrent::Promise

Gets the source controls available for Azure websites.

Gets the source controls available for Azure websites.

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.



376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 376

def list_source_controls_async(custom_headers:nil)
  fail ArgumentError, 'api_version is nil' if api_version.nil?


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

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = accept_language unless accept_language.nil?
  path_template = 'providers/Microsoft.Web/sourcecontrols'

  request_url = @base_url || self.base_url

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

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

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

    result
  end

  promise.execute
end

#list_source_controls_next(next_page_link, custom_headers: nil) ⇒ SourceControlCollection

Gets the source controls available for Azure websites.

Gets the source controls available for Azure websites.

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:

  • (SourceControlCollection)

    operation results.



1686
1687
1688
1689
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1686

def list_source_controls_next(next_page_link, custom_headers:nil)
  response = list_source_controls_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_source_controls_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise

Gets the source controls available for Azure websites.

Gets the source controls available for Azure websites.

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.



1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1719

def list_source_controls_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'] = accept_language unless accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || self.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 = self.make_request_async(:get, path_template, options)

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

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

    result
  end

  promise.execute
end

#list_source_controls_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets the source controls available for Azure websites.

Gets the source controls available for Azure websites.

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.



1703
1704
1705
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1703

def list_source_controls_next_with_http_info(next_page_link, custom_headers:nil)
  list_source_controls_next_async(next_page_link, custom_headers:custom_headers).value!
end

#list_source_controls_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets the source controls available for Azure websites.

Gets the source controls available for Azure websites.

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.



362
363
364
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 362

def list_source_controls_with_http_info(custom_headers:nil)
  list_source_controls_async(custom_headers:custom_headers).value!
end

#make_request(method, path, options = {}) ⇒ Hash{String=>String}

Makes a request and returns the body of the response. Example:

request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
path = "/path"
options = {
  body: request_content,
  query_params: {'api-version' => '2016-02-01'}
}
result = @client.make_request(:put, path, options)

Parameters:

  • method (Symbol)

    with any of the following values :get, :put, :post, :patch, :delete.

  • path (String)

    the path, relative to #base_url.

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

    specifying any request options like :body.

Returns:

  • (Hash{String=>String})

    containing the body of the response.



104
105
106
107
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 104

def make_request(method, path, options = {})
  result = make_request_with_http_info(method, path, options)
  result.body unless result.nil?
end

#make_request_async(method, path, options = {}) ⇒ Concurrent::Promise

Makes a request asynchronously.

Parameters:

  • method (Symbol)

    with any of the following values :get, :put, :post, :patch, :delete.

  • path (String)

    the path, relative to #base_url.

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

    specifying any request options like :body.

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 129

def make_request_async(method, path, options = {})
  fail ArgumentError, 'method is nil' if method.nil?
  fail ArgumentError, 'path is nil' if path.nil?

  request_url = options[:base_url] || @base_url
  if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
    @request_headers['Content-Type'] = options[:headers]['Content-Type']
  end

  request_headers = @request_headers
  request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
  options.merge!({headers: request_headers.merge(options[:headers] || {})})
  options.merge!({credentials: @credentials}) unless @credentials.nil?

  super(request_url, method, path, options)
end

#make_request_with_http_info(method, path, options = {}) ⇒ MsRestAzure::AzureOperationResponse

Makes a request and returns the operation response.

Parameters:

  • method (Symbol)

    with any of the following values :get, :put, :post, :patch, :delete.

  • path (String)

    the path, relative to #base_url.

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

    specifying any request options like :body.

Returns:

  • (MsRestAzure::AzureOperationResponse)

    Operation response containing the request, response and status.



116
117
118
119
120
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 116

def make_request_with_http_info(method, path, options = {})
  result = make_request_async(method, path, options).value!
  result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
  result
end

#move(resource_group_name, move_resource_envelope, custom_headers: nil) ⇒ Object

Move resources between resource groups.

Move resources between resource groups.

resource belongs. represents the resource to move. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • move_resource_envelope (CsmMoveResourceEnvelope)

    Object that

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

    A hash of custom headers that



1361
1362
1363
1364
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1361

def move(resource_group_name, move_resource_envelope, custom_headers:nil)
  response = move_async(resource_group_name, move_resource_envelope, custom_headers:custom_headers).value!
  nil
end

#move_async(resource_group_name, move_resource_envelope, custom_headers: nil) ⇒ Concurrent::Promise

Move resources between resource groups.

Move resources between resource groups.

resource belongs. represents the resource to move. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • move_resource_envelope (CsmMoveResourceEnvelope)

    Object that

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1398

def move_async(resource_group_name, move_resource_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, 'move_resource_envelope is nil' if move_resource_envelope.nil?
  fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
  fail ArgumentError, 'api_version is nil' if api_version.nil?


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

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

  # Serialize Request
  request_mapper = Azure::Web::Mgmt::V2016_03_01::Models::CsmMoveResourceEnvelope.mapper()
  request_content = self.serialize(request_mapper,  move_resource_envelope)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => subscription_id},
      query_params: {'api-version' => api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.make_request_async(:post, path_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

#move_with_http_info(resource_group_name, move_resource_envelope, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Move resources between resource groups.

Move resources between resource groups.

resource belongs. represents the resource to move. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • move_resource_envelope (CsmMoveResourceEnvelope)

    Object that

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1380
1381
1382
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1380

def move_with_http_info(resource_group_name, move_resource_envelope, custom_headers:nil)
  move_async(resource_group_name, move_resource_envelope, custom_headers:custom_headers).value!
end

#update_publishing_user(user_details, custom_headers: nil) ⇒ User

Updates publishing user

Updates publishing user

will be added to the HTTP request.

Parameters:

  • user_details (User)

    Details of publishing user

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

    A hash of custom headers that

Returns:

  • (User)

    operation results.



247
248
249
250
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 247

def update_publishing_user(user_details, custom_headers:nil)
  response = update_publishing_user_async(user_details, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#update_publishing_user_async(user_details, custom_headers: nil) ⇒ Concurrent::Promise

Updates publishing user

Updates publishing user

to the HTTP request.

Parameters:

  • user_details (User)

    Details of publishing user

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
332
333
334
335
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 278

def update_publishing_user_async(user_details, custom_headers:nil)
  fail ArgumentError, 'user_details is nil' if user_details.nil?
  fail ArgumentError, 'api_version is nil' if api_version.nil?


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

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

  # Serialize Request
  request_mapper = Azure::Web::Mgmt::V2016_03_01::Models::User.mapper()
  request_content = self.serialize(request_mapper,  user_details)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'providers/Microsoft.Web/publishingUsers/web'

  request_url = @base_url || self.base_url

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

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::User.mapper()
        result.body = self.deserialize(result_mapper, parsed_response)
      rescue 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_publishing_user_with_http_info(user_details, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Updates publishing user

Updates publishing user

will be added to the HTTP request.

Parameters:

  • user_details (User)

    Details of publishing user

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



263
264
265
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 263

def update_publishing_user_with_http_info(user_details, custom_headers:nil)
  update_publishing_user_async(user_details, custom_headers:custom_headers).value!
end

#update_source_control(source_control_type, request_message, custom_headers: nil) ⇒ SourceControl

Updates source control token

Updates source control token

will be added to the HTTP request.

Parameters:

  • source_control_type (String)

    Type of source control

  • request_message (SourceControl)

    Source control token information

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

    A hash of custom headers that

Returns:

  • (SourceControl)

    operation results.



534
535
536
537
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 534

def update_source_control(source_control_type, request_message, custom_headers:nil)
  response = update_source_control_async(source_control_type, request_message, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#update_source_control_async(source_control_type, request_message, custom_headers: nil) ⇒ Concurrent::Promise

Updates source control token

Updates source control token

to the HTTP request.

Parameters:

  • source_control_type (String)

    Type of source control

  • request_message (SourceControl)

    Source control token information

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 567

def update_source_control_async(source_control_type, request_message, custom_headers:nil)
  fail ArgumentError, 'source_control_type is nil' if source_control_type.nil?
  fail ArgumentError, 'request_message is nil' if request_message.nil?
  fail ArgumentError, 'api_version is nil' if api_version.nil?


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

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

  # Serialize Request
  request_mapper = Azure::Web::Mgmt::V2016_03_01::Models::SourceControl.mapper()
  request_content = self.serialize(request_mapper,  request_message)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'providers/Microsoft.Web/sourcecontrols/{sourceControlType}'

  request_url = @base_url || self.base_url

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

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::SourceControl.mapper()
        result.body = self.deserialize(result_mapper, parsed_response)
      rescue 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_with_http_info(source_control_type, request_message, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Updates source control token

Updates source control token

will be added to the HTTP request.

Parameters:

  • source_control_type (String)

    Type of source control

  • request_message (SourceControl)

    Source control token information

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



551
552
553
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 551

def update_source_control_with_http_info(source_control_type, request_message, custom_headers:nil)
  update_source_control_async(source_control_type, request_message, custom_headers:custom_headers).value!
end

#validate(resource_group_name, validate_request, custom_headers: nil) ⇒ ValidateResponse

Validate if a resource can be created.

Validate if a resource can be created.

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

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • validate_request (ValidateRequest)

    Request with the resources to

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

    A hash of custom headers that

Returns:

  • (ValidateResponse)

    operation results.



1467
1468
1469
1470
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1467

def validate(resource_group_name, validate_request, custom_headers:nil)
  response = validate_async(resource_group_name, validate_request, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#validate_async(resource_group_name, validate_request, custom_headers: nil) ⇒ Concurrent::Promise

Validate if a resource can be created.

Validate if a resource can be created.

resource belongs. validate. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • validate_request (ValidateRequest)

    Request with the resources to

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
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
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1504

def validate_async(resource_group_name, validate_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, 'validate_request is nil' if validate_request.nil?
  fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
  fail ArgumentError, 'api_version is nil' if api_version.nil?


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

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

  # Serialize Request
  request_mapper = Azure::Web::Mgmt::V2016_03_01::Models::ValidateRequest.mapper()
  request_content = self.serialize(request_mapper,  validate_request)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'

  request_url = @base_url || self.base_url

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

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

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

    result
  end

  promise.execute
end

#validate_move(resource_group_name, move_resource_envelope, custom_headers: nil) ⇒ Object

Validate whether a resource can be moved.

Validate whether a resource can be moved.

resource belongs. represents the resource to move. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • move_resource_envelope (CsmMoveResourceEnvelope)

    Object that

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

    A hash of custom headers that



1582
1583
1584
1585
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1582

def validate_move(resource_group_name, move_resource_envelope, custom_headers:nil)
  response = validate_move_async(resource_group_name, move_resource_envelope, custom_headers:custom_headers).value!
  nil
end

#validate_move_async(resource_group_name, move_resource_envelope, custom_headers: nil) ⇒ Concurrent::Promise

Validate whether a resource can be moved.

Validate whether a resource can be moved.

resource belongs. represents the resource to move. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • move_resource_envelope (CsmMoveResourceEnvelope)

    Object that

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
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
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1619

def validate_move_async(resource_group_name, move_resource_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, 'move_resource_envelope is nil' if move_resource_envelope.nil?
  fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
  fail ArgumentError, 'api_version is nil' if api_version.nil?


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

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

  # Serialize Request
  request_mapper = Azure::Web::Mgmt::V2016_03_01::Models::CsmMoveResourceEnvelope.mapper()
  request_content = self.serialize(request_mapper,  move_resource_envelope)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => subscription_id},
      query_params: {'api-version' => api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = self.make_request_async(:post, path_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

#validate_move_with_http_info(resource_group_name, move_resource_envelope, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Validate whether a resource can be moved.

Validate whether a resource can be moved.

resource belongs. represents the resource to move. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • move_resource_envelope (CsmMoveResourceEnvelope)

    Object that

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1601
1602
1603
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1601

def validate_move_with_http_info(resource_group_name, move_resource_envelope, custom_headers:nil)
  validate_move_async(resource_group_name, move_resource_envelope, custom_headers:custom_headers).value!
end

#validate_with_http_info(resource_group_name, validate_request, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Validate if a resource can be created.

Validate if a resource can be created.

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

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • validate_request (ValidateRequest)

    Request with the resources to

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1486
1487
1488
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1486

def validate_with_http_info(resource_group_name, validate_request, custom_headers:nil)
  validate_async(resource_group_name, validate_request, custom_headers:custom_headers).value!
end

#verify_hosting_environment_vnet(parameters, custom_headers: nil) ⇒ VnetValidationFailureDetails

Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.

Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.

will be added to the HTTP request.

Parameters:

  • parameters (VnetParameters)

    VNET information

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

    A hash of custom headers that

Returns:

  • (VnetValidationFailureDetails)

    operation results.



1252
1253
1254
1255
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1252

def verify_hosting_environment_vnet(parameters, custom_headers:nil)
  response = verify_hosting_environment_vnet_async(parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#verify_hosting_environment_vnet_async(parameters, custom_headers: nil) ⇒ Concurrent::Promise

Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.

Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.

to the HTTP request.

Parameters:

  • parameters (VnetParameters)

    VNET information

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1287

def verify_hosting_environment_vnet_async(parameters, custom_headers:nil)
  fail ArgumentError, 'parameters is nil' if parameters.nil?
  fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
  fail ArgumentError, 'api_version is nil' if api_version.nil?


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

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

  # Serialize Request
  request_mapper = Azure::Web::Mgmt::V2016_03_01::Models::VnetParameters.mapper()
  request_content = self.serialize(request_mapper,  parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'

  request_url = @base_url || self.base_url

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

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

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

    result
  end

  promise.execute
end

#verify_hosting_environment_vnet_with_http_info(parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.

Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.

will be added to the HTTP request.

Parameters:

  • parameters (VnetParameters)

    VNET information

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1270
1271
1272
# File 'lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1270

def verify_hosting_environment_vnet_with_http_info(parameters, custom_headers:nil)
  verify_hosting_environment_vnet_async(parameters, custom_headers:custom_headers).value!
end