Class: Azure::CDN::Mgmt::V2015_06_01::Endpoints
- Inherits:
-
Object
- Object
- Azure::CDN::Mgmt::V2015_06_01::Endpoints
- Includes:
- MsRestAzure
- Defined in:
- lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb
Overview
Use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must make sure that requests made to these resources are secure. For more information, see msdn.microsoft.com/en-us/library/azure/dn790557.aspx.
Instance Attribute Summary collapse
-
#client ⇒ CdnManagementClient
readonly
Reference to the CdnManagementClient.
Instance Method Summary collapse
-
#begin_create(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ Endpoint
Creates a new CDN endpoint with the specified parameters.
-
#begin_create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Creates a new CDN endpoint with the specified parameters.
-
#begin_create_with_http_info(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Creates a new CDN endpoint with the specified parameters.
-
#begin_delete_if_exists(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Object
Deletes an existing CDN endpoint with the specified parameters.
-
#begin_delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Deletes an existing CDN endpoint with the specified parameters.
-
#begin_delete_if_exists_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes an existing CDN endpoint with the specified parameters.
-
#begin_load_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) ⇒ Object
Forcibly pre-loads CDN endpoint content.
-
#begin_load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Forcibly pre-loads CDN endpoint content.
-
#begin_load_content_with_http_info(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Forcibly pre-loads CDN endpoint content.
-
#begin_purge_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) ⇒ Object
Forcibly purges CDN endpoint content.
-
#begin_purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Forcibly purges CDN endpoint content.
-
#begin_purge_content_with_http_info(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Forcibly purges CDN endpoint content.
-
#begin_start(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Endpoint
Starts an existing stopped CDN endpoint.
-
#begin_start_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Starts an existing stopped CDN endpoint.
-
#begin_start_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Starts an existing stopped CDN endpoint.
-
#begin_stop(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Endpoint
Stops an existing running CDN endpoint.
-
#begin_stop_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Stops an existing running CDN endpoint.
-
#begin_stop_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Stops an existing running CDN endpoint.
-
#begin_update(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ Endpoint
Updates an existing CDN endpoint with the specified parameters.
-
#begin_update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Updates an existing CDN endpoint with the specified parameters.
-
#begin_update_with_http_info(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Updates an existing CDN endpoint with the specified parameters.
-
#create(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ Endpoint
Creates a new CDN endpoint with the specified parameters.
-
#create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
group.
-
#delete_if_exists(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Object
Deletes an existing CDN endpoint with the specified parameters.
-
#delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
group.
-
#get(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Endpoint
Gets an existing CDN endpoint with the specified parameters.
-
#get_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Gets an existing CDN endpoint with the specified parameters.
-
#get_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets an existing CDN endpoint with the specified parameters.
-
#initialize(client) ⇒ Endpoints
constructor
Creates and initializes a new instance of the Endpoints class.
-
#list_by_profile(profile_name, resource_group_name, custom_headers = nil) ⇒ EndpointListResult
Lists existing CDN endpoints within a profile.
-
#list_by_profile_async(profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Lists existing CDN endpoints within a profile.
-
#list_by_profile_with_http_info(profile_name, resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Lists existing CDN endpoints within a profile.
-
#load_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) ⇒ Object
Forcibly pre-loads CDN endpoint content.
-
#load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
loaded.
-
#purge_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) ⇒ Object
Forcibly purges CDN endpoint content.
-
#purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
purged.
-
#start(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Endpoint
Starts an existing stopped CDN endpoint.
-
#start_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
group.
-
#stop(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Endpoint
Stops an existing running CDN endpoint.
-
#stop_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
group.
-
#update(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ Endpoint
Updates an existing CDN endpoint with the specified parameters.
-
#update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
group.
-
#validate_custom_domain(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ ValidateCustomDomainOutput
Validates a custom domain mapping to ensure it maps to the correct CNAME in DNS.
-
#validate_custom_domain_async(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Validates a custom domain mapping to ensure it maps to the correct CNAME in DNS.
-
#validate_custom_domain_with_http_info(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Validates a custom domain mapping to ensure it maps to the correct CNAME in DNS.
Constructor Details
#initialize(client) ⇒ Endpoints
Creates and initializes a new instance of the Endpoints class.
20 21 22 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 20 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ CdnManagementClient (readonly)
Returns reference to the CdnManagementClient.
25 26 27 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 25 def client @client end |
Instance Method Details
#begin_create(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ Endpoint
Creates a new CDN endpoint with the specified parameters.
group. Azure subscription. will be added to the HTTP request.
698 699 700 701 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 698 def begin_create(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) response = begin_create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers).value! response.body unless response.nil? end |
#begin_create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Creates a new CDN endpoint with the specified parameters.
group. Azure subscription. to the HTTP request.
735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 735 def begin_create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil? fail ArgumentError, 'endpoint_properties is nil' if endpoint_properties.nil? fail ArgumentError, 'profile_name is nil' if profile_name.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? request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request request_mapper = Azure::CDN::Mgmt::V2015_06_01::Models::EndpointCreateParameters.mapper() request_content = @client.serialize(request_mapper, endpoint_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}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'resourceGroupName' => resource_group_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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::CDN::Mgmt::V2015_06_01::Models::Endpoint.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::V2015_06_01::Models::Endpoint.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::V2015_06_01::Models::Endpoint.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(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Creates a new CDN endpoint with the specified parameters.
group. Azure subscription. will be added to the HTTP request.
717 718 719 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 717 def begin_create_with_http_info(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) begin_create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers).value! end |
#begin_delete_if_exists(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Object
Deletes an existing CDN endpoint with the specified parameters.
group. Azure subscription. will be added to the HTTP request.
963 964 965 966 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 963 def begin_delete_if_exists(endpoint_name, profile_name, resource_group_name, custom_headers = nil) response = begin_delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers).value! nil end |
#begin_delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Deletes an existing CDN endpoint with the specified parameters.
group. Azure subscription. to the HTTP request.
998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 998 def begin_delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil) fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil? fail ArgumentError, 'profile_name is nil' if profile_name.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.Cdn/profiles/{profileName}/endpoints/{endpointName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'resourceGroupName' => resource_group_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 == 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 end promise.execute end |
#begin_delete_if_exists_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes an existing CDN endpoint with the specified parameters.
group. Azure subscription. will be added to the HTTP request.
981 982 983 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 981 def begin_delete_if_exists_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers = nil) begin_delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers).value! end |
#begin_load_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) ⇒ Object
Forcibly pre-loads CDN endpoint content.
loaded. Path should describe a file. group. Azure subscription. will be added to the HTTP request.
1363 1364 1365 1366 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 1363 def begin_load_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) response = begin_load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers).value! nil end |
#begin_load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Forcibly pre-loads CDN endpoint content.
loaded. Path should describe a file. group. Azure subscription. to the HTTP request.
1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 1402 def begin_load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil? fail ArgumentError, 'content_file_paths is nil' if content_file_paths.nil? fail ArgumentError, 'profile_name is nil' if profile_name.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? request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request request_mapper = Azure::CDN::Mgmt::V2015_06_01::Models::LoadParameters.mapper() request_content = @client.serialize(request_mapper, content_file_paths) 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}/load' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'resourceGroupName' => resource_group_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 == 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 end promise.execute end |
#begin_load_content_with_http_info(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Forcibly pre-loads CDN endpoint content.
loaded. Path should describe a file. group. Azure subscription. will be added to the HTTP request.
1383 1384 1385 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 1383 def begin_load_content_with_http_info(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) begin_load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers).value! end |
#begin_purge_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) ⇒ Object
Forcibly purges CDN endpoint content.
purged. Path can describe a file or directory. group. Azure subscription. will be added to the HTTP request.
1257 1258 1259 1260 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 1257 def begin_purge_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) response = begin_purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers).value! nil end |
#begin_purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Forcibly purges CDN endpoint content.
purged. Path can describe a file or directory. group. Azure subscription. to the HTTP request.
1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 1296 def begin_purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil? fail ArgumentError, 'content_file_paths is nil' if content_file_paths.nil? fail ArgumentError, 'profile_name is nil' if profile_name.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? request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request request_mapper = Azure::CDN::Mgmt::V2015_06_01::Models::PurgeParameters.mapper() request_content = @client.serialize(request_mapper, content_file_paths) 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}/purge' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'resourceGroupName' => resource_group_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 == 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 end promise.execute end |
#begin_purge_content_with_http_info(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Forcibly purges CDN endpoint content.
purged. Path can describe a file or directory. group. Azure subscription. will be added to the HTTP request.
1277 1278 1279 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 1277 def begin_purge_content_with_http_info(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) begin_purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers).value! end |
#begin_start(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Endpoint
Starts an existing stopped CDN endpoint.
group. Azure subscription. will be added to the HTTP request.
1054 1055 1056 1057 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 1054 def begin_start(endpoint_name, profile_name, resource_group_name, custom_headers = nil) response = begin_start_async(endpoint_name, profile_name, resource_group_name, custom_headers).value! response.body unless response.nil? end |
#begin_start_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Starts an existing stopped CDN endpoint.
group. Azure subscription. to the HTTP request.
1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 1089 def begin_start_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil) fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil? fail ArgumentError, 'profile_name is nil' if profile_name.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.Cdn/profiles/{profileName}/endpoints/{endpointName}/start' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'resourceGroupName' => resource_group_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 == 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? # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::CDN::Mgmt::V2015_06_01::Models::Endpoint.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_start_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Starts an existing stopped CDN endpoint.
group. Azure subscription. will be added to the HTTP request.
1072 1073 1074 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 1072 def begin_start_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers = nil) begin_start_async(endpoint_name, profile_name, resource_group_name, custom_headers).value! end |
#begin_stop(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Endpoint
Stops an existing running CDN endpoint.
group. Azure subscription. will be added to the HTTP request.
1155 1156 1157 1158 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 1155 def begin_stop(endpoint_name, profile_name, resource_group_name, custom_headers = nil) response = begin_stop_async(endpoint_name, profile_name, resource_group_name, custom_headers).value! response.body unless response.nil? end |
#begin_stop_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Stops an existing running CDN endpoint.
group. Azure subscription. to the HTTP request.
1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 1190 def begin_stop_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil) fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil? fail ArgumentError, 'profile_name is nil' if profile_name.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.Cdn/profiles/{profileName}/endpoints/{endpointName}/stop' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'resourceGroupName' => resource_group_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 == 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? # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::CDN::Mgmt::V2015_06_01::Models::Endpoint.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_stop_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Stops an existing running CDN endpoint.
group. Azure subscription. will be added to the HTTP request.
1173 1174 1175 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 1173 def begin_stop_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers = nil) begin_stop_async(endpoint_name, profile_name, resource_group_name, custom_headers).value! end |
#begin_update(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ Endpoint
Updates an existing CDN endpoint with the specified parameters. Only tags and OriginHostHeader can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update custom domains, use the Update Custom Domain operation.
group. Azure subscription. will be added to the HTTP request.
835 836 837 838 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 835 def begin_update(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) response = begin_update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers).value! response.body unless response.nil? end |
#begin_update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Updates an existing CDN endpoint with the specified parameters. Only tags and OriginHostHeader can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update custom domains, use the Update Custom Domain operation.
group. Azure subscription. to the HTTP request.
878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 878 def begin_update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil? fail ArgumentError, 'endpoint_properties is nil' if endpoint_properties.nil? fail ArgumentError, 'profile_name is nil' if profile_name.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? request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request request_mapper = Azure::CDN::Mgmt::V2015_06_01::Models::EndpointUpdateParameters.mapper() request_content = @client.serialize(request_mapper, endpoint_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}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'resourceGroupName' => resource_group_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(:patch, 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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::CDN::Mgmt::V2015_06_01::Models::Endpoint.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::V2015_06_01::Models::Endpoint.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_update_with_http_info(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Updates an existing CDN endpoint with the specified parameters. Only tags and OriginHostHeader can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update custom domains, use the Update Custom Domain operation.
group. Azure subscription. will be added to the HTTP request.
857 858 859 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 857 def begin_update_with_http_info(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) begin_update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers).value! end |
#create(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ Endpoint
Creates a new CDN endpoint with the specified parameters.
group. Azure subscription. will be added to the HTTP request.
239 240 241 242 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 239 def create(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) response = create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers).value! response.body unless response.nil? end |
#create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
group. Azure subscription. will be added to the HTTP request.
response.
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 257 def create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) # Send request promise = begin_create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::CDN::Mgmt::V2015_06_01::Models::Endpoint.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_if_exists(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Object
Deletes an existing CDN endpoint with the specified parameters.
group. Azure subscription. will be added to the HTTP request.
339 340 341 342 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 339 def delete_if_exists(endpoint_name, profile_name, resource_group_name, custom_headers = nil) response = delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers).value! nil end |
#delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
group. Azure subscription. will be added to the HTTP request.
response.
356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 356 def delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil) # Send request promise = begin_delete_if_exists_async(endpoint_name, profile_name, resource_group_name, 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(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Endpoint
Gets an existing CDN endpoint with the specified parameters.
group. Azure subscription. will be added to the HTTP request.
137 138 139 140 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 137 def get(endpoint_name, profile_name, resource_group_name, custom_headers = nil) response = get_async(endpoint_name, profile_name, resource_group_name, custom_headers).value! response.body unless response.nil? end |
#get_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Gets an existing CDN endpoint with the specified parameters.
group. Azure subscription. to the HTTP request.
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 172 def get_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil) fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil? fail ArgumentError, 'profile_name is nil' if profile_name.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.Cdn/profiles/{profileName}/endpoints/{endpointName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'resourceGroupName' => resource_group_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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::CDN::Mgmt::V2015_06_01::Models::Endpoint.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(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets an existing CDN endpoint with the specified parameters.
group. Azure subscription. will be added to the HTTP request.
155 156 157 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 155 def get_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers = nil) get_async(endpoint_name, profile_name, resource_group_name, custom_headers).value! end |
#list_by_profile(profile_name, resource_group_name, custom_headers = nil) ⇒ EndpointListResult
Lists existing CDN endpoints within a profile.
group. Azure subscription. will be added to the HTTP request.
39 40 41 42 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 39 def list_by_profile(profile_name, resource_group_name, custom_headers = nil) response = list_by_profile_async(profile_name, resource_group_name, custom_headers).value! response.body unless response.nil? end |
#list_by_profile_async(profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Lists existing CDN endpoints within a profile.
group. Azure subscription. to the HTTP request.
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 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 72 def list_by_profile_async(profile_name, resource_group_name, custom_headers = nil) fail ArgumentError, 'profile_name is nil' if profile_name.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.Cdn/profiles/{profileName}/endpoints' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'profileName' => profile_name,'resourceGroupName' => resource_group_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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::CDN::Mgmt::V2015_06_01::Models::EndpointListResult.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_profile_with_http_info(profile_name, resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Lists existing CDN endpoints within a profile.
group. Azure subscription. will be added to the HTTP request.
56 57 58 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 56 def list_by_profile_with_http_info(profile_name, resource_group_name, custom_headers = nil) list_by_profile_async(profile_name, resource_group_name, custom_headers).value! end |
#load_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) ⇒ Object
Forcibly pre-loads CDN endpoint content.
loaded. Path should describe a file. group. Azure subscription. will be added to the HTTP request.
529 530 531 532 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 529 def load_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) response = load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers).value! nil end |
#load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
loaded. Path should describe a file. group. Azure subscription. will be added to the HTTP request.
response.
548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 548 def load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) # Send request promise = begin_load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, 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 |
#purge_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) ⇒ Object
Forcibly purges CDN endpoint content.
purged. Path can describe a file or directory. group. Azure subscription. will be added to the HTTP request.
481 482 483 484 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 481 def purge_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) response = purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers).value! nil end |
#purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
purged. Path can describe a file or directory. group. Azure subscription. will be added to the HTTP request.
response.
500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 500 def purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil) # Send request promise = begin_purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, 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 |
#start(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Endpoint
Starts an existing stopped CDN endpoint.
group. Azure subscription. will be added to the HTTP request.
385 386 387 388 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 385 def start(endpoint_name, profile_name, resource_group_name, custom_headers = nil) response = start_async(endpoint_name, profile_name, resource_group_name, custom_headers).value! response.body unless response.nil? end |
#start_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
group. Azure subscription. will be added to the HTTP request.
response.
402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 402 def start_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil) # Send request promise = begin_start_async(endpoint_name, profile_name, resource_group_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::CDN::Mgmt::V2015_06_01::Models::Endpoint.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 |
#stop(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Endpoint
Stops an existing running CDN endpoint.
group. Azure subscription. will be added to the HTTP request.
433 434 435 436 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 433 def stop(endpoint_name, profile_name, resource_group_name, custom_headers = nil) response = stop_async(endpoint_name, profile_name, resource_group_name, custom_headers).value! response.body unless response.nil? end |
#stop_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
group. Azure subscription. will be added to the HTTP request.
response.
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 450 def stop_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil) # Send request promise = begin_stop_async(endpoint_name, profile_name, resource_group_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::CDN::Mgmt::V2015_06_01::Models::Endpoint.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 |
#update(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ Endpoint
Updates an existing CDN endpoint with the specified parameters. Only tags and OriginHostHeader can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update custom domains, use the Update Custom Domain operation.
group. Azure subscription. will be added to the HTTP request.
292 293 294 295 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 292 def update(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) response = update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers).value! response.body unless response.nil? end |
#update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
group. Azure subscription. 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 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 310 def update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil) # Send request promise = begin_update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::CDN::Mgmt::V2015_06_01::Models::Endpoint.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 |
#validate_custom_domain(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ ValidateCustomDomainOutput
Validates a custom domain mapping to ensure it maps to the correct CNAME in DNS.
validate. group. Azure subscription. will be added to the HTTP request.
580 581 582 583 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 580 def validate_custom_domain(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers = nil) response = validate_custom_domain_async(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers).value! response.body unless response.nil? end |
#validate_custom_domain_async(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Validates a custom domain mapping to ensure it maps to the correct CNAME in DNS.
validate. group. Azure subscription. to the HTTP request.
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 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 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 621 def validate_custom_domain_async(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers = nil) fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil? fail ArgumentError, 'custom_domain_properties is nil' if custom_domain_properties.nil? fail ArgumentError, 'profile_name is nil' if profile_name.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? request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request request_mapper = Azure::CDN::Mgmt::V2015_06_01::Models::ValidateCustomDomainInput.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}/validateCustomDomain' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'resourceGroupName' => resource_group_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 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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::CDN::Mgmt::V2015_06_01::Models::ValidateCustomDomainOutput.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 |
#validate_custom_domain_with_http_info(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Validates a custom domain mapping to ensure it maps to the correct CNAME in DNS.
validate. group. Azure subscription. will be added to the HTTP request.
601 602 603 |
# File 'lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb', line 601 def validate_custom_domain_with_http_info(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers = nil) validate_custom_domain_async(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers).value! end |