Class: Azure::ARM::Web::ManagedHostingEnvironments
- Inherits:
-
Object
- Object
- Azure::ARM::Web::ManagedHostingEnvironments
- Includes:
- Models, MsRestAzure
- Defined in:
- lib/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) ⇒ Concurrent::Promise
Create or update a managed hosting environment.
-
#delete_managed_hosting_environment(resource_group_name, name, force_delete = nil, custom_headers = nil) ⇒ Concurrent::Promise
Delete a managed hosting environment.
-
#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/azure_mgmt_web/managed_hosting_environments.rb', line 25 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
30 31 32 |
# File 'lib/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.
172 173 174 175 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 172 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.
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 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 205 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? managed_hosting_environment_envelope.validate unless 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? # Serialize Request request_headers['Content-Type'] = 'application/json; charset=utf-8' unless managed_hosting_environment_envelope.nil? managed_hosting_environment_envelope = HostingEnvironment.serialize_object(managed_hosting_environment_envelope) end request_content = managed_hosting_environment_envelope != nil ? JSON.generate(managed_hosting_environment_envelope, 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) 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., 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.
189 190 191 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 189 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.
308 309 310 311 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 308 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.
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 341 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.
325 326 327 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 325 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) ⇒ Concurrent::Promise
Create or update a managed hosting environment.
of managed hosting environment for the response.
response.
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 141 def create_or_update_managed_hosting_environment(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| 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 |
#delete_managed_hosting_environment(resource_group_name, name, force_delete = nil, custom_headers = nil) ⇒ Concurrent::Promise
Delete a managed hosting environment.
contains resources response.
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 280 def delete_managed_hosting_environment(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| 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/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/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) unless parsed_response.nil? parsed_response = ManagedHostingEnvironment.deserialize_object(parsed_response) end result.body = parsed_response 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.
579 580 581 582 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 579 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.
610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 610 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.
595 596 597 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 595 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.
858 859 860 861 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 858 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.
887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 887 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) 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., 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.
873 874 875 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 873 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.
666 667 668 669 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 666 def get_managed_hosting_environment_sites(resource_group_name, name, properties_to_include = nil, custom_headers = nil) response = get_managed_hosting_environment_sites_async(resource_group_name, name, properties_to_include, custom_headers).value! response.body unless response.nil? 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.
699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 699 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) 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., 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.
683 684 685 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 683 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.
484 485 486 487 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 484 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.
513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 513 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) 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., 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.
499 500 501 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 499 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.
764 765 766 767 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 764 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.
793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 793 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) 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., 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.
779 780 781 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 779 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/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.
393 394 395 396 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 393 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.
420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 420 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) 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., 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.
407 408 409 |
# File 'lib/azure_mgmt_web/managed_hosting_environments.rb', line 407 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 |