Class: Azure::ARM::Web::AppServiceEnvironments

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

Overview

WebSite Management Client

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ AppServiceEnvironments

Creates and initializes a new instance of the AppServiceEnvironments class.

Parameters:

  • client

    service class for accessing basic functionality.



17
18
19
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 17

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientWebSiteManagementClient (readonly)

Returns reference to the WebSiteManagementClient.

Returns:



22
23
24
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 22

def client
  @client
end

Instance Method Details

#begin_create_or_update(resource_group_name, name, hosting_environment_envelope, custom_headers = nil) ⇒ AppServiceEnvironmentResource

Create or update an App Service Environment.

Create or update an App Service Environment.

resource belongs. Configuration details of the App Service Environment. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (AppServiceEnvironmentResource)

    operation results.



3573
3574
3575
3576
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3573

def begin_create_or_update(resource_group_name, name, hosting_environment_envelope, custom_headers = nil)
  response = begin_create_or_update_async(resource_group_name, name, hosting_environment_envelope, custom_headers).value!
  response.body unless response.nil?
end

#begin_create_or_update_async(resource_group_name, name, hosting_environment_envelope, custom_headers = nil) ⇒ Concurrent::Promise

Create or update an App Service Environment.

Create or update an App Service Environment.

resource belongs. Configuration details of the App Service Environment. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • hosting_environment_envelope (AppServiceEnvironmentResource)
  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3612

def begin_create_or_update_async(resource_group_name, name, hosting_environment_envelope, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'hosting_environment_envelope is nil' if hosting_environment_envelope.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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 = Azure::ARM::Web::Models::AppServiceEnvironmentResource.mapper()
  request_content = @client.serialize(request_mapper,  hosting_environment_envelope)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

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

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#begin_create_or_update_multi_role_pool(resource_group_name, name, multi_role_pool_envelope, custom_headers = nil) ⇒ WorkerPoolResource

Create or update a multi-role pool.

Create or update a multi-role pool.

resource belongs. multi-role pool. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • multi_role_pool_envelope (WorkerPoolResource)

    Properties of the

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

    A hash of custom headers that

Returns:

  • (WorkerPoolResource)

    operation results.



3797
3798
3799
3800
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3797

def begin_create_or_update_multi_role_pool(resource_group_name, name, multi_role_pool_envelope, custom_headers = nil)
  response = begin_create_or_update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers).value!
  response.body unless response.nil?
end

#begin_create_or_update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers = nil) ⇒ Concurrent::Promise

Create or update a multi-role pool.

Create or update a multi-role pool.

resource belongs. multi-role pool. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • multi_role_pool_envelope (WorkerPoolResource)

    Properties of the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3836

def begin_create_or_update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'multi_role_pool_envelope is nil' if multi_role_pool_envelope.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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 = Azure::ARM::Web::Models::WorkerPoolResource.mapper()
  request_content = @client.serialize(request_mapper,  multi_role_pool_envelope)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#begin_create_or_update_multi_role_pool_with_http_info(resource_group_name, name, multi_role_pool_envelope, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Create or update a multi-role pool.

Create or update a multi-role pool.

resource belongs. multi-role pool. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • multi_role_pool_envelope (WorkerPoolResource)

    Properties of the

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3817
3818
3819
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3817

def begin_create_or_update_multi_role_pool_with_http_info(resource_group_name, name, multi_role_pool_envelope, custom_headers = nil)
  begin_create_or_update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers).value!
end

#begin_create_or_update_with_http_info(resource_group_name, name, hosting_environment_envelope, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Create or update an App Service Environment.

Create or update an App Service Environment.

resource belongs. Configuration details of the App Service Environment. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3593
3594
3595
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3593

def begin_create_or_update_with_http_info(resource_group_name, name, hosting_environment_envelope, custom_headers = nil)
  begin_create_or_update_async(resource_group_name, name, hosting_environment_envelope, custom_headers).value!
end

#begin_create_or_update_worker_pool(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers = nil) ⇒ WorkerPoolResource

Create or update a worker pool.

Create or update a worker pool.

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

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

  • worker_pool_envelope (WorkerPoolResource)

    Properties of the worker

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

    A hash of custom headers that

Returns:

  • (WorkerPoolResource)

    operation results.



4144
4145
4146
4147
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4144

def begin_create_or_update_worker_pool(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers = nil)
  response = begin_create_or_update_worker_pool_async(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers).value!
  response.body unless response.nil?
end

#begin_create_or_update_worker_pool_async(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers = nil) ⇒ Concurrent::Promise

Create or update a worker pool.

Create or update a worker pool.

resource belongs. pool. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

  • worker_pool_envelope (WorkerPoolResource)

    Properties of the worker

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4185

