azure_mgmt_cdn 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +13 -5
- data/azure_mgmt_cdn.gemspec +1 -1
- data/lib/azure_mgmt_cdn.rb +2 -3
- data/lib/azure_mgmt_cdn/cdn_management_client.rb +5 -5
- data/lib/azure_mgmt_cdn/custom_domains.rb +293 -72
- data/lib/azure_mgmt_cdn/endpoints.rb +573 -142
- data/lib/azure_mgmt_cdn/models/check_name_availability_input.rb +3 -3
- data/lib/azure_mgmt_cdn/models/check_name_availability_output.rb +6 -6
- data/lib/azure_mgmt_cdn/models/custom_domain.rb +3 -3
- data/lib/azure_mgmt_cdn/models/custom_domain_list_result.rb +1 -1
- data/lib/azure_mgmt_cdn/models/custom_domain_parameters.rb +2 -2
- data/lib/azure_mgmt_cdn/models/custom_domain_properties.rb +3 -2
- data/lib/azure_mgmt_cdn/models/custom_domain_properties_parameters.rb +3 -2
- data/lib/azure_mgmt_cdn/models/custom_domain_resource_state.rb +1 -1
- data/lib/azure_mgmt_cdn/models/deep_created_origin.rb +2 -2
- data/lib/azure_mgmt_cdn/models/deep_created_origin_properties.rb +6 -5
- data/lib/azure_mgmt_cdn/models/endpoint.rb +3 -3
- data/lib/azure_mgmt_cdn/models/endpoint_create_parameters.rb +2 -2
- data/lib/azure_mgmt_cdn/models/endpoint_list_result.rb +2 -2
- data/lib/azure_mgmt_cdn/models/endpoint_properties.rb +12 -12
- data/lib/azure_mgmt_cdn/models/endpoint_properties_create_parameters.rb +15 -14
- data/lib/azure_mgmt_cdn/models/endpoint_properties_update_parameters.rb +16 -15
- data/lib/azure_mgmt_cdn/models/endpoint_resource_state.rb +1 -1
- data/lib/azure_mgmt_cdn/models/endpoint_update_parameters.rb +2 -2
- data/lib/azure_mgmt_cdn/models/error_response.rb +2 -2
- data/lib/azure_mgmt_cdn/models/load_parameters.rb +3 -3
- data/lib/azure_mgmt_cdn/models/operation.rb +1 -1
- data/lib/azure_mgmt_cdn/models/operation_display.rb +3 -3
- data/lib/azure_mgmt_cdn/models/operation_list_result.rb +3 -3
- data/lib/azure_mgmt_cdn/models/origin.rb +4 -4
- data/lib/azure_mgmt_cdn/models/origin_list_result.rb +1 -1
- data/lib/azure_mgmt_cdn/models/origin_parameters.rb +2 -2
- data/lib/azure_mgmt_cdn/models/origin_properties.rb +7 -6
- data/lib/azure_mgmt_cdn/models/origin_properties_parameters.rb +7 -6
- data/lib/azure_mgmt_cdn/models/origin_resource_state.rb +1 -1
- data/lib/azure_mgmt_cdn/models/profile.rb +17 -1
- data/lib/azure_mgmt_cdn/models/profile_create_parameters.rb +18 -17
- data/lib/azure_mgmt_cdn/models/profile_list_result.rb +2 -2
- data/lib/azure_mgmt_cdn/models/profile_properties.rb +1 -17
- data/lib/azure_mgmt_cdn/models/profile_resource_state.rb +1 -1
- data/lib/azure_mgmt_cdn/models/profile_update_parameters.rb +2 -2
- data/lib/azure_mgmt_cdn/models/provisioning_state.rb +1 -1
- data/lib/azure_mgmt_cdn/models/purge_parameters.rb +3 -3
- data/lib/azure_mgmt_cdn/models/query_string_caching_behavior.rb +1 -1
- data/lib/azure_mgmt_cdn/models/resource_type.rb +1 -1
- data/lib/azure_mgmt_cdn/models/sku.rb +5 -4
- data/lib/azure_mgmt_cdn/models/sku_name.rb +5 -3
- data/lib/azure_mgmt_cdn/models/sso_uri.rb +3 -3
- data/lib/azure_mgmt_cdn/models/tracked_resource.rb +1 -1
- data/lib/azure_mgmt_cdn/models/validate_custom_domain_input.rb +4 -3
- data/lib/azure_mgmt_cdn/models/validate_custom_domain_output.rb +6 -5
- data/lib/azure_mgmt_cdn/module_definition.rb +1 -1
- data/lib/azure_mgmt_cdn/name_availability.rb +47 -12
- data/lib/azure_mgmt_cdn/operations.rb +34 -7
- data/lib/azure_mgmt_cdn/origins.rb +296 -79
- data/lib/azure_mgmt_cdn/profiles.rb +358 -84
- data/lib/azure_mgmt_cdn/version.rb +2 -2
- metadata +25 -21
- data/lib/azure_mgmt_cdn/models/profile_properties_create_parameters.rb +0 -63
@@ -1,19 +1,20 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
6
6
|
module Azure::ARM::CDN
|
7
7
|
module Models
|
8
8
|
#
|
9
|
-
#
|
9
|
+
# The SKU (pricing tier) of the CDN profile.
|
10
10
|
#
|
11
11
|
class Sku
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
15
|
-
# @return [SkuName] Name of the
|
16
|
-
# '
|
15
|
+
# @return [SkuName] Name of the pricing tier. Possible values include:
|
16
|
+
# 'Standard_Verizon', 'Premium_Verizon', 'Custom_Verizon',
|
17
|
+
# 'Standard_Akamai'
|
17
18
|
attr_accessor :name
|
18
19
|
|
19
20
|
#
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -9,8 +9,10 @@ module Azure::ARM::CDN
|
|
9
9
|
# Defines values for SkuName
|
10
10
|
#
|
11
11
|
module SkuName
|
12
|
-
|
13
|
-
|
12
|
+
StandardVerizon = "Standard_Verizon"
|
13
|
+
PremiumVerizon = "Premium_Verizon"
|
14
|
+
CustomVerizon = "Custom_Verizon"
|
15
|
+
StandardAkamai = "Standard_Akamai"
|
14
16
|
end
|
15
17
|
end
|
16
18
|
end
|
@@ -1,18 +1,18 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
6
6
|
module Azure::ARM::CDN
|
7
7
|
module Models
|
8
8
|
#
|
9
|
-
#
|
9
|
+
# SSO URI required to login to third party web portal.
|
10
10
|
#
|
11
11
|
class SsoUri
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
15
|
-
# @return [String] The
|
15
|
+
# @return [String] The URI used to login to third party web portal.
|
16
16
|
attr_accessor :sso_uri_value
|
17
17
|
|
18
18
|
#
|
@@ -1,18 +1,19 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
6
6
|
module Azure::ARM::CDN
|
7
7
|
module Models
|
8
8
|
#
|
9
|
-
# Input of the custom domain to be validated
|
9
|
+
# Input of the custom domain to be validated.
|
10
10
|
#
|
11
11
|
class ValidateCustomDomainInput
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
15
|
-
# @return [String] The host name of the custom domain
|
15
|
+
# @return [String] The host name of the custom domain. Must be a domain
|
16
|
+
# name.
|
16
17
|
attr_accessor :host_name
|
17
18
|
|
18
19
|
#
|
@@ -1,25 +1,26 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
6
6
|
module Azure::ARM::CDN
|
7
7
|
module Models
|
8
8
|
#
|
9
|
-
# Output of custom domain validation
|
9
|
+
# Output of custom domain validation.
|
10
10
|
#
|
11
11
|
class ValidateCustomDomainOutput
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
15
15
|
# @return [Boolean] Indicates whether the custom domain is validated or
|
16
|
-
# not
|
16
|
+
# not.
|
17
17
|
attr_accessor :custom_domain_validated
|
18
18
|
|
19
|
-
# @return [String] The reason why the custom domain is not valid
|
19
|
+
# @return [String] The reason why the custom domain is not valid.
|
20
20
|
attr_accessor :reason
|
21
21
|
|
22
|
-
# @return [String] The message
|
22
|
+
# @return [String] The message describing why the custom domain is not
|
23
|
+
# valid.
|
23
24
|
attr_accessor :message
|
24
25
|
|
25
26
|
#
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -27,19 +27,51 @@ module Azure::ARM::CDN
|
|
27
27
|
attr_reader :client
|
28
28
|
|
29
29
|
#
|
30
|
-
# Check the availability of a resource name
|
31
|
-
# where name is globally unique
|
32
|
-
#
|
30
|
+
# Check the availability of a resource name without creating the resource.
|
31
|
+
# This is needed for resources where name is globally unique, such as a CDN
|
32
|
+
# endpoint.
|
33
33
|
#
|
34
|
-
# @param check_name_availability_input [CheckNameAvailabilityInput]
|
35
|
-
# check
|
36
|
-
# @param [Hash{String => String}]
|
37
|
-
#
|
34
|
+
# @param check_name_availability_input [CheckNameAvailabilityInput] Input to
|
35
|
+
# check.
|
36
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
37
|
+
# will be added to the HTTP request.
|
38
38
|
#
|
39
|
-
# @return [
|
40
|
-
# response.
|
39
|
+
# @return [CheckNameAvailabilityOutput] operation results.
|
41
40
|
#
|
42
41
|
def check_name_availability(check_name_availability_input, custom_headers = nil)
|
42
|
+
response = check_name_availability_async(check_name_availability_input, custom_headers).value!
|
43
|
+
response.body unless response.nil?
|
44
|
+
end
|
45
|
+
|
46
|
+
#
|
47
|
+
# Check the availability of a resource name without creating the resource.
|
48
|
+
# This is needed for resources where name is globally unique, such as a CDN
|
49
|
+
# endpoint.
|
50
|
+
#
|
51
|
+
# @param check_name_availability_input [CheckNameAvailabilityInput] Input to
|
52
|
+
# check.
|
53
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
54
|
+
# will be added to the HTTP request.
|
55
|
+
#
|
56
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
57
|
+
#
|
58
|
+
def check_name_availability_with_http_info(check_name_availability_input, custom_headers = nil)
|
59
|
+
check_name_availability_async(check_name_availability_input, custom_headers).value!
|
60
|
+
end
|
61
|
+
|
62
|
+
#
|
63
|
+
# Check the availability of a resource name without creating the resource.
|
64
|
+
# This is needed for resources where name is globally unique, such as a CDN
|
65
|
+
# endpoint.
|
66
|
+
#
|
67
|
+
# @param check_name_availability_input [CheckNameAvailabilityInput] Input to
|
68
|
+
# check.
|
69
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
70
|
+
# to the HTTP request.
|
71
|
+
#
|
72
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
73
|
+
#
|
74
|
+
def check_name_availability_async(check_name_availability_input, custom_headers = nil)
|
43
75
|
fail ArgumentError, 'check_name_availability_input is nil' if check_name_availability_input.nil?
|
44
76
|
check_name_availability_input.validate unless check_name_availability_input.nil?
|
45
77
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
@@ -54,7 +86,7 @@ module Azure::ARM::CDN
|
|
54
86
|
unless check_name_availability_input.nil?
|
55
87
|
check_name_availability_input = CheckNameAvailabilityInput.serialize_object(check_name_availability_input)
|
56
88
|
end
|
57
|
-
request_content = JSON.generate(check_name_availability_input, quirks_mode: true)
|
89
|
+
request_content = check_name_availability_input != nil ? JSON.generate(check_name_availability_input, quirks_mode: true) : nil
|
58
90
|
path_template = '/providers/Microsoft.Cdn/checkNameAvailability'
|
59
91
|
options = {
|
60
92
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -62,7 +94,10 @@ module Azure::ARM::CDN
|
|
62
94
|
body: request_content,
|
63
95
|
headers: request_headers.merge(custom_headers || {})
|
64
96
|
}
|
65
|
-
|
97
|
+
|
98
|
+
request_url = @base_url || @client.base_url
|
99
|
+
|
100
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
66
101
|
promise = request.run_promise do |req|
|
67
102
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
68
103
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -27,15 +27,39 @@ module Azure::ARM::CDN
|
|
27
27
|
attr_reader :client
|
28
28
|
|
29
29
|
#
|
30
|
-
# Lists all of the available CDN REST API operations
|
30
|
+
# Lists all of the available CDN REST API operations.
|
31
31
|
#
|
32
|
-
# @param [Hash{String => String}]
|
33
|
-
#
|
32
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
33
|
+
# will be added to the HTTP request.
|
34
34
|
#
|
35
|
-
# @return [
|
36
|
-
# response.
|
35
|
+
# @return [OperationListResult] operation results.
|
37
36
|
#
|
38
37
|
def list(custom_headers = nil)
|
38
|
+
response = list_async(custom_headers).value!
|
39
|
+
response.body unless response.nil?
|
40
|
+
end
|
41
|
+
|
42
|
+
#
|
43
|
+
# Lists all of the available CDN REST API operations.
|
44
|
+
#
|
45
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
46
|
+
# will be added to the HTTP request.
|
47
|
+
#
|
48
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
49
|
+
#
|
50
|
+
def list_with_http_info(custom_headers = nil)
|
51
|
+
list_async(custom_headers).value!
|
52
|
+
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# Lists all of the available CDN REST API operations.
|
56
|
+
#
|
57
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
58
|
+
# to the HTTP request.
|
59
|
+
#
|
60
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
61
|
+
#
|
62
|
+
def list_async(custom_headers = nil)
|
39
63
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
40
64
|
request_headers = {}
|
41
65
|
|
@@ -48,7 +72,10 @@ module Azure::ARM::CDN
|
|
48
72
|
query_params: {'api-version' => @client.api_version},
|
49
73
|
headers: request_headers.merge(custom_headers || {})
|
50
74
|
}
|
51
|
-
|
75
|
+
|
76
|
+
request_url = @base_url || @client.base_url
|
77
|
+
|
78
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
52
79
|
promise = request.run_promise do |req|
|
53
80
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
54
81
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -27,20 +27,54 @@ module Azure::ARM::CDN
|
|
27
27
|
attr_reader :client
|
28
28
|
|
29
29
|
#
|
30
|
-
# Lists the existing CDN
|
30
|
+
# Lists the existing CDN origins within an endpoint.
|
31
31
|
#
|
32
|
-
# @param endpoint_name [String] Name of the endpoint within the CDN profile
|
32
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
33
33
|
# @param profile_name [String] Name of the CDN profile within the resource
|
34
|
-
# group
|
34
|
+
# group.
|
35
35
|
# @param resource_group_name [String] Name of the resource group within the
|
36
|
-
# Azure subscription
|
37
|
-
# @param [Hash{String => String}]
|
38
|
-
#
|
36
|
+
# Azure subscription.
|
37
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
38
|
+
# will be added to the HTTP request.
|
39
39
|
#
|
40
|
-
# @return [
|
41
|
-
# response.
|
40
|
+
# @return [OriginListResult] operation results.
|
42
41
|
#
|
43
42
|
def list_by_endpoint(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
43
|
+
response = list_by_endpoint_async(endpoint_name, profile_name, resource_group_name, custom_headers).value!
|
44
|
+
response.body unless response.nil?
|
45
|
+
end
|
46
|
+
|
47
|
+
#
|
48
|
+
# Lists the existing CDN origins within an endpoint.
|
49
|
+
#
|
50
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
51
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
52
|
+
# group.
|
53
|
+
# @param resource_group_name [String] Name of the resource group within the
|
54
|
+
# Azure subscription.
|
55
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
56
|
+
# will be added to the HTTP request.
|
57
|
+
#
|
58
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
59
|
+
#
|
60
|
+
def list_by_endpoint_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
61
|
+
list_by_endpoint_async(endpoint_name, profile_name, resource_group_name, custom_headers).value!
|
62
|
+
end
|
63
|
+
|
64
|
+
#
|
65
|
+
# Lists the existing CDN origins within an endpoint.
|
66
|
+
#
|
67
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
68
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
69
|
+
# group.
|
70
|
+
# @param resource_group_name [String] Name of the resource group within the
|
71
|
+
# Azure subscription.
|
72
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
73
|
+
# to the HTTP request.
|
74
|
+
#
|
75
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
76
|
+
#
|
77
|
+
def list_by_endpoint_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
44
78
|
fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
|
45
79
|
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
46
80
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
@@ -58,7 +92,10 @@ module Azure::ARM::CDN
|
|
58
92
|
query_params: {'api-version' => @client.api_version},
|
59
93
|
headers: request_headers.merge(custom_headers || {})
|
60
94
|
}
|
61
|
-
|
95
|
+
|
96
|
+
request_url = @base_url || @client.base_url
|
97
|
+
|
98
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
62
99
|
promise = request.run_promise do |req|
|
63
100
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
64
101
|
end
|
@@ -94,22 +131,60 @@ module Azure::ARM::CDN
|
|
94
131
|
end
|
95
132
|
|
96
133
|
#
|
97
|
-
# Gets an existing CDN
|
134
|
+
# Gets an existing CDN origin within an endpoint.
|
98
135
|
#
|
99
136
|
# @param origin_name [String] Name of the origin, an arbitrary value but it
|
100
137
|
# needs to be unique under endpoint
|
101
|
-
# @param endpoint_name [String] Name of the endpoint within the CDN profile
|
138
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
102
139
|
# @param profile_name [String] Name of the CDN profile within the resource
|
103
|
-
# group
|
140
|
+
# group.
|
104
141
|
# @param resource_group_name [String] Name of the resource group within the
|
105
|
-
# Azure subscription
|
106
|
-
# @param [Hash{String => String}]
|
107
|
-
#
|
142
|
+
# Azure subscription.
|
143
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
144
|
+
# will be added to the HTTP request.
|
108
145
|
#
|
109
|
-
# @return [
|
110
|
-
# response.
|
146
|
+
# @return [Origin] operation results.
|
111
147
|
#
|
112
148
|
def get(origin_name, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
149
|
+
response = get_async(origin_name, endpoint_name, profile_name, resource_group_name, custom_headers).value!
|
150
|
+
response.body unless response.nil?
|
151
|
+
end
|
152
|
+
|
153
|
+
#
|
154
|
+
# Gets an existing CDN origin within an endpoint.
|
155
|
+
#
|
156
|
+
# @param origin_name [String] Name of the origin, an arbitrary value but it
|
157
|
+
# needs to be unique under endpoint
|
158
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
159
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
160
|
+
# group.
|
161
|
+
# @param resource_group_name [String] Name of the resource group within the
|
162
|
+
# Azure subscription.
|
163
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
164
|
+
# will be added to the HTTP request.
|
165
|
+
#
|
166
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
167
|
+
#
|
168
|
+
def get_with_http_info(origin_name, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
169
|
+
get_async(origin_name, endpoint_name, profile_name, resource_group_name, custom_headers).value!
|
170
|
+
end
|
171
|
+
|
172
|
+
#
|
173
|
+
# Gets an existing CDN origin within an endpoint.
|
174
|
+
#
|
175
|
+
# @param origin_name [String] Name of the origin, an arbitrary value but it
|
176
|
+
# needs to be unique under endpoint
|
177
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
178
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
179
|
+
# group.
|
180
|
+
# @param resource_group_name [String] Name of the resource group within the
|
181
|
+
# Azure subscription.
|
182
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
183
|
+
# to the HTTP request.
|
184
|
+
#
|
185
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
186
|
+
#
|
187
|
+
def get_async(origin_name, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
113
188
|
fail ArgumentError, 'origin_name is nil' if origin_name.nil?
|
114
189
|
fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
|
115
190
|
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
@@ -128,7 +203,10 @@ module Azure::ARM::CDN
|
|
128
203
|
query_params: {'api-version' => @client.api_version},
|
129
204
|
headers: request_headers.merge(custom_headers || {})
|
130
205
|
}
|
131
|
-
|
206
|
+
|
207
|
+
request_url = @base_url || @client.base_url
|
208
|
+
|
209
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
132
210
|
promise = request.run_promise do |req|
|
133
211
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
134
212
|
end
|
@@ -164,19 +242,19 @@ module Azure::ARM::CDN
|
|
164
242
|
end
|
165
243
|
|
166
244
|
#
|
167
|
-
# Creates a new CDN
|
245
|
+
# Creates a new CDN origin within an endpoint.
|
168
246
|
#
|
169
247
|
# @param origin_name [String] Name of the origin, an arbitrary value but it
|
170
248
|
# needs to be unique under endpoint
|
171
249
|
# @param origin_properties [OriginParameters] Origin properties
|
172
|
-
# @param endpoint_name [String] Name of the endpoint within the CDN profile
|
250
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
173
251
|
# @param profile_name [String] Name of the CDN profile within the resource
|
174
|
-
# group
|
252
|
+
# group.
|
175
253
|
# @param resource_group_name [String] Name of the resource group within the
|
176
|
-
# Azure subscription
|
177
|
-
# @param @client.subscription_id [String] Azure Subscription ID
|
254
|
+
# Azure subscription.
|
255
|
+
# @param @client.subscription_id [String] Azure Subscription ID.
|
178
256
|
# @param @client.api_version [String] Version of the API to be used with the
|
179
|
-
# client request
|
257
|
+
# client request. Current version is 2016-04-02
|
180
258
|
# @param @client.accept_language [String] Gets or sets the preferred language
|
181
259
|
# for the response.
|
182
260
|
#
|
@@ -185,7 +263,7 @@ module Azure::ARM::CDN
|
|
185
263
|
#
|
186
264
|
def create(origin_name, origin_properties, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
187
265
|
# Send request
|
188
|
-
promise =
|
266
|
+
promise = begin_create_async(origin_name, origin_properties, endpoint_name, profile_name, resource_group_name, custom_headers)
|
189
267
|
|
190
268
|
promise = promise.then do |response|
|
191
269
|
# Defining deserialization method.
|
@@ -196,30 +274,70 @@ module Azure::ARM::CDN
|
|
196
274
|
end
|
197
275
|
|
198
276
|
# Waiting for response.
|
199
|
-
@client.
|
277
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
200
278
|
end
|
201
279
|
|
202
280
|
promise
|
203
281
|
end
|
204
282
|
|
205
283
|
#
|
206
|
-
# Creates a new CDN
|
284
|
+
# Creates a new CDN origin within an endpoint.
|
207
285
|
#
|
208
286
|
# @param origin_name [String] Name of the origin, an arbitrary value but it
|
209
287
|
# needs to be unique under endpoint
|
210
288
|
# @param origin_properties [OriginParameters] Origin properties
|
211
|
-
# @param endpoint_name [String] Name of the endpoint within the CDN profile
|
289
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
212
290
|
# @param profile_name [String] Name of the CDN profile within the resource
|
213
|
-
# group
|
291
|
+
# group.
|
214
292
|
# @param resource_group_name [String] Name of the resource group within the
|
215
|
-
# Azure subscription
|
216
|
-
# @param [Hash{String => String}]
|
217
|
-
#
|
293
|
+
# Azure subscription.
|
294
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
295
|
+
# will be added to the HTTP request.
|
218
296
|
#
|
219
|
-
# @return [
|
220
|
-
# response.
|
297
|
+
# @return [Origin] operation results.
|
221
298
|
#
|
222
299
|
def begin_create(origin_name, origin_properties, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
300
|
+
response = begin_create_async(origin_name, origin_properties, endpoint_name, profile_name, resource_group_name, custom_headers).value!
|
301
|
+
response.body unless response.nil?
|
302
|
+
end
|
303
|
+
|
304
|
+
#
|
305
|
+
# Creates a new CDN origin within an endpoint.
|
306
|
+
#
|
307
|
+
# @param origin_name [String] Name of the origin, an arbitrary value but it
|
308
|
+
# needs to be unique under endpoint
|
309
|
+
# @param origin_properties [OriginParameters] Origin properties
|
310
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
311
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
312
|
+
# group.
|
313
|
+
# @param resource_group_name [String] Name of the resource group within the
|
314
|
+
# Azure subscription.
|
315
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
316
|
+
# will be added to the HTTP request.
|
317
|
+
#
|
318
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
319
|
+
#
|
320
|
+
def begin_create_with_http_info(origin_name, origin_properties, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
321
|
+
begin_create_async(origin_name, origin_properties, endpoint_name, profile_name, resource_group_name, custom_headers).value!
|
322
|
+
end
|
323
|
+
|
324
|
+
#
|
325
|
+
# Creates a new CDN origin within an endpoint.
|
326
|
+
#
|
327
|
+
# @param origin_name [String] Name of the origin, an arbitrary value but it
|
328
|
+
# needs to be unique under endpoint
|
329
|
+
# @param origin_properties [OriginParameters] Origin properties
|
330
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
331
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
332
|
+
# group.
|
333
|
+
# @param resource_group_name [String] Name of the resource group within the
|
334
|
+
# Azure subscription.
|
335
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
336
|
+
# to the HTTP request.
|
337
|
+
#
|
338
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
339
|
+
#
|
340
|
+
def begin_create_async(origin_name, origin_properties, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
223
341
|
fail ArgumentError, 'origin_name is nil' if origin_name.nil?
|
224
342
|
fail ArgumentError, 'origin_properties is nil' if origin_properties.nil?
|
225
343
|
origin_properties.validate unless origin_properties.nil?
|
@@ -239,7 +357,7 @@ module Azure::ARM::CDN
|
|
239
357
|
unless origin_properties.nil?
|
240
358
|
origin_properties = OriginParameters.serialize_object(origin_properties)
|
241
359
|
end
|
242
|
-
request_content = JSON.generate(origin_properties, quirks_mode: true)
|
360
|
+
request_content = origin_properties != nil ? JSON.generate(origin_properties, quirks_mode: true) : nil
|
243
361
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}'
|
244
362
|
options = {
|
245
363
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -248,7 +366,10 @@ module Azure::ARM::CDN
|
|
248
366
|
body: request_content,
|
249
367
|
headers: request_headers.merge(custom_headers || {})
|
250
368
|
}
|
251
|
-
|
369
|
+
|
370
|
+
request_url = @base_url || @client.base_url
|
371
|
+
|
372
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
|
252
373
|
promise = request.run_promise do |req|
|
253
374
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
254
375
|
end
|
@@ -256,7 +377,7 @@ module Azure::ARM::CDN
|
|
256
377
|
promise = promise.then do |http_response|
|
257
378
|
status_code = http_response.status
|
258
379
|
response_content = http_response.body
|
259
|
-
unless status_code == 201 || status_code == 202
|
380
|
+
unless status_code == 200 || status_code == 201 || status_code == 202
|
260
381
|
error_model = JSON.load(response_content)
|
261
382
|
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
262
383
|
end
|
@@ -265,6 +386,18 @@ module Azure::ARM::CDN
|
|
265
386
|
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
266
387
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
267
388
|
# Deserialize Response
|
389
|
+
if status_code == 200
|
390
|
+
begin
|
391
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
392
|
+
unless parsed_response.nil?
|
393
|
+
parsed_response = Origin.deserialize_object(parsed_response)
|
394
|
+
end
|
395
|
+
result.body = parsed_response
|
396
|
+
rescue Exception => e
|
397
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
398
|
+
end
|
399
|
+
end
|
400
|
+
# Deserialize Response
|
268
401
|
if status_code == 201
|
269
402
|
begin
|
270
403
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
@@ -296,19 +429,19 @@ module Azure::ARM::CDN
|
|
296
429
|
end
|
297
430
|
|
298
431
|
#
|
299
|
-
# Updates an existing CDN
|
432
|
+
# Updates an existing CDN origin within an endpoint.
|
300
433
|
#
|
301
|
-
# @param origin_name [String] Name of the origin
|
302
|
-
#
|
434
|
+
# @param origin_name [String] Name of the origin. Must be unique within
|
435
|
+
# endpoint.
|
303
436
|
# @param origin_properties [OriginParameters] Origin properties
|
304
|
-
# @param endpoint_name [String] Name of the endpoint within the CDN profile
|
437
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
305
438
|
# @param profile_name [String] Name of the CDN profile within the resource
|
306
|
-
# group
|
439
|
+
# group.
|
307
440
|
# @param resource_group_name [String] Name of the resource group within the
|
308
|
-
# Azure subscription
|
309
|
-
# @param @client.subscription_id [String] Azure Subscription ID
|
441
|
+
# Azure subscription.
|
442
|
+
# @param @client.subscription_id [String] Azure Subscription ID.
|
310
443
|
# @param @client.api_version [String] Version of the API to be used with the
|
311
|
-
# client request
|
444
|
+
# client request. Current version is 2016-04-02
|
312
445
|
# @param @client.accept_language [String] Gets or sets the preferred language
|
313
446
|
# for the response.
|
314
447
|
#
|
@@ -317,7 +450,7 @@ module Azure::ARM::CDN
|
|
317
450
|
#
|
318
451
|
def update(origin_name, origin_properties, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
319
452
|
# Send request
|
320
|
-
promise =
|
453
|
+
promise = begin_update_async(origin_name, origin_properties, endpoint_name, profile_name, resource_group_name, custom_headers)
|
321
454
|
|
322
455
|
promise = promise.then do |response|
|
323
456
|
# Defining deserialization method.
|
@@ -328,30 +461,70 @@ module Azure::ARM::CDN
|
|
328
461
|
end
|
329
462
|
|
330
463
|
# Waiting for response.
|
331
|
-
@client.
|
464
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
332
465
|
end
|
333
466
|
|
334
467
|
promise
|
335
468
|
end
|
336
469
|
|
337
470
|
#
|
338
|
-
# Updates an existing CDN
|
471
|
+
# Updates an existing CDN origin within an endpoint.
|
339
472
|
#
|
340
|
-
# @param origin_name [String] Name of the origin
|
341
|
-
#
|
473
|
+
# @param origin_name [String] Name of the origin. Must be unique within
|
474
|
+
# endpoint.
|
342
475
|
# @param origin_properties [OriginParameters] Origin properties
|
343
|
-
# @param endpoint_name [String] Name of the endpoint within the CDN profile
|
476
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
344
477
|
# @param profile_name [String] Name of the CDN profile within the resource
|
345
|
-
# group
|
478
|
+
# group.
|
346
479
|
# @param resource_group_name [String] Name of the resource group within the
|
347
|
-
# Azure subscription
|
348
|
-
# @param [Hash{String => String}]
|
349
|
-
#
|
480
|
+
# Azure subscription.
|
481
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
482
|
+
# will be added to the HTTP request.
|
350
483
|
#
|
351
|
-
# @return [
|
352
|
-
# response.
|
484
|
+
# @return [Origin] operation results.
|
353
485
|
#
|
354
486
|
def begin_update(origin_name, origin_properties, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
487
|
+
response = begin_update_async(origin_name, origin_properties, endpoint_name, profile_name, resource_group_name, custom_headers).value!
|
488
|
+
response.body unless response.nil?
|
489
|
+
end
|
490
|
+
|
491
|
+
#
|
492
|
+
# Updates an existing CDN origin within an endpoint.
|
493
|
+
#
|
494
|
+
# @param origin_name [String] Name of the origin. Must be unique within
|
495
|
+
# endpoint.
|
496
|
+
# @param origin_properties [OriginParameters] Origin properties
|
497
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
498
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
499
|
+
# group.
|
500
|
+
# @param resource_group_name [String] Name of the resource group within the
|
501
|
+
# Azure subscription.
|
502
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
503
|
+
# will be added to the HTTP request.
|
504
|
+
#
|
505
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
506
|
+
#
|
507
|
+
def begin_update_with_http_info(origin_name, origin_properties, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
508
|
+
begin_update_async(origin_name, origin_properties, endpoint_name, profile_name, resource_group_name, custom_headers).value!
|
509
|
+
end
|
510
|
+
|
511
|
+
#
|
512
|
+
# Updates an existing CDN origin within an endpoint.
|
513
|
+
#
|
514
|
+
# @param origin_name [String] Name of the origin. Must be unique within
|
515
|
+
# endpoint.
|
516
|
+
# @param origin_properties [OriginParameters] Origin properties
|
517
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
518
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
519
|
+
# group.
|
520
|
+
# @param resource_group_name [String] Name of the resource group within the
|
521
|
+
# Azure subscription.
|
522
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
523
|
+
# to the HTTP request.
|
524
|
+
#
|
525
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
526
|
+
#
|
527
|
+
def begin_update_async(origin_name, origin_properties, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
355
528
|
fail ArgumentError, 'origin_name is nil' if origin_name.nil?
|
356
529
|
fail ArgumentError, 'origin_properties is nil' if origin_properties.nil?
|
357
530
|
origin_properties.validate unless origin_properties.nil?
|
@@ -371,7 +544,7 @@ module Azure::ARM::CDN
|
|
371
544
|
unless origin_properties.nil?
|
372
545
|
origin_properties = OriginParameters.serialize_object(origin_properties)
|
373
546
|
end
|
374
|
-
request_content = JSON.generate(origin_properties, quirks_mode: true)
|
547
|
+
request_content = origin_properties != nil ? JSON.generate(origin_properties, quirks_mode: true) : nil
|
375
548
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}'
|
376
549
|
options = {
|
377
550
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -380,7 +553,10 @@ module Azure::ARM::CDN
|
|
380
553
|
body: request_content,
|
381
554
|
headers: request_headers.merge(custom_headers || {})
|
382
555
|
}
|
383
|
-
|
556
|
+
|
557
|
+
request_url = @base_url || @client.base_url
|
558
|
+
|
559
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
|
384
560
|
promise = request.run_promise do |req|
|
385
561
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
386
562
|
end
|
@@ -428,21 +604,21 @@ module Azure::ARM::CDN
|
|
428
604
|
end
|
429
605
|
|
430
606
|
#
|
431
|
-
# Deletes an existing CDN
|
607
|
+
# Deletes an existing CDN origin within an endpoint.
|
432
608
|
#
|
433
|
-
# @param origin_name [String] Name of the origin
|
434
|
-
#
|
435
|
-
# @param endpoint_name [String] Name of the endpoint within the CDN profile
|
609
|
+
# @param origin_name [String] Name of the origin. Must be unique within
|
610
|
+
# endpoint.
|
611
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
436
612
|
# @param profile_name [String] Name of the CDN profile within the resource
|
437
|
-
# group
|
613
|
+
# group.
|
438
614
|
# @param resource_group_name [String] Name of the resource group within the
|
439
|
-
# Azure subscription
|
615
|
+
# Azure subscription.
|
440
616
|
# @return [Concurrent::Promise] promise which provides async access to http
|
441
617
|
# response.
|
442
618
|
#
|
443
619
|
def delete_if_exists(origin_name, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
444
620
|
# Send request
|
445
|
-
promise =
|
621
|
+
promise = begin_delete_if_exists_async(origin_name, endpoint_name, profile_name, resource_group_name, custom_headers)
|
446
622
|
|
447
623
|
promise = promise.then do |response|
|
448
624
|
# Defining deserialization method.
|
@@ -453,29 +629,67 @@ module Azure::ARM::CDN
|
|
453
629
|
end
|
454
630
|
|
455
631
|
# Waiting for response.
|
456
|
-
@client.
|
632
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
457
633
|
end
|
458
634
|
|
459
635
|
promise
|
460
636
|
end
|
461
637
|
|
462
638
|
#
|
463
|
-
# Deletes an existing CDN
|
639
|
+
# Deletes an existing CDN origin within an endpoint.
|
464
640
|
#
|
465
|
-
# @param origin_name [String] Name of the origin
|
466
|
-
#
|
467
|
-
# @param endpoint_name [String] Name of the endpoint within the CDN profile
|
641
|
+
# @param origin_name [String] Name of the origin. Must be unique within
|
642
|
+
# endpoint.
|
643
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
468
644
|
# @param profile_name [String] Name of the CDN profile within the resource
|
469
|
-
# group
|
645
|
+
# group.
|
470
646
|
# @param resource_group_name [String] Name of the resource group within the
|
471
|
-
# Azure subscription
|
472
|
-
# @param [Hash{String => String}]
|
473
|
-
#
|
647
|
+
# Azure subscription.
|
648
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
649
|
+
# will be added to the HTTP request.
|
474
650
|
#
|
475
|
-
# @return [
|
476
|
-
# response.
|
651
|
+
# @return [Origin] operation results.
|
477
652
|
#
|
478
653
|
def begin_delete_if_exists(origin_name, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
654
|
+
response = begin_delete_if_exists_async(origin_name, endpoint_name, profile_name, resource_group_name, custom_headers).value!
|
655
|
+
response.body unless response.nil?
|
656
|
+
end
|
657
|
+
|
658
|
+
#
|
659
|
+
# Deletes an existing CDN origin within an endpoint.
|
660
|
+
#
|
661
|
+
# @param origin_name [String] Name of the origin. Must be unique within
|
662
|
+
# endpoint.
|
663
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
664
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
665
|
+
# group.
|
666
|
+
# @param resource_group_name [String] Name of the resource group within the
|
667
|
+
# Azure subscription.
|
668
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
669
|
+
# will be added to the HTTP request.
|
670
|
+
#
|
671
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
672
|
+
#
|
673
|
+
def begin_delete_if_exists_with_http_info(origin_name, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
674
|
+
begin_delete_if_exists_async(origin_name, endpoint_name, profile_name, resource_group_name, custom_headers).value!
|
675
|
+
end
|
676
|
+
|
677
|
+
#
|
678
|
+
# Deletes an existing CDN origin within an endpoint.
|
679
|
+
#
|
680
|
+
# @param origin_name [String] Name of the origin. Must be unique within
|
681
|
+
# endpoint.
|
682
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
683
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
684
|
+
# group.
|
685
|
+
# @param resource_group_name [String] Name of the resource group within the
|
686
|
+
# Azure subscription.
|
687
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
688
|
+
# to the HTTP request.
|
689
|
+
#
|
690
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
691
|
+
#
|
692
|
+
def begin_delete_if_exists_async(origin_name, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
479
693
|
fail ArgumentError, 'origin_name is nil' if origin_name.nil?
|
480
694
|
fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
|
481
695
|
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
@@ -494,7 +708,10 @@ module Azure::ARM::CDN
|
|
494
708
|
query_params: {'api-version' => @client.api_version},
|
495
709
|
headers: request_headers.merge(custom_headers || {})
|
496
710
|
}
|
497
|
-
|
711
|
+
|
712
|
+
request_url = @base_url || @client.base_url
|
713
|
+
|
714
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
|
498
715
|
promise = request.run_promise do |req|
|
499
716
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
500
717
|
end
|