Class: Azure::CDN::Mgmt::V2020_04_15::CustomDomains
- Inherits:
-
Object
- Object
- Azure::CDN::Mgmt::V2020_04_15::CustomDomains
- Includes:
- MsRestAzure
- Defined in:
- lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb
Overview
Cdn Management Client
Instance Attribute Summary collapse
-
#client ⇒ CdnManagementClient
readonly
Reference to the CdnManagementClient.
Instance Method Summary collapse
-
#begin_create(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers: nil) ⇒ CustomDomain
Creates a new custom domain within an endpoint.
-
#begin_create_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers: nil) ⇒ Concurrent::Promise
Creates a new custom domain within an endpoint.
-
#begin_create_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates a new custom domain within an endpoint.
-
#begin_delete(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers: nil) ⇒ CustomDomain
Deletes an existing custom domain within an endpoint.
-
#begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes an existing custom domain within an endpoint.
-
#begin_delete_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes an existing custom domain within an endpoint.
-
#create(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers: nil) ⇒ CustomDomain
Creates a new custom domain within an endpoint.
-
#create_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers: nil) ⇒ Concurrent::Promise
Azure subscription.
-
#delete(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers: nil) ⇒ CustomDomain
Deletes an existing custom domain within an endpoint.
-
#delete_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers: nil) ⇒ Concurrent::Promise
Azure subscription.
-
#disable_custom_https(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers: nil) ⇒ CustomDomain
Disable https delivery of the custom domain.
-
#disable_custom_https_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers: nil) ⇒ Concurrent::Promise
Disable https delivery of the custom domain.
-
#disable_custom_https_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Disable https delivery of the custom domain.
-
#enable_custom_https(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_https_parameters: nil, custom_headers: nil) ⇒ CustomDomain
Enable https delivery of the custom domain.
-
#enable_custom_https_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_https_parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
Enable https delivery of the custom domain.
-
#enable_custom_https_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_https_parameters: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Enable https delivery of the custom domain.
-
#get(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers: nil) ⇒ CustomDomain
Gets an existing custom domain within an endpoint.
-
#get_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets an existing custom domain within an endpoint.
-
#get_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets an existing custom domain within an endpoint.
-
#initialize(client) ⇒ CustomDomains
constructor
Creates and initializes a new instance of the CustomDomains class.
-
#list_by_endpoint(resource_group_name, profile_name, endpoint_name, custom_headers: nil) ⇒ Array<CustomDomain>
Lists all of the existing custom domains within an endpoint.
-
#list_by_endpoint_as_lazy(resource_group_name, profile_name, endpoint_name, custom_headers: nil) ⇒ CustomDomainListResult
Lists all of the existing custom domains within an endpoint.
-
#list_by_endpoint_async(resource_group_name, profile_name, endpoint_name, custom_headers: nil) ⇒ Concurrent::Promise
Lists all of the existing custom domains within an endpoint.
-
#list_by_endpoint_next(next_page_link, custom_headers: nil) ⇒ CustomDomainListResult
Lists all of the existing custom domains within an endpoint.
-
#list_by_endpoint_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists all of the existing custom domains within an endpoint.
-
#list_by_endpoint_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists all of the existing custom domains within an endpoint.
-
#list_by_endpoint_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists all of the existing custom domains within an endpoint.
Constructor Details
#initialize(client) ⇒ CustomDomains
Creates and initializes a new instance of the CustomDomains class.
17 18 19 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ CdnManagementClient (readonly)
Returns reference to the CdnManagementClient.
22 23 24 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 22 def client @client end |
Instance Method Details
#begin_create(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers: nil) ⇒ CustomDomain
Creates a new custom domain within an endpoint.
Azure subscription. the resource group. unique globally. endpoint. to create a new custom domain. will be added to the HTTP request.
634 635 636 637 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 634 def begin_create(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers:nil) response = begin_create_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_create_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers: nil) ⇒ Concurrent::Promise
Creates a new custom domain within an endpoint.
Azure subscription. the resource group. unique globally. endpoint. to create a new custom domain. to the HTTP request.
679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 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 753 754 755 756 757 758 759 760 761 762 763 764 765 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 679 def begin_create_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'profile_name is nil' if profile_name.nil? fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil? fail ArgumentError, 'custom_domain_name is nil' if custom_domain_name.nil? fail ArgumentError, 'custom_domain_properties is nil' if custom_domain_properties.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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CustomDomainParameters.mapper() request_content = @client.serialize(request_mapper, custom_domain_properties) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'customDomainName' => custom_domain_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 201 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CustomDomain.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CustomDomain.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CustomDomain.mapper() result.body = @client.deserialize(result_mapper, 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_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates a new custom domain within an endpoint.
Azure subscription. the resource group. unique globally. endpoint. to create a new custom domain. will be added to the HTTP request.
657 658 659 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 657 def begin_create_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers:nil) begin_create_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers:custom_headers).value! end |
#begin_delete(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers: nil) ⇒ CustomDomain
Deletes an existing custom domain within an endpoint.
Azure subscription. the resource group. unique globally. endpoint. will be added to the HTTP request.
783 784 785 786 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 783 def begin_delete(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:nil) response = begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes an existing custom domain within an endpoint.
Azure subscription. the resource group. unique globally. endpoint. to the HTTP request.
824 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 878 879 880 881 882 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 824 def begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'profile_name is nil' if profile_name.nil? fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil? fail ArgumentError, 'custom_domain_name is nil' if custom_domain_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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'customDomainName' => custom_domain_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 || status_code == 204 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CustomDomain.mapper() result.body = @client.deserialize(result_mapper, 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_delete_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes an existing custom domain within an endpoint.
Azure subscription. the resource group. unique globally. endpoint. will be added to the HTTP request.
804 805 806 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 804 def begin_delete_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:nil) begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:custom_headers).value! end |
#create(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers: nil) ⇒ CustomDomain
Creates a new custom domain within an endpoint.
Azure subscription. the resource group. unique globally. endpoint. to create a new custom domain. will be added to the HTTP request.
269 270 271 272 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 269 def create(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers:nil) response = create_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers: nil) ⇒ Concurrent::Promise
Azure subscription. the resource group. unique globally. endpoint. to create a new custom domain. will be added to the HTTP request.
response.
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 291 def create_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers:nil) # Send request promise = begin_create_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_properties, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CustomDomain.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#delete(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers: nil) ⇒ CustomDomain
Deletes an existing custom domain within an endpoint.
Azure subscription. the resource group. unique globally. endpoint. will be added to the HTTP request.
325 326 327 328 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 325 def delete(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:nil) response = delete_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#delete_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers: nil) ⇒ Concurrent::Promise
Azure subscription. the resource group. unique globally. endpoint. will be added to the HTTP request.
response.
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 345 def delete_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:nil) # Send request promise = begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CustomDomain.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#disable_custom_https(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers: nil) ⇒ CustomDomain
Disable https delivery of the custom domain.
Azure subscription. the resource group. unique globally. endpoint. will be added to the HTTP request.
379 380 381 382 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 379 def disable_custom_https(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:nil) response = disable_custom_https_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#disable_custom_https_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers: nil) ⇒ Concurrent::Promise
Disable https delivery of the custom domain.
Azure subscription. the resource group. unique globally. endpoint. 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 473 474 475 476 477 478 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 420 def disable_custom_https_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'profile_name is nil' if profile_name.nil? fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil? fail ArgumentError, 'custom_domain_name is nil' if custom_domain_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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'customDomainName' => custom_domain_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CustomDomain.mapper() result.body = @client.deserialize(result_mapper, 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 |
#disable_custom_https_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Disable https delivery of the custom domain.
Azure subscription. the resource group. unique globally. endpoint. will be added to the HTTP request.
400 401 402 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 400 def disable_custom_https_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:nil) disable_custom_https_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:custom_headers).value! end |
#enable_custom_https(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_https_parameters: nil, custom_headers: nil) ⇒ CustomDomain
Enable https delivery of the custom domain.
Azure subscription. the resource group. unique globally. endpoint. configuration specifying how to enable HTTPS for the custom domain - using CDN managed certificate or user’s own certificate. If not specified, enabling ssl uses CDN managed certificate by default. will be added to the HTTP request.
500 501 502 503 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 500 def enable_custom_https(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_https_parameters:nil, custom_headers:nil) response = enable_custom_https_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_https_parameters:custom_domain_https_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#enable_custom_https_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_https_parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
Enable https delivery of the custom domain.
Azure subscription. the resource group. unique globally. endpoint. configuration specifying how to enable HTTPS for the custom domain - using CDN managed certificate or user’s own certificate. If not specified, enabling ssl uses CDN managed certificate by default. to the HTTP request.
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 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 549 def enable_custom_https_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_https_parameters:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'profile_name is nil' if profile_name.nil? fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil? fail ArgumentError, 'custom_domain_name is nil' if custom_domain_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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CustomDomainHttpsParameters.mapper() request_content = @client.serialize(request_mapper, custom_domain_https_parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'customDomainName' => custom_domain_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CustomDomain.mapper() result.body = @client.deserialize(result_mapper, 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 |
#enable_custom_https_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_https_parameters: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Enable https delivery of the custom domain.
Azure subscription. the resource group. unique globally. endpoint. configuration specifying how to enable HTTPS for the custom domain - using CDN managed certificate or user’s own certificate. If not specified, enabling ssl uses CDN managed certificate by default. will be added to the HTTP request.
525 526 527 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 525 def enable_custom_https_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_https_parameters:nil, custom_headers:nil) enable_custom_https_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_https_parameters:custom_domain_https_parameters, custom_headers:custom_headers).value! end |
#get(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers: nil) ⇒ CustomDomain
Gets an existing custom domain within an endpoint.
Azure subscription. the resource group. unique globally. endpoint. will be added to the HTTP request.
150 151 152 153 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 150 def get(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:nil) response = get_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets an existing custom domain within an endpoint.
Azure subscription. the resource group. unique globally. endpoint. to the HTTP request.
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 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 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 191 def get_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'profile_name is nil' if profile_name.nil? fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil? fail ArgumentError, 'custom_domain_name is nil' if custom_domain_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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'customDomainName' => custom_domain_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CustomDomain.mapper() result.body = @client.deserialize(result_mapper, 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_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets an existing custom domain within an endpoint.
Azure subscription. the resource group. unique globally. endpoint. will be added to the HTTP request.
171 172 173 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 171 def get_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:nil) get_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers:custom_headers).value! end |
#list_by_endpoint(resource_group_name, profile_name, endpoint_name, custom_headers: nil) ⇒ Array<CustomDomain>
Lists all of the existing custom domains within an endpoint.
Azure subscription. the resource group. unique globally. will be added to the HTTP request.
38 39 40 41 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 38 def list_by_endpoint(resource_group_name, profile_name, endpoint_name, custom_headers:nil) first_page = list_by_endpoint_as_lazy(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers) first_page.get_all_items end |
#list_by_endpoint_as_lazy(resource_group_name, profile_name, endpoint_name, custom_headers: nil) ⇒ CustomDomainListResult
Lists all of the existing custom domains within an endpoint.
Azure subscription. the resource group. unique globally. will be added to the HTTP request.
response.
989 990 991 992 993 994 995 996 997 998 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 989 def list_by_endpoint_as_lazy(resource_group_name, profile_name, endpoint_name, custom_headers:nil) response = list_by_endpoint_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_endpoint_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_by_endpoint_async(resource_group_name, profile_name, endpoint_name, custom_headers: nil) ⇒ Concurrent::Promise
Lists all of the existing custom domains within an endpoint.
Azure subscription. the resource group. unique globally. to the HTTP request.
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 125 126 127 128 129 130 131 132 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 75 def list_by_endpoint_async(resource_group_name, profile_name, endpoint_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'profile_name is nil' if profile_name.nil? fail ArgumentError, 'endpoint_name is nil' if endpoint_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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CustomDomainListResult.mapper() result.body = @client.deserialize(result_mapper, 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 |
#list_by_endpoint_next(next_page_link, custom_headers: nil) ⇒ CustomDomainListResult
Lists all of the existing custom domains within an endpoint.
to List operation. will be added to the HTTP request.
894 895 896 897 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 894 def list_by_endpoint_next(next_page_link, custom_headers:nil) response = list_by_endpoint_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_endpoint_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists all of the existing custom domains within an endpoint.
to List operation. to the HTTP request.
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 960 961 962 963 964 965 966 967 968 969 970 971 972 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 923 def list_by_endpoint_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CustomDomainListResult.mapper() result.body = @client.deserialize(result_mapper, 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 |
#list_by_endpoint_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists all of the existing custom domains within an endpoint.
to List operation. will be added to the HTTP request.
909 910 911 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 909 def list_by_endpoint_next_with_http_info(next_page_link, custom_headers:nil) list_by_endpoint_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_by_endpoint_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists all of the existing custom domains within an endpoint.
Azure subscription. the resource group. unique globally. will be added to the HTTP request.
57 58 59 |
# File 'lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb', line 57 def list_by_endpoint_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers:nil) list_by_endpoint_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value! end |