def begin_create_or_update_worker_pool_async(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'worker_pool_name is nil' if worker_pool_name.nil?
  fail ArgumentError, 'worker_pool_envelope is nil' if worker_pool_envelope.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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 = Azure::ARM::Web::Models::WorkerPoolResource.mapper()
  request_content = @client.serialize(request_mapper,  worker_pool_envelope)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#begin_create_or_update_worker_pool_with_http_info(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Create or update a worker pool.

Create or update a worker pool.

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

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

  • worker_pool_envelope (WorkerPoolResource)

    Properties of the worker

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



4165
4166
4167
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4165

def begin_create_or_update_worker_pool_with_http_info(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers = nil)
  begin_create_or_update_worker_pool_async(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers).value!
end

#begin_delete(resource_group_name, name, force_delete = nil, custom_headers = nil) ⇒ Object

Delete an App Service Environment.

Delete an App Service Environment.

resource belongs. even if the App Service Environment contains resources. The default is false. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • force_delete (Boolean) (defaults to: nil)

    Specify true to force the deletion

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

    A hash of custom headers that



3699
3700
3701
3702
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3699

def begin_delete(resource_group_name, name, force_delete = nil, custom_headers = nil)
  response = begin_delete_async(resource_group_name, name, force_delete, custom_headers).value!
  nil
end

#begin_delete_async(resource_group_name, name, force_delete = nil, custom_headers = nil) ⇒ Concurrent::Promise

Delete an App Service Environment.

Delete an App Service Environment.

resource belongs. even if the App Service Environment contains resources. The default is false. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • force_delete (Boolean) (defaults to: nil)

    Specify true to force the deletion

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3740

def begin_delete_async(resource_group_name, name, force_delete = nil, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#begin_delete_with_http_info(resource_group_name, name, force_delete = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Delete an App Service Environment.

Delete an App Service Environment.

resource belongs. even if the App Service Environment contains resources. The default is false. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • force_delete (Boolean) (defaults to: nil)

    Specify true to force the deletion

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3720
3721
3722
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3720

def begin_delete_with_http_info(resource_group_name, name, force_delete = nil, custom_headers = nil)
  begin_delete_async(resource_group_name, name, force_delete, custom_headers).value!
end

#begin_resume(resource_group_name, name, custom_headers = nil) ⇒ Array<Site>

Resume an App Service Environment.

Resume an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (Array<Site>)

    operation results.



3921
3922
3923
3924
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3921

def begin_resume(resource_group_name, name, custom_headers = nil)
  first_page = begin_resume_as_lazy(resource_group_name, name, custom_headers)
  first_page.get_all_items
end

#begin_resume_as_lazy(resource_group_name, name, custom_headers = nil) ⇒ WebAppCollection

Resume an App Service Environment.

Resume an App Service Environment.

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (WebAppCollection)

    which provide lazy access to pages of the



7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 7131

def begin_resume_as_lazy(resource_group_name, name, custom_headers = nil)
  response = begin_resume_async(resource_group_name, name, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      begin_resume_next_async(next_page_link, custom_headers)
    end
    page
  end
end

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

Resume an App Service Environment.

Resume an App Service Environment.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3956

def begin_resume_async(resource_group_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'

  request_url = @base_url || @client.base_url

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

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

    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 = Azure::ARM::Web::Models::WebAppCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end
    # Deserialize Response
    if status_code == 202
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::ARM::Web::Models::WebAppCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#begin_resume_next(next_page_link, custom_headers = nil) ⇒ WebAppCollection

Resume an App Service Environment.

Resume an App Service Environment.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (WebAppCollection)

    operation results.



6347
6348
6349
6350
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6347

def begin_resume_next(next_page_link, custom_headers = nil)
  response = begin_resume_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#begin_resume_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Resume an App Service Environment.

Resume an App Service Environment.

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.



6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6380

def begin_resume_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

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

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

    result
  end

  promise.execute
end

#begin_resume_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Resume an App Service Environment.

Resume an App Service Environment.

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.



6364
6365
6366
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6364

def begin_resume_next_with_http_info(next_page_link, custom_headers = nil)
  begin_resume_next_async(next_page_link, custom_headers).value!
end

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

Resume an App Service Environment.

Resume an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3939
3940
3941
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3939

def begin_resume_with_http_info(resource_group_name, name, custom_headers = nil)
  begin_resume_async(resource_group_name, name, custom_headers).value!
end

#begin_suspend(resource_group_name, name, custom_headers = nil) ⇒ Array<Site>

Suspend an App Service Environment.

Suspend an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (Array<Site>)

    operation results.



4031
4032
4033
4034
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4031

def begin_suspend(resource_group_name, name, custom_headers = nil)
  first_page = begin_suspend_as_lazy(resource_group_name, name, custom_headers)
  first_page.get_all_items
end

#begin_suspend_as_lazy(resource_group_name, name, custom_headers = nil) ⇒ WebAppCollection

Suspend an App Service Environment.

Suspend an App Service Environment.

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (WebAppCollection)

    which provide lazy access to pages of the



7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 7156

def begin_suspend_as_lazy(resource_group_name, name, custom_headers = nil)
  response = begin_suspend_async(resource_group_name, name, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      begin_suspend_next_async(next_page_link, custom_headers)
    end
    page
  end
end

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

Suspend an App Service Environment.

Suspend an App Service Environment.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4066

def begin_suspend_async(resource_group_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'

  request_url = @base_url || @client.base_url

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

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

    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 = Azure::ARM::Web::Models::WebAppCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end
    # Deserialize Response
    if status_code == 202
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::ARM::Web::Models::WebAppCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#begin_suspend_next(next_page_link, custom_headers = nil) ⇒ WebAppCollection

Suspend an App Service Environment.

Suspend an App Service Environment.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (WebAppCollection)

    operation results.



6450
6451
6452
6453
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6450

def begin_suspend_next(next_page_link, custom_headers = nil)
  response = begin_suspend_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#begin_suspend_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Suspend an App Service Environment.

Suspend an App Service Environment.

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.



6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6483

def begin_suspend_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

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

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

    result
  end

  promise.execute
end

#begin_suspend_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Suspend an App Service Environment.

Suspend an App Service Environment.

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.



6467
6468
6469
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6467

def begin_suspend_next_with_http_info(next_page_link, custom_headers = nil)
  begin_suspend_next_async(next_page_link, custom_headers).value!
end

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

Suspend an App Service Environment.

Suspend an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



4049
4050
4051
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4049

def begin_suspend_with_http_info(resource_group_name, name, custom_headers = nil)
  begin_suspend_async(resource_group_name, name, custom_headers).value!
end

#create_or_update(resource_group_name, name, hosting_environment_envelope, custom_headers = nil) ⇒ AppServiceEnvironmentResource

Create or update an App Service Environment.

Create or update an App Service Environment.

resource belongs. Configuration details of the App Service Environment. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (AppServiceEnvironmentResource)

    operation results.



324
325
326
327
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 324

def create_or_update(resource_group_name, name, hosting_environment_envelope, custom_headers = nil)
  response = create_or_update_async(resource_group_name, name, hosting_environment_envelope, custom_headers).value!
  response.body unless response.nil?
end

#create_or_update_async(resource_group_name, name, hosting_environment_envelope, custom_headers = nil) ⇒ Concurrent::Promise

resource belongs. Configuration details of the App Service Environment. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 341

def create_or_update_async(resource_group_name, name, hosting_environment_envelope, custom_headers = nil)
  # Send request
  promise = begin_create_or_update_async(resource_group_name, name, hosting_environment_envelope, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::ARM::Web::Models::AppServiceEnvironmentResource.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response)
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#create_or_update_multi_role_pool(resource_group_name, name, multi_role_pool_envelope, custom_headers = nil) ⇒ WorkerPoolResource

Create or update a multi-role pool.

Create or update a multi-role pool.

resource belongs. multi-role pool. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • multi_role_pool_envelope (WorkerPoolResource)

    Properties of the

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

    A hash of custom headers that

Returns:

  • (WorkerPoolResource)

    operation results.



1265
1266
1267
1268
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1265

def create_or_update_multi_role_pool(resource_group_name, name, multi_role_pool_envelope, custom_headers = nil)
  response = create_or_update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers).value!
  response.body unless response.nil?
end

#create_or_update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers = nil) ⇒ Concurrent::Promise

resource belongs. multi-role pool. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • multi_role_pool_envelope (WorkerPoolResource)

    Properties of the

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1282

def create_or_update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers = nil)
  # Send request
  promise = begin_create_or_update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::ARM::Web::Models::WorkerPoolResource.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response)
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#create_or_update_worker_pool(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers = nil) ⇒ WorkerPoolResource

Create or update a worker pool.

Create or update a worker pool.

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

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

  • worker_pool_envelope (WorkerPoolResource)

    Properties of the worker

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

    A hash of custom headers that

Returns:

  • (WorkerPoolResource)

    operation results.



2834
2835
2836
2837
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2834

def create_or_update_worker_pool(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers = nil)
  response = create_or_update_worker_pool_async(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers).value!
  response.body unless response.nil?
end

#create_or_update_worker_pool_async(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers = nil) ⇒ Concurrent::Promise

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

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

  • worker_pool_envelope (WorkerPoolResource)

    Properties of the worker

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2852

def create_or_update_worker_pool_async(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers = nil)
  # Send request
  promise = begin_create_or_update_worker_pool_async(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::ARM::Web::Models::WorkerPoolResource.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response)
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#delete(resource_group_name, name, force_delete = nil, custom_headers = nil) ⇒ Object

Delete an App Service Environment.

Delete an App Service Environment.

resource belongs. even if the App Service Environment contains resources. The default is false. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • force_delete (Boolean) (defaults to: nil)

    Specify true to force the deletion

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

    A hash of custom headers that



373
374
375
376
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 373

def delete(resource_group_name, name, force_delete = nil, custom_headers = nil)
  response = delete_async(resource_group_name, name, force_delete, custom_headers).value!
  nil
end

#delete_async(resource_group_name, name, force_delete = nil, custom_headers = nil) ⇒ Concurrent::Promise

resource belongs. even if the App Service Environment contains resources. The default is false. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • force_delete (Boolean) (defaults to: nil)

    Specify true to force the deletion

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 391

def delete_async(resource_group_name, name, force_delete = nil, custom_headers = nil)
  # Send request
  promise = begin_delete_async(resource_group_name, name, force_delete, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#get(resource_group_name, name, custom_headers = nil) ⇒ AppServiceEnvironmentResource

Get the properties of an App Service Environment.

Get the properties of an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (AppServiceEnvironmentResource)

    operation results.



222
223
224
225
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 222

def get(resource_group_name, name, custom_headers = nil)
  response = get_async(resource_group_name, name, custom_headers).value!
  response.body unless response.nil?
end

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

Get the properties of an App Service Environment.

Get the properties of an App Service Environment.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
305
306
307
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 257

def get_async(resource_group_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'

  request_url = @base_url || @client.base_url

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

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::ARM::Web::Models::AppServiceEnvironmentResource.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_diagnostics_item(resource_group_name, name, diagnostics_name, custom_headers = nil) ⇒ HostingEnvironmentDiagnostics

Get a diagnostics item for an App Service Environment.

Get a diagnostics item for an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • diagnostics_name (String)

    Name of the diagnostics item.

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

    A hash of custom headers that

Returns:

  • (HostingEnvironmentDiagnostics)

    operation results.



741
742
743
744
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 741

def get_diagnostics_item(resource_group_name, name, diagnostics_name, custom_headers = nil)
  response = get_diagnostics_item_async(resource_group_name, name, diagnostics_name, custom_headers).value!
  response.body unless response.nil?
end

#get_diagnostics_item_async(resource_group_name, name, diagnostics_name, custom_headers = nil) ⇒ Concurrent::Promise

Get a diagnostics item for an App Service Environment.

Get a diagnostics item for an App Service Environment.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • diagnostics_name (String)

    Name of the diagnostics item.

  • 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/app_service_environments.rb', line 778

def get_diagnostics_item_async(resource_group_name, name, diagnostics_name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'diagnostics_name is nil' if diagnostics_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'

  request_url = @base_url || @client.base_url

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

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::ARM::Web::Models::HostingEnvironmentDiagnostics.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_diagnostics_item_with_http_info(resource_group_name, name, diagnostics_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get a diagnostics item for an App Service Environment.

Get a diagnostics item for an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • diagnostics_name (String)

    Name of the diagnostics item.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



760
761
762
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 760

def get_diagnostics_item_with_http_info(resource_group_name, name, diagnostics_name, custom_headers = nil)
  get_diagnostics_item_async(resource_group_name, name, diagnostics_name, custom_headers).value!
end

#get_multi_role_pool(resource_group_name, name, custom_headers = nil) ⇒ WorkerPoolResource

Get properties of a multi-role pool.

Get properties of a multi-role pool.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (WorkerPoolResource)

    operation results.



1163
1164
1165
1166
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1163

def get_multi_role_pool(resource_group_name, name, custom_headers = nil)
  response = get_multi_role_pool_async(resource_group_name, name, custom_headers).value!
  response.body unless response.nil?
end

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

Get properties of a multi-role pool.

Get properties of a multi-role pool.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1198

def get_multi_role_pool_async(resource_group_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'

  request_url = @base_url || @client.base_url

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

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

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

Get properties of a multi-role pool.

Get properties of a multi-role pool.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1181
1182
1183
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1181

def get_multi_role_pool_with_http_info(resource_group_name, name, custom_headers = nil)
  get_multi_role_pool_async(resource_group_name, name, custom_headers).value!
end

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

Get the properties of an App Service Environment.

Get the properties of an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • 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/app_service_environments.rb', line 240

def get_with_http_info(resource_group_name, name, custom_headers = nil)
  get_async(resource_group_name, name, custom_headers).value!
end

#get_worker_pool(resource_group_name, name, worker_pool_name, custom_headers = nil) ⇒ WorkerPoolResource

Get properties of a worker pool.

Get properties of a worker pool.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

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

    A hash of custom headers that

Returns:

  • (WorkerPoolResource)

    operation results.



2728
2729
2730
2731
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2728

def get_worker_pool(resource_group_name, name, worker_pool_name, custom_headers = nil)
  response = get_worker_pool_async(resource_group_name, name, worker_pool_name, custom_headers).value!
  response.body unless response.nil?
end

#get_worker_pool_async(resource_group_name, name, worker_pool_name, custom_headers = nil) ⇒ Concurrent::Promise

Get properties of a worker pool.

Get properties of a worker pool.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2765

def get_worker_pool_async(resource_group_name, name, worker_pool_name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'worker_pool_name is nil' if worker_pool_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'

  request_url = @base_url || @client.base_url

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

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::ARM::Web::Models::WorkerPoolResource.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue 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_worker_pool_with_http_info(resource_group_name, name, worker_pool_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get properties of a worker pool.

Get properties of a worker pool.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2747
2748
2749
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2747

def get_worker_pool_with_http_info(resource_group_name, name, worker_pool_name, custom_headers = nil)
  get_worker_pool_async(resource_group_name, name, worker_pool_name, custom_headers).value!
end

#list(custom_headers = nil) ⇒ Array<AppServiceEnvironment>

Get all App Service Environments for a subscription.

Get all App Service 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:

  • (Array<AppServiceEnvironment>)

    operation results.



34
35
36
37
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 34

def list(custom_headers = nil)
  first_page = list_as_lazy(custom_headers)
  first_page.get_all_items
end

#list_app_service_plans(resource_group_name, name, custom_headers = nil) ⇒ Array<AppServicePlan>

Get all App Service plans in an App Service Environment.

Get all App Service plans in an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (Array<AppServicePlan>)

    operation results.



2239
2240
2241
2242
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2239

def list_app_service_plans(resource_group_name, name, custom_headers = nil)
  first_page = list_app_service_plans_as_lazy(resource_group_name, name, custom_headers)
  first_page.get_all_items
end

#list_app_service_plans_as_lazy(resource_group_name, name, custom_headers = nil) ⇒ AppServicePlanCollection

Get all App Service plans in an App Service Environment.

Get all App Service plans in an App Service Environment.

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (AppServicePlanCollection)

    which provide lazy access to pages of the



6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6850

def list_app_service_plans_as_lazy(resource_group_name, name, custom_headers = nil)
  response = list_app_service_plans_async(resource_group_name, name, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_app_service_plans_next_async(next_page_link, custom_headers)
    end
    page
  end
end

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

Get all App Service plans in an App Service Environment.

Get all App Service plans in an App Service Environment.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2274

def list_app_service_plans_async(resource_group_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#list_app_service_plans_next(next_page_link, custom_headers = nil) ⇒ AppServicePlanCollection

Get all App Service plans in an App Service Environment.

Get all App Service plans in an App Service Environment.

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:

  • (AppServicePlanCollection)

    operation results.



5355
5356
5357
5358
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5355

def list_app_service_plans_next(next_page_link, custom_headers = nil)
  response = list_app_service_plans_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_app_service_plans_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Get all App Service plans in an App Service Environment.

Get all App Service plans in an App Service Environment.

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.



5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5388

def list_app_service_plans_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    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 = Azure::ARM::Web::Models::AppServicePlanCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_app_service_plans_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get all App Service plans in an App Service Environment.

Get all App Service plans in an App Service Environment.

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.



5372
5373
5374
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5372

def list_app_service_plans_next_with_http_info(next_page_link, custom_headers = nil)
  list_app_service_plans_next_async(next_page_link, custom_headers).value!
end

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

Get all App Service plans in an App Service Environment.

Get all App Service plans in an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2257
2258
2259
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2257

def list_app_service_plans_with_http_info(resource_group_name, name, custom_headers = nil)
  list_app_service_plans_async(resource_group_name, name, custom_headers).value!
end

#list_as_lazy(custom_headers = nil) ⇒ AppServiceEnvironmentCollection

Get all App Service Environments for a subscription.

Get all App Service Environments for a subscription.

will be added to the HTTP request.

of the response.

Parameters:

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

    A hash of custom headers that

Returns:

  • (AppServiceEnvironmentCollection)

    which provide lazy access to pages



6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6552

def list_as_lazy(custom_headers = nil)
  response = list_async(custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_next_async(next_page_link, custom_headers)
    end
    page
  end
end

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

Get all App Service Environments for a subscription.

Get all App Service 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.



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

def list_async(custom_headers = nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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'

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#list_by_resource_group(resource_group_name, custom_headers = nil) ⇒ Array<AppServiceEnvironment>

Get all App Service Environments in a resource group.

Get all App Service Environments in a resource group.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

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

    A hash of custom headers that

Returns:

  • (Array<AppServiceEnvironment>)

    operation results.



125
126
127
128
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 125

def list_by_resource_group(resource_group_name, custom_headers = nil)
  first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers)
  first_page.get_all_items
end

#list_by_resource_group_as_lazy(resource_group_name, custom_headers = nil) ⇒ AppServiceEnvironmentCollection

Get all App Service Environments in a resource group.

Get all App Service Environments in a resource group.

resource belongs. will be added to the HTTP request.

of the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

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

    A hash of custom headers that

Returns:

  • (AppServiceEnvironmentCollection)

    which provide lazy access to pages



6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6576

def list_by_resource_group_as_lazy(resource_group_name, custom_headers = nil)
  response = list_by_resource_group_async(resource_group_name, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_by_resource_group_next_async(next_page_link, custom_headers)
    end
    page
  end
end

#list_by_resource_group_async(resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise

Get all App Service Environments in a resource group.

Get all App Service Environments in a resource group.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • A (Hash{String => String})

    hash of custom headers that will be added

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
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
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 158

def list_by_resource_group_async(resource_group_name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#list_by_resource_group_next(next_page_link, custom_headers = nil) ⇒ AppServiceEnvironmentCollection

Get all App Service Environments in a resource group.

Get all App Service Environments in a resource group.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (AppServiceEnvironmentCollection)

    operation results.



4363
4364
4365
4366
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4363

def list_by_resource_group_next(next_page_link, custom_headers = nil)
  response = list_by_resource_group_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_by_resource_group_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Get all App Service Environments in a resource group.

Get all App Service Environments in a resource group.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4396

def list_by_resource_group_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}

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

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    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 = Azure::ARM::Web::Models::AppServiceEnvironmentCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get all App Service Environments in a resource group.

Get all App Service Environments in a resource group.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



4380
4381
4382
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4380

def list_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil)
  list_by_resource_group_next_async(next_page_link, custom_headers).value!
end

#list_by_resource_group_with_http_info(resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get all App Service Environments in a resource group.

Get all App Service Environments in a resource group.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



142
143
144
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 142

def list_by_resource_group_with_http_info(resource_group_name, custom_headers = nil)
  list_by_resource_group_async(resource_group_name, custom_headers).value!
end

#list_capacities(resource_group_name, name, custom_headers = nil) ⇒ Array<StampCapacity>

Get the used, available, and total worker capacity an App Service Environment.

Get the used, available, and total worker capacity an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (Array<StampCapacity>)

    operation results.



422
423
424
425
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 422

def list_capacities(resource_group_name, name, custom_headers = nil)
  first_page = list_capacities_as_lazy(resource_group_name, name, custom_headers)
  first_page.get_all_items
end

#list_capacities_as_lazy(resource_group_name, name, custom_headers = nil) ⇒ StampCapacityCollection

Get the used, available, and total worker capacity an App Service Environment.

Get the used, available, and total worker capacity an App Service Environment.

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (StampCapacityCollection)

    which provide lazy access to pages of the



6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6603

def list_capacities_as_lazy(resource_group_name, name, custom_headers = nil)
  response = list_capacities_async(resource_group_name, name, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_capacities_next_async(next_page_link, custom_headers)
    end
    page
  end
end

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

Get the used, available, and total worker capacity an App Service Environment.

Get the used, available, and total worker capacity an App Service Environment.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 461

def list_capacities_async(resource_group_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#list_capacities_next(next_page_link, custom_headers = nil) ⇒ StampCapacityCollection

Get the used, available, and total worker capacity an App Service Environment.

Get the used, available, and total worker capacity an App Service Environment.

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:

  • (StampCapacityCollection)

    operation results.



4458
4459
4460
4461
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4458

def list_capacities_next(next_page_link, custom_headers = nil)
  response = list_capacities_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_capacities_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Get the used, available, and total worker capacity an App Service Environment.

Get the used, available, and total worker capacity an App Service Environment.

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.



4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4495

def list_capacities_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    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 = Azure::ARM::Web::Models::StampCapacityCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_capacities_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get the used, available, and total worker capacity an App Service Environment.

Get the used, available, and total worker capacity an App Service Environment.

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.



4477
4478
4479
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4477

def list_capacities_next_with_http_info(next_page_link, custom_headers = nil)
  list_capacities_next_async(next_page_link, custom_headers).value!
end

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

Get the used, available, and total worker capacity an App Service Environment.

Get the used, available, and total worker capacity an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



442
443
444
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 442

def list_capacities_with_http_info(resource_group_name, name, custom_headers = nil)
  list_capacities_async(resource_group_name, name, custom_headers).value!
end

#list_diagnostics(resource_group_name, name, custom_headers = nil) ⇒ Array

Get diagnostic information for an App Service Environment.

Get diagnostic information for an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (Array)

    operation results.



626
627
628
629
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 626

def list_diagnostics(resource_group_name, name, custom_headers = nil)
  response = list_diagnostics_async(resource_group_name, name, custom_headers).value!
  response.body unless response.nil?
end

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

Get diagnostic information for an App Service Environment.

Get diagnostic information for an App Service Environment.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 661

def list_diagnostics_async(resource_group_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'

  request_url = @base_url || @client.base_url

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

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = {
          required: false,
          serialized_name: 'parsed_response',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serialized_name: 'HostingEnvironmentDiagnosticsElementType',
                type: {
                  name: 'Composite',
                  class_name: 'HostingEnvironmentDiagnostics'
                }
            }
          }
        }
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

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

Get diagnostic information for an App Service Environment.

Get diagnostic information for an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



644
645
646
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 644

def list_diagnostics_with_http_info(resource_group_name, name, custom_headers = nil)
  list_diagnostics_async(resource_group_name, name, custom_headers).value!
end

#list_metric_definitions(resource_group_name, name, custom_headers = nil) ⇒ MetricDefinition

Get global metric definitions of an App Service Environment.

Get global metric definitions of an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (MetricDefinition)

    operation results.



844
845
846
847
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 844

def list_metric_definitions(resource_group_name, name, custom_headers = nil)
  response = list_metric_definitions_async(resource_group_name, name, custom_headers).value!
  response.body unless response.nil?
end

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

Get global metric definitions of an App Service Environment.

Get global metric definitions of an App Service Environment.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 879

def list_metric_definitions_async(resource_group_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metricdefinitions'

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

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

Get global metric definitions of an App Service Environment.

Get global metric definitions of an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



862
863
864
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 862

def list_metric_definitions_with_http_info(resource_group_name, name, custom_headers = nil)
  list_metric_definitions_async(resource_group_name, name, custom_headers).value!
end

#list_metrics(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) ⇒ Array<ResourceMetric>

Get global metrics of an App Service Environment.

Get global metrics of an App Service Environment.

resource belongs. details. The default is false. Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • details (Boolean) (defaults to: nil)

    Specify true to include instance

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

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

    A hash of custom headers that

Returns:

  • (Array<ResourceMetric>)

    operation results.



950
951
952
953
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 950

def list_metrics(resource_group_name, name, details = nil, filter = nil, custom_headers = nil)
  first_page = list_metrics_as_lazy(resource_group_name, name, details, filter, custom_headers)
  first_page.get_all_items
end

#list_metrics_as_lazy(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) ⇒ ResourceMetricCollection

Get global metrics of an App Service Environment.

Get global metrics of an App Service Environment.

resource belongs. details. The default is false. Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • details (Boolean) (defaults to: nil)

    Specify true to include instance

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

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

    A hash of custom headers that

Returns:

  • (ResourceMetricCollection)

    which provide lazy access to pages of the



6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6634

def list_metrics_as_lazy(resource_group_name, name, details = nil, filter = nil, custom_headers = nil)
  response = list_metrics_async(resource_group_name, name, details, filter, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_metrics_next_async(next_page_link, custom_headers)
    end
    page
  end
end

#list_metrics_async(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) ⇒ Concurrent::Promise

Get global metrics of an App Service Environment.

Get global metrics of an App Service Environment.

resource belongs. details. The default is false. Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • details (Boolean) (defaults to: nil)

    Specify true to include instance

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 997

def list_metrics_async(resource_group_name, name, details = nil, filter = nil, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics'

  request_url = @base_url || @client.base_url

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

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

    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 = Azure::ARM::Web::Models::ResourceMetricCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_metrics_next(next_page_link, custom_headers = nil) ⇒ ResourceMetricCollection

Get global metrics of an App Service Environment.

Get global metrics of an App Service Environment.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (ResourceMetricCollection)

    operation results.



4555
4556
4557
4558
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4555

def list_metrics_next(next_page_link, custom_headers = nil)
  response = list_metrics_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_metrics_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Get global metrics of an App Service Environment.

Get global metrics of an App Service Environment.

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.



4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4588

def list_metrics_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}

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

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    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 = Azure::ARM::Web::Models::ResourceMetricCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_metrics_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get global metrics of an App Service Environment.

Get global metrics of an App Service Environment.

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.



4572
4573
4574
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4572

def list_metrics_next_with_http_info(next_page_link, custom_headers = nil)
  list_metrics_next_async(next_page_link, custom_headers).value!
end

#list_metrics_with_http_info(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get global metrics of an App Service Environment.

Get global metrics of an App Service Environment.

resource belongs. details. The default is false. Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • details (Boolean) (defaults to: nil)

    Specify true to include instance

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



974
975
976
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 974

def list_metrics_with_http_info(resource_group_name, name, details = nil, filter = nil, custom_headers = nil)
  list_metrics_async(resource_group_name, name, details, filter, custom_headers).value!
end

#list_multi_role_metric_definitions(resource_group_name, name, custom_headers = nil) ⇒ Array<ResourceMetricDefinition>

Get metric definitions for a multi-role pool of an App Service Environment.

Get metric definitions for a multi-role pool of an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (Array<ResourceMetricDefinition>)

    operation results.



1539
1540
1541
1542
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1539

def list_multi_role_metric_definitions(resource_group_name, name, custom_headers = nil)
  first_page = list_multi_role_metric_definitions_as_lazy(resource_group_name, name, custom_headers)
  first_page.get_all_items
end

#list_multi_role_metric_definitions_as_lazy(resource_group_name, name, custom_headers = nil) ⇒ ResourceMetricDefinitionCollection

Get metric definitions for a multi-role pool of an App Service Environment.

Get metric definitions for a multi-role pool of an App Service Environment.

resource belongs. will be added to the HTTP request.

pages of the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (ResourceMetricDefinitionCollection)

    which provide lazy access to



6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6742

def list_multi_role_metric_definitions_as_lazy(resource_group_name, name, custom_headers = nil)
  response = list_multi_role_metric_definitions_async(resource_group_name, name, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_multi_role_metric_definitions_next_async(next_page_link, custom_headers)
    end
    page
  end
end

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

Get metric definitions for a multi-role pool of an App Service Environment.

Get metric definitions for a multi-role pool of an App Service Environment.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1574

def list_multi_role_metric_definitions_async(resource_group_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#list_multi_role_metric_definitions_next(next_page_link, custom_headers = nil) ⇒ ResourceMetricDefinitionCollection

Get metric definitions for a multi-role pool of an App Service Environment.

Get metric definitions for a multi-role pool of an App Service Environment.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (ResourceMetricDefinitionCollection)

    operation results.



4939
4940
4941
4942
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4939

def list_multi_role_metric_definitions_next(next_page_link, custom_headers = nil)
  response = list_multi_role_metric_definitions_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_multi_role_metric_definitions_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Get metric definitions for a multi-role pool of an App Service Environment.

Get metric definitions for a multi-role pool of an App Service Environment.

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.



4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4972

def list_multi_role_metric_definitions_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    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 = Azure::ARM::Web::Models::ResourceMetricDefinitionCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_multi_role_metric_definitions_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get metric definitions for a multi-role pool of an App Service Environment.

Get metric definitions for a multi-role pool of an App Service Environment.

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.



4956
4957
4958
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4956

def list_multi_role_metric_definitions_next_with_http_info(next_page_link, custom_headers = nil)
  list_multi_role_metric_definitions_next_async(next_page_link, custom_headers).value!
end

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

Get metric definitions for a multi-role pool of an App Service Environment.

Get metric definitions for a multi-role pool of an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1557
1558
1559
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1557

def list_multi_role_metric_definitions_with_http_info(resource_group_name, name, custom_headers = nil)
  list_multi_role_metric_definitions_async(resource_group_name, name, custom_headers).value!
end

#list_multi_role_metrics(resource_group_name, name, start_time = nil, end_time = nil, time_grain = nil, details = nil, filter = nil, custom_headers = nil) ⇒ Array<ResourceMetric>

Get metrics for a multi-role pool of an App Service Environment.

Get metrics for a multi-role pool of an App Service Environment.

resource belongs. details. The default is false. Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • start_time (String) (defaults to: nil)

    Beginning time of the metrics query.

  • end_time (String) (defaults to: nil)

    End time of the metrics query.

  • time_grain (String) (defaults to: nil)

    Time granularity of the metrics query.

  • details (Boolean) (defaults to: nil)

    Specify true to include instance

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

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

    A hash of custom headers that

Returns:

  • (Array<ResourceMetric>)

    operation results.



1648
1649
1650
1651
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1648

def list_multi_role_metrics(resource_group_name, name, start_time = nil, end_time = nil, time_grain = nil, details = nil, filter = nil, custom_headers = nil)
  first_page = list_multi_role_metrics_as_lazy(resource_group_name, name, start_time, end_time, time_grain, details, filter, custom_headers)
  first_page.get_all_items
end

#list_multi_role_metrics_as_lazy(resource_group_name, name, start_time = nil, end_time = nil, time_grain = nil, details = nil, filter = nil, custom_headers = nil) ⇒ ResourceMetricCollection

Get metrics for a multi-role pool of an App Service Environment.

Get metrics for a multi-role pool of an App Service Environment.

resource belongs. details. The default is false. Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • start_time (String) (defaults to: nil)

    Beginning time of the metrics query.

  • end_time (String) (defaults to: nil)

    End time of the metrics query.

  • time_grain (String) (defaults to: nil)

    Time granularity of the metrics query.

  • details (Boolean) (defaults to: nil)

    Specify true to include instance

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

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

    A hash of custom headers that

Returns:

  • (ResourceMetricCollection)

    which provide lazy access to pages of the



6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6776

def list_multi_role_metrics_as_lazy(resource_group_name, name, start_time = nil, end_time = nil, time_grain = nil, details = nil, filter = nil, custom_headers = nil)
  response = list_multi_role_metrics_async(resource_group_name, name, start_time, end_time, time_grain, details, filter, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_multi_role_metrics_next_async(next_page_link, custom_headers)
    end
    page
  end
end

#list_multi_role_metrics_async(resource_group_name, name, start_time = nil, end_time = nil, time_grain = nil, details = nil, filter = nil, custom_headers = nil) ⇒ Concurrent::Promise

Get metrics for a multi-role pool of an App Service Environment.

Get metrics for a multi-role pool of an App Service Environment.

resource belongs. details. The default is false. Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • start_time (String) (defaults to: nil)

    Beginning time of the metrics query.

  • end_time (String) (defaults to: nil)

    End time of the metrics query.

  • time_grain (String) (defaults to: nil)

    Time granularity of the metrics query.

  • details (Boolean) (defaults to: nil)

    Specify true to include instance

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1701

def list_multi_role_metrics_async(resource_group_name, name, start_time = nil, end_time = nil, time_grain = nil, details = nil, filter = nil, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics'

  request_url = @base_url || @client.base_url

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

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

    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 = Azure::ARM::Web::Models::ResourceMetricCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_multi_role_metrics_next(next_page_link, custom_headers = nil) ⇒ ResourceMetricCollection

Get metrics for a multi-role pool of an App Service Environment.

Get metrics for a multi-role pool of an App Service Environment.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (ResourceMetricCollection)

    operation results.



5032
5033
5034
5035
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5032

def list_multi_role_metrics_next(next_page_link, custom_headers = nil)
  response = list_multi_role_metrics_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_multi_role_metrics_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Get metrics for a multi-role pool of an App Service Environment.

Get metrics for a multi-role pool of an App Service Environment.

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.



5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5065

def list_multi_role_metrics_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    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 = Azure::ARM::Web::Models::ResourceMetricCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_multi_role_metrics_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get metrics for a multi-role pool of an App Service Environment.

Get metrics for a multi-role pool of an App Service Environment.

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.



5049
5050
5051
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5049

def list_multi_role_metrics_next_with_http_info(next_page_link, custom_headers = nil)
  list_multi_role_metrics_next_async(next_page_link, custom_headers).value!
end

#list_multi_role_metrics_with_http_info(resource_group_name, name, start_time = nil, end_time = nil, time_grain = nil, details = nil, filter = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get metrics for a multi-role pool of an App Service Environment.

Get metrics for a multi-role pool of an App Service Environment.

resource belongs. details. The default is false. Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • start_time (String) (defaults to: nil)

    Beginning time of the metrics query.

  • end_time (String) (defaults to: nil)

    End time of the metrics query.

  • time_grain (String) (defaults to: nil)

    Time granularity of the metrics query.

  • details (Boolean) (defaults to: nil)

    Specify true to include instance

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1675
1676
1677
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1675

def list_multi_role_metrics_with_http_info(resource_group_name, name, start_time = nil, end_time = nil, time_grain = nil, details = nil, filter = nil, custom_headers = nil)
  list_multi_role_metrics_async(resource_group_name, name, start_time, end_time, time_grain, details, filter, custom_headers).value!
end

#list_multi_role_pool_instance_metric_definitions(resource_group_name, name, instance, custom_headers = nil) ⇒ Array<ResourceMetricDefinition>

Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.

Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • instance (String)

    Name of the instance in the multi-role pool.

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

    A hash of custom headers that

Returns:

  • (Array<ResourceMetricDefinition>)

    operation results.



1316
1317
1318
1319
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1316

def list_multi_role_pool_instance_metric_definitions(resource_group_name, name, instance, custom_headers = nil)
  first_page = list_multi_role_pool_instance_metric_definitions_as_lazy(resource_group_name, name, instance, custom_headers)
  first_page.get_all_items
end

#list_multi_role_pool_instance_metric_definitions_as_lazy(resource_group_name, name, instance, custom_headers = nil) ⇒ ResourceMetricDefinitionCollection

Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.

Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.

resource belongs. will be added to the HTTP request.

pages of the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • instance (String)

    Name of the instance in the multi-role pool.

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

    A hash of custom headers that

Returns:

  • (ResourceMetricDefinitionCollection)

    which provide lazy access to



6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6687

def list_multi_role_pool_instance_metric_definitions_as_lazy(resource_group_name, name, instance, custom_headers = nil)
  response = list_multi_role_pool_instance_metric_definitions_async(resource_group_name, name, instance, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_multi_role_pool_instance_metric_definitions_next_async(next_page_link, custom_headers)
    end
    page
  end
end

#list_multi_role_pool_instance_metric_definitions_async(resource_group_name, name, instance, custom_headers = nil) ⇒ Concurrent::Promise

Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.

Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • instance (String)

    Name of the instance in the multi-role pool.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1357

def list_multi_role_pool_instance_metric_definitions_async(resource_group_name, name, instance, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'instance is nil' if instance.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#list_multi_role_pool_instance_metric_definitions_next(next_page_link, custom_headers = nil) ⇒ ResourceMetricDefinitionCollection

Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.

Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (ResourceMetricDefinitionCollection)

    operation results.



4743
4744
4745
4746
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4743

def list_multi_role_pool_instance_metric_definitions_next(next_page_link, custom_headers = nil)
  response = list_multi_role_pool_instance_metric_definitions_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_multi_role_pool_instance_metric_definitions_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.

Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.

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.



4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4780

def list_multi_role_pool_instance_metric_definitions_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    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 = Azure::ARM::Web::Models::ResourceMetricDefinitionCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_multi_role_pool_instance_metric_definitions_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.

Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.

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.



4762
4763
4764
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4762

def list_multi_role_pool_instance_metric_definitions_next_with_http_info(next_page_link, custom_headers = nil)
  list_multi_role_pool_instance_metric_definitions_next_async(next_page_link, custom_headers).value!
end

#list_multi_role_pool_instance_metric_definitions_with_http_info(resource_group_name, name, instance, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.

Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • instance (String)

    Name of the instance in the multi-role pool.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1337
1338
1339
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1337

def list_multi_role_pool_instance_metric_definitions_with_http_info(resource_group_name, name, instance, custom_headers = nil)
  list_multi_role_pool_instance_metric_definitions_async(resource_group_name, name, instance, custom_headers).value!
end

#list_multi_role_pool_instance_metrics(resource_group_name, name, instance, details = nil, custom_headers = nil) ⇒ Array<ResourceMetric>

Get metrics for a specific instance of a multi-role pool of an App Service Environment.

Get metrics for a specific instance of a multi-role pool of an App Service Environment.

resource belongs. details. The default is false. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • instance (String)

    Name of the instance in the multi-role pool.

  • details (Boolean) (defaults to: nil)

    Specify true to include instance

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

    A hash of custom headers that

Returns:

  • (Array<ResourceMetric>)

    operation results.



1428
1429
1430
1431
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1428

def list_multi_role_pool_instance_metrics(resource_group_name, name, instance, details = nil, custom_headers = nil)
  first_page = list_multi_role_pool_instance_metrics_as_lazy(resource_group_name, name, instance, details, custom_headers)
  first_page.get_all_items
end

#list_multi_role_pool_instance_metrics_as_lazy(resource_group_name, name, instance, details = nil, custom_headers = nil) ⇒ ResourceMetricCollection

Get metrics for a specific instance of a multi-role pool of an App Service Environment.

Get metrics for a specific instance of a multi-role pool of an App Service Environment.

resource belongs. details. The default is false. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • instance (String)

    Name of the instance in the multi-role pool.

  • details (Boolean) (defaults to: nil)

    Specify true to include instance

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

    A hash of custom headers that

Returns:

  • (ResourceMetricCollection)

    which provide lazy access to pages of the



6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6717

def list_multi_role_pool_instance_metrics_as_lazy(resource_group_name, name, instance, details = nil, custom_headers = nil)
  response = list_multi_role_pool_instance_metrics_async(resource_group_name, name, instance, details, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_multi_role_pool_instance_metrics_next_async(next_page_link, custom_headers)
    end
    page
  end
end

#list_multi_role_pool_instance_metrics_async(resource_group_name, name, instance, details = nil, custom_headers = nil) ⇒ Concurrent::Promise

Get metrics for a specific instance of a multi-role pool of an App Service Environment.

Get metrics for a specific instance of a multi-role pool of an App Service Environment.

resource belongs. details. The default is false. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • instance (String)

    Name of the instance in the multi-role pool.

  • details (Boolean) (defaults to: nil)

    Specify true to include instance

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1473

def list_multi_role_pool_instance_metrics_async(resource_group_name, name, instance, details = nil, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'instance is nil' if instance.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}metrics'

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#list_multi_role_pool_instance_metrics_next(next_page_link, custom_headers = nil) ⇒ ResourceMetricCollection

Get metrics for a specific instance of a multi-role pool of an App Service Environment.

Get metrics for a specific instance of a multi-role pool of an App Service Environment.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (ResourceMetricCollection)

    operation results.



4842
4843
4844
4845
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4842

def list_multi_role_pool_instance_metrics_next(next_page_link, custom_headers = nil)
  response = list_multi_role_pool_instance_metrics_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_multi_role_pool_instance_metrics_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Get metrics for a specific instance of a multi-role pool of an App Service Environment.

Get metrics for a specific instance of a multi-role pool of an App Service Environment.

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.



4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4879

def list_multi_role_pool_instance_metrics_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    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 = Azure::ARM::Web::Models::ResourceMetricCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_multi_role_pool_instance_metrics_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get metrics for a specific instance of a multi-role pool of an App Service Environment.

Get metrics for a specific instance of a multi-role pool of an App Service Environment.

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.



4861
4862
4863
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4861

def list_multi_role_pool_instance_metrics_next_with_http_info(next_page_link, custom_headers = nil)
  list_multi_role_pool_instance_metrics_next_async(next_page_link, custom_headers).value!
end

#list_multi_role_pool_instance_metrics_with_http_info(resource_group_name, name, instance, details = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get metrics for a specific instance of a multi-role pool of an App Service Environment.

Get metrics for a specific instance of a multi-role pool of an App Service Environment.

resource belongs. details. The default is false. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • instance (String)

    Name of the instance in the multi-role pool.

  • details (Boolean) (defaults to: nil)

    Specify true to include instance

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1451
1452
1453
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1451

def list_multi_role_pool_instance_metrics_with_http_info(resource_group_name, name, instance, details = nil, custom_headers = nil)
  list_multi_role_pool_instance_metrics_async(resource_group_name, name, instance, details, custom_headers).value!
end

#list_multi_role_pool_skus(resource_group_name, name, custom_headers = nil) ⇒ Array<SkuInfo>

Get available SKUs for scaling a multi-role pool.

Get available SKUs for scaling a multi-role pool.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (Array<SkuInfo>)

    operation results.



1767
1768
1769
1770
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1767

def list_multi_role_pool_skus(resource_group_name, name, custom_headers = nil)
  first_page = list_multi_role_pool_skus_as_lazy(resource_group_name, name, custom_headers)
  first_page.get_all_items
end

#list_multi_role_pool_skus_as_lazy(resource_group_name, name, custom_headers = nil) ⇒ SkuInfoCollection

Get available SKUs for scaling a multi-role pool.

Get available SKUs for scaling a multi-role pool.

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (SkuInfoCollection)

    which provide lazy access to pages of the



6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6801

def list_multi_role_pool_skus_as_lazy(resource_group_name, name, custom_headers = nil)
  response = list_multi_role_pool_skus_async(resource_group_name, name, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_multi_role_pool_skus_next_async(next_page_link, custom_headers)
    end
    page
  end
end

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

Get available SKUs for scaling a multi-role pool.

Get available SKUs for scaling a multi-role pool.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1802

def list_multi_role_pool_skus_async(resource_group_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#list_multi_role_pool_skus_next(next_page_link, custom_headers = nil) ⇒ SkuInfoCollection

Get available SKUs for scaling a multi-role pool.

Get available SKUs for scaling a multi-role pool.

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:

  • (SkuInfoCollection)

    operation results.



5125
5126
5127
5128
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5125

def list_multi_role_pool_skus_next(next_page_link, custom_headers = nil)
  response = list_multi_role_pool_skus_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_multi_role_pool_skus_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Get available SKUs for scaling a multi-role pool.

Get available SKUs for scaling a multi-role pool.

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.



5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5158

def list_multi_role_pool_skus_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    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 = Azure::ARM::Web::Models::SkuInfoCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_multi_role_pool_skus_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get available SKUs for scaling a multi-role pool.

Get available SKUs for scaling a multi-role pool.

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.



5142
5143
5144
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5142

def list_multi_role_pool_skus_next_with_http_info(next_page_link, custom_headers = nil)
  list_multi_role_pool_skus_next_async(next_page_link, custom_headers).value!
end

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

Get available SKUs for scaling a multi-role pool.

Get available SKUs for scaling a multi-role pool.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1785
1786
1787
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1785

def list_multi_role_pool_skus_with_http_info(resource_group_name, name, custom_headers = nil)
  list_multi_role_pool_skus_async(resource_group_name, name, custom_headers).value!
end

#list_multi_role_pools(resource_group_name, name, custom_headers = nil) ⇒ Array<WorkerPoolResource>

Get all multi-role pools.

Get all multi-role pools.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (Array<WorkerPoolResource>)

    operation results.



1063
1064
1065
1066
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1063

def list_multi_role_pools(resource_group_name, name, custom_headers = nil)
  first_page = list_multi_role_pools_as_lazy(resource_group_name, name, custom_headers)
  first_page.get_all_items
end

#list_multi_role_pools_as_lazy(resource_group_name, name, custom_headers = nil) ⇒ WorkerPoolCollection

Get all multi-role pools.

Get all multi-role pools.

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (WorkerPoolCollection)

    which provide lazy access to pages of the



6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6659

def list_multi_role_pools_as_lazy(resource_group_name, name, custom_headers = nil)
  response = list_multi_role_pools_async(resource_group_name, name, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_multi_role_pools_next_async(next_page_link, custom_headers)
    end
    page
  end
end

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

Get all multi-role pools.

Get all multi-role pools.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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

def list_multi_role_pools_async(resource_group_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#list_multi_role_pools_next(next_page_link, custom_headers = nil) ⇒ WorkerPoolCollection

Get all multi-role pools.

Get all multi-role pools.

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:

  • (WorkerPoolCollection)

    operation results.



4648
4649
4650
4651
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4648

def list_multi_role_pools_next(next_page_link, custom_headers = nil)
  response = list_multi_role_pools_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_multi_role_pools_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Get all multi-role pools.

Get all multi-role pools.

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.



4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4681

def list_multi_role_pools_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    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 = Azure::ARM::Web::Models::WorkerPoolCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_multi_role_pools_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get all multi-role pools.

Get all multi-role pools.

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.



4665
4666
4667
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4665

def list_multi_role_pools_next_with_http_info(next_page_link, custom_headers = nil)
  list_multi_role_pools_next_async(next_page_link, custom_headers).value!
end

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

Get all multi-role pools.

Get all multi-role pools.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1081
1082
1083
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1081

def list_multi_role_pools_with_http_info(resource_group_name, name, custom_headers = nil)
  list_multi_role_pools_async(resource_group_name, name, custom_headers).value!
end

#list_multi_role_usages(resource_group_name, name, custom_headers = nil) ⇒ Array<Usage>

Get usage metrics for a multi-role pool of an App Service Environment.

Get usage metrics for a multi-role pool of an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (Array<Usage>)

    operation results.



1867
1868
1869
1870
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1867

def list_multi_role_usages(resource_group_name, name, custom_headers = nil)
  first_page = list_multi_role_usages_as_lazy(resource_group_name, name, custom_headers)
  first_page.get_all_items
end

#list_multi_role_usages_as_lazy(resource_group_name, name, custom_headers = nil) ⇒ UsageCollection

Get usage metrics for a multi-role pool of an App Service Environment.

Get usage metrics for a multi-role pool of an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (UsageCollection)

    which provide lazy access to pages of the response.



6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6825

def list_multi_role_usages_as_lazy(resource_group_name, name, custom_headers = nil)
  response = list_multi_role_usages_async(resource_group_name, name, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_multi_role_usages_next_async(next_page_link, custom_headers)
    end
    page
  end
end

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

Get usage metrics for a multi-role pool of an App Service Environment.

Get usage metrics for a multi-role pool of an App Service Environment.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1902

def list_multi_role_usages_async(resource_group_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#list_multi_role_usages_next(next_page_link, custom_headers = nil) ⇒ UsageCollection

Get usage metrics for a multi-role pool of an App Service Environment.

Get usage metrics for a multi-role pool of an App Service Environment.

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:

  • (UsageCollection)

    operation results.



5218
5219
5220
5221
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5218

def list_multi_role_usages_next(next_page_link, custom_headers = nil)
  response = list_multi_role_usages_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_multi_role_usages_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Get usage metrics for a multi-role pool of an App Service Environment.

Get usage metrics for a multi-role pool of an App Service Environment.

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.



5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5251

def list_multi_role_usages_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    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 = Azure::ARM::Web::Models::UsageCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_multi_role_usages_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get usage metrics for a multi-role pool of an App Service Environment.

Get usage metrics for a multi-role pool of an App Service Environment.

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.



5235
5236
5237
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5235

def list_multi_role_usages_next_with_http_info(next_page_link, custom_headers = nil)
  list_multi_role_usages_next_async(next_page_link, custom_headers).value!
end

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

Get usage metrics for a multi-role pool of an App Service Environment.

Get usage metrics for a multi-role pool of an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1885
1886
1887
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1885

def list_multi_role_usages_with_http_info(resource_group_name, name, custom_headers = nil)
  list_multi_role_usages_async(resource_group_name, name, custom_headers).value!
end

#list_next(next_page_link, custom_headers = nil) ⇒ AppServiceEnvironmentCollection

Get all App Service Environments for a subscription.

Get all App Service Environments for a subscription.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (AppServiceEnvironmentCollection)

    operation results.



4270
4271
4272
4273
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4270

def list_next(next_page_link, custom_headers = nil)
  response = list_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Get all App Service Environments for a subscription.

Get all App Service Environments for a subscription.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4303

def list_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    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 = Azure::ARM::Web::Models::AppServiceEnvironmentCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get all App Service Environments for a subscription.

Get all App Service Environments for a subscription.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



4287
4288
4289
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 4287

def list_next_with_http_info(next_page_link, custom_headers = nil)
  list_next_async(next_page_link, custom_headers).value!
end

#list_operations(resource_group_name, name, custom_headers = nil) ⇒ Array

List all currently running operations on the App Service Environment.

List all currently running operations on the App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (Array)

    operation results.



1967
1968
1969
1970
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1967

def list_operations(resource_group_name, name, custom_headers = nil)
  response = list_operations_async(resource_group_name, name, custom_headers).value!
  response.body unless response.nil?
end

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

List all currently running operations on the App Service Environment.

List all currently running operations on the App Service Environment.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2002

def list_operations_async(resource_group_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'

  request_url = @base_url || @client.base_url

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

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = {
          required: false,
          serialized_name: 'parsed_response',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serialized_name: 'OperationElementType',
                type: {
                  name: 'Composite',
                  class_name: 'Operation'
                }
            }
          }
        }
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

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

List all currently running operations on the App Service Environment.

List all currently running operations on the App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1985
1986
1987
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 1985

def list_operations_with_http_info(resource_group_name, name, custom_headers = nil)
  list_operations_async(resource_group_name, name, custom_headers).value!
end

#list_usages(resource_group_name, name, filter = nil, custom_headers = nil) ⇒ Array<CsmUsageQuota>

Get global usage metrics of an App Service Environment.

Get global usage metrics of an App Service Environment.

resource belongs. Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

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

    A hash of custom headers that

Returns:

  • (Array<CsmUsageQuota>)

    operation results.



2518
2519
2520
2521
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2518

def list_usages(resource_group_name, name, filter = nil, custom_headers = nil)
  first_page = list_usages_as_lazy(resource_group_name, name, filter, custom_headers)
  first_page.get_all_items
end

#list_usages_as_lazy(resource_group_name, name, filter = nil, custom_headers = nil) ⇒ CsmUsageQuotaCollection

Get global usage metrics of an App Service Environment.

Get global usage metrics of an App Service Environment.

resource belongs. Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

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

    A hash of custom headers that

Returns:

  • (CsmUsageQuotaCollection)

    which provide lazy access to pages of the



6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6906

def list_usages_as_lazy(resource_group_name, name, filter = nil, custom_headers = nil)
  response = list_usages_async(resource_group_name, name, filter, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_usages_next_async(next_page_link, custom_headers)
    end
    page
  end
end

#list_usages_async(resource_group_name, name, filter = nil, custom_headers = nil) ⇒ Concurrent::Promise

Get global usage metrics of an App Service Environment.

Get global usage metrics of an App Service Environment.

resource belongs. Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2561

def list_usages_async(resource_group_name, name, filter = nil, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'

  request_url = @base_url || @client.base_url

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

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

    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 = Azure::ARM::Web::Models::CsmUsageQuotaCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_usages_next(next_page_link, custom_headers = nil) ⇒ CsmUsageQuotaCollection

Get global usage metrics of an App Service Environment.

Get global usage metrics of an App Service Environment.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (CsmUsageQuotaCollection)

    operation results.



5585
5586
5587
5588
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5585

def list_usages_next(next_page_link, custom_headers = nil)
  response = list_usages_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_usages_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Get global usage metrics of an App Service Environment.

Get global usage metrics of an App Service Environment.

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.



5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5618

def list_usages_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}

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

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    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 = Azure::ARM::Web::Models::CsmUsageQuotaCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_usages_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get global usage metrics of an App Service Environment.

Get global usage metrics of an App Service Environment.

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.



5602
5603
5604
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5602

def list_usages_next_with_http_info(next_page_link, custom_headers = nil)
  list_usages_next_async(next_page_link, custom_headers).value!
end

#list_usages_with_http_info(resource_group_name, name, filter = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get global usage metrics of an App Service Environment.

Get global usage metrics of an App Service Environment.

resource belongs. Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2540
2541
2542
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2540

def list_usages_with_http_info(resource_group_name, name, filter = nil, custom_headers = nil)
  list_usages_async(resource_group_name, name, filter, custom_headers).value!
end

#list_vips(resource_group_name, name, custom_headers = nil) ⇒ AddressResponse

Get IP addresses assigned to an App Service Environment.

Get IP addresses assigned to an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (AddressResponse)

    operation results.



526
527
528
529
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 526

def list_vips(resource_group_name, name, custom_headers = nil)
  response = list_vips_async(resource_group_name, name, custom_headers).value!
  response.body unless response.nil?
end

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

Get IP addresses assigned to an App Service Environment.

Get IP addresses assigned to an App Service Environment.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 561

def list_vips_async(resource_group_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

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

Get IP addresses assigned to an App Service Environment.

Get IP addresses assigned to an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



544
545
546
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 544

def list_vips_with_http_info(resource_group_name, name, custom_headers = nil)
  list_vips_async(resource_group_name, name, custom_headers).value!
end

#list_web_apps(resource_group_name, name, properties_to_include = nil, custom_headers = nil) ⇒ Array<Site>

Get all apps in an App Service Environment.

Get all apps in an App Service Environment.

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

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • properties_to_include (String) (defaults to: nil)

    Comma separated list of app properties

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

    A hash of custom headers that

Returns:

  • (Array<Site>)

    operation results.



2341
2342
2343
2344
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2341

def list_web_apps(resource_group_name, name, properties_to_include = nil, custom_headers = nil)
  first_page = list_web_apps_as_lazy(resource_group_name, name, properties_to_include, custom_headers)
  first_page.get_all_items
end

#list_web_apps_as_lazy(resource_group_name, name, properties_to_include = nil, custom_headers = nil) ⇒ WebAppCollection

Get all apps in an App Service Environment.

Get all apps in an App Service Environment.

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

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • properties_to_include (String) (defaults to: nil)

    Comma separated list of app properties

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

    A hash of custom headers that

Returns:

  • (WebAppCollection)

    which provide lazy access to pages of the



6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6877

def list_web_apps_as_lazy(resource_group_name, name, properties_to_include = nil, custom_headers = nil)
  response = list_web_apps_async(resource_group_name, name, properties_to_include, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_web_apps_next_async(next_page_link, custom_headers)
    end
    page
  end
end

#list_web_apps_async(resource_group_name, name, properties_to_include = nil, custom_headers = nil) ⇒ Concurrent::Promise

Get all apps in an App Service Environment.

Get all apps in an App Service Environment.

resource belongs. to include. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • properties_to_include (String) (defaults to: nil)

    Comma separated list of app properties

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2380

def list_web_apps_async(resource_group_name, name, properties_to_include = nil, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#list_web_apps_next(next_page_link, custom_headers = nil) ⇒ WebAppCollection

Get all apps in an App Service Environment.

Get all apps in an App Service Environment.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (WebAppCollection)

    operation results.



5448
5449
5450
5451
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5448

def list_web_apps_next(next_page_link, custom_headers = nil)
  response = list_web_apps_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_web_apps_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Get all apps in an App Service Environment.

Get all apps in an App Service Environment.

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.



5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5481

def list_web_apps_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    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 = Azure::ARM::Web::Models::WebAppCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_web_apps_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get all apps in an App Service Environment.

Get all apps in an App Service Environment.

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.



5465
5466
5467
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5465

def list_web_apps_next_with_http_info(next_page_link, custom_headers = nil)
  list_web_apps_next_async(next_page_link, custom_headers).value!
end

#list_web_apps_with_http_info(resource_group_name, name, properties_to_include = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get all apps in an App Service Environment.

Get all apps in an App Service Environment.

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

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • properties_to_include (String) (defaults to: nil)

    Comma separated list of app properties

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2361
2362
2363
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2361

def list_web_apps_with_http_info(resource_group_name, name, properties_to_include = nil, custom_headers = nil)
  list_web_apps_async(resource_group_name, name, properties_to_include, custom_headers).value!
end

#list_web_worker_metric_definitions(resource_group_name, name, worker_pool_name, custom_headers = nil) ⇒ Array<ResourceMetricDefinition>

Get metric definitions for a worker pool of an App Service Environment.

Get metric definitions for a worker pool of an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

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

    A hash of custom headers that

Returns:

  • (Array<ResourceMetricDefinition>)

    operation results.



3131
3132
3133
3134
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3131

def list_web_worker_metric_definitions(resource_group_name, name, worker_pool_name, custom_headers = nil)
  first_page = list_web_worker_metric_definitions_as_lazy(resource_group_name, name, worker_pool_name, custom_headers)
  first_page.get_all_items
end

#list_web_worker_metric_definitions_as_lazy(resource_group_name, name, worker_pool_name, custom_headers = nil) ⇒ ResourceMetricDefinitionCollection

Get metric definitions for a worker pool of an App Service Environment.

Get metric definitions for a worker pool of an App Service Environment.

resource belongs. will be added to the HTTP request.

pages of the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

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

    A hash of custom headers that

Returns:

  • (ResourceMetricDefinitionCollection)

    which provide lazy access to



7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 7021

def list_web_worker_metric_definitions_as_lazy(resource_group_name, name, worker_pool_name, custom_headers = nil)
  response = list_web_worker_metric_definitions_async(resource_group_name, name, worker_pool_name, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_web_worker_metric_definitions_next_async(next_page_link, custom_headers)
    end
    page
  end
end

#list_web_worker_metric_definitions_async(resource_group_name, name, worker_pool_name, custom_headers = nil) ⇒ Concurrent::Promise

Get metric definitions for a worker pool of an App Service Environment.

Get metric definitions for a worker pool of an App Service Environment.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3168

def list_web_worker_metric_definitions_async(resource_group_name, name, worker_pool_name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'worker_pool_name is nil' if worker_pool_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#list_web_worker_metric_definitions_next(next_page_link, custom_headers = nil) ⇒ ResourceMetricDefinitionCollection

Get metric definitions for a worker pool of an App Service Environment.

Get metric definitions for a worker pool of an App Service Environment.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (ResourceMetricDefinitionCollection)

    operation results.



5969
5970
5971
5972
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5969

def list_web_worker_metric_definitions_next(next_page_link, custom_headers = nil)
  response = list_web_worker_metric_definitions_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_web_worker_metric_definitions_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Get metric definitions for a worker pool of an App Service Environment.

Get metric definitions for a worker pool of an App Service Environment.

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.



6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6002

def list_web_worker_metric_definitions_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    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 = Azure::ARM::Web::Models::ResourceMetricDefinitionCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_web_worker_metric_definitions_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get metric definitions for a worker pool of an App Service Environment.

Get metric definitions for a worker pool of an App Service Environment.

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.



5986
5987
5988
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5986

def list_web_worker_metric_definitions_next_with_http_info(next_page_link, custom_headers = nil)
  list_web_worker_metric_definitions_next_async(next_page_link, custom_headers).value!
end

#list_web_worker_metric_definitions_with_http_info(resource_group_name, name, worker_pool_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get metric definitions for a worker pool of an App Service Environment.

Get metric definitions for a worker pool of an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3150
3151
3152
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3150

def list_web_worker_metric_definitions_with_http_info(resource_group_name, name, worker_pool_name, custom_headers = nil)
  list_web_worker_metric_definitions_async(resource_group_name, name, worker_pool_name, custom_headers).value!
end

#list_web_worker_metrics(resource_group_name, name, worker_pool_name, details = nil, filter = nil, custom_headers = nil) ⇒ Array<ResourceMetric>

Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment).

Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment).

resource belongs. details. The default is false. Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of worker pool

  • details (Boolean) (defaults to: nil)

    Specify true to include instance

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

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

    A hash of custom headers that

Returns:

  • (Array<ResourceMetric>)

    operation results.



3243
3244
3245
3246
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3243

def list_web_worker_metrics(resource_group_name, name, worker_pool_name, details = nil, filter = nil, custom_headers = nil)
  first_page = list_web_worker_metrics_as_lazy(resource_group_name, name, worker_pool_name, details, filter, custom_headers)
  first_page.get_all_items
end

#list_web_worker_metrics_as_lazy(resource_group_name, name, worker_pool_name, details = nil, filter = nil, custom_headers = nil) ⇒ ResourceMetricCollection

Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment).

Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment).

resource belongs. details. The default is false. Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of worker pool

  • details (Boolean) (defaults to: nil)

    Specify true to include instance

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

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

    A hash of custom headers that

Returns:

  • (ResourceMetricCollection)

    which provide lazy access to pages of the



7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 7055

def list_web_worker_metrics_as_lazy(resource_group_name, name, worker_pool_name, details = nil, filter = nil, custom_headers = nil)
  response = list_web_worker_metrics_async(resource_group_name, name, worker_pool_name, details, filter, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_web_worker_metrics_next_async(next_page_link, custom_headers)
    end
    page
  end
end

#list_web_worker_metrics_async(resource_group_name, name, worker_pool_name, details = nil, filter = nil, custom_headers = nil) ⇒ Concurrent::Promise

Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment).

Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment).

resource belongs. details. The default is false. Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of worker pool

  • details (Boolean) (defaults to: nil)

    Specify true to include instance

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3296

def list_web_worker_metrics_async(resource_group_name, name, worker_pool_name, details = nil, filter = nil, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'worker_pool_name is nil' if worker_pool_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics'

  request_url = @base_url || @client.base_url

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

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

    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 = Azure::ARM::Web::Models::ResourceMetricCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_web_worker_metrics_next(next_page_link, custom_headers = nil) ⇒ ResourceMetricCollection

Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment).

Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment).

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (ResourceMetricCollection)

    operation results.



6064
6065
6066
6067
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6064

def list_web_worker_metrics_next(next_page_link, custom_headers = nil)
  response = list_web_worker_metrics_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_web_worker_metrics_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment).

Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment).

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.



6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6101

def list_web_worker_metrics_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    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 = Azure::ARM::Web::Models::ResourceMetricCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_web_worker_metrics_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment).

Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment).

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.



6083
6084
6085
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6083

def list_web_worker_metrics_next_with_http_info(next_page_link, custom_headers = nil)
  list_web_worker_metrics_next_async(next_page_link, custom_headers).value!
end

#list_web_worker_metrics_with_http_info(resource_group_name, name, worker_pool_name, details = nil, filter = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment).

Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment).

resource belongs. details. The default is false. Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of worker pool

  • details (Boolean) (defaults to: nil)

    Specify true to include instance

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3270
3271
3272
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3270

def list_web_worker_metrics_with_http_info(resource_group_name, name, worker_pool_name, details = nil, filter = nil, custom_headers = nil)
  list_web_worker_metrics_async(resource_group_name, name, worker_pool_name, details, filter, custom_headers).value!
end

#list_web_worker_usages(resource_group_name, name, worker_pool_name, custom_headers = nil) ⇒ Array<Usage>

Get usage metrics for a worker pool of an App Service Environment.

Get usage metrics for a worker pool of an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

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

    A hash of custom headers that

Returns:

  • (Array<Usage>)

    operation results.



3468
3469
3470
3471
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3468

def list_web_worker_usages(resource_group_name, name, worker_pool_name, custom_headers = nil)
  first_page = list_web_worker_usages_as_lazy(resource_group_name, name, worker_pool_name, custom_headers)
  first_page.get_all_items
end

#list_web_worker_usages_as_lazy(resource_group_name, name, worker_pool_name, custom_headers = nil) ⇒ UsageCollection

Get usage metrics for a worker pool of an App Service Environment.

Get usage metrics for a worker pool of an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

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

    A hash of custom headers that

Returns:

  • (UsageCollection)

    which provide lazy access to pages of the response.



7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 7106

def list_web_worker_usages_as_lazy(resource_group_name, name, worker_pool_name, custom_headers = nil)
  response = list_web_worker_usages_async(resource_group_name, name, worker_pool_name, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_web_worker_usages_next_async(next_page_link, custom_headers)
    end
    page
  end
end

#list_web_worker_usages_async(resource_group_name, name, worker_pool_name, custom_headers = nil) ⇒ Concurrent::Promise

Get usage metrics for a worker pool of an App Service Environment.

Get usage metrics for a worker pool of an App Service Environment.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3505

def list_web_worker_usages_async(resource_group_name, name, worker_pool_name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'worker_pool_name is nil' if worker_pool_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#list_web_worker_usages_next(next_page_link, custom_headers = nil) ⇒ UsageCollection

Get usage metrics for a worker pool of an App Service Environment.

Get usage metrics for a worker pool of an App Service Environment.

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:

  • (UsageCollection)

    operation results.



6254
6255
6256
6257
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6254

def list_web_worker_usages_next(next_page_link, custom_headers = nil)
  response = list_web_worker_usages_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_web_worker_usages_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Get usage metrics for a worker pool of an App Service Environment.

Get usage metrics for a worker pool of an App Service Environment.

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.



6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6287

def list_web_worker_usages_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    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 = Azure::ARM::Web::Models::UsageCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_web_worker_usages_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get usage metrics for a worker pool of an App Service Environment.

Get usage metrics for a worker pool of an App Service Environment.

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.



6271
6272
6273
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6271

def list_web_worker_usages_next_with_http_info(next_page_link, custom_headers = nil)
  list_web_worker_usages_next_async(next_page_link, custom_headers).value!
end

#list_web_worker_usages_with_http_info(resource_group_name, name, worker_pool_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get usage metrics for a worker pool of an App Service Environment.

Get usage metrics for a worker pool of an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3487
3488
3489
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3487

def list_web_worker_usages_with_http_info(resource_group_name, name, worker_pool_name, custom_headers = nil)
  list_web_worker_usages_async(resource_group_name, name, worker_pool_name, custom_headers).value!
end

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

Get all App Service Environments for a subscription.

Get all App Service 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.



49
50
51
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 49

def list_with_http_info(custom_headers = nil)
  list_async(custom_headers).value!
end

#list_worker_pool_instance_metric_definitions(resource_group_name, name, worker_pool_name, instance, custom_headers = nil) ⇒ Array<ResourceMetricDefinition>

Get metric definitions for a specific instance of a worker pool of an App Service Environment.

Get metric definitions for a specific instance of a worker pool of an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

  • instance (String)

    Name of the instance in the worker pool.

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

    A hash of custom headers that

Returns:

  • (Array<ResourceMetricDefinition>)

    operation results.



2887
2888
2889
2890
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2887

def list_worker_pool_instance_metric_definitions(resource_group_name, name, worker_pool_name, instance, custom_headers = nil)
  first_page = list_worker_pool_instance_metric_definitions_as_lazy(resource_group_name, name, worker_pool_name, instance, custom_headers)
  first_page.get_all_items
end

#list_worker_pool_instance_metric_definitions_as_lazy(resource_group_name, name, worker_pool_name, instance, custom_headers = nil) ⇒ ResourceMetricDefinitionCollection

Get metric definitions for a specific instance of a worker pool of an App Service Environment.

Get metric definitions for a specific instance of a worker pool of an App Service Environment.

resource belongs. will be added to the HTTP request.

pages of the response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

  • instance (String)

    Name of the instance in the worker pool.

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

    A hash of custom headers that

Returns:

  • (ResourceMetricDefinitionCollection)

    which provide lazy access to



6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6960

def list_worker_pool_instance_metric_definitions_as_lazy(resource_group_name, name, worker_pool_name, instance, custom_headers = nil)
  response = list_worker_pool_instance_metric_definitions_async(resource_group_name, name, worker_pool_name, instance, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_worker_pool_instance_metric_definitions_next_async(next_page_link, custom_headers)
    end
    page
  end
end

#list_worker_pool_instance_metric_definitions_async(resource_group_name, name, worker_pool_name, instance, custom_headers = nil) ⇒ Concurrent::Promise

Get metric definitions for a specific instance of a worker pool of an App Service Environment.

Get metric definitions for a specific instance of a worker pool of an App Service Environment.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

  • instance (String)

    Name of the instance in the worker pool.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2930

def list_worker_pool_instance_metric_definitions_async(resource_group_name, name, worker_pool_name, instance, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'worker_pool_name is nil' if worker_pool_name.nil?
  fail ArgumentError, 'instance is nil' if instance.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#list_worker_pool_instance_metric_definitions_next(next_page_link, custom_headers = nil) ⇒ ResourceMetricDefinitionCollection

Get metric definitions for a specific instance of a worker pool of an App Service Environment.

Get metric definitions for a specific instance of a worker pool of an App Service Environment.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (ResourceMetricDefinitionCollection)

    operation results.



5773
5774
5775
5776
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5773

def list_worker_pool_instance_metric_definitions_next(next_page_link, custom_headers = nil)
  response = list_worker_pool_instance_metric_definitions_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_worker_pool_instance_metric_definitions_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Get metric definitions for a specific instance of a worker pool of an App Service Environment.

Get metric definitions for a specific instance of a worker pool of an App Service Environment.

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.



5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5810

def list_worker_pool_instance_metric_definitions_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    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 = Azure::ARM::Web::Models::ResourceMetricDefinitionCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_worker_pool_instance_metric_definitions_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get metric definitions for a specific instance of a worker pool of an App Service Environment.

Get metric definitions for a specific instance of a worker pool of an App Service Environment.

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.



5792
5793
5794
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5792

def list_worker_pool_instance_metric_definitions_next_with_http_info(next_page_link, custom_headers = nil)
  list_worker_pool_instance_metric_definitions_next_async(next_page_link, custom_headers).value!
end

#list_worker_pool_instance_metric_definitions_with_http_info(resource_group_name, name, worker_pool_name, instance, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get metric definitions for a specific instance of a worker pool of an App Service Environment.

Get metric definitions for a specific instance of a worker pool of an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

  • instance (String)

    Name of the instance in the worker pool.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2909
2910
2911
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2909

def list_worker_pool_instance_metric_definitions_with_http_info(resource_group_name, name, worker_pool_name, instance, custom_headers = nil)
  list_worker_pool_instance_metric_definitions_async(resource_group_name, name, worker_pool_name, instance, custom_headers).value!
end

#list_worker_pool_instance_metrics(resource_group_name, name, worker_pool_name, instance, details = nil, filter = nil, custom_headers = nil) ⇒ Array<ResourceMetric>

Get metrics for a specific instance of a worker pool of an App Service Environment.

Get metrics for a specific instance of a worker pool of an App Service Environment.

resource belongs. details. The default is false. Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

  • instance (String)

    Name of the instance in the worker pool.

  • details (Boolean) (defaults to: nil)

    Specify true to include instance

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

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

    A hash of custom headers that

Returns:

  • (Array<ResourceMetric>)

    operation results.



3007
3008
3009
3010
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3007

def list_worker_pool_instance_metrics(resource_group_name, name, worker_pool_name, instance, details = nil, filter = nil, custom_headers = nil)
  first_page = list_worker_pool_instance_metrics_as_lazy(resource_group_name, name, worker_pool_name, instance, details, filter, custom_headers)
  first_page.get_all_items
end

#list_worker_pool_instance_metrics_as_lazy(resource_group_name, name, worker_pool_name, instance, details = nil, filter = nil, custom_headers = nil) ⇒ ResourceMetricCollection

Get metrics for a specific instance of a worker pool of an App Service Environment.

Get metrics for a specific instance of a worker pool of an App Service Environment.

resource belongs. details. The default is false. Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

  • instance (String)

    Name of the instance in the worker pool.

  • details (Boolean) (defaults to: nil)

    Specify true to include instance

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

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

    A hash of custom headers that

Returns:

  • (ResourceMetricCollection)

    which provide lazy access to pages of the



6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6995

def list_worker_pool_instance_metrics_as_lazy(resource_group_name, name, worker_pool_name, instance, details = nil, filter = nil, custom_headers = nil)
  response = list_worker_pool_instance_metrics_async(resource_group_name, name, worker_pool_name, instance, details, filter, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_worker_pool_instance_metrics_next_async(next_page_link, custom_headers)
    end
    page
  end
end

#list_worker_pool_instance_metrics_async(resource_group_name, name, worker_pool_name, instance, details = nil, filter = nil, custom_headers = nil) ⇒ Concurrent::Promise

Get metrics for a specific instance of a worker pool of an App Service Environment.

Get metrics for a specific instance of a worker pool of an App Service Environment.

resource belongs. details. The default is false. Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

  • instance (String)

    Name of the instance in the worker pool.

  • details (Boolean) (defaults to: nil)

    Specify true to include instance

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3062

def list_worker_pool_instance_metrics_async(resource_group_name, name, worker_pool_name, instance, details = nil, filter = nil, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'worker_pool_name is nil' if worker_pool_name.nil?
  fail ArgumentError, 'instance is nil' if instance.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}metrics'

  request_url = @base_url || @client.base_url

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

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

    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 = Azure::ARM::Web::Models::ResourceMetricCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_worker_pool_instance_metrics_next(next_page_link, custom_headers = nil) ⇒ ResourceMetricCollection

Get metrics for a specific instance of a worker pool of an App Service Environment.

Get metrics for a specific instance of a worker pool of an App Service Environment.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (ResourceMetricCollection)

    operation results.



5872
5873
5874
5875
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5872

def list_worker_pool_instance_metrics_next(next_page_link, custom_headers = nil)
  response = list_worker_pool_instance_metrics_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_worker_pool_instance_metrics_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Get metrics for a specific instance of a worker pool of an App Service Environment.

Get metrics for a specific instance of a worker pool of an App Service Environment.

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.



5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5909

def list_worker_pool_instance_metrics_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    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 = Azure::ARM::Web::Models::ResourceMetricCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_worker_pool_instance_metrics_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get metrics for a specific instance of a worker pool of an App Service Environment.

Get metrics for a specific instance of a worker pool of an App Service Environment.

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.



5891
5892
5893
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5891

def list_worker_pool_instance_metrics_next_with_http_info(next_page_link, custom_headers = nil)
  list_worker_pool_instance_metrics_next_async(next_page_link, custom_headers).value!
end

#list_worker_pool_instance_metrics_with_http_info(resource_group_name, name, worker_pool_name, instance, details = nil, filter = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get metrics for a specific instance of a worker pool of an App Service Environment.

Get metrics for a specific instance of a worker pool of an App Service Environment.

resource belongs. details. The default is false. Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

  • instance (String)

    Name of the instance in the worker pool.

  • details (Boolean) (defaults to: nil)

    Specify true to include instance

  • filter (String) (defaults to: nil)

    Return only usages/metrics specified in the filter.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3035
3036
3037
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3035

def list_worker_pool_instance_metrics_with_http_info(resource_group_name, name, worker_pool_name, instance, details = nil, filter = nil, custom_headers = nil)
  list_worker_pool_instance_metrics_async(resource_group_name, name, worker_pool_name, instance, details, filter, custom_headers).value!
end

#list_worker_pool_skus(resource_group_name, name, worker_pool_name, custom_headers = nil) ⇒ Array<SkuInfo>

Get available SKUs for scaling a worker pool.

Get available SKUs for scaling a worker pool.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

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

    A hash of custom headers that

Returns:

  • (Array<SkuInfo>)

    operation results.



3364
3365
3366
3367
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3364

def list_worker_pool_skus(resource_group_name, name, worker_pool_name, custom_headers = nil)
  first_page = list_worker_pool_skus_as_lazy(resource_group_name, name, worker_pool_name, custom_headers)
  first_page.get_all_items
end

#list_worker_pool_skus_as_lazy(resource_group_name, name, worker_pool_name, custom_headers = nil) ⇒ SkuInfoCollection

Get available SKUs for scaling a worker pool.

Get available SKUs for scaling a worker pool.

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

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

    A hash of custom headers that

Returns:

  • (SkuInfoCollection)

    which provide lazy access to pages of the



7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 7081

def list_worker_pool_skus_as_lazy(resource_group_name, name, worker_pool_name, custom_headers = nil)
  response = list_worker_pool_skus_async(resource_group_name, name, worker_pool_name, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_worker_pool_skus_next_async(next_page_link, custom_headers)
    end
    page
  end
end

#list_worker_pool_skus_async(resource_group_name, name, worker_pool_name, custom_headers = nil) ⇒ Concurrent::Promise

Get available SKUs for scaling a worker pool.

Get available SKUs for scaling a worker pool.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3401

def list_worker_pool_skus_async(resource_group_name, name, worker_pool_name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'worker_pool_name is nil' if worker_pool_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#list_worker_pool_skus_next(next_page_link, custom_headers = nil) ⇒ SkuInfoCollection

Get available SKUs for scaling a worker pool.

Get available SKUs for scaling a worker pool.

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:

  • (SkuInfoCollection)

    operation results.



6161
6162
6163
6164
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6161

def list_worker_pool_skus_next(next_page_link, custom_headers = nil)
  response = list_worker_pool_skus_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_worker_pool_skus_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Get available SKUs for scaling a worker pool.

Get available SKUs for scaling a worker pool.

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.



6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6194

def list_worker_pool_skus_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    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 = Azure::ARM::Web::Models::SkuInfoCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_worker_pool_skus_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get available SKUs for scaling a worker pool.

Get available SKUs for scaling a worker pool.

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.



6178
6179
6180
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6178

def list_worker_pool_skus_next_with_http_info(next_page_link, custom_headers = nil)
  list_worker_pool_skus_next_async(next_page_link, custom_headers).value!
end

#list_worker_pool_skus_with_http_info(resource_group_name, name, worker_pool_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get available SKUs for scaling a worker pool.

Get available SKUs for scaling a worker pool.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • worker_pool_name (String)

    Name of the worker pool.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3383
3384
3385
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 3383

def list_worker_pool_skus_with_http_info(resource_group_name, name, worker_pool_name, custom_headers = nil)
  list_worker_pool_skus_async(resource_group_name, name, worker_pool_name, custom_headers).value!
end

#list_worker_pools(resource_group_name, name, custom_headers = nil) ⇒ Array<WorkerPoolResource>

Get all worker pools of an App Service Environment.

Get all worker pools of an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (Array<WorkerPoolResource>)

    operation results.



2627
2628
2629
2630
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2627

def list_worker_pools(resource_group_name, name, custom_headers = nil)
  first_page = list_worker_pools_as_lazy(resource_group_name, name, custom_headers)
  first_page.get_all_items
end

#list_worker_pools_as_lazy(resource_group_name, name, custom_headers = nil) ⇒ WorkerPoolCollection

Get all worker pools of an App Service Environment.

Get all worker pools of an App Service Environment.

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (WorkerPoolCollection)

    which provide lazy access to pages of the



6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 6931

def list_worker_pools_as_lazy(resource_group_name, name, custom_headers = nil)
  response = list_worker_pools_async(resource_group_name, name, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_worker_pools_next_async(next_page_link, custom_headers)
    end
    page
  end
end

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

Get all worker pools of an App Service Environment.

Get all worker pools of an App Service Environment.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2662

def list_worker_pools_async(resource_group_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#list_worker_pools_next(next_page_link, custom_headers = nil) ⇒ WorkerPoolCollection

Get all worker pools of an App Service Environment.

Get all worker pools of an App Service Environment.

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:

  • (WorkerPoolCollection)

    operation results.



5678
5679
5680
5681
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5678

def list_worker_pools_next(next_page_link, custom_headers = nil)
  response = list_worker_pools_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_worker_pools_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Get all worker pools of an App Service Environment.

Get all worker pools of an App Service Environment.

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.



5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5711

def list_worker_pools_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    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 = Azure::ARM::Web::Models::WorkerPoolCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_worker_pools_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get all worker pools of an App Service Environment.

Get all worker pools of an App Service Environment.

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.



5695
5696
5697
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5695

def list_worker_pools_next_with_http_info(next_page_link, custom_headers = nil)
  list_worker_pools_next_async(next_page_link, custom_headers).value!
end

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

Get all worker pools of an App Service Environment.

Get all worker pools of an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2645
2646
2647
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2645

def list_worker_pools_with_http_info(resource_group_name, name, custom_headers = nil)
  list_worker_pools_async(resource_group_name, name, custom_headers).value!
end

#reboot(resource_group_name, name, custom_headers = nil) ⇒ Object

Reboot all machines in an App Service Environment.

Reboot all machines in an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that



2080
2081
2082
2083
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2080

def reboot(resource_group_name, name, custom_headers = nil)
  response = reboot_async(resource_group_name, name, custom_headers).value!
  nil
end

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

Reboot all machines in an App Service Environment.

Reboot all machines in an App Service Environment.

resource belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2115

def reboot_async(resource_group_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  api_version = '2016-09-01'


  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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

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

Reboot all machines in an App Service Environment.

Reboot all machines in an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2098
2099
2100
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2098

def reboot_with_http_info(resource_group_name, name, custom_headers = nil)
  reboot_async(resource_group_name, name, custom_headers).value!
end

#resume(resource_group_name, name, custom_headers = nil) ⇒ Array<Site>

Resume an App Service Environment.

Resume an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (Array<Site>)

    operation results.



2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2170

def resume(resource_group_name, name, custom_headers = nil)
  response = resume_async(resource_group_name, name, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      resume_next_async(next_page_link, custom_headers)
    end
    page
  end
end

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

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2208

def resume_async(resource_group_name, name, custom_headers = nil)
  # Send request
  promise = begin_resume_async(resource_group_name, name, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::ARM::Web::Models::WebAppCollection.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response)
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#resume_next(next_page_link, custom_headers = nil) ⇒ WebAppCollection

Resume an App Service Environment.

Resume an App Service Environment.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (WebAppCollection)

    operation results.



5311
5312
5313
5314
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5311

def resume_next(next_page_link, custom_headers = nil)
  response = resume_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#resume_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

to List operation. will be added to the HTTP request.

response.

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:

  • (Concurrent::Promise)

    promise which provides async access to http



5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5325

def resume_next_async(next_page_link, custom_headers = nil)
  # Send request
  promise = begin_resume_next_async(next_page_link, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::ARM::Web::Models::WebAppCollection.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response)
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#suspend(resource_group_name, name, custom_headers = nil) ⇒ Array<Site>

Suspend an App Service Environment.

Suspend an App Service Environment.

resource belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (Array<Site>)

    operation results.



2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2445

def suspend(resource_group_name, name, custom_headers = nil)
  response = suspend_async(resource_group_name, name, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      suspend_next_async(next_page_link, custom_headers)
    end
    page
  end
end

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

resource belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    Name of the resource group to which the

  • name (String)

    Name of the App Service Environment.

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 2483

def suspend_async(resource_group_name, name, custom_headers = nil)
  # Send request
  promise = begin_suspend_async(resource_group_name, name, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::ARM::Web::Models::WebAppCollection.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response)
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#suspend_next(next_page_link, custom_headers = nil) ⇒ WebAppCollection

Suspend an App Service Environment.

Suspend an App Service Environment.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (WebAppCollection)

    operation results.



5541
5542
5543
5544
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5541

def suspend_next(next_page_link, custom_headers = nil)
  response = suspend_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#suspend_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

to List operation. will be added to the HTTP request.

response.

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:

  • (Concurrent::Promise)

    promise which provides async access to http



5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
# File 'lib/generated/azure_mgmt_web/app_service_environments.rb', line 5555

def suspend_next_async(next_page_link, custom_headers = nil)
  # Send request
  promise = begin_suspend_next_async(next_page_link, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::ARM::Web::Models::WebAppCollection.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response)
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end