azure_mgmt_cdn 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YzgzM2M5MTY2Mjk0MDAzNDU3MDExMjgwMmI1N2EyNWJmNDJjNDdkMg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MzBiNzlkNGQyMzJiZDdhY2I3NDI1NWZmZmVmM2RmZjA0NjNmZTM3MQ==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NTUwNjUxNjljZTA3ZmM5ZTRlOGEyZDVmNzJjOTA4NmVhNWRlOTQ2NmIzYTg4
|
10
|
+
ZGU5NDlmNGY0MWNlMmQ1YjdjY2NjOGUxNDM2NDllYzNlNzk0OTMwM2Y5YjNi
|
11
|
+
MTNjOTcwZjcxNDU5MTE0YjZhMDBkNzUyZTgxZGY1ZjVlNjc1ZGQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MjM0NDc2NGFhMDJmYzUxYmFkZDVkZDIzOGU4YmMwOTE5N2M4YWEyZDUzMjdk
|
14
|
+
NzdkYjcwOGFmYzExY2ZhYjU4ODU2ODk3ZDc5YmY0MWMzOWQ0ZGYyNzk5Yjdm
|
15
|
+
ZTk0MWMyY2IxOWYxNjc4NTcxNGI3NzdlYzJkMjlmNThiNWMyYWE=
|
data/azure_mgmt_cdn.gemspec
CHANGED
data/lib/azure_mgmt_cdn.rb
CHANGED
@@ -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
|
|
@@ -29,11 +29,10 @@ module Azure::ARM::CDN
|
|
29
29
|
autoload :CdnManagementClient, 'azure_mgmt_cdn/cdn_management_client.rb'
|
30
30
|
|
31
31
|
module Models
|
32
|
-
autoload :ProfileProperties, 'azure_mgmt_cdn/models/profile_properties.rb'
|
33
32
|
autoload :Sku, 'azure_mgmt_cdn/models/sku.rb'
|
33
|
+
autoload :ProfileProperties, 'azure_mgmt_cdn/models/profile_properties.rb'
|
34
34
|
autoload :ProfileListResult, 'azure_mgmt_cdn/models/profile_list_result.rb'
|
35
35
|
autoload :ProfileCreateParameters, 'azure_mgmt_cdn/models/profile_create_parameters.rb'
|
36
|
-
autoload :ProfilePropertiesCreateParameters, 'azure_mgmt_cdn/models/profile_properties_create_parameters.rb'
|
37
36
|
autoload :ProfileUpdateParameters, 'azure_mgmt_cdn/models/profile_update_parameters.rb'
|
38
37
|
autoload :SsoUri, 'azure_mgmt_cdn/models/sso_uri.rb'
|
39
38
|
autoload :EndpointProperties, 'azure_mgmt_cdn/models/endpoint_properties.rb'
|
@@ -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
|
|
@@ -17,11 +17,11 @@ module Azure::ARM::CDN
|
|
17
17
|
# @return Gets Azure subscription credentials.
|
18
18
|
attr_reader :credentials
|
19
19
|
|
20
|
-
# @return [String] Azure Subscription ID
|
20
|
+
# @return [String] Azure Subscription ID.
|
21
21
|
attr_accessor :subscription_id
|
22
22
|
|
23
|
-
# @return [String] Version of the API to be used with the client request
|
24
|
-
#
|
23
|
+
# @return [String] Version of the API to be used with the client request.
|
24
|
+
# Current version is 2016-04-02
|
25
25
|
attr_reader :api_version
|
26
26
|
|
27
27
|
# @return [String] Gets or sets the preferred language for the response.
|
@@ -77,7 +77,7 @@ module Azure::ARM::CDN
|
|
77
77
|
@custom_domains = CustomDomains.new(self)
|
78
78
|
@name_availability = NameAvailability.new(self)
|
79
79
|
@operations = Operations.new(self)
|
80
|
-
@api_version = '
|
80
|
+
@api_version = '2016-04-02'
|
81
81
|
@accept_language = 'en-US'
|
82
82
|
@long_running_operation_retry_timeout = 30
|
83
83
|
@generate_client_request_id = true
|
@@ -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 custom domains 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 [CustomDomainListResult] 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 custom domains 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 custom domains 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 custom domain within an endpoint.
|
98
135
|
#
|
99
136
|
# @param custom_domain_name [String] Name of the custom domain within an
|
100
|
-
# endpoint
|
101
|
-
# @param endpoint_name [String] Name of the endpoint within the CDN profile
|
137
|
+
# endpoint.
|
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 [CustomDomain] operation results.
|
111
147
|
#
|
112
148
|
def get(custom_domain_name, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
149
|
+
response = get_async(custom_domain_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 custom domain within an endpoint.
|
155
|
+
#
|
156
|
+
# @param custom_domain_name [String] Name of the custom domain within an
|
157
|
+
# 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(custom_domain_name, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
169
|
+
get_async(custom_domain_name, endpoint_name, profile_name, resource_group_name, custom_headers).value!
|
170
|
+
end
|
171
|
+
|
172
|
+
#
|
173
|
+
# Gets an existing CDN custom domain within an endpoint.
|
174
|
+
#
|
175
|
+
# @param custom_domain_name [String] Name of the custom domain within an
|
176
|
+
# 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(custom_domain_name, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
113
188
|
fail ArgumentError, 'custom_domain_name is nil' if custom_domain_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,20 +242,20 @@ module Azure::ARM::CDN
|
|
164
242
|
end
|
165
243
|
|
166
244
|
#
|
167
|
-
# Creates a new CDN
|
245
|
+
# Creates a new CDN custom domain within an endpoint.
|
168
246
|
#
|
169
247
|
# @param custom_domain_name [String] Name of the custom domain within an
|
170
|
-
# endpoint
|
248
|
+
# endpoint.
|
171
249
|
# @param custom_domain_properties [CustomDomainParameters] Custom domain
|
172
|
-
# properties required for creation
|
173
|
-
# @param endpoint_name [String] Name of the endpoint within the CDN profile
|
250
|
+
# properties required for creation.
|
251
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
174
252
|
# @param profile_name [String] Name of the CDN profile within the resource
|
175
|
-
# group
|
253
|
+
# group.
|
176
254
|
# @param resource_group_name [String] Name of the resource group within the
|
177
|
-
# Azure subscription
|
178
|
-
# @param @client.subscription_id [String] Azure Subscription ID
|
255
|
+
# Azure subscription.
|
256
|
+
# @param @client.subscription_id [String] Azure Subscription ID.
|
179
257
|
# @param @client.api_version [String] Version of the API to be used with the
|
180
|
-
# client request
|
258
|
+
# client request. Current version is 2016-04-02
|
181
259
|
# @param @client.accept_language [String] Gets or sets the preferred language
|
182
260
|
# for the response.
|
183
261
|
#
|
@@ -186,7 +264,7 @@ module Azure::ARM::CDN
|
|
186
264
|
#
|
187
265
|
def create(custom_domain_name, custom_domain_properties, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
188
266
|
# Send request
|
189
|
-
promise =
|
267
|
+
promise = begin_create_async(custom_domain_name, custom_domain_properties, endpoint_name, profile_name, resource_group_name, custom_headers)
|
190
268
|
|
191
269
|
promise = promise.then do |response|
|
192
270
|
# Defining deserialization method.
|
@@ -197,31 +275,73 @@ module Azure::ARM::CDN
|
|
197
275
|
end
|
198
276
|
|
199
277
|
# Waiting for response.
|
200
|
-
@client.
|
278
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
201
279
|
end
|
202
280
|
|
203
281
|
promise
|
204
282
|
end
|
205
283
|
|
206
284
|
#
|
207
|
-
# Creates a new CDN
|
285
|
+
# Creates a new CDN custom domain within an endpoint.
|
208
286
|
#
|
209
287
|
# @param custom_domain_name [String] Name of the custom domain within an
|
210
|
-
# endpoint
|
288
|
+
# endpoint.
|
211
289
|
# @param custom_domain_properties [CustomDomainParameters] Custom domain
|
212
|
-
# properties required for creation
|
213
|
-
# @param endpoint_name [String] Name of the endpoint within the CDN profile
|
290
|
+
# properties required for creation.
|
291
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
214
292
|
# @param profile_name [String] Name of the CDN profile within the resource
|
215
|
-
# group
|
293
|
+
# group.
|
216
294
|
# @param resource_group_name [String] Name of the resource group within the
|
217
|
-
# Azure subscription
|
218
|
-
# @param [Hash{String => String}]
|
219
|
-
#
|
295
|
+
# Azure subscription.
|
296
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
297
|
+
# will be added to the HTTP request.
|
220
298
|
#
|
221
|
-
# @return [
|
222
|
-
# response.
|
299
|
+
# @return [CustomDomain] operation results.
|
223
300
|
#
|
224
301
|
def begin_create(custom_domain_name, custom_domain_properties, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
302
|
+
response = begin_create_async(custom_domain_name, custom_domain_properties, endpoint_name, profile_name, resource_group_name, custom_headers).value!
|
303
|
+
response.body unless response.nil?
|
304
|
+
end
|
305
|
+
|
306
|
+
#
|
307
|
+
# Creates a new CDN custom domain within an endpoint.
|
308
|
+
#
|
309
|
+
# @param custom_domain_name [String] Name of the custom domain within an
|
310
|
+
# endpoint.
|
311
|
+
# @param custom_domain_properties [CustomDomainParameters] Custom domain
|
312
|
+
# properties required for creation.
|
313
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
314
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
315
|
+
# group.
|
316
|
+
# @param resource_group_name [String] Name of the resource group within the
|
317
|
+
# Azure subscription.
|
318
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
319
|
+
# will be added to the HTTP request.
|
320
|
+
#
|
321
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
322
|
+
#
|
323
|
+
def begin_create_with_http_info(custom_domain_name, custom_domain_properties, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
324
|
+
begin_create_async(custom_domain_name, custom_domain_properties, endpoint_name, profile_name, resource_group_name, custom_headers).value!
|
325
|
+
end
|
326
|
+
|
327
|
+
#
|
328
|
+
# Creates a new CDN custom domain within an endpoint.
|
329
|
+
#
|
330
|
+
# @param custom_domain_name [String] Name of the custom domain within an
|
331
|
+
# endpoint.
|
332
|
+
# @param custom_domain_properties [CustomDomainParameters] Custom domain
|
333
|
+
# properties required for creation.
|
334
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
335
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
336
|
+
# group.
|
337
|
+
# @param resource_group_name [String] Name of the resource group within the
|
338
|
+
# Azure subscription.
|
339
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
340
|
+
# to the HTTP request.
|
341
|
+
#
|
342
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
343
|
+
#
|
344
|
+
def begin_create_async(custom_domain_name, custom_domain_properties, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
225
345
|
fail ArgumentError, 'custom_domain_name is nil' if custom_domain_name.nil?
|
226
346
|
fail ArgumentError, 'custom_domain_properties is nil' if custom_domain_properties.nil?
|
227
347
|
custom_domain_properties.validate unless custom_domain_properties.nil?
|
@@ -241,7 +361,7 @@ module Azure::ARM::CDN
|
|
241
361
|
unless custom_domain_properties.nil?
|
242
362
|
custom_domain_properties = CustomDomainParameters.serialize_object(custom_domain_properties)
|
243
363
|
end
|
244
|
-
request_content = JSON.generate(custom_domain_properties, quirks_mode: true)
|
364
|
+
request_content = custom_domain_properties != nil ? JSON.generate(custom_domain_properties, quirks_mode: true) : nil
|
245
365
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}'
|
246
366
|
options = {
|
247
367
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -250,7 +370,10 @@ module Azure::ARM::CDN
|
|
250
370
|
body: request_content,
|
251
371
|
headers: request_headers.merge(custom_headers || {})
|
252
372
|
}
|
253
|
-
|
373
|
+
|
374
|
+
request_url = @base_url || @client.base_url
|
375
|
+
|
376
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
|
254
377
|
promise = request.run_promise do |req|
|
255
378
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
256
379
|
end
|
@@ -258,7 +381,7 @@ module Azure::ARM::CDN
|
|
258
381
|
promise = promise.then do |http_response|
|
259
382
|
status_code = http_response.status
|
260
383
|
response_content = http_response.body
|
261
|
-
unless status_code == 201 || status_code == 202
|
384
|
+
unless status_code == 200 || status_code == 201 || status_code == 202
|
262
385
|
error_model = JSON.load(response_content)
|
263
386
|
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
264
387
|
end
|
@@ -267,6 +390,18 @@ module Azure::ARM::CDN
|
|
267
390
|
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
268
391
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
269
392
|
# Deserialize Response
|
393
|
+
if status_code == 200
|
394
|
+
begin
|
395
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
396
|
+
unless parsed_response.nil?
|
397
|
+
parsed_response = CustomDomain.deserialize_object(parsed_response)
|
398
|
+
end
|
399
|
+
result.body = parsed_response
|
400
|
+
rescue Exception => e
|
401
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
402
|
+
end
|
403
|
+
end
|
404
|
+
# Deserialize Response
|
270
405
|
if status_code == 201
|
271
406
|
begin
|
272
407
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
@@ -298,24 +433,66 @@ module Azure::ARM::CDN
|
|
298
433
|
end
|
299
434
|
|
300
435
|
#
|
301
|
-
# Updates an existing CDN
|
436
|
+
# Updates an existing CDN custom domain within an endpoint.
|
302
437
|
#
|
303
438
|
# @param custom_domain_name [String] Name of the custom domain within an
|
304
|
-
# endpoint
|
439
|
+
# endpoint.
|
305
440
|
# @param custom_domain_properties [CustomDomainParameters] Custom domain
|
306
|
-
# properties to update
|
307
|
-
# @param endpoint_name [String] Name of the endpoint within the CDN profile
|
441
|
+
# properties to update.
|
442
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
308
443
|
# @param profile_name [String] Name of the CDN profile within the resource
|
309
|
-
# group
|
444
|
+
# group.
|
310
445
|
# @param resource_group_name [String] Name of the resource group within the
|
311
|
-
# Azure subscription
|
312
|
-
# @param [Hash{String => String}]
|
313
|
-
#
|
446
|
+
# Azure subscription.
|
447
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
448
|
+
# will be added to the HTTP request.
|
314
449
|
#
|
315
|
-
# @return [
|
316
|
-
# response.
|
450
|
+
# @return [ErrorResponse] operation results.
|
317
451
|
#
|
318
452
|
def update(custom_domain_name, custom_domain_properties, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
453
|
+
response = update_async(custom_domain_name, custom_domain_properties, endpoint_name, profile_name, resource_group_name, custom_headers).value!
|
454
|
+
response.body unless response.nil?
|
455
|
+
end
|
456
|
+
|
457
|
+
#
|
458
|
+
# Updates an existing CDN custom domain within an endpoint.
|
459
|
+
#
|
460
|
+
# @param custom_domain_name [String] Name of the custom domain within an
|
461
|
+
# endpoint.
|
462
|
+
# @param custom_domain_properties [CustomDomainParameters] Custom domain
|
463
|
+
# properties to update.
|
464
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
465
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
466
|
+
# group.
|
467
|
+
# @param resource_group_name [String] Name of the resource group within the
|
468
|
+
# Azure subscription.
|
469
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
470
|
+
# will be added to the HTTP request.
|
471
|
+
#
|
472
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
473
|
+
#
|
474
|
+
def update_with_http_info(custom_domain_name, custom_domain_properties, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
475
|
+
update_async(custom_domain_name, custom_domain_properties, endpoint_name, profile_name, resource_group_name, custom_headers).value!
|
476
|
+
end
|
477
|
+
|
478
|
+
#
|
479
|
+
# Updates an existing CDN custom domain within an endpoint.
|
480
|
+
#
|
481
|
+
# @param custom_domain_name [String] Name of the custom domain within an
|
482
|
+
# endpoint.
|
483
|
+
# @param custom_domain_properties [CustomDomainParameters] Custom domain
|
484
|
+
# properties to update.
|
485
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
486
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
487
|
+
# group.
|
488
|
+
# @param resource_group_name [String] Name of the resource group within the
|
489
|
+
# Azure subscription.
|
490
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
491
|
+
# to the HTTP request.
|
492
|
+
#
|
493
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
494
|
+
#
|
495
|
+
def update_async(custom_domain_name, custom_domain_properties, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
319
496
|
fail ArgumentError, 'custom_domain_name is nil' if custom_domain_name.nil?
|
320
497
|
fail ArgumentError, 'custom_domain_properties is nil' if custom_domain_properties.nil?
|
321
498
|
custom_domain_properties.validate unless custom_domain_properties.nil?
|
@@ -335,7 +512,7 @@ module Azure::ARM::CDN
|
|
335
512
|
unless custom_domain_properties.nil?
|
336
513
|
custom_domain_properties = CustomDomainParameters.serialize_object(custom_domain_properties)
|
337
514
|
end
|
338
|
-
request_content = JSON.generate(custom_domain_properties, quirks_mode: true)
|
515
|
+
request_content = custom_domain_properties != nil ? JSON.generate(custom_domain_properties, quirks_mode: true) : nil
|
339
516
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}'
|
340
517
|
options = {
|
341
518
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -344,7 +521,10 @@ module Azure::ARM::CDN
|
|
344
521
|
body: request_content,
|
345
522
|
headers: request_headers.merge(custom_headers || {})
|
346
523
|
}
|
347
|
-
|
524
|
+
|
525
|
+
request_url = @base_url || @client.base_url
|
526
|
+
|
527
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
|
348
528
|
promise = request.run_promise do |req|
|
349
529
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
350
530
|
end
|
@@ -377,21 +557,21 @@ module Azure::ARM::CDN
|
|
377
557
|
end
|
378
558
|
|
379
559
|
#
|
380
|
-
# Deletes an existing CDN
|
560
|
+
# Deletes an existing CDN custom domain within an endpoint.
|
381
561
|
#
|
382
562
|
# @param custom_domain_name [String] Name of the custom domain within an
|
383
|
-
# endpoint
|
384
|
-
# @param endpoint_name [String] Name of the endpoint within the CDN profile
|
563
|
+
# endpoint.
|
564
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
385
565
|
# @param profile_name [String] Name of the CDN profile within the resource
|
386
|
-
# group
|
566
|
+
# group.
|
387
567
|
# @param resource_group_name [String] Name of the resource group within the
|
388
|
-
# Azure subscription
|
568
|
+
# Azure subscription.
|
389
569
|
# @return [Concurrent::Promise] promise which provides async access to http
|
390
570
|
# response.
|
391
571
|
#
|
392
572
|
def delete_if_exists(custom_domain_name, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
393
573
|
# Send request
|
394
|
-
promise =
|
574
|
+
promise = begin_delete_if_exists_async(custom_domain_name, endpoint_name, profile_name, resource_group_name, custom_headers)
|
395
575
|
|
396
576
|
promise = promise.then do |response|
|
397
577
|
# Defining deserialization method.
|
@@ -402,29 +582,67 @@ module Azure::ARM::CDN
|
|
402
582
|
end
|
403
583
|
|
404
584
|
# Waiting for response.
|
405
|
-
@client.
|
585
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
406
586
|
end
|
407
587
|
|
408
588
|
promise
|
409
589
|
end
|
410
590
|
|
411
591
|
#
|
412
|
-
# Deletes an existing CDN
|
592
|
+
# Deletes an existing CDN custom domain within an endpoint.
|
413
593
|
#
|
414
594
|
# @param custom_domain_name [String] Name of the custom domain within an
|
415
|
-
# endpoint
|
416
|
-
# @param endpoint_name [String] Name of the endpoint within the CDN profile
|
595
|
+
# endpoint.
|
596
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
417
597
|
# @param profile_name [String] Name of the CDN profile within the resource
|
418
|
-
# group
|
598
|
+
# group.
|
419
599
|
# @param resource_group_name [String] Name of the resource group within the
|
420
|
-
# Azure subscription
|
421
|
-
# @param [Hash{String => String}]
|
422
|
-
#
|
600
|
+
# Azure subscription.
|
601
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
602
|
+
# will be added to the HTTP request.
|
423
603
|
#
|
424
|
-
# @return [
|
425
|
-
# response.
|
604
|
+
# @return [CustomDomain] operation results.
|
426
605
|
#
|
427
606
|
def begin_delete_if_exists(custom_domain_name, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
607
|
+
response = begin_delete_if_exists_async(custom_domain_name, endpoint_name, profile_name, resource_group_name, custom_headers).value!
|
608
|
+
response.body unless response.nil?
|
609
|
+
end
|
610
|
+
|
611
|
+
#
|
612
|
+
# Deletes an existing CDN custom domain within an endpoint.
|
613
|
+
#
|
614
|
+
# @param custom_domain_name [String] Name of the custom domain within an
|
615
|
+
# endpoint.
|
616
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
617
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
618
|
+
# group.
|
619
|
+
# @param resource_group_name [String] Name of the resource group within the
|
620
|
+
# Azure subscription.
|
621
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
622
|
+
# will be added to the HTTP request.
|
623
|
+
#
|
624
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
625
|
+
#
|
626
|
+
def begin_delete_if_exists_with_http_info(custom_domain_name, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
627
|
+
begin_delete_if_exists_async(custom_domain_name, endpoint_name, profile_name, resource_group_name, custom_headers).value!
|
628
|
+
end
|
629
|
+
|
630
|
+
#
|
631
|
+
# Deletes an existing CDN custom domain within an endpoint.
|
632
|
+
#
|
633
|
+
# @param custom_domain_name [String] Name of the custom domain within an
|
634
|
+
# endpoint.
|
635
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
636
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
637
|
+
# group.
|
638
|
+
# @param resource_group_name [String] Name of the resource group within the
|
639
|
+
# Azure subscription.
|
640
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
641
|
+
# to the HTTP request.
|
642
|
+
#
|
643
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
644
|
+
#
|
645
|
+
def begin_delete_if_exists_async(custom_domain_name, endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
428
646
|
fail ArgumentError, 'custom_domain_name is nil' if custom_domain_name.nil?
|
429
647
|
fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
|
430
648
|
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
@@ -443,7 +661,10 @@ module Azure::ARM::CDN
|
|
443
661
|
query_params: {'api-version' => @client.api_version},
|
444
662
|
headers: request_headers.merge(custom_headers || {})
|
445
663
|
}
|
446
|
-
|
664
|
+
|
665
|
+
request_url = @base_url || @client.base_url
|
666
|
+
|
667
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
|
447
668
|
promise = request.run_promise do |req|
|
448
669
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
449
670
|
end
|