Class: Azure::ARM::Web::HostingEnvironments

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

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ HostingEnvironments

Creates and initializes a new instance of the HostingEnvironments class.

Parameters:

  • client

    service class for accessing basic functionality.



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

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns reference to the WebSiteManagementClient.

Returns:

  • reference to the WebSiteManagementClient



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

def client
  @client
end

Instance Method Details

#begin_create_or_update_hosting_environment(resource_group_name, name, hosting_environment_envelope, custom_headers = nil) ⇒ HostingEnvironment

Create or update a hostingEnvironment (App Service Environment).

hostingEnvironment (App Service Environment) will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • hosting_environment_envelope (HostingEnvironment)

    Properties of

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

    A hash of custom headers that

Returns:



172
173
174
175
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 172

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

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

Create or update a hostingEnvironment (App Service Environment).

hostingEnvironment (App Service Environment) to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • hosting_environment_envelope (HostingEnvironment)

    Properties of

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 205

def begin_create_or_update_hosting_environment_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?
  hosting_environment_envelope.validate unless hosting_environment_envelope.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

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

  # Serialize Request
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
  unless hosting_environment_envelope.nil?
    hosting_environment_envelope = HostingEnvironment.serialize_object(hosting_environment_envelope)
  end
  request_content = hosting_environment_envelope != nil ? JSON.generate(hosting_environment_envelope, quirks_mode: true) : nil
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

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

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          parsed_response = HostingEnvironment.deserialize_object(parsed_response)
        end
        result.body = 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)
        unless parsed_response.nil?
          parsed_response = HostingEnvironment.deserialize_object(parsed_response)
        end
        result.body = parsed_response
      rescue 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_hosting_environment_with_http_info(resource_group_name, name, hosting_environment_envelope, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Create or update a hostingEnvironment (App Service Environment).

hostingEnvironment (App Service Environment) will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • hosting_environment_envelope (HostingEnvironment)

    Properties of

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



189
190
191
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 189

def begin_create_or_update_hosting_environment_with_http_info(resource_group_name, name, hosting_environment_envelope, custom_headers = nil)
  begin_create_or_update_hosting_environment_async(resource_group_name, name, hosting_environment_envelope, custom_headers).value!
end

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

Create or update a multiRole pool.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • multi_role_pool_envelope (WorkerPool)

    Properties of multiRole pool

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

    A hash of custom headers that

Returns:



2615
2616
2617
2618
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2615

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 multiRole pool.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • multi_role_pool_envelope (WorkerPool)

    Properties of multiRole pool

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2646

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?
  multi_role_pool_envelope.validate unless multi_role_pool_envelope.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

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

  # Serialize Request
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
  unless multi_role_pool_envelope.nil?
    multi_role_pool_envelope = WorkerPool.serialize_object(multi_role_pool_envelope)
  end
  request_content = multi_role_pool_envelope != nil ? JSON.generate(multi_role_pool_envelope, quirks_mode: true) : nil
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

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

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          parsed_response = WorkerPool.deserialize_object(parsed_response)
        end
        result.body = 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)
        unless parsed_response.nil?
          parsed_response = WorkerPool.deserialize_object(parsed_response)
        end
        result.body = parsed_response
      rescue 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 multiRole pool.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • multi_role_pool_envelope (WorkerPool)

    Properties of multiRole pool

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2631
2632
2633
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2631

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_worker_pool(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers = nil) ⇒ WorkerPool

Create or update a worker pool.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

  • worker_pool_envelope (WorkerPool)

    Properties of worker pool

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

    A hash of custom headers that

Returns:



3055
3056
3057
3058
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3055

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.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

  • worker_pool_envelope (WorkerPool)

    Properties of worker pool

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3088

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?
  worker_pool_envelope.validate unless worker_pool_envelope.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

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

  # Serialize Request
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
  unless worker_pool_envelope.nil?
    worker_pool_envelope = WorkerPool.serialize_object(worker_pool_envelope)
  end
  request_content = worker_pool_envelope != nil ? JSON.generate(worker_pool_envelope, quirks_mode: true) : nil
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'
  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' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

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

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

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

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

  • worker_pool_envelope (WorkerPool)

    Properties of worker pool

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3072
3073
3074
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3072

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_hosting_environment(resource_group_name, name, force_delete = nil, custom_headers = nil) ⇒ Object

Delete a hostingEnvironment (App Service Environment).

