Class: Azure::ARM::Web::ManagedHostingEnvironments
- Inherits:
-
Object
- Object
- Azure::ARM::Web::ManagedHostingEnvironments
- Includes:
- Models, MsRestAzure
- Defined in:
- lib/generated/azure_mgmt_web/managed_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
-
#client ⇒ Object
readonly
Reference to the WebSiteManagementClient.
Instance Method Summary collapse
-
#begin_create_or_update_managed_hosting_environment(resource_group_name, name, managed_hosting_environment_envelope, custom_headers = nil) ⇒ HostingEnvironment
Create or update a managed hosting environment.
-
#begin_create_or_update_managed_hosting_environment_async(resource_group_name, name, managed_hosting_environment_envelope, custom_headers = nil) ⇒ Concurrent::Promise
Create or update a managed hosting environment.
-
#begin_create_or_update_managed_hosting_environment_with_http_info(resource_group_name, name, managed_hosting_environment_envelope, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Create or update a managed hosting environment.
-
#begin_delete_managed_hosting_environment(resource_group_name, name, force_delete = nil, custom_headers = nil) ⇒ Object
Delete a managed hosting environment.
-
#begin_delete_managed_hosting_environment_async(resource_group_name, name, force_delete = nil, custom_headers = nil) ⇒ Concurrent::Promise
Delete a managed hosting environment.
-
#begin_delete_managed_hosting_environment_with_http_info(resource_group_name, name, force_delete = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Delete a managed hosting environment.
-
#create_or_update_managed_hosting_environment(resource_group_name, name, managed_hosting_environment_envelope, custom_headers = nil) ⇒ HostingEnvironment
Create or update a managed hosting environment.
-
#create_or_update_managed_hosting_environment_async(resource_group_name, name, managed_hosting_environment_envelope, custom_headers = nil) ⇒ Concurrent::Promise
of managed hosting environment will be added to the HTTP request.
-
#delete_managed_hosting_environment(resource_group_name, name, force_delete = nil, custom_headers = nil) ⇒ Object
Delete a managed hosting environment.
-
#delete_managed_hosting_environment_async(resource_group_name, name, force_delete = nil, custom_headers = nil) ⇒ Concurrent::Promise
contains resources will be added to the HTTP request.
-
#get_managed_hosting_environment(resource_group_name, name, custom_headers = nil) ⇒ ManagedHostingEnvironment
Get properties of a managed hosting environment.
-
#get_managed_hosting_environment_async(resource_group_name, name, custom_headers = nil) ⇒ Concurrent::Promise
Get properties of a managed hosting environment.
-
#get_managed_hosting_environment_operation(resource_group_name, name, operation_id, custom_headers = nil) ⇒ Object
Get status of an operation on a managed hosting environment.
-
#get_managed_hosting_environment_operation_async(resource_group_name, name, operation_id, custom_headers = nil) ⇒ Concurrent::Promise
Get status of an operation on a managed hosting environment.
-
#get_managed_hosting_environment_operation_with_http_info(resource_group_name, name, operation_id, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Get status of an operation on a managed hosting environment.
-
#get_managed_hosting_environment_server_farms(resource_group_name, name, custom_headers = nil) ⇒ ServerFarmCollection
Get all serverfarms (App Service Plans) on the managed hosting environment.
-
#get_managed_hosting_environment_server_farms_async(resource_group_name, name, custom_headers = nil) ⇒ Concurrent::Promise
Get all serverfarms (App Service Plans) on the managed hosting environment.
-
#get_managed_hosting_environment_server_farms_with_http_info(resource_group_name, name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Get all serverfarms (App Service Plans) on the managed hosting environment.
-
#get_managed_hosting_environment_sites(resource_group_name, name, properties_to_include = nil, custom_headers = nil) ⇒ SiteCollection
Get all sites on the managed hosting environment.
-
#get_managed_hosting_environment_sites_async(resource_group_name, name, properties_to_include = nil, custom_headers = nil) ⇒ Concurrent::Promise
Get all sites on the managed hosting environment.
-
#get_managed_hosting_environment_sites_with_http_info(resource_group_name, name, properties_to_include = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Get all sites on the managed hosting environment.
-
#get_managed_hosting_environment_vips(resource_group_name, name, custom_headers = nil) ⇒ AddressResponse
Get list of ip addresses assigned to a managed hosting environment.
-
#get_managed_hosting_environment_vips_async(resource_group_name, name, custom_headers = nil) ⇒ Concurrent::Promise
Get list of ip addresses assigned to a managed hosting environment.
-
#get_managed_hosting_environment_vips_with_http_info(resource_group_name, name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Get list of ip addresses assigned to a managed hosting environment.
-
#get_managed_hosting_environment_web_hosting_plans(resource_group_name, name, custom_headers = nil) ⇒ ServerFarmCollection
Get all serverfarms (App Service Plans) on the managed hosting environment.
-
#get_managed_hosting_environment_web_hosting_plans_async(resource_group_name, name, custom_headers = nil) ⇒ Concurrent::Promise
Get all serverfarms (App Service Plans) on the managed hosting environment.
-
#get_managed_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 managed hosting environment.
-
#get_managed_hosting_environment_with_http_info(resource_group_name, name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Get properties of a managed hosting environment.
-
#get_managed_hosting_environments(resource_group_name, custom_headers = nil) ⇒ HostingEnvironmentCollection
Get all managed hosting environments in a resource group.
-
#get_managed_hosting_environments_async(resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Get all managed hosting environments in a resource group.
-
#get_managed_hosting_environments_with_http_info(resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Get all managed hosting environments in a resource group.
-
#initialize(client) ⇒ ManagedHostingEnvironments
constructor
Creates and initializes a new instance of the ManagedHostingEnvironments class.
Constructor Details
#initialize(client) ⇒ ManagedHostingEnvironments
Creates and initializes a new instance of the ManagedHostingEnvironments class.
25 26 27 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 25 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns reference to the WebSiteManagementClient.
30 31 32 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 30 def client @client end |
Instance Method Details
#begin_create_or_update_managed_hosting_environment(resource_group_name, name, managed_hosting_environment_envelope, custom_headers = nil) ⇒ HostingEnvironment
Create or update a managed hosting environment.
of managed hosting environment will be added to the HTTP request.
184 185 186 187 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 184 def begin_create_or_update_managed_hosting_environment(resource_group_name, name, managed_hosting_environment_envelope, custom_headers = nil) response = begin_create_or_update_managed_hosting_environment_async(resource_group_name, name, managed_hosting_environment_envelope, custom_headers).value! response.body unless response.nil? end |
#begin_create_or_update_managed_hosting_environment_async(resource_group_name, name, managed_hosting_environment_envelope, custom_headers = nil) ⇒ Concurrent::Promise
Create or update a managed hosting environment.
of managed hosting environment to the HTTP request.
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/generated/azure_mgmt_web/managed_hosting_environments.rb', line 217 def begin_create_or_update_managed_hosting_environment_async(resource_group_name, name, managed_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, 'managed_hosting_environment_envelope is nil' if managed_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? request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request request_mapper = HostingEnvironment.mapper() request_content = @client.serialize(request_mapper, managed_hosting_environment_envelope, 'managed_hosting_environment_envelope') request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}' = { 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, ) 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? # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = HostingEnvironment.mapper() result.body = @client.deserialize(result_mapper, parsed_response, 'result.body') rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_create_or_update_managed_hosting_environment_with_http_info(resource_group_name, name, managed_hosting_environment_envelope, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Create or update a managed hosting environment.
of managed hosting environment will be added to the HTTP request.
201 202 203 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 201 def begin_create_or_update_managed_hosting_environment_with_http_info(resource_group_name, name, managed_hosting_environment_envelope, custom_headers = nil) begin_create_or_update_managed_hosting_environment_async(resource_group_name, name, managed_hosting_environment_envelope, custom_headers).value! end |
#begin_delete_managed_hosting_environment(resource_group_name, name, force_delete = nil, custom_headers = nil) ⇒ Object
Delete a managed hosting environment.
contains resources will be added to the HTTP request.
346 347 348 349 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 346 def begin_delete_managed_hosting_environment(resource_group_name, name, force_delete = nil, custom_headers = nil) response = begin_delete_managed_hosting_environment_async(resource_group_name, name, force_delete, custom_headers).value! response.body unless response.nil? end |
#begin_delete_managed_hosting_environment_async(resource_group_name, name, force_delete = nil, custom_headers = nil) ⇒ Concurrent::Promise
Delete a managed hosting environment.
contains resources to the HTTP request.
379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 379 def begin_delete_managed_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/managedHostingEnvironments/{name}' = { 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, ) 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 |
#begin_delete_managed_hosting_environment_with_http_info(resource_group_name, name, force_delete = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Delete a managed hosting environment.
contains resources will be added to the HTTP request.
363 364 365 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 363 def begin_delete_managed_hosting_environment_with_http_info(resource_group_name, name, force_delete = nil, custom_headers = nil) begin_delete_managed_hosting_environment_async(resource_group_name, name, force_delete, custom_headers).value! end |
#create_or_update_managed_hosting_environment(resource_group_name, name, managed_hosting_environment_envelope, custom_headers = nil) ⇒ HostingEnvironment
Create or update a managed hosting environment.
of managed hosting environment will be added to the HTTP request.
138 139 140 141 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 138 def create_or_update_managed_hosting_environment(resource_group_name, name, managed_hosting_environment_envelope, custom_headers = nil) response = create_or_update_managed_hosting_environment_async(resource_group_name, name, managed_hosting_environment_envelope, custom_headers).value! response.body unless response.nil? end |
#create_or_update_managed_hosting_environment_async(resource_group_name, name, managed_hosting_environment_envelope, custom_headers = nil) ⇒ Concurrent::Promise
of managed hosting environment will be added to the HTTP request.
response.
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 154 def create_or_update_managed_hosting_environment_async(resource_group_name, name, managed_hosting_environment_envelope, custom_headers = nil) # Send request promise = begin_create_or_update_managed_hosting_environment_async(resource_group_name, name, managed_hosting_environment_envelope, custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = HostingEnvironment.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response') end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#delete_managed_hosting_environment(resource_group_name, name, force_delete = nil, custom_headers = nil) ⇒ Object
Delete a managed hosting environment.
contains resources will be added to the HTTP request.
294 295 296 297 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 294 def delete_managed_hosting_environment(resource_group_name, name, force_delete = nil, custom_headers = nil) response = delete_managed_hosting_environment_async(resource_group_name, name, force_delete, custom_headers).value! response.body unless response.nil? end |
#delete_managed_hosting_environment_async(resource_group_name, name, force_delete = nil, custom_headers = nil) ⇒ Concurrent::Promise
contains resources will be added to the HTTP request.
response.
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 310 def delete_managed_hosting_environment_async(resource_group_name, name, force_delete = nil, custom_headers = nil) # Send request promise = begin_delete_managed_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| result_mapper = { required: false, serialized_name: 'parsed_response', type: { name: 'Object' } } parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response') end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#get_managed_hosting_environment(resource_group_name, name, custom_headers = nil) ⇒ ManagedHostingEnvironment
Get properties of a managed hosting environment.
will be added to the HTTP request.
42 43 44 45 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 42 def get_managed_hosting_environment(resource_group_name, name, custom_headers = nil) response = get_managed_hosting_environment_async(resource_group_name, name, custom_headers).value! response.body unless response.nil? end |
#get_managed_hosting_environment_async(resource_group_name, name, custom_headers = nil) ⇒ Concurrent::Promise
Get properties of a managed hosting environment.
to the HTTP request.
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/generated/azure_mgmt_web/managed_hosting_environments.rb', line 71 def get_managed_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/managedHostingEnvironments/{name}' = { 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, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = ManagedHostingEnvironment.mapper() result.body = @client.deserialize(result_mapper, parsed_response, 'result.body') rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_managed_hosting_environment_operation(resource_group_name, name, operation_id, custom_headers = nil) ⇒ Object
Get status of an operation on a managed hosting environment.
will be added to the HTTP request.
619 620 621 622 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 619 def get_managed_hosting_environment_operation(resource_group_name, name, operation_id, custom_headers = nil) response = get_managed_hosting_environment_operation_async(resource_group_name, name, operation_id, custom_headers).value! response.body unless response.nil? end |
#get_managed_hosting_environment_operation_async(resource_group_name, name, operation_id, custom_headers = nil) ⇒ Concurrent::Promise
Get status of an operation on a managed hosting environment.
to the HTTP request.
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 691 692 693 694 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 650 def get_managed_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/managedHostingEnvironments/{name}/operations/{operationId}' = { 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, ) 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_managed_hosting_environment_operation_with_http_info(resource_group_name, name, operation_id, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Get status of an operation on a managed hosting environment.
will be added to the HTTP request.
635 636 637 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 635 def get_managed_hosting_environment_operation_with_http_info(resource_group_name, name, operation_id, custom_headers = nil) get_managed_hosting_environment_operation_async(resource_group_name, name, operation_id, custom_headers).value! end |
#get_managed_hosting_environment_server_farms(resource_group_name, name, custom_headers = nil) ⇒ ServerFarmCollection
Get all serverfarms (App Service Plans) on the managed hosting environment.
will be added to the HTTP request.
900 901 902 903 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 900 def get_managed_hosting_environment_server_farms(resource_group_name, name, custom_headers = nil) response = get_managed_hosting_environment_server_farms_async(resource_group_name, name, custom_headers).value! response.body unless response.nil? end |
#get_managed_hosting_environment_server_farms_async(resource_group_name, name, custom_headers = nil) ⇒ Concurrent::Promise
Get all serverfarms (App Service Plans) on the managed hosting environment.
to the HTTP request.
929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 929 def get_managed_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/managedHostingEnvironments/{name}/serverfarms' = { 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, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = ServerFarmCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response, 'result.body') rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_managed_hosting_environment_server_farms_with_http_info(resource_group_name, name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Get all serverfarms (App Service Plans) on the managed hosting environment.
will be added to the HTTP request.
915 916 917 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 915 def get_managed_hosting_environment_server_farms_with_http_info(resource_group_name, name, custom_headers = nil) get_managed_hosting_environment_server_farms_async(resource_group_name, name, custom_headers).value! end |
#get_managed_hosting_environment_sites(resource_group_name, name, properties_to_include = nil, custom_headers = nil) ⇒ SiteCollection
Get all sites on the managed hosting environment.
properties to include will be added to the HTTP request.
708 709 710 711 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 708 def get_managed_hosting_environment_sites(resource_group_name, name, properties_to_include = nil, custom_headers = nil) first_page = get_managed_hosting_environment_sites_as_lazy(resource_group_name, name, properties_to_include, custom_headers) first_page.get_all_items end |
#get_managed_hosting_environment_sites_async(resource_group_name, name, properties_to_include = nil, custom_headers = nil) ⇒ Concurrent::Promise
Get all sites on the managed hosting environment.
properties to include to the HTTP request.
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 788 789 790 791 792 793 794 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 741 def get_managed_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/managedHostingEnvironments/{name}/sites' = { 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, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = SiteCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response, 'result.body') rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_managed_hosting_environment_sites_with_http_info(resource_group_name, name, properties_to_include = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Get all sites on the managed hosting environment.
properties to include will be added to the HTTP request.
725 726 727 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 725 def get_managed_hosting_environment_sites_with_http_info(resource_group_name, name, properties_to_include = nil, custom_headers = nil) get_managed_hosting_environment_sites_async(resource_group_name, name, properties_to_include, custom_headers).value! end |
#get_managed_hosting_environment_vips(resource_group_name, name, custom_headers = nil) ⇒ AddressResponse
Get list of ip addresses assigned to a managed hosting environment
will be added to the HTTP request.
524 525 526 527 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 524 def get_managed_hosting_environment_vips(resource_group_name, name, custom_headers = nil) response = get_managed_hosting_environment_vips_async(resource_group_name, name, custom_headers).value! response.body unless response.nil? end |
#get_managed_hosting_environment_vips_async(resource_group_name, name, custom_headers = nil) ⇒ Concurrent::Promise
Get list of ip addresses assigned to a managed hosting environment
to the HTTP request.
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 594 595 596 597 598 599 600 601 602 603 604 605 606 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 553 def get_managed_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/managedHostingEnvironments/{name}/capacities/virtualip' = { 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, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = AddressResponse.mapper() result.body = @client.deserialize(result_mapper, parsed_response, 'result.body') rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_managed_hosting_environment_vips_with_http_info(resource_group_name, name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Get list of ip addresses assigned to a managed hosting environment
will be added to the HTTP request.
539 540 541 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 539 def get_managed_hosting_environment_vips_with_http_info(resource_group_name, name, custom_headers = nil) get_managed_hosting_environment_vips_async(resource_group_name, name, custom_headers).value! end |
#get_managed_hosting_environment_web_hosting_plans(resource_group_name, name, custom_headers = nil) ⇒ ServerFarmCollection
Get all serverfarms (App Service Plans) on the managed hosting environment.
will be added to the HTTP request.
806 807 808 809 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 806 def get_managed_hosting_environment_web_hosting_plans(resource_group_name, name, custom_headers = nil) response = get_managed_hosting_environment_web_hosting_plans_async(resource_group_name, name, custom_headers).value! response.body unless response.nil? end |
#get_managed_hosting_environment_web_hosting_plans_async(resource_group_name, name, custom_headers = nil) ⇒ Concurrent::Promise
Get all serverfarms (App Service Plans) on the managed hosting environment.
to the HTTP request.
835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 835 def get_managed_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/managedHostingEnvironments/{name}/webhostingplans' = { 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, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = ServerFarmCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response, 'result.body') rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_managed_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 managed hosting environment.
will be added to the HTTP request.
821 822 823 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 821 def get_managed_hosting_environment_web_hosting_plans_with_http_info(resource_group_name, name, custom_headers = nil) get_managed_hosting_environment_web_hosting_plans_async(resource_group_name, name, custom_headers).value! end |
#get_managed_hosting_environment_with_http_info(resource_group_name, name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Get properties of a managed hosting environment.
will be added to the HTTP request.
57 58 59 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 57 def get_managed_hosting_environment_with_http_info(resource_group_name, name, custom_headers = nil) get_managed_hosting_environment_async(resource_group_name, name, custom_headers).value! end |
#get_managed_hosting_environments(resource_group_name, custom_headers = nil) ⇒ HostingEnvironmentCollection
Get all managed hosting environments in a resource group.
will be added to the HTTP request.
433 434 435 436 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 433 def get_managed_hosting_environments(resource_group_name, custom_headers = nil) response = get_managed_hosting_environments_async(resource_group_name, custom_headers).value! response.body unless response.nil? end |
#get_managed_hosting_environments_async(resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Get all managed hosting environments in a resource group.
to the HTTP request.
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 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 460 def get_managed_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/managedHostingEnvironments' = { 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, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = HostingEnvironmentCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response, 'result.body') rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_managed_hosting_environments_with_http_info(resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Get all managed hosting environments in a resource group.
will be added to the HTTP request.
447 448 449 |
# File 'lib/generated/azure_mgmt_web/managed_hosting_environments.rb', line 447 def get_managed_hosting_environments_with_http_info(resource_group_name, custom_headers = nil) get_managed_hosting_environments_async(resource_group_name, custom_headers).value! end |