Class: Azure::ARM::Web::Global

Inherits:
Object
  • Object
show all
Includes:
Models, MsRestAzure
Defined in:
lib/generated/azure_mgmt_web/global.rb

Overview

Use these APIs to manage Azure Websites resources through the Azure Resource Manager. All task operations conform to the HTTP/1.1 protocol specification and each operation returns an x-ms-request-id header that can be used to obtain information about the request. You must make sure that requests made to these resources are secure. For more information, see <a href=“msdn.microsoft.com/en-us/library/azure/dn790557.aspx”>Authenticating Azure Resource Manager requests.</a>

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Global

Creates and initializes a new instance of the Global class.

Parameters:

  • client

    service class for accessing basic functionality.



25
26
27
# File 'lib/generated/azure_mgmt_web/global.rb', line 25

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns reference to the WebSiteManagementClient.

Returns:

  • reference to the WebSiteManagementClient



30
31
32
# File 'lib/generated/azure_mgmt_web/global.rb', line 30

def client
  @client
end

Instance Method Details

#check_name_availability(request, custom_headers = nil) ⇒ ResourceNameAvailability

Check if resource name is available

will be added to the HTTP request.

Parameters:

  • request (ResourceNameAvailabilityRequest)

    Name availability request

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

    A hash of custom headers that

Returns:



1076
1077
1078
1079
# File 'lib/generated/azure_mgmt_web/global.rb', line 1076

def check_name_availability(request, custom_headers = nil)
  response = check_name_availability_async(request, custom_headers).value!
  response.body unless response.nil?
end

#check_name_availability_async(request, custom_headers = nil) ⇒ Concurrent::Promise

Check if resource name is available

to the HTTP request.

Parameters:

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
# File 'lib/generated/azure_mgmt_web/global.rb', line 1103