Service Environment) contains resources will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • force_delete (Boolean) (defaults to: nil)

    Delete even if the hostingEnvironment (App

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

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



320
321
322
323
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 320

def begin_delete_hosting_environment(resource_group_name, name, force_delete = nil, custom_headers = nil)
  response = begin_delete_hosting_environment_async(resource_group_name, name, force_delete, custom_headers).value!
  response.body unless response.nil?
end

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

Delete a hostingEnvironment (App Service Environment).

Service Environment) contains resources to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • force_delete (Boolean) (defaults to: nil)

    Delete even if the hostingEnvironment (App

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 353

def begin_delete_hosting_environment_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'
  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' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

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

Delete a hostingEnvironment (App Service Environment).

Service Environment) contains resources will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • force_delete (Boolean) (defaults to: nil)

    Delete even if the hostingEnvironment (App

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



337
338
339
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 337

def begin_delete_hosting_environment_with_http_info(resource_group_name, name, force_delete = nil, custom_headers = nil)
  begin_delete_hosting_environment_async(resource_group_name, name, force_delete, custom_headers).value!
end

#begin_resume_hosting_environment(resource_group_name, name, custom_headers = nil) ⇒ SiteCollection

Resumes the hostingEnvironment.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:



3819
3820
3821
3822
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3819

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

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

Resumes the hostingEnvironment.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (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.



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
3907
3908
3909
3910
3911
3912
3913
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3848

def begin_resume_hosting_environment_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

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

  request_url = @base_url || @client.base_url

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

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

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

Resumes the hostingEnvironment.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3834
3835
3836
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3834

def begin_resume_hosting_environment_with_http_info(resource_group_name, name, custom_headers = nil)
  begin_resume_hosting_environment_async(resource_group_name, name, custom_headers).value!
end

#begin_suspend_hosting_environment(resource_group_name, name, custom_headers = nil) ⇒ SiteCollection

Suspends the hostingEnvironment.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:



3686
3687
3688
3689
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3686

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

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

Suspends the hostingEnvironment.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (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.



3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3715

def begin_suspend_hosting_environment_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

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

  request_url = @base_url || @client.base_url

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

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

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

Suspends the hostingEnvironment.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3701
3702
3703
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3701

def begin_suspend_hosting_environment_with_http_info(resource_group_name, name, custom_headers = nil)
  begin_suspend_hosting_environment_async(resource_group_name, name, custom_headers).value!
end

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

Create or update a hostingEnvironment (App Service Environment).

hostingEnvironment (App Service Environment) for the response.

response.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • hosting_environment_envelope (HostingEnvironment)

    Properties of

  • @client.subscription_id (String)

    Subscription Id

  • @client.api_version (String)

    API Version

  • @client.accept_language (String)

    Gets or sets the preferred language

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 141

def create_or_update_hosting_environment(resource_group_name, name, hosting_environment_envelope, custom_headers = nil)
  # Send request
  promise = begin_create_or_update_hosting_environment_async(resource_group_name, name, hosting_environment_envelope, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      unless parsed_response.nil?
        parsed_response = HostingEnvironment.deserialize_object(parsed_response)
      end
    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) ⇒ Concurrent::Promise

Create or update a multiRole pool.

for the response.

response.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • multi_role_pool_envelope (WorkerPool)

    Properties of multiRole pool

  • @client.subscription_id (String)

    Subscription Id

  • @client.api_version (String)

    API Version

  • @client.accept_language (String)

    Gets or sets the preferred language

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2585

def create_or_update_multi_role_pool(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|
      unless parsed_response.nil?
        parsed_response = WorkerPool.deserialize_object(parsed_response)
      end
    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) ⇒ Concurrent::Promise

Create or update a worker pool.

for the response.

response.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

  • worker_pool_envelope (WorkerPool)

    Properties of worker pool

  • @client.subscription_id (String)

    Subscription Id

  • @client.api_version (String)

    API Version

  • @client.accept_language (String)

    Gets or sets the preferred language

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3024

def create_or_update_worker_pool(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|
      unless parsed_response.nil?
        parsed_response = WorkerPool.deserialize_object(parsed_response)
      end
    end

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

  promise
end

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

Delete a hostingEnvironment (App Service Environment).

Service Environment) contains resources response.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • force_delete (Boolean) (defaults to: nil)

    Delete even if the hostingEnvironment (App

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 292

def delete_hosting_environment(resource_group_name, name, force_delete = nil, custom_headers = nil)
  # Send request
  promise = begin_delete_hosting_environment_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_hosting_environment(resource_group_name, name, custom_headers = nil) ⇒ HostingEnvironment

Get properties of hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:



42
43
44
45
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 42

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

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

Get properties of hostingEnvironment (App Service Environment).

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (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.



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 71

def get_hosting_environment_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

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

  request_url = @base_url || @client.base_url

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

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          parsed_response = HostingEnvironment.deserialize_object(parsed_response)
        end
        result.body = parsed_response
      rescue 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_hosting_environment_capacities(resource_group_name, name, custom_headers = nil) ⇒ StampCapacityCollection

Get used, available, and total worker capacity for hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:



606
607
608
609
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 606

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

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

Get used, available, and total worker capacity for hostingEnvironment (App Service Environment).

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (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.



637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
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
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 637

def get_hosting_environment_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

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

  request_url = @base_url || @client.base_url

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

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

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

Get used, available, and total worker capacity for hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



622
623
624
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 622

def get_hosting_environment_capacities_with_http_info(resource_group_name, name, custom_headers = nil)
  get_hosting_environment_capacities_async(resource_group_name, name, custom_headers).value!
end

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

Get diagnostic information for hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:

  • (Array)

    operation results.



406
407
408
409
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 406

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

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

Get diagnostic information for hostingEnvironment (App Service Environment).

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (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.



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

def get_hosting_environment_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

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

  request_url = @base_url || @client.base_url

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

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          deserialized_array = []
          parsed_response.each do |element|
            unless element.nil?
              element = HostingEnvironmentDiagnostics.deserialize_object(element)
            end
            deserialized_array.push(element)
          end
          parsed_response = deserialized_array
        end
        result.body = parsed_response
      rescue 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_hosting_environment_diagnostics_item(resource_group_name, name, diagnostics_name, custom_headers = nil) ⇒ HostingEnvironmentDiagnostics

Get diagnostic information for hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • diagnostics_name (String)

    Name of the diagnostics

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

    A hash of custom headers that

Returns:



508
509
510
511
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 508

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

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

Get diagnostic information for hostingEnvironment (App Service Environment).

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • diagnostics_name (String)

    Name of the diagnostics

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 539

def get_hosting_environment_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'
  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' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

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

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          parsed_response = HostingEnvironmentDiagnostics.deserialize_object(parsed_response)
        end
        result.body = parsed_response
      rescue 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_hosting_environment_diagnostics_item_with_http_info(resource_group_name, name, diagnostics_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get diagnostic information for hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • diagnostics_name (String)

    Name of the diagnostics

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



524
525
526
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 524

def get_hosting_environment_diagnostics_item_with_http_info(resource_group_name, name, diagnostics_name, custom_headers = nil)
  get_hosting_environment_diagnostics_item_async(resource_group_name, name, diagnostics_name, custom_headers).value!
end

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

Get diagnostic information for hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



421
422
423
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 421

def get_hosting_environment_diagnostics_with_http_info(resource_group_name, name, custom_headers = nil)
  get_hosting_environment_diagnostics_async(resource_group_name, name, custom_headers).value!
end

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

Get global metric definitions of hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:



1255
1256
1257
1258
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1255

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

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

Get global metric definitions of hostingEnvironment (App Service Environment).

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (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.



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

def get_hosting_environment_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

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

  request_url = @base_url || @client.base_url

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

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

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

Get global metric definitions of hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1271
1272
1273
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1271

def get_hosting_environment_metric_definitions_with_http_info(resource_group_name, name, custom_headers = nil)
  get_hosting_environment_metric_definitions_async(resource_group_name, name, custom_headers).value!
end

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

Get global metrics of hostingEnvironment (App Service Environment).

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 resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • details (Boolean) (defaults to: nil)

    Include instance details

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



1148
1149
1150
1151
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1148

def get_hosting_environment_metrics(resource_group_name, name, details = nil, filter = nil, custom_headers = nil)
  response = get_hosting_environment_metrics_async(resource_group_name, name, details, filter, custom_headers).value!
  response.body unless response.nil?
end

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

Get global metrics of hostingEnvironment (App Service Environment).

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 resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • details (Boolean) (defaults to: nil)

    Include instance details

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



1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1189

def get_hosting_environment_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics'
  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,'$filter' => filter,'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

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

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          parsed_response = ResourceMetricCollection.deserialize_object(parsed_response)
        end
        result.body = parsed_response
      rescue 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_hosting_environment_metrics_with_http_info(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get global metrics of hostingEnvironment (App Service Environment).

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 resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • details (Boolean) (defaults to: nil)

    Include instance details

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



1169
1170
1171
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1169

def get_hosting_environment_metrics_with_http_info(resource_group_name, name, details = nil, filter = nil, custom_headers = nil)
  get_hosting_environment_metrics_async(resource_group_name, name, details, filter, custom_headers).value!
end

#get_hosting_environment_multi_role_metric_definitions(resource_group_name, name, custom_headers = nil) ⇒ MetricDefinitionCollection

Get metric definitions for a multiRole pool of a hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:



1704
1705
1706
1707
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1704

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

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

Get metric definitions for a multiRole pool of a hostingEnvironment (App Service Environment).

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (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.



1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1735

def get_hosting_environment_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

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

  request_url = @base_url || @client.base_url

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

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

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

Get metric definitions for a multiRole pool of a hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1720
1721
1722
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1720

def get_hosting_environment_multi_role_metric_definitions_with_http_info(resource_group_name, name, custom_headers = nil)
  get_hosting_environment_multi_role_metric_definitions_async(resource_group_name, name, custom_headers).value!
end

#get_hosting_environment_multi_role_metrics(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 multiRole pool of a hostingEnvironment (App Service Environment).

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 resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • start_time (String) (defaults to: nil)

    Beginning time of metrics query

  • end_time (String) (defaults to: nil)

    End time of metrics query

  • time_grain (String) (defaults to: nil)

    Time granularity of metrics query

  • details (Boolean) (defaults to: nil)

    Include instance details

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



1470
1471
1472
1473
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1470

def get_hosting_environment_multi_role_metrics(resource_group_name, name, start_time = nil, end_time = nil, time_grain = nil, details = nil, filter = nil, custom_headers = nil)
  response = get_hosting_environment_multi_role_metrics_async(resource_group_name, name, start_time, end_time, time_grain, details, filter, custom_headers).value!
  response.body unless response.nil?
end

#get_hosting_environment_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 multiRole pool of a hostingEnvironment (App Service Environment).

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 resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • start_time (String) (defaults to: nil)

    Beginning time of metrics query

  • end_time (String) (defaults to: nil)

    End time of metrics query

  • time_grain (String) (defaults to: nil)

    Time granularity of metrics query

  • details (Boolean) (defaults to: nil)

    Include instance details

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



1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1519

def get_hosting_environment_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics'
  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,'$filter' => filter,'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

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

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          parsed_response = ResourceMetricCollection.deserialize_object(parsed_response)
        end
        result.body = parsed_response
      rescue 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_hosting_environment_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 multiRole pool of a hostingEnvironment (App Service Environment).

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 resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • start_time (String) (defaults to: nil)

    Beginning time of metrics query

  • end_time (String) (defaults to: nil)

    End time of metrics query

  • time_grain (String) (defaults to: nil)

    Time granularity of metrics query

  • details (Boolean) (defaults to: nil)

    Include instance details

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



1495
1496
1497
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1495

def get_hosting_environment_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)
  get_hosting_environment_multi_role_metrics_async(resource_group_name, name, start_time, end_time, time_grain, details, filter, custom_headers).value!
end

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

Get usages for a multiRole pool of a hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:



1902
1903
1904
1905
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1902

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

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

Get usages for a multiRole pool of a hostingEnvironment (App Service Environment).

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (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.



1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1933

def get_hosting_environment_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

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

  request_url = @base_url || @client.base_url

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

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

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

Get usages for a multiRole pool of a hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1918
1919
1920
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1918

def get_hosting_environment_multi_role_usages_with_http_info(resource_group_name, name, custom_headers = nil)
  get_hosting_environment_multi_role_usages_async(resource_group_name, name, custom_headers).value!
end

#get_hosting_environment_operation(resource_group_name, name, operation_id, custom_headers = nil) ⇒ Object

Get status of an operation on a hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • operation_id (String)

    operation identifier GUID

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

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



1057
1058
1059
1060
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1057

def get_hosting_environment_operation(resource_group_name, name, operation_id, custom_headers = nil)
  response = get_hosting_environment_operation_async(resource_group_name, name, operation_id, custom_headers).value!
  response.body unless response.nil?
end

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

Get status of an operation on a hostingEnvironment (App Service Environment).

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • operation_id (String)

    operation identifier GUID

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1088

def get_hosting_environment_operation_async(resource_group_name, name, operation_id, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'operation_id is nil' if operation_id.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-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/{operationId}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'operationId' => operation_id,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

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

Get status of an operation on a hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • operation_id (String)

    operation identifier GUID

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1073
1074
1075
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1073

def get_hosting_environment_operation_with_http_info(resource_group_name, name, operation_id, custom_headers = nil)
  get_hosting_environment_operation_async(resource_group_name, name, operation_id, custom_headers).value!
end

#get_hosting_environment_operations(resource_group_name, name, custom_headers = nil) ⇒ Object

List all currently running operations on the hostingEnvironment (App Service Environment)

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



972
973
974
975
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 972

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

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

List all currently running operations on the hostingEnvironment (App Service Environment)

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (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.



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
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1003

def get_hosting_environment_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

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

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

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

List all currently running operations on the hostingEnvironment (App Service Environment)

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



988
989
990
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 988

def get_hosting_environment_operations_with_http_info(resource_group_name, name, custom_headers = nil)
  get_hosting_environment_operations_async(resource_group_name, name, custom_headers).value!
end

#get_hosting_environment_server_farms(resource_group_name, name, custom_headers = nil) ⇒ ServerFarmCollection

Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:



2297
2298
2299
2300
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2297

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

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

Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment).

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (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.



2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2328

def get_hosting_environment_server_farms_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

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

  request_url = @base_url || @client.base_url

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

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

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

Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2313
2314
2315
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2313

def get_hosting_environment_server_farms_with_http_info(resource_group_name, name, custom_headers = nil)
  get_hosting_environment_server_farms_async(resource_group_name, name, custom_headers).value!
end

#get_hosting_environment_sites(resource_group_name, name, properties_to_include = nil, custom_headers = nil) ⇒ SiteCollection

Get all sites on the hostingEnvironment (App Service Environment).

properties to include will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • properties_to_include (String) (defaults to: nil)

    Comma separated list of site

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

    A hash of custom headers that

Returns:



2101
2102
2103
2104
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2101

def get_hosting_environment_sites(resource_group_name, name, properties_to_include = nil, custom_headers = nil)
  response = get_hosting_environment_sites_async(resource_group_name, name, properties_to_include, custom_headers).value!
  response.body unless response.nil?
end

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

Get all sites on the hostingEnvironment (App Service Environment).

properties to include to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • properties_to_include (String) (defaults to: nil)

    Comma separated list of site

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2134

def get_hosting_environment_sites_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'
  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' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

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

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          parsed_response = SiteCollection.deserialize_object(parsed_response)
        end
        result.body = parsed_response
      rescue 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_hosting_environment_sites_with_http_info(resource_group_name, name, properties_to_include = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get all sites on the hostingEnvironment (App Service Environment).

properties to include will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • properties_to_include (String) (defaults to: nil)

    Comma separated list of site

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2118
2119
2120
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2118

def get_hosting_environment_sites_with_http_info(resource_group_name, name, properties_to_include = nil, custom_headers = nil)
  get_hosting_environment_sites_async(resource_group_name, name, properties_to_include, custom_headers).value!
end

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

Get global usages of hostingEnvironment (App Service Environment).

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 resource group

  • name (String)

    Name of hostingEnvironment (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:



1356
1357
1358
1359
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1356

def get_hosting_environment_usages(resource_group_name, name, filter = nil, custom_headers = nil)
  response = get_hosting_environment_usages_async(resource_group_name, name, filter, custom_headers).value!
  response.body unless response.nil?
end

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

Get global usages of hostingEnvironment (App Service Environment).

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 resource group

  • name (String)

    Name of hostingEnvironment (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.



1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1395

def get_hosting_environment_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'
  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: {'$filter' => filter,'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

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

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          parsed_response = CsmUsageQuotaCollection.deserialize_object(parsed_response)
        end
        result.body = parsed_response
      rescue 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_hosting_environment_usages_with_http_info(resource_group_name, name, filter = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get global usages of hostingEnvironment (App Service Environment).

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 resource group

  • name (String)

    Name of hostingEnvironment (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.



1376
1377
1378
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1376

def get_hosting_environment_usages_with_http_info(resource_group_name, name, filter = nil, custom_headers = nil)
  get_hosting_environment_usages_async(resource_group_name, name, filter, custom_headers).value!
end

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

Get IP addresses assigned to the hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:



703
704
705
706
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 703

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

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

Get IP addresses assigned to the hostingEnvironment (App Service Environment).

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (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.



734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 734

def get_hosting_environment_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

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

  request_url = @base_url || @client.base_url

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

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

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

Get IP addresses assigned to the hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



719
720
721
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 719

def get_hosting_environment_vips_with_http_info(resource_group_name, name, custom_headers = nil)
  get_hosting_environment_vips_async(resource_group_name, name, custom_headers).value!
end

#get_hosting_environment_web_hosting_plans(resource_group_name, name, custom_headers = nil) ⇒ ServerFarmCollection

Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:



2200
2201
2202
2203
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2200

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

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

Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment).

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (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.



2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2231

def get_hosting_environment_web_hosting_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

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

  request_url = @base_url || @client.base_url

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

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

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

Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2216
2217
2218
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2216

def get_hosting_environment_web_hosting_plans_with_http_info(resource_group_name, name, custom_headers = nil)
  get_hosting_environment_web_hosting_plans_async(resource_group_name, name, custom_headers).value!
end

#get_hosting_environment_web_worker_metric_definitions(resource_group_name, name, worker_pool_name, custom_headers = nil) ⇒ MetricDefinitionCollection

Get metric definitions for a worker pool of a hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

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

    A hash of custom headers that

Returns:



1802
1803
1804
1805
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1802

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

#get_hosting_environment_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 a hostingEnvironment (App Service Environment).

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1835

def get_hosting_environment_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'
  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' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

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

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          parsed_response = MetricDefinitionCollection.deserialize_object(parsed_response)
        end
        result.body = parsed_response
      rescue 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_hosting_environment_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 a hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1819
1820
1821
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1819

def get_hosting_environment_web_worker_metric_definitions_with_http_info(resource_group_name, name, worker_pool_name, custom_headers = nil)
  get_hosting_environment_web_worker_metric_definitions_async(resource_group_name, name, worker_pool_name, custom_headers).value!
end

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

Get metrics for a worker pool of a hostingEnvironment (App Service Environment).

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 resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

  • details (Boolean) (defaults to: nil)

    Include instance details

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



1592
1593
1594
1595
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1592

def get_hosting_environment_web_worker_metrics(resource_group_name, name, worker_pool_name, details = nil, filter = nil, custom_headers = nil)
  response = get_hosting_environment_web_worker_metrics_async(resource_group_name, name, worker_pool_name, details, filter, custom_headers).value!
  response.body unless response.nil?
end

#get_hosting_environment_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 hostingEnvironment (App Service Environment).

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 resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

  • details (Boolean) (defaults to: nil)

    Include instance details

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



1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1637

def get_hosting_environment_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics'
  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,'$filter' => filter,'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

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

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          parsed_response = ResourceMetricCollection.deserialize_object(parsed_response)
        end
        result.body = parsed_response
      rescue 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_hosting_environment_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 hostingEnvironment (App Service Environment).

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 resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

  • details (Boolean) (defaults to: nil)

    Include instance details

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



1615
1616
1617
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 1615

def get_hosting_environment_web_worker_metrics_with_http_info(resource_group_name, name, worker_pool_name, details = nil, filter = nil, custom_headers = nil)
  get_hosting_environment_web_worker_metrics_async(resource_group_name, name, worker_pool_name, details, filter, custom_headers).value!
end

#get_hosting_environment_web_worker_usages(resource_group_name, name, worker_pool_name, custom_headers = nil) ⇒ UsageCollection

Get usages for a worker pool of a hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

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

    A hash of custom headers that

Returns:



2000
2001
2002
2003
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2000

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

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

Get usages for a worker pool of a hostingEnvironment (App Service Environment).

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2033

def get_hosting_environment_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'
  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' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

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

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          parsed_response = UsageCollection.deserialize_object(parsed_response)
        end
        result.body = parsed_response
      rescue 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_hosting_environment_web_worker_usages_with_http_info(resource_group_name, name, worker_pool_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get usages for a worker pool of a hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2017
2018
2019
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2017

def get_hosting_environment_web_worker_usages_with_http_info(resource_group_name, name, worker_pool_name, custom_headers = nil)
  get_hosting_environment_web_worker_usages_async(resource_group_name, name, worker_pool_name, custom_headers).value!
end

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

Get properties of hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



57
58
59
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 57

def get_hosting_environment_with_http_info(resource_group_name, name, custom_headers = nil)
  get_hosting_environment_async(resource_group_name, name, custom_headers).value!
end

#get_hosting_environments(resource_group_name, custom_headers = nil) ⇒ HostingEnvironmentCollection

Get all hostingEnvironments (App Service Environments) in a resource group.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

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

    A hash of custom headers that

Returns:



798
799
800
801
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 798

def get_hosting_environments(resource_group_name, custom_headers = nil)
  response = get_hosting_environments_async(resource_group_name, custom_headers).value!
  response.body unless response.nil?
end

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

Get all hostingEnvironments (App Service Environments) in a resource group.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 825

def get_hosting_environments_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'
  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' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

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

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

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

Get all hostingEnvironments (App Service Environments) in a resource group.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



812
813
814
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 812

def get_hosting_environments_with_http_info(resource_group_name, custom_headers = nil)
  get_hosting_environments_async(resource_group_name, custom_headers).value!
end

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

Get properties of a multiRool pool.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:



2487
2488
2489
2490
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2487

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 multiRool pool.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (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.



2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2516

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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

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

  request_url = @base_url || @client.base_url

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

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          parsed_response = WorkerPool.deserialize_object(parsed_response)
        end
        result.body = parsed_response
      rescue 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_instance_metric_definitions(resource_group_name, name, instance, custom_headers = nil) ⇒ Object

Get metric definitions for a specific instance of a multiRole pool of a hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • instance (String)

    Name of instance in the multiRole pool&gt;

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

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



3572
3573
3574
3575
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3572

def get_multi_role_pool_instance_metric_definitions(resource_group_name, name, instance, custom_headers = nil)
  response = get_multi_role_pool_instance_metric_definitions_async(resource_group_name, name, instance, custom_headers).value!
  response.body unless response.nil?
end

#get_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 multiRole pool of a hostingEnvironment (App Service Environment).

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • instance (String)

    Name of instance in the multiRole pool&gt;

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3605

def get_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'
  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' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#get_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 multiRole pool of a hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • instance (String)

    Name of instance in the multiRole pool&gt;

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3589
3590
3591
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3589

def get_multi_role_pool_instance_metric_definitions_with_http_info(resource_group_name, name, instance, custom_headers = nil)
  get_multi_role_pool_instance_metric_definitions_async(resource_group_name, name, instance, custom_headers).value!
end

#get_multi_role_pool_instance_metrics(resource_group_name, name, instance, details = nil, custom_headers = nil) ⇒ Object

Get metrics for a specific instance of a multiRole pool of a hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • instance (String)

    Name of instance in the multiRole pool

  • details (Boolean) (defaults to: nil)

    Include instance details

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

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



3481
3482
3483
3484
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3481

def get_multi_role_pool_instance_metrics(resource_group_name, name, instance, details = nil, custom_headers = nil)
  response = get_multi_role_pool_instance_metrics_async(resource_group_name, name, instance, details, custom_headers).value!
  response.body unless response.nil?
end

#get_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 multiRole pool of a hostingEnvironment (App Service Environment).

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • instance (String)

    Name of instance in the multiRole pool

  • details (Boolean) (defaults to: nil)

    Include instance details

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
3557
3558
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3516

def get_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metrics'
  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' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#get_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 multiRole pool of a hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • instance (String)

    Name of instance in the multiRole pool

  • details (Boolean) (defaults to: nil)

    Include instance details

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3499
3500
3501
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3499

def get_multi_role_pool_instance_metrics_with_http_info(resource_group_name, name, instance, details = nil, custom_headers = nil)
  get_multi_role_pool_instance_metrics_async(resource_group_name, name, instance, details, custom_headers).value!
end

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

Get available skus for scaling a multiRole pool.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:



2733
2734
2735
2736
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2733

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

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

Get available skus for scaling a multiRole pool.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (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.



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

def get_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

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

  request_url = @base_url || @client.base_url

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

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

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

Get available skus for scaling a multiRole pool.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2748
2749
2750
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2748

def get_multi_role_pool_skus_with_http_info(resource_group_name, name, custom_headers = nil)
  get_multi_role_pool_skus_async(resource_group_name, name, custom_headers).value!
end

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

Get properties of a multiRool pool.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2502
2503
2504
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2502

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_multi_role_pools(resource_group_name, name, custom_headers = nil) ⇒ WorkerPoolCollection

Get all multi role pools

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:



2393
2394
2395
2396
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2393

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

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

Get all multi role pools

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (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.



2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2422

def get_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

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

  request_url = @base_url || @client.base_url

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

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

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

Get all multi role pools

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2408
2409
2410
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2408

def get_multi_role_pools_with_http_info(resource_group_name, name, custom_headers = nil)
  get_multi_role_pools_async(resource_group_name, name, custom_headers).value!
end

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

Get properties of a worker pool.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

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

    A hash of custom headers that

Returns:



2922
2923
2924
2925
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2922

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.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2953

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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'
  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' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

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

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          parsed_response = WorkerPool.deserialize_object(parsed_response)
        end
        result.body = parsed_response
      rescue 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_instance_metric_definitions(resource_group_name, name, worker_pool_name, instance, custom_headers = nil) ⇒ Object

Get metric definitions for a specific instance of a worker pool of a hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

  • instance (String)

    Name of instance in the worker pool

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

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



3388
3389
3390
3391
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3388

def get_worker_pool_instance_metric_definitions(resource_group_name, name, worker_pool_name, instance, custom_headers = nil)
  response = get_worker_pool_instance_metric_definitions_async(resource_group_name, name, worker_pool_name, instance, custom_headers).value!
  response.body unless response.nil?
end

#get_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 a hostingEnvironment (App Service Environment).

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

  • instance (String)

    Name of 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.



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
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3423

def get_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'
  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' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#get_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 a hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

  • instance (String)

    Name of 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.



3406
3407
3408
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3406

def get_worker_pool_instance_metric_definitions_with_http_info(resource_group_name, name, worker_pool_name, instance, custom_headers = nil)
  get_worker_pool_instance_metric_definitions_async(resource_group_name, name, worker_pool_name, instance, custom_headers).value!
end

#get_worker_pool_instance_metrics(resource_group_name, name, worker_pool_name, instance, details = nil, filter = nil, custom_headers = nil) ⇒ Object

Get metrics for a specific instance of a worker pool of a hostingEnvironment (App Service Environment).

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 resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

  • instance (String)

    Name of instance in the worker pool

  • details (Boolean) (defaults to: nil)

    Include instance details

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

  • (Object)

    operation results.



3283
3284
3285
3286
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3283

def get_worker_pool_instance_metrics(resource_group_name, name, worker_pool_name, instance, details = nil, filter = nil, custom_headers = nil)
  response = get_worker_pool_instance_metrics_async(resource_group_name, name, worker_pool_name, instance, details, filter, custom_headers).value!
  response.body unless response.nil?
end

#get_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 a hostingEnvironment (App Service Environment).

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 resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

  • instance (String)

    Name of instance in the worker pool

  • details (Boolean) (defaults to: nil)

    Include instance details

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



3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3330

def get_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metrics'
  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,'$filter' => filter,'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

#get_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 a hostingEnvironment (App Service Environment).

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 resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

  • instance (String)

    Name of instance in the worker pool

  • details (Boolean) (defaults to: nil)

    Include instance details

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



3307
3308
3309
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3307

def get_worker_pool_instance_metrics_with_http_info(resource_group_name, name, worker_pool_name, instance, details = nil, filter = nil, custom_headers = nil)
  get_worker_pool_instance_metrics_async(resource_group_name, name, worker_pool_name, instance, details, filter, custom_headers).value!
end

#get_worker_pool_skus(resource_group_name, name, worker_pool_name, custom_headers = nil) ⇒ SkuInfoCollection

Get available skus for scaling a worker pool.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

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

    A hash of custom headers that

Returns:



3177
3178
3179
3180
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3177

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

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

Get available skus for scaling a worker pool.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3208

def get_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'
  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' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

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

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

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          parsed_response = SkuInfoCollection.deserialize_object(parsed_response)
        end
        result.body = parsed_response
      rescue 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_skus_with_http_info(resource_group_name, name, worker_pool_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get available skus for scaling a worker pool.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



3193
3194
3195
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3193

def get_worker_pool_skus_with_http_info(resource_group_name, name, worker_pool_name, custom_headers = nil)
  get_worker_pool_skus_async(resource_group_name, name, worker_pool_name, custom_headers).value!
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.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

  • worker_pool_name (String)

    Name of worker pool

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2938
2939
2940
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2938

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

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

Get all worker pools

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:



2827
2828
2829
2830
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2827

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

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

Get all worker pools

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (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.



2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2856

def get_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

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

  request_url = @base_url || @client.base_url

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

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

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

Get all worker pools

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



2842
2843
2844
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 2842

def get_worker_pools_with_http_info(resource_group_name, name, custom_headers = nil)
  get_worker_pools_async(resource_group_name, name, custom_headers).value!
end

#reboot_hosting_environment(resource_group_name, name, custom_headers = nil) ⇒ Object

Reboots all machines in a hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



889
890
891
892
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 889

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

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

Reboots all machines in a hostingEnvironment (App Service Environment).

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (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.



918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 918

def reboot_hosting_environment_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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

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

  request_url = @base_url || @client.base_url

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

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

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

    result
  end

  promise.execute
end

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

Reboots all machines in a hostingEnvironment (App Service Environment).

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



904
905
906
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 904

def reboot_hosting_environment_with_http_info(resource_group_name, name, custom_headers = nil)
  reboot_hosting_environment_async(resource_group_name, name, custom_headers).value!
end

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

Resumes the hostingEnvironment.

response.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3790

def resume_hosting_environment(resource_group_name, name, custom_headers = nil)
  # Send request
  promise = begin_resume_hosting_environment_async(resource_group_name, name, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      unless parsed_response.nil?
        parsed_response = SiteCollection.deserialize_object(parsed_response)
      end
    end

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

  promise
end

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

Suspends the hostingEnvironment.

response.

Parameters:

  • resource_group_name (String)

    Name of resource group

  • name (String)

    Name of hostingEnvironment (App Service Environment)

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
# File 'lib/azure_mgmt_web/hosting_environments.rb', line 3657

def suspend_hosting_environment(resource_group_name, name, custom_headers = nil)
  # Send request
  promise = begin_suspend_hosting_environment_async(resource_group_name, name, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      unless parsed_response.nil?
        parsed_response = SiteCollection.deserialize_object(parsed_response)
      end
    end

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

  promise
end