Class: Azure::Web::Mgmt::V2018_02_01::WebSiteManagementClient

Inherits:
MsRestAzure::AzureServiceClient
  • Object
show all
Includes:
MsRestAzure, MsRestAzure::Serialization
Defined in:
lib/2018-02-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.



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 89

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

  @app_service_certificate_orders = AppServiceCertificateOrders.new(self)
  @certificate_registration_provider = CertificateRegistrationProvider.new(self)
  @domains = Domains.new(self)
  @top_level_domains = TopLevelDomains.new(self)
  @domain_registration_provider = DomainRegistrationProvider.new(self)
  @certificates = Certificates.new(self)
  @deleted_web_apps = DeletedWebApps.new(self)
  @diagnostics = Diagnostics.new(self)
  @provider = Provider.new(self)
  @recommendations = Recommendations.new(self)
  @web_apps = WebApps.new(self)
  @app_service_environments = AppServiceEnvironments.new(self)
  @app_service_plans = AppServicePlans.new(self)
   = ResourceHealthMetadataOperations.new(self)
  @api_version = '2018-02-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/2018-02-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/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 25

def api_version
  @api_version
end

#app_service_certificate_ordersAppServiceCertificateOrders (readonly)

Returns app_service_certificate_orders.

Returns:



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

def app_service_certificate_orders
  @app_service_certificate_orders
end

#app_service_environmentsAppServiceEnvironments (readonly)

Returns app_service_environments.

Returns:



74
75
76
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 74

def app_service_environments
  @app_service_environments
end

#app_service_plansAppServicePlans (readonly)

Returns app_service_plans.

Returns:



77
78
79
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 77

def app_service_plans
  @app_service_plans
end

#base_urlString

Returns the base URI of the service.

Returns:

  • (String)

    the base URI of the service.



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

def base_url
  @base_url
end

#certificate_registration_providerCertificateRegistrationProvider (readonly)

certificate_registration_provider



44
45
46
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 44

def certificate_registration_provider
  @certificate_registration_provider
end

#certificatesCertificates (readonly)

Returns certificates.

Returns:



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

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/2018-02-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:



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

def deleted_web_apps
  @deleted_web_apps
end

#diagnosticsDiagnostics (readonly)

Returns diagnostics.

Returns:



62
63
64
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 62

def diagnostics
  @diagnostics
end

#domain_registration_providerDomainRegistrationProvider (readonly)

Returns domain_registration_provider.

Returns:



53
54
55
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 53

def domain_registration_provider
  @domain_registration_provider
end

#domainsDomains (readonly)

Returns domains.

Returns:



47
48
49
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 47

def domains
  @domains
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/2018-02-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/2018-02-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:



65
66
67
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 65

def provider
  @provider
end

#recommendationsRecommendations (readonly)

Returns recommendations.

Returns:



68
69
70
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 68

def recommendations
  @recommendations
end

#resource_health_metadata_operationsResourceHealthMetadataOperations (readonly)

resource_health_metadata_operations



81
82
83
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 81

def 
  
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/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 22

def subscription_id
  @subscription_id
end

#top_level_domainsTopLevelDomains (readonly)

Returns top_level_domains.

Returns:



50
51
52
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 50

def top_level_domains
  @top_level_domains
end

#web_appsWebApps (readonly)

Returns web_apps.

Returns:



71
72
73
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 71

def web_apps
  @web_apps
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.



771
772
773
774
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 771

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.



812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 812

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

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



792
793
794
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 792

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.



185
186
187
188
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 185

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.



214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 214

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

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



200
201
202
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 200

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.



467
468
469
470
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 467

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.



498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 498

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

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



483
484
485
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 483

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.



890
891
892
893
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 890

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.



919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 919

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

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



905
906
907
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 905

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

#list_billing_meters(billing_location: nil, os_type: nil, custom_headers: nil) ⇒ Array<BillingMeter>

Gets a list of meters for a given location.

Gets a list of meters for a given location.

will be added to the HTTP request.

Parameters:

  • billing_location (String) (defaults to: nil)

    Azure Location of billable resource

  • os_type (String) (defaults to: nil)

    App Service OS type meters used for

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

    A hash of custom headers that

Returns:

  • (Array<BillingMeter>)

    operation results.



669
670
671
672
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 669

def list_billing_meters(billing_location:nil, os_type:nil, custom_headers:nil)
  first_page = list_billing_meters_as_lazy(billing_location:billing_location, os_type:os_type, custom_headers:custom_headers)
  first_page.get_all_items
end

#list_billing_meters_as_lazy(billing_location: nil, os_type: nil, custom_headers: nil) ⇒ BillingMeterCollection

Gets a list of meters for a given location.

Gets a list of meters for a given location.

will be added to the HTTP request.

Parameters:

  • billing_location (String) (defaults to: nil)

    Azure Location of billable resource

  • os_type (String) (defaults to: nil)

    App Service OS type meters used for

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

    A hash of custom headers that

Returns:

  • (BillingMeterCollection)

    operation results.



2389
2390
2391
2392
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2389