def check_name_availability_async(request, custom_headers = nil)
  fail ArgumentError, 'request is nil' if request.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}

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

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

  # Serialize Request
  request_mapper = ResourceNameAvailabilityRequest.mapper()
  request_content = @client.serialize(request_mapper,  request, 'request')
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = ResourceNameAvailability.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue 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(request, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Check if resource name is available

will be added to the HTTP request.

Parameters:

  • request (ResourceNameAvailabilityRequest)

    Name availability request

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1090
1091
1092
# File 'lib/generated/azure_mgmt_web/global.rb', line 1090

def check_name_availability_with_http_info(request, custom_headers = nil)
  check_name_availability_async(request, custom_headers).value!
end

#get_all_certificates(custom_headers = nil) ⇒ CertificateCollection

Get all certificates for a subscription

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:



314
315
316
317
# File 'lib/generated/azure_mgmt_web/global.rb', line 314

def get_all_certificates(custom_headers = nil)
  response = get_all_certificates_async(custom_headers).value!
  response.body unless response.nil?
end

#get_all_certificates_async(custom_headers = nil) ⇒ Concurrent::Promise

Get all certificates for a subscription

to the HTTP request.

Parameters:

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
# File 'lib/generated/azure_mgmt_web/global.rb', line 339

def get_all_certificates_async(custom_headers = nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = CertificateCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#get_all_certificates_with_http_info(custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get all certificates for a subscription

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



327
328
329
# File 'lib/generated/azure_mgmt_web/global.rb', line 327

def get_all_certificates_with_http_info(custom_headers = nil)
  get_all_certificates_async(custom_headers).value!
end

#get_all_classic_mobile_services(custom_headers = nil) ⇒ ClassicMobileServiceCollection

Gets all mobile services for a subscription

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:



753
754
755
756
# File 'lib/generated/azure_mgmt_web/global.rb', line 753

def get_all_classic_mobile_services(custom_headers = nil)
  response = get_all_classic_mobile_services_async(custom_headers).value!
  response.body unless response.nil?
end

#get_all_classic_mobile_services_async(custom_headers = nil) ⇒ Concurrent::Promise

Gets all mobile services for a subscription

to the HTTP request.

Parameters:

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
# File 'lib/generated/azure_mgmt_web/global.rb', line 778

def get_all_classic_mobile_services_async(custom_headers = nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/classicMobileServices'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = ClassicMobileServiceCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#get_all_classic_mobile_services_with_http_info(custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Gets all mobile services for a subscription

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



766
767
768
# File 'lib/generated/azure_mgmt_web/global.rb', line 766

def get_all_classic_mobile_services_with_http_info(custom_headers = nil)
  get_all_classic_mobile_services_async(custom_headers).value!
end

#get_all_hosting_environments(custom_headers = nil) ⇒ HostingEnvironmentCollection

Gets all hostingEnvironments (App Service Environment) for a subscription

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:



581
582
583
584
# File 'lib/generated/azure_mgmt_web/global.rb', line 581

def get_all_hosting_environments(custom_headers = nil)
  response = get_all_hosting_environments_async(custom_headers).value!
  response.body unless response.nil?
end

#get_all_hosting_environments_async(custom_headers = nil) ⇒ Concurrent::Promise

Gets all hostingEnvironments (App Service Environment) for a subscription

to the HTTP request.

Parameters:

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
656
657
# File 'lib/generated/azure_mgmt_web/global.rb', line 606

def get_all_hosting_environments_async(custom_headers = nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = HostingEnvironmentCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#get_all_hosting_environments_with_http_info(custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Gets all hostingEnvironments (App Service Environment) for a subscription

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



594
595
596
# File 'lib/generated/azure_mgmt_web/global.rb', line 594

def get_all_hosting_environments_with_http_info(custom_headers = nil)
  get_all_hosting_environments_async(custom_headers).value!
end

#get_all_managed_hosting_environments(custom_headers = nil) ⇒ ManagedHostingEnvironmentCollection

Gets all managed hosting environments for a subscription

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:



667
668
669
670
# File 'lib/generated/azure_mgmt_web/global.rb', line 667

def get_all_managed_hosting_environments(custom_headers = nil)
  response = get_all_managed_hosting_environments_async(custom_headers).value!
  response.body unless response.nil?
end

#get_all_managed_hosting_environments_async(custom_headers = nil) ⇒ Concurrent::Promise

Gets all managed hosting environments for a subscription

to the HTTP request.

Parameters:

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
# File 'lib/generated/azure_mgmt_web/global.rb', line 692

def get_all_managed_hosting_environments_async(custom_headers = nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/managedHostingEnvironments'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = ManagedHostingEnvironmentCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#get_all_managed_hosting_environments_with_http_info(custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Gets all managed hosting environments for a subscription

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



680
681
682
# File 'lib/generated/azure_mgmt_web/global.rb', line 680

def get_all_managed_hosting_environments_with_http_info(custom_headers = nil)
  get_all_managed_hosting_environments_async(custom_headers).value!
end

#get_all_server_farms(detailed = nil, custom_headers = nil) ⇒ ServerFarmCollection

Gets all App Service Plans for a subcription

properties, true to return all of the properties. Retrieval of all properties may increase the API latency. will be added to the HTTP request.

Parameters:

  • detailed (Boolean) (defaults to: nil)

    False to return a subset of App Service Plan

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

    A hash of custom headers that

Returns:



403
404
405
406
# File 'lib/generated/azure_mgmt_web/global.rb', line 403

def get_all_server_farms(detailed = nil, custom_headers = nil)
  response = get_all_server_farms_async(detailed, custom_headers).value!
  response.body unless response.nil?
end

#get_all_server_farms_async(detailed = nil, custom_headers = nil) ⇒ Concurrent::Promise

Gets all App Service Plans for a subcription

properties, true to return all of the properties. Retrieval of all properties may increase the API latency. to the HTTP request.

Parameters:

  • detailed (Boolean) (defaults to: nil)

    False to return a subset of App Service Plan

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
# File 'lib/generated/azure_mgmt_web/global.rb', line 434

def get_all_server_farms_async(detailed = nil, custom_headers = nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id},
      query_params: {'detailed' => detailed,'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = ServerFarmCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#get_all_server_farms_with_http_info(detailed = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Gets all App Service Plans for a subcription

properties, true to return all of the properties. Retrieval of all properties may increase the API latency. will be added to the HTTP request.

Parameters:

  • detailed (Boolean) (defaults to: nil)

    False to return a subset of App Service Plan

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



419
420
421
# File 'lib/generated/azure_mgmt_web/global.rb', line 419

def get_all_server_farms_with_http_info(detailed = nil, custom_headers = nil)
  get_all_server_farms_async(detailed, custom_headers).value!
end

#get_all_sites(custom_headers = nil) ⇒ SiteCollection

Gets all Web Apps for a subscription

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:



495
496
497
498
# File 'lib/generated/azure_mgmt_web/global.rb', line 495

def get_all_sites(custom_headers = nil)
  first_page = get_all_sites_as_lazy(custom_headers)
  first_page.get_all_items
end

#get_all_sites_async(custom_headers = nil) ⇒ Concurrent::Promise

Gets all Web Apps for a subscription

to the HTTP request.

Parameters:

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
# File 'lib/generated/azure_mgmt_web/global.rb', line 520

def get_all_sites_async(custom_headers = nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = SiteCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#get_all_sites_with_http_info(custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Gets all Web Apps for a subscription

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



508
509
510
# File 'lib/generated/azure_mgmt_web/global.rb', line 508

def get_all_sites_with_http_info(custom_headers = nil)
  get_all_sites_async(custom_headers).value!
end

#get_subscription_geo_regions(sku = nil, custom_headers = nil) ⇒ GeoRegionCollection

Gets list of available geo regions

will be added to the HTTP request.

Parameters:

  • sku (String) (defaults to: nil)

    Filter only to regions that support this sku

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

    A hash of custom headers that

Returns:



226
227
228
229
# File 'lib/generated/azure_mgmt_web/global.rb', line 226

def get_subscription_geo_regions(sku = nil, custom_headers = nil)
  response = get_subscription_geo_regions_async(sku, custom_headers).value!
  response.body unless response.nil?
end

#get_subscription_geo_regions_async(sku = nil, custom_headers = nil) ⇒ Concurrent::Promise

Gets list of available geo regions

to the HTTP request.

Parameters:

  • sku (String) (defaults to: nil)

    Filter only to regions that support this sku

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
# File 'lib/generated/azure_mgmt_web/global.rb', line 253

def get_subscription_geo_regions_async(sku = nil, custom_headers = nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id},
      query_params: {'sku' => sku,'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = GeoRegionCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => 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_geo_regions_with_http_info(sku = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Gets list of available geo regions

will be added to the HTTP request.

Parameters:

  • sku (String) (defaults to: nil)

    Filter only to regions that support this sku

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



240
241
242
# File 'lib/generated/azure_mgmt_web/global.rb', line 240

def get_subscription_geo_regions_with_http_info(sku = nil, custom_headers = nil)
  get_subscription_geo_regions_async(sku, custom_headers).value!
end

#get_subscription_publishing_credentials(custom_headers = nil) ⇒ User

Gets publishing credentials for the subscription owner

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.



40
41
42
43
# File 'lib/generated/azure_mgmt_web/global.rb', line 40

def get_subscription_publishing_credentials(custom_headers = nil)
  response = get_subscription_publishing_credentials_async(custom_headers).value!
  response.body unless response.nil?
end

#get_subscription_publishing_credentials_async(custom_headers = nil) ⇒ Concurrent::Promise

Gets publishing credentials for the subscription owner

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.



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/generated/azure_mgmt_web/global.rb', line 65

def get_subscription_publishing_credentials_async(custom_headers = nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/publishingCredentials'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = User.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => 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_publishing_credentials_with_http_info(custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Gets publishing credentials for the subscription owner

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.



53
54
55
# File 'lib/generated/azure_mgmt_web/global.rb', line 53

def get_subscription_publishing_credentials_with_http_info(custom_headers = nil)
  get_subscription_publishing_credentials_async(custom_headers).value!
end

#is_hosting_environment_name_available(name, custom_headers = nil) ⇒ Object

Whether hosting environment name is available

will be added to the HTTP request.

Parameters:

  • name (String)

    Hosting environment name

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

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



916
917
918
919
# File 'lib/generated/azure_mgmt_web/global.rb', line 916

def is_hosting_environment_name_available(name, custom_headers = nil)
  response = is_hosting_environment_name_available_async(name, custom_headers).value!
  response.body unless response.nil?
end

#is_hosting_environment_name_available_async(name, custom_headers = nil) ⇒ Concurrent::Promise

Whether hosting environment name is available

to the HTTP request.

Parameters:

  • name (String)

    Hosting environment name

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
# File 'lib/generated/azure_mgmt_web/global.rb', line 943

def is_hosting_environment_name_available_async(name, custom_headers = nil)
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/ishostingenvironmentnameavailable'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id},
      query_params: {'name' => name,'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?

    result
  end

  promise.execute
end

#is_hosting_environment_name_available_with_http_info(name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Whether hosting environment name is available

will be added to the HTTP request.

Parameters:

  • name (String)

    Hosting environment name

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



930
931
932
# File 'lib/generated/azure_mgmt_web/global.rb', line 930

def is_hosting_environment_name_available_with_http_info(name, custom_headers = nil)
  is_hosting_environment_name_available_async(name, custom_headers).value!
end

#is_hosting_environment_with_legacy_name_available(name, custom_headers = nil) ⇒ Object

Whether hosting environment name is available

will be added to the HTTP request.

Parameters:

  • name (String)

    Hosting environment name

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

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



996
997
998
999
# File 'lib/generated/azure_mgmt_web/global.rb', line 996

def is_hosting_environment_with_legacy_name_available(name, custom_headers = nil)
  response = is_hosting_environment_with_legacy_name_available_async(name, custom_headers).value!
  response.body unless response.nil?
end

#is_hosting_environment_with_legacy_name_available_async(name, custom_headers = nil) ⇒ Concurrent::Promise

Whether hosting environment name is available

to the HTTP request.

Parameters:

  • name (String)

    Hosting environment name

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
# File 'lib/generated/azure_mgmt_web/global.rb', line 1023

def is_hosting_environment_with_legacy_name_available_async(name, custom_headers = nil)
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/ishostingenvironmentnameavailable/{name}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?

    result
  end

  promise.execute
end

#is_hosting_environment_with_legacy_name_available_with_http_info(name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Whether hosting environment name is available

will be added to the HTTP request.

Parameters:

  • name (String)

    Hosting environment name

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1010
1011
1012
# File 'lib/generated/azure_mgmt_web/global.rb', line 1010

def is_hosting_environment_with_legacy_name_available_with_http_info(name, custom_headers = nil)
  is_hosting_environment_with_legacy_name_available_async(name, custom_headers).value!
end

#list_premier_add_on_offers(custom_headers = nil) ⇒ Object

List 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:

  • (Object)

    operation results.



839
840
841
842
# File 'lib/generated/azure_mgmt_web/global.rb', line 839

def list_premier_add_on_offers(custom_headers = nil)
  response = list_premier_add_on_offers_async(custom_headers).value!
  response.body unless response.nil?
end

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

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



864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
# File 'lib/generated/azure_mgmt_web/global.rb', line 864

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


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?

    result
  end

  promise.execute
end

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

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



852
853
854
# File 'lib/generated/azure_mgmt_web/global.rb', line 852

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

#update_subscription_publishing_credentials(request_message, custom_headers = nil) ⇒ User

Updates publishing credentials for the subscription owner

will be added to the HTTP request.

Parameters:

  • request_message (User)

    requestMessage with new publishing credentials

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

    A hash of custom headers that

Returns:

  • (User)

    operation results.



127
128
129
130
# File 'lib/generated/azure_mgmt_web/global.rb', line 127

def update_subscription_publishing_credentials(request_message, custom_headers = nil)
  response = update_subscription_publishing_credentials_async(request_message, custom_headers).value!
  response.body unless response.nil?
end

#update_subscription_publishing_credentials_async(request_message, custom_headers = nil) ⇒ Concurrent::Promise

Updates publishing credentials for the subscription owner

to the HTTP request.

Parameters:

  • request_message (User)

    requestMessage with new publishing credentials

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# File 'lib/generated/azure_mgmt_web/global.rb', line 154

def update_subscription_publishing_credentials_async(request_message, custom_headers = nil)
  fail ArgumentError, 'request_message is nil' if request_message.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}

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

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

  # Serialize Request
  request_mapper = User.mapper()
  request_content = @client.serialize(request_mapper,  request_message, 'request_message')
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/publishingCredentials'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = User.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue 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_subscription_publishing_credentials_with_http_info(request_message, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Updates publishing credentials for the subscription owner

will be added to the HTTP request.

Parameters:

  • request_message (User)

    requestMessage with new publishing credentials

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



141
142
143
# File 'lib/generated/azure_mgmt_web/global.rb', line 141

def update_subscription_publishing_credentials_with_http_info(request_message, custom_headers = nil)
  update_subscription_publishing_credentials_async(request_message, custom_headers).value!
end