def list_billing_meters_as_lazy(billing_location:nil, os_type:nil, custom_headers:nil)
  first_page = list_billing_meters_as_lazy_as_lazy(billing_location:billing_location, os_type:os_type, custom_headers:custom_headers)
  first_page.get_all_items
end

#list_billing_meters_as_lazy_async(billing_location: nil, os_type: nil, custom_headers: nil) ⇒ Concurrent::Promise

Gets a list of meters for a given location.

Gets a list of meters for a given location.

to the HTTP request.

Parameters:

  • billing_location (String) (defaults to: nil)

    Azure Location of billable resource

  • os_type (String) (defaults to: nil)

    App Service OS type meters used for

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2422

def list_billing_meters_as_lazy_async(billing_location:nil, os_type:nil, custom_headers:nil)


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

  request_url = @base_url || self.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      query_params: {'billingLocation' => billing_location,'osType' => os_type},
      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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::BillingMeterCollection.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_billing_meters_as_lazy_with_http_info(billing_location: nil, os_type: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets a list of meters for a given location.

Gets a list of meters for a given location.

will be added to the HTTP request.

Parameters:

  • billing_location (String) (defaults to: nil)

    Azure Location of billable resource

  • os_type (String) (defaults to: nil)

    App Service OS type meters used for

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2406
2407
2408
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2406

def list_billing_meters_as_lazy_with_http_info(billing_location:nil, os_type:nil, custom_headers:nil)
  list_billing_meters_as_lazy_async(billing_location:billing_location, os_type:os_type, custom_headers:custom_headers).value!
end

#list_billing_meters_async(billing_location: nil, os_type: nil, custom_headers: nil) ⇒ Concurrent::Promise

Gets a list of meters for a given location.

Gets a list of meters for a given location.

to the HTTP request.

Parameters:

  • billing_location (String) (defaults to: nil)

    Azure Location of billable resource

  • os_type (String) (defaults to: nil)

    App Service OS type meters used for

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
752
753
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 702

def list_billing_meters_async(billing_location:nil, os_type: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/billingMeters'

  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: {'billingLocation' => billing_location,'osType' => os_type,'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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

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

Gets a list of meters for a given location.

Gets a list of meters for a given location.

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:

  • (BillingMeterCollection)

    operation results.



1921
1922
1923
1924
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1921

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

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

Gets a list of meters for a given location.

Gets a list of meters for a given location.

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.



1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1954

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

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

Gets a list of meters for a given location.

Gets a list of meters for a given location.

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.



1938
1939
1940
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1938

def list_billing_meters_next_with_http_info(next_page_link, custom_headers:nil)
  list_billing_meters_next_async(next_page_link, custom_headers:custom_headers).value!
end

#list_billing_meters_with_http_info(billing_location: nil, os_type: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets a list of meters for a given location.

Gets a list of meters for a given location.

will be added to the HTTP request.

Parameters:

  • billing_location (String) (defaults to: nil)

    Azure Location of billable resource

  • os_type (String) (defaults to: nil)

    App Service OS type meters used for

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



686
687
688
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 686

def list_billing_meters_with_http_info(billing_location:nil, os_type:nil, custom_headers:nil)
  list_billing_meters_async(billing_location:billing_location, os_type:os_type, custom_headers:custom_headers).value!
end

#list_geo_regions(sku: nil, linux_workers_enabled: nil, xenon_workers_enabled: nil, linux_dynamic_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’, ‘Dynamic’, ‘Isolated’, ‘PremiumV2’, ‘ElasticPremium’, ‘ElasticIsolated’ to filter to only regions that support Linux workers. to filter to only regions that support Xenon workers. you want to filter to only regions that support Linux Consumption 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

  • xenon_workers_enabled (Boolean) (defaults to: nil)

    Specify true if you want

  • linux_dynamic_workers_enabled (Boolean) (defaults to: nil)

    Specify true if

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

    A hash of custom headers that

Returns:

  • (Array<GeoRegion>)

    operation results.



991
992
993
994
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 991

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

#list_geo_regions_as_lazy(sku: nil, linux_workers_enabled: nil, xenon_workers_enabled: nil, linux_dynamic_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’, ‘Dynamic’, ‘Isolated’, ‘PremiumV2’, ‘ElasticPremium’, ‘ElasticIsolated’ to filter to only regions that support Linux workers. to filter to only regions that support Xenon workers. you want to filter to only regions that support Linux Consumption 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

  • xenon_workers_enabled (Boolean) (defaults to: nil)

    Specify true if you want

  • linux_dynamic_workers_enabled (Boolean) (defaults to: nil)

    Specify true if

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

    A hash of custom headers that

Returns:

  • (GeoRegionCollection)

    operation results.



2487
2488
2489
2490
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2487

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

#list_geo_regions_as_lazy_async(sku: nil, linux_workers_enabled: nil, xenon_workers_enabled: nil, linux_dynamic_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’, ‘Dynamic’, ‘Isolated’, ‘PremiumV2’, ‘ElasticPremium’, ‘ElasticIsolated’ to filter to only regions that support Linux workers. to filter to only regions that support Xenon workers. you want to filter to only regions that support Linux Consumption 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

  • xenon_workers_enabled (Boolean) (defaults to: nil)

    Specify true if you want

  • linux_dynamic_workers_enabled (Boolean) (defaults to: nil)

    Specify true if

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2534

def list_geo_regions_as_lazy_async(sku:nil, linux_workers_enabled:nil, xenon_workers_enabled:nil, linux_dynamic_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,'xenonWorkersEnabled' => xenon_workers_enabled,'linuxDynamicWorkersEnabled' => linux_dynamic_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Web::Mgmt::V2018_02_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, xenon_workers_enabled: nil, linux_dynamic_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’, ‘Dynamic’, ‘Isolated’, ‘PremiumV2’, ‘ElasticPremium’, ‘ElasticIsolated’ to filter to only regions that support Linux workers. to filter to only regions that support Xenon workers. you want to filter to only regions that support Linux Consumption 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

  • xenon_workers_enabled (Boolean) (defaults to: nil)

    Specify true if you want

  • linux_dynamic_workers_enabled (Boolean) (defaults to: nil)

    Specify true if

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2511
2512
2513
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2511

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

#list_geo_regions_async(sku: nil, linux_workers_enabled: nil, xenon_workers_enabled: nil, linux_dynamic_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’, ‘Dynamic’, ‘Isolated’, ‘PremiumV2’, ‘ElasticPremium’, ‘ElasticIsolated’ to filter to only regions that support Linux workers. to filter to only regions that support Xenon workers. you want to filter to only regions that support Linux Consumption 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

  • xenon_workers_enabled (Boolean) (defaults to: nil)

    Specify true if you want

  • linux_dynamic_workers_enabled (Boolean) (defaults to: nil)

    Specify true if

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1038

def list_geo_regions_async(sku:nil, linux_workers_enabled:nil, xenon_workers_enabled:nil, linux_dynamic_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,'xenonWorkersEnabled' => xenon_workers_enabled,'linuxDynamicWorkersEnabled' => linux_dynamic_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 MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

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



2017
2018
2019
2020
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2017

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.



2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2050

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

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



2034
2035
2036
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2034

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, xenon_workers_enabled: nil, linux_dynamic_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’, ‘Dynamic’, ‘Isolated’, ‘PremiumV2’, ‘ElasticPremium’, ‘ElasticIsolated’ to filter to only regions that support Linux workers. to filter to only regions that support Xenon workers. you want to filter to only regions that support Linux Consumption 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

  • xenon_workers_enabled (Boolean) (defaults to: nil)

    Specify true if you want

  • linux_dynamic_workers_enabled (Boolean) (defaults to: nil)

    Specify true if

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1015
1016
1017
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1015

def list_geo_regions_with_http_info(sku:nil, linux_workers_enabled:nil, xenon_workers_enabled:nil, linux_dynamic_workers_enabled:nil, custom_headers:nil)
  list_geo_regions_async(sku:sku, linux_workers_enabled:linux_workers_enabled, xenon_workers_enabled:xenon_workers_enabled, linux_dynamic_workers_enabled:linux_dynamic_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.



1204
1205
1206
1207
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1204

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.



2685
2686
2687
2688
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2685

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.



2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2714

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

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



2700
2701
2702
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2700

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.



1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1233

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

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



2209
2210
2211
2212
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2209

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.



2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2242

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

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



2226
2227
2228
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2226

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.



1219
1220
1221
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1219

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.



1102
1103
1104
1105
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1102

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.



2591
2592
2593
2594
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2591

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.



2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2622

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

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



2607
2608
2609
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2607

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.



1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1133

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

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



2113
2114
2115
2116
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2113

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.



2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2146

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

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



2130
2131
2132
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2130

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.



1118
1119
1120
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1118

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.



1296
1297
1298
1299
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1296

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.



1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1325

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

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



1311
1312
1313
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1311

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.



376
377
378
379
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 376

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.



2303
2304
2305
2306
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2303

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.



2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2332

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

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



2318
2319
2320
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 2318

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.



405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 405

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

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



1825
1826
1827
1828
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1825

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.



1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1858

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

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



1842
1843
1844
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1842

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.



391
392
393
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 391

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.



133
134
135
136
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 133

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.



158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 158

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.



145
146
147
148
149
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 145

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



1500
1501
1502
1503
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1500

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.



1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1537

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::V2018_02_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.



1519
1520
1521
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1519

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.



276
277
278
279
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 276

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.



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
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 307

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

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



292
293
294
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 292

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.



563
564
565
566
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 563

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.



596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 596

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

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



580
581
582
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 580

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.



1606
1607
1608
1609
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1606

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.



1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1643

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

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



1721
1722
1723
1724
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1721

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.



1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1758

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::V2018_02_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.



1740
1741
1742
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1740

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.



1625
1626
1627
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1625

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.



1391
1392
1393
1394
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1391

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.



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
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1426

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

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



1409
1410
1411
# File 'lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb', line 1409

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