azure_mgmt_appconfiguration 0.17.2 → 0.17.3
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 +4 -4
- data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/app_configuration_management_client.rb +1 -1
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/app_configuration_management_client.rb +1 -1
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration.rb +63 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/app_configuration_management_client.rb +143 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb +1500 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/actions_required.rb +16 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/api_key.rb +111 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/api_key_list_result.rb +99 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/check_name_availability_parameters.rb +60 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/configuration_store.rb +199 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/configuration_store_list_result.rb +99 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/configuration_store_update_parameters.rb +92 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/connection_status.rb +18 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/encryption_properties.rb +47 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/error.rb +57 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/identity_type.rb +18 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/key_value.rb +150 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/key_vault_properties.rb +58 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/list_key_value_parameters.rb +57 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/name_availability_status.rb +73 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/operation_definition.rb +59 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/operation_definition_display.rb +81 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/operation_definition_list_result.rb +99 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/private_endpoint.rb +46 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/private_endpoint_connection.rb +111 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/private_endpoint_connection_list_result.rb +99 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/private_endpoint_connection_reference.rb +111 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/private_link_resource.rb +125 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/private_link_resource_list_result.rb +99 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/private_link_service_connection_state.rb +73 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/provisioning_state.rb +20 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/public_network_access.rb +16 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/regenerate_key_parameters.rb +46 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/resource.rb +111 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/resource_identity.rb +99 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/sku.rb +46 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/user_identity.rb +59 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/module_definition.rb +9 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/operations.rb +339 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/private_endpoint_connections.rb +675 -0
- data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/private_link_resources.rb +352 -0
- data/lib/azure_mgmt_appconfiguration.rb +2 -1
- data/lib/profiles/latest/modules/appconfiguration_profile_module.rb +89 -81
- data/lib/version.rb +1 -1
- metadata +41 -2
@@ -0,0 +1,9 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure end
|
7
|
+
module Azure::Appconfiguration end
|
8
|
+
module Azure::Appconfiguration::Mgmt end
|
9
|
+
module Azure::Appconfiguration::Mgmt::V2020_06_01 end
|
@@ -0,0 +1,339 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Appconfiguration::Mgmt::V2020_06_01
|
7
|
+
#
|
8
|
+
# Operations
|
9
|
+
#
|
10
|
+
class Operations
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Operations class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [AppConfigurationManagementClient] reference to the AppConfigurationManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Checks whether the configuration store name is available for use.
|
26
|
+
#
|
27
|
+
# @param check_name_availability_parameters [CheckNameAvailabilityParameters]
|
28
|
+
# The object containing information for the availability request.
|
29
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
30
|
+
# will be added to the HTTP request.
|
31
|
+
#
|
32
|
+
# @return [NameAvailabilityStatus] operation results.
|
33
|
+
#
|
34
|
+
def check_name_availability(check_name_availability_parameters, custom_headers:nil)
|
35
|
+
response = check_name_availability_async(check_name_availability_parameters, custom_headers:custom_headers).value!
|
36
|
+
response.body unless response.nil?
|
37
|
+
end
|
38
|
+
|
39
|
+
#
|
40
|
+
# Checks whether the configuration store name is available for use.
|
41
|
+
#
|
42
|
+
# @param check_name_availability_parameters [CheckNameAvailabilityParameters]
|
43
|
+
# The object containing information for the availability request.
|
44
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
45
|
+
# will be added to the HTTP request.
|
46
|
+
#
|
47
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
48
|
+
#
|
49
|
+
def check_name_availability_with_http_info(check_name_availability_parameters, custom_headers:nil)
|
50
|
+
check_name_availability_async(check_name_availability_parameters, custom_headers:custom_headers).value!
|
51
|
+
end
|
52
|
+
|
53
|
+
#
|
54
|
+
# Checks whether the configuration store name is available for use.
|
55
|
+
#
|
56
|
+
# @param check_name_availability_parameters [CheckNameAvailabilityParameters]
|
57
|
+
# The object containing information for the availability request.
|
58
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
59
|
+
# to the HTTP request.
|
60
|
+
#
|
61
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
62
|
+
#
|
63
|
+
def check_name_availability_async(check_name_availability_parameters, custom_headers:nil)
|
64
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
65
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
66
|
+
fail ArgumentError, 'check_name_availability_parameters is nil' if check_name_availability_parameters.nil?
|
67
|
+
|
68
|
+
|
69
|
+
request_headers = {}
|
70
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
71
|
+
|
72
|
+
# Set Headers
|
73
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
74
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
75
|
+
|
76
|
+
# Serialize Request
|
77
|
+
request_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::CheckNameAvailabilityParameters.mapper()
|
78
|
+
request_content = @client.serialize(request_mapper, check_name_availability_parameters)
|
79
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
80
|
+
|
81
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/checkNameAvailability'
|
82
|
+
|
83
|
+
request_url = @base_url || @client.base_url
|
84
|
+
|
85
|
+
options = {
|
86
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
87
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
88
|
+
query_params: {'api-version' => @client.api_version},
|
89
|
+
body: request_content,
|
90
|
+
headers: request_headers.merge(custom_headers || {}),
|
91
|
+
base_url: request_url
|
92
|
+
}
|
93
|
+
promise = @client.make_request_async(:post, path_template, options)
|
94
|
+
|
95
|
+
promise = promise.then do |result|
|
96
|
+
http_response = result.response
|
97
|
+
status_code = http_response.status
|
98
|
+
response_content = http_response.body
|
99
|
+
unless status_code == 200
|
100
|
+
error_model = JSON.load(response_content)
|
101
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
102
|
+
end
|
103
|
+
|
104
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
105
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
106
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
107
|
+
# Deserialize Response
|
108
|
+
if status_code == 200
|
109
|
+
begin
|
110
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
111
|
+
result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::NameAvailabilityStatus.mapper()
|
112
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
113
|
+
rescue Exception => e
|
114
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
result
|
119
|
+
end
|
120
|
+
|
121
|
+
promise.execute
|
122
|
+
end
|
123
|
+
|
124
|
+
#
|
125
|
+
# Lists the operations available from this provider.
|
126
|
+
#
|
127
|
+
# @param skip_token [String] A skip token is used to continue retrieving items
|
128
|
+
# after an operation returns a partial result. If a previous response contains
|
129
|
+
# a nextLink element, the value of the nextLink element will include a
|
130
|
+
# skipToken parameter that specifies a starting point to use for subsequent
|
131
|
+
# calls.
|
132
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
133
|
+
# will be added to the HTTP request.
|
134
|
+
#
|
135
|
+
# @return [Array<OperationDefinition>] operation results.
|
136
|
+
#
|
137
|
+
def list(skip_token:nil, custom_headers:nil)
|
138
|
+
first_page = list_as_lazy(skip_token:skip_token, custom_headers:custom_headers)
|
139
|
+
first_page.get_all_items
|
140
|
+
end
|
141
|
+
|
142
|
+
#
|
143
|
+
# Lists the operations available from this provider.
|
144
|
+
#
|
145
|
+
# @param skip_token [String] A skip token is used to continue retrieving items
|
146
|
+
# after an operation returns a partial result. If a previous response contains
|
147
|
+
# a nextLink element, the value of the nextLink element will include a
|
148
|
+
# skipToken parameter that specifies a starting point to use for subsequent
|
149
|
+
# calls.
|
150
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
151
|
+
# will be added to the HTTP request.
|
152
|
+
#
|
153
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
154
|
+
#
|
155
|
+
def list_with_http_info(skip_token:nil, custom_headers:nil)
|
156
|
+
list_async(skip_token:skip_token, custom_headers:custom_headers).value!
|
157
|
+
end
|
158
|
+
|
159
|
+
#
|
160
|
+
# Lists the operations available from this provider.
|
161
|
+
#
|
162
|
+
# @param skip_token [String] A skip token is used to continue retrieving items
|
163
|
+
# after an operation returns a partial result. If a previous response contains
|
164
|
+
# a nextLink element, the value of the nextLink element will include a
|
165
|
+
# skipToken parameter that specifies a starting point to use for subsequent
|
166
|
+
# calls.
|
167
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
168
|
+
# to the HTTP request.
|
169
|
+
#
|
170
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
171
|
+
#
|
172
|
+
def list_async(skip_token:nil, custom_headers:nil)
|
173
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
174
|
+
|
175
|
+
|
176
|
+
request_headers = {}
|
177
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
178
|
+
|
179
|
+
# Set Headers
|
180
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
181
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
182
|
+
path_template = 'providers/Microsoft.AppConfiguration/operations'
|
183
|
+
|
184
|
+
request_url = @base_url || @client.base_url
|
185
|
+
|
186
|
+
options = {
|
187
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
188
|
+
query_params: {'api-version' => @client.api_version,'$skipToken' => skip_token},
|
189
|
+
headers: request_headers.merge(custom_headers || {}),
|
190
|
+
base_url: request_url
|
191
|
+
}
|
192
|
+
promise = @client.make_request_async(:get, path_template, options)
|
193
|
+
|
194
|
+
promise = promise.then do |result|
|
195
|
+
http_response = result.response
|
196
|
+
status_code = http_response.status
|
197
|
+
response_content = http_response.body
|
198
|
+
unless status_code == 200
|
199
|
+
error_model = JSON.load(response_content)
|
200
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
201
|
+
end
|
202
|
+
|
203
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
204
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
205
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
206
|
+
# Deserialize Response
|
207
|
+
if status_code == 200
|
208
|
+
begin
|
209
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
210
|
+
result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::OperationDefinitionListResult.mapper()
|
211
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
212
|
+
rescue Exception => e
|
213
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
result
|
218
|
+
end
|
219
|
+
|
220
|
+
promise.execute
|
221
|
+
end
|
222
|
+
|
223
|
+
#
|
224
|
+
# Lists the operations available from this provider.
|
225
|
+
#
|
226
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
227
|
+
# to List operation.
|
228
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
229
|
+
# will be added to the HTTP request.
|
230
|
+
#
|
231
|
+
# @return [OperationDefinitionListResult] operation results.
|
232
|
+
#
|
233
|
+
def list_next(next_page_link, custom_headers:nil)
|
234
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
235
|
+
response.body unless response.nil?
|
236
|
+
end
|
237
|
+
|
238
|
+
#
|
239
|
+
# Lists the operations available from this provider.
|
240
|
+
#
|
241
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
242
|
+
# to List operation.
|
243
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
244
|
+
# will be added to the HTTP request.
|
245
|
+
#
|
246
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
247
|
+
#
|
248
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
249
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
250
|
+
end
|
251
|
+
|
252
|
+
#
|
253
|
+
# Lists the operations available from this provider.
|
254
|
+
#
|
255
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
256
|
+
# to List operation.
|
257
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
258
|
+
# to the HTTP request.
|
259
|
+
#
|
260
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
261
|
+
#
|
262
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
263
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
264
|
+
|
265
|
+
|
266
|
+
request_headers = {}
|
267
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
268
|
+
|
269
|
+
# Set Headers
|
270
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
271
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
272
|
+
path_template = '{nextLink}'
|
273
|
+
|
274
|
+
request_url = @base_url || @client.base_url
|
275
|
+
|
276
|
+
options = {
|
277
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
278
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
279
|
+
headers: request_headers.merge(custom_headers || {}),
|
280
|
+
base_url: request_url
|
281
|
+
}
|
282
|
+
promise = @client.make_request_async(:get, path_template, options)
|
283
|
+
|
284
|
+
promise = promise.then do |result|
|
285
|
+
http_response = result.response
|
286
|
+
status_code = http_response.status
|
287
|
+
response_content = http_response.body
|
288
|
+
unless status_code == 200
|
289
|
+
error_model = JSON.load(response_content)
|
290
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
291
|
+
end
|
292
|
+
|
293
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
294
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
295
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
296
|
+
# Deserialize Response
|
297
|
+
if status_code == 200
|
298
|
+
begin
|
299
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
300
|
+
result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::OperationDefinitionListResult.mapper()
|
301
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
302
|
+
rescue Exception => e
|
303
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
304
|
+
end
|
305
|
+
end
|
306
|
+
|
307
|
+
result
|
308
|
+
end
|
309
|
+
|
310
|
+
promise.execute
|
311
|
+
end
|
312
|
+
|
313
|
+
#
|
314
|
+
# Lists the operations available from this provider.
|
315
|
+
#
|
316
|
+
# @param skip_token [String] A skip token is used to continue retrieving items
|
317
|
+
# after an operation returns a partial result. If a previous response contains
|
318
|
+
# a nextLink element, the value of the nextLink element will include a
|
319
|
+
# skipToken parameter that specifies a starting point to use for subsequent
|
320
|
+
# calls.
|
321
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
322
|
+
# will be added to the HTTP request.
|
323
|
+
#
|
324
|
+
# @return [OperationDefinitionListResult] which provide lazy access to pages of
|
325
|
+
# the response.
|
326
|
+
#
|
327
|
+
def list_as_lazy(skip_token:nil, custom_headers:nil)
|
328
|
+
response = list_async(skip_token:skip_token, custom_headers:custom_headers).value!
|
329
|
+
unless response.nil?
|
330
|
+
page = response.body
|
331
|
+
page.next_method = Proc.new do |next_page_link|
|
332
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
333
|
+
end
|
334
|
+
page
|
335
|
+
end
|
336
|
+
end
|
337
|
+
|
338
|
+
end
|
339
|
+
end
|
@@ -0,0 +1,675 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Appconfiguration::Mgmt::V2020_06_01
|
7
|
+
#
|
8
|
+
# PrivateEndpointConnections
|
9
|
+
#
|
10
|
+
class PrivateEndpointConnections
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the PrivateEndpointConnections class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [AppConfigurationManagementClient] reference to the AppConfigurationManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Lists all private endpoint connections for a configuration store.
|
26
|
+
#
|
27
|
+
# @param resource_group_name [String] The name of the resource group to which
|
28
|
+
# the container registry belongs.
|
29
|
+
# @param config_store_name [String] The name of the configuration store.
|
30
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
31
|
+
# will be added to the HTTP request.
|
32
|
+
#
|
33
|
+
# @return [Array<PrivateEndpointConnection>] operation results.
|
34
|
+
#
|
35
|
+
def list_by_configuration_store(resource_group_name, config_store_name, custom_headers:nil)
|
36
|
+
first_page = list_by_configuration_store_as_lazy(resource_group_name, config_store_name, custom_headers:custom_headers)
|
37
|
+
first_page.get_all_items
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
# Lists all private endpoint connections for a configuration store.
|
42
|
+
#
|
43
|
+
# @param resource_group_name [String] The name of the resource group to which
|
44
|
+
# the container registry belongs.
|
45
|
+
# @param config_store_name [String] The name of the configuration store.
|
46
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
47
|
+
# will be added to the HTTP request.
|
48
|
+
#
|
49
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
50
|
+
#
|
51
|
+
def list_by_configuration_store_with_http_info(resource_group_name, config_store_name, custom_headers:nil)
|
52
|
+
list_by_configuration_store_async(resource_group_name, config_store_name, custom_headers:custom_headers).value!
|
53
|
+
end
|
54
|
+
|
55
|
+
#
|
56
|
+
# Lists all private endpoint connections for a configuration store.
|
57
|
+
#
|
58
|
+
# @param resource_group_name [String] The name of the resource group to which
|
59
|
+
# the container registry belongs.
|
60
|
+
# @param config_store_name [String] The name of the configuration store.
|
61
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
62
|
+
# to the HTTP request.
|
63
|
+
#
|
64
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
65
|
+
#
|
66
|
+
def list_by_configuration_store_async(resource_group_name, config_store_name, custom_headers:nil)
|
67
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
68
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
69
|
+
fail ArgumentError, 'config_store_name is nil' if config_store_name.nil?
|
70
|
+
fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MaxLength': '50'" if !config_store_name.nil? && config_store_name.length > 50
|
71
|
+
fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MinLength': '5'" if !config_store_name.nil? && config_store_name.length < 5
|
72
|
+
fail ArgumentError, "'config_store_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9_-]*$'" if !config_store_name.nil? && config_store_name.match(Regexp.new('^^[a-zA-Z0-9_-]*$$')).nil?
|
73
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
74
|
+
|
75
|
+
|
76
|
+
request_headers = {}
|
77
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
78
|
+
|
79
|
+
# Set Headers
|
80
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
81
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
82
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections'
|
83
|
+
|
84
|
+
request_url = @base_url || @client.base_url
|
85
|
+
|
86
|
+
options = {
|
87
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
88
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'configStoreName' => config_store_name},
|
89
|
+
query_params: {'api-version' => @client.api_version},
|
90
|
+
headers: request_headers.merge(custom_headers || {}),
|
91
|
+
base_url: request_url
|
92
|
+
}
|
93
|
+
promise = @client.make_request_async(:get, path_template, options)
|
94
|
+
|
95
|
+
promise = promise.then do |result|
|
96
|
+
http_response = result.response
|
97
|
+
status_code = http_response.status
|
98
|
+
response_content = http_response.body
|
99
|
+
unless status_code == 200
|
100
|
+
error_model = JSON.load(response_content)
|
101
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
102
|
+
end
|
103
|
+
|
104
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
105
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
106
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
107
|
+
# Deserialize Response
|
108
|
+
if status_code == 200
|
109
|
+
begin
|
110
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
111
|
+
result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PrivateEndpointConnectionListResult.mapper()
|
112
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
113
|
+
rescue Exception => e
|
114
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
result
|
119
|
+
end
|
120
|
+
|
121
|
+
promise.execute
|
122
|
+
end
|
123
|
+
|
124
|
+
#
|
125
|
+
# Gets the specified private endpoint connection associated with the
|
126
|
+
# configuration store.
|
127
|
+
#
|
128
|
+
# @param resource_group_name [String] The name of the resource group to which
|
129
|
+
# the container registry belongs.
|
130
|
+
# @param config_store_name [String] The name of the configuration store.
|
131
|
+
# @param private_endpoint_connection_name [String] Private endpoint connection
|
132
|
+
# name
|
133
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
134
|
+
# will be added to the HTTP request.
|
135
|
+
#
|
136
|
+
# @return [PrivateEndpointConnection] operation results.
|
137
|
+
#
|
138
|
+
def get(resource_group_name, config_store_name, private_endpoint_connection_name, custom_headers:nil)
|
139
|
+
response = get_async(resource_group_name, config_store_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
|
140
|
+
response.body unless response.nil?
|
141
|
+
end
|
142
|
+
|
143
|
+
#
|
144
|
+
# Gets the specified private endpoint connection associated with the
|
145
|
+
# configuration store.
|
146
|
+
#
|
147
|
+
# @param resource_group_name [String] The name of the resource group to which
|
148
|
+
# the container registry belongs.
|
149
|
+
# @param config_store_name [String] The name of the configuration store.
|
150
|
+
# @param private_endpoint_connection_name [String] Private endpoint connection
|
151
|
+
# name
|
152
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
153
|
+
# will be added to the HTTP request.
|
154
|
+
#
|
155
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
156
|
+
#
|
157
|
+
def get_with_http_info(resource_group_name, config_store_name, private_endpoint_connection_name, custom_headers:nil)
|
158
|
+
get_async(resource_group_name, config_store_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
|
159
|
+
end
|
160
|
+
|
161
|
+
#
|
162
|
+
# Gets the specified private endpoint connection associated with the
|
163
|
+
# configuration store.
|
164
|
+
#
|
165
|
+
# @param resource_group_name [String] The name of the resource group to which
|
166
|
+
# the container registry belongs.
|
167
|
+
# @param config_store_name [String] The name of the configuration store.
|
168
|
+
# @param private_endpoint_connection_name [String] Private endpoint connection
|
169
|
+
# name
|
170
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
171
|
+
# to the HTTP request.
|
172
|
+
#
|
173
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
174
|
+
#
|
175
|
+
def get_async(resource_group_name, config_store_name, private_endpoint_connection_name, custom_headers:nil)
|
176
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
177
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
178
|
+
fail ArgumentError, 'config_store_name is nil' if config_store_name.nil?
|
179
|
+
fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MaxLength': '50'" if !config_store_name.nil? && config_store_name.length > 50
|
180
|
+
fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MinLength': '5'" if !config_store_name.nil? && config_store_name.length < 5
|
181
|
+
fail ArgumentError, "'config_store_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9_-]*$'" if !config_store_name.nil? && config_store_name.match(Regexp.new('^^[a-zA-Z0-9_-]*$$')).nil?
|
182
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
183
|
+
fail ArgumentError, 'private_endpoint_connection_name is nil' if private_endpoint_connection_name.nil?
|
184
|
+
|
185
|
+
|
186
|
+
request_headers = {}
|
187
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
188
|
+
|
189
|
+
# Set Headers
|
190
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
191
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
192
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}'
|
193
|
+
|
194
|
+
request_url = @base_url || @client.base_url
|
195
|
+
|
196
|
+
options = {
|
197
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
198
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'configStoreName' => config_store_name,'privateEndpointConnectionName' => private_endpoint_connection_name},
|
199
|
+
query_params: {'api-version' => @client.api_version},
|
200
|
+
headers: request_headers.merge(custom_headers || {}),
|
201
|
+
base_url: request_url
|
202
|
+
}
|
203
|
+
promise = @client.make_request_async(:get, path_template, options)
|
204
|
+
|
205
|
+
promise = promise.then do |result|
|
206
|
+
http_response = result.response
|
207
|
+
status_code = http_response.status
|
208
|
+
response_content = http_response.body
|
209
|
+
unless status_code == 200
|
210
|
+
error_model = JSON.load(response_content)
|
211
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
212
|
+
end
|
213
|
+
|
214
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
215
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
216
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
217
|
+
# Deserialize Response
|
218
|
+
if status_code == 200
|
219
|
+
begin
|
220
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
221
|
+
result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PrivateEndpointConnection.mapper()
|
222
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
223
|
+
rescue Exception => e
|
224
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
result
|
229
|
+
end
|
230
|
+
|
231
|
+
promise.execute
|
232
|
+
end
|
233
|
+
|
234
|
+
#
|
235
|
+
# Update the state of the specified private endpoint connection associated with
|
236
|
+
# the configuration store.
|
237
|
+
#
|
238
|
+
# @param resource_group_name [String] The name of the resource group to which
|
239
|
+
# the container registry belongs.
|
240
|
+
# @param config_store_name [String] The name of the configuration store.
|
241
|
+
# @param private_endpoint_connection_name [String] Private endpoint connection
|
242
|
+
# name
|
243
|
+
# @param private_endpoint_connection [PrivateEndpointConnection] The private
|
244
|
+
# endpoint connection properties.
|
245
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
246
|
+
# will be added to the HTTP request.
|
247
|
+
#
|
248
|
+
# @return [PrivateEndpointConnection] operation results.
|
249
|
+
#
|
250
|
+
def create_or_update(resource_group_name, config_store_name, private_endpoint_connection_name, private_endpoint_connection, custom_headers:nil)
|
251
|
+
response = create_or_update_async(resource_group_name, config_store_name, private_endpoint_connection_name, private_endpoint_connection, custom_headers:custom_headers).value!
|
252
|
+
response.body unless response.nil?
|
253
|
+
end
|
254
|
+
|
255
|
+
#
|
256
|
+
# @param resource_group_name [String] The name of the resource group to which
|
257
|
+
# the container registry belongs.
|
258
|
+
# @param config_store_name [String] The name of the configuration store.
|
259
|
+
# @param private_endpoint_connection_name [String] Private endpoint connection
|
260
|
+
# name
|
261
|
+
# @param private_endpoint_connection [PrivateEndpointConnection] The private
|
262
|
+
# endpoint connection properties.
|
263
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
264
|
+
# will be added to the HTTP request.
|
265
|
+
#
|
266
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
267
|
+
# response.
|
268
|
+
#
|
269
|
+
def create_or_update_async(resource_group_name, config_store_name, private_endpoint_connection_name, private_endpoint_connection, custom_headers:nil)
|
270
|
+
# Send request
|
271
|
+
promise = begin_create_or_update_async(resource_group_name, config_store_name, private_endpoint_connection_name, private_endpoint_connection, custom_headers:custom_headers)
|
272
|
+
|
273
|
+
promise = promise.then do |response|
|
274
|
+
# Defining deserialization method.
|
275
|
+
deserialize_method = lambda do |parsed_response|
|
276
|
+
result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PrivateEndpointConnection.mapper()
|
277
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
278
|
+
end
|
279
|
+
|
280
|
+
# Waiting for response.
|
281
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
282
|
+
end
|
283
|
+
|
284
|
+
promise
|
285
|
+
end
|
286
|
+
|
287
|
+
#
|
288
|
+
# Deletes a private endpoint connection.
|
289
|
+
#
|
290
|
+
# @param resource_group_name [String] The name of the resource group to which
|
291
|
+
# the container registry belongs.
|
292
|
+
# @param config_store_name [String] The name of the configuration store.
|
293
|
+
# @param private_endpoint_connection_name [String] Private endpoint connection
|
294
|
+
# name
|
295
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
296
|
+
# will be added to the HTTP request.
|
297
|
+
#
|
298
|
+
def delete(resource_group_name, config_store_name, private_endpoint_connection_name, custom_headers:nil)
|
299
|
+
response = delete_async(resource_group_name, config_store_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
|
300
|
+
nil
|
301
|
+
end
|
302
|
+
|
303
|
+
#
|
304
|
+
# @param resource_group_name [String] The name of the resource group to which
|
305
|
+
# the container registry belongs.
|
306
|
+
# @param config_store_name [String] The name of the configuration store.
|
307
|
+
# @param private_endpoint_connection_name [String] Private endpoint connection
|
308
|
+
# name
|
309
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
310
|
+
# will be added to the HTTP request.
|
311
|
+
#
|
312
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
313
|
+
# response.
|
314
|
+
#
|
315
|
+
def delete_async(resource_group_name, config_store_name, private_endpoint_connection_name, custom_headers:nil)
|
316
|
+
# Send request
|
317
|
+
promise = begin_delete_async(resource_group_name, config_store_name, private_endpoint_connection_name, custom_headers:custom_headers)
|
318
|
+
|
319
|
+
promise = promise.then do |response|
|
320
|
+
# Defining deserialization method.
|
321
|
+
deserialize_method = lambda do |parsed_response|
|
322
|
+
end
|
323
|
+
|
324
|
+
# Waiting for response.
|
325
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
326
|
+
end
|
327
|
+
|
328
|
+
promise
|
329
|
+
end
|
330
|
+
|
331
|
+
#
|
332
|
+
# Update the state of the specified private endpoint connection associated with
|
333
|
+
# the configuration store.
|
334
|
+
#
|
335
|
+
# @param resource_group_name [String] The name of the resource group to which
|
336
|
+
# the container registry belongs.
|
337
|
+
# @param config_store_name [String] The name of the configuration store.
|
338
|
+
# @param private_endpoint_connection_name [String] Private endpoint connection
|
339
|
+
# name
|
340
|
+
# @param private_endpoint_connection [PrivateEndpointConnection] The private
|
341
|
+
# endpoint connection properties.
|
342
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
343
|
+
# will be added to the HTTP request.
|
344
|
+
#
|
345
|
+
# @return [PrivateEndpointConnection] operation results.
|
346
|
+
#
|
347
|
+
def begin_create_or_update(resource_group_name, config_store_name, private_endpoint_connection_name, private_endpoint_connection, custom_headers:nil)
|
348
|
+
response = begin_create_or_update_async(resource_group_name, config_store_name, private_endpoint_connection_name, private_endpoint_connection, custom_headers:custom_headers).value!
|
349
|
+
response.body unless response.nil?
|
350
|
+
end
|
351
|
+
|
352
|
+
#
|
353
|
+
# Update the state of the specified private endpoint connection associated with
|
354
|
+
# the configuration store.
|
355
|
+
#
|
356
|
+
# @param resource_group_name [String] The name of the resource group to which
|
357
|
+
# the container registry belongs.
|
358
|
+
# @param config_store_name [String] The name of the configuration store.
|
359
|
+
# @param private_endpoint_connection_name [String] Private endpoint connection
|
360
|
+
# name
|
361
|
+
# @param private_endpoint_connection [PrivateEndpointConnection] The private
|
362
|
+
# endpoint connection properties.
|
363
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
364
|
+
# will be added to the HTTP request.
|
365
|
+
#
|
366
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
367
|
+
#
|
368
|
+
def begin_create_or_update_with_http_info(resource_group_name, config_store_name, private_endpoint_connection_name, private_endpoint_connection, custom_headers:nil)
|
369
|
+
begin_create_or_update_async(resource_group_name, config_store_name, private_endpoint_connection_name, private_endpoint_connection, custom_headers:custom_headers).value!
|
370
|
+
end
|
371
|
+
|
372
|
+
#
|
373
|
+
# Update the state of the specified private endpoint connection associated with
|
374
|
+
# the configuration store.
|
375
|
+
#
|
376
|
+
# @param resource_group_name [String] The name of the resource group to which
|
377
|
+
# the container registry belongs.
|
378
|
+
# @param config_store_name [String] The name of the configuration store.
|
379
|
+
# @param private_endpoint_connection_name [String] Private endpoint connection
|
380
|
+
# name
|
381
|
+
# @param private_endpoint_connection [PrivateEndpointConnection] The private
|
382
|
+
# endpoint connection properties.
|
383
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
384
|
+
# to the HTTP request.
|
385
|
+
#
|
386
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
387
|
+
#
|
388
|
+
def begin_create_or_update_async(resource_group_name, config_store_name, private_endpoint_connection_name, private_endpoint_connection, custom_headers:nil)
|
389
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
390
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
391
|
+
fail ArgumentError, 'config_store_name is nil' if config_store_name.nil?
|
392
|
+
fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MaxLength': '50'" if !config_store_name.nil? && config_store_name.length > 50
|
393
|
+
fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MinLength': '5'" if !config_store_name.nil? && config_store_name.length < 5
|
394
|
+
fail ArgumentError, "'config_store_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9_-]*$'" if !config_store_name.nil? && config_store_name.match(Regexp.new('^^[a-zA-Z0-9_-]*$$')).nil?
|
395
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
396
|
+
fail ArgumentError, 'private_endpoint_connection_name is nil' if private_endpoint_connection_name.nil?
|
397
|
+
fail ArgumentError, 'private_endpoint_connection is nil' if private_endpoint_connection.nil?
|
398
|
+
|
399
|
+
|
400
|
+
request_headers = {}
|
401
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
402
|
+
|
403
|
+
# Set Headers
|
404
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
405
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
406
|
+
|
407
|
+
# Serialize Request
|
408
|
+
request_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PrivateEndpointConnection.mapper()
|
409
|
+
request_content = @client.serialize(request_mapper, private_endpoint_connection)
|
410
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
411
|
+
|
412
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}'
|
413
|
+
|
414
|
+
request_url = @base_url || @client.base_url
|
415
|
+
|
416
|
+
options = {
|
417
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
418
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'configStoreName' => config_store_name,'privateEndpointConnectionName' => private_endpoint_connection_name},
|
419
|
+
query_params: {'api-version' => @client.api_version},
|
420
|
+
body: request_content,
|
421
|
+
headers: request_headers.merge(custom_headers || {}),
|
422
|
+
base_url: request_url
|
423
|
+
}
|
424
|
+
promise = @client.make_request_async(:put, path_template, options)
|
425
|
+
|
426
|
+
promise = promise.then do |result|
|
427
|
+
http_response = result.response
|
428
|
+
status_code = http_response.status
|
429
|
+
response_content = http_response.body
|
430
|
+
unless status_code == 200 || status_code == 201
|
431
|
+
error_model = JSON.load(response_content)
|
432
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
433
|
+
end
|
434
|
+
|
435
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
436
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
437
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
438
|
+
# Deserialize Response
|
439
|
+
if status_code == 200
|
440
|
+
begin
|
441
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
442
|
+
result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PrivateEndpointConnection.mapper()
|
443
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
444
|
+
rescue Exception => e
|
445
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
446
|
+
end
|
447
|
+
end
|
448
|
+
# Deserialize Response
|
449
|
+
if status_code == 201
|
450
|
+
begin
|
451
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
452
|
+
result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PrivateEndpointConnection.mapper()
|
453
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
454
|
+
rescue Exception => e
|
455
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
456
|
+
end
|
457
|
+
end
|
458
|
+
|
459
|
+
result
|
460
|
+
end
|
461
|
+
|
462
|
+
promise.execute
|
463
|
+
end
|
464
|
+
|
465
|
+
#
|
466
|
+
# Deletes a private endpoint connection.
|
467
|
+
#
|
468
|
+
# @param resource_group_name [String] The name of the resource group to which
|
469
|
+
# the container registry belongs.
|
470
|
+
# @param config_store_name [String] The name of the configuration store.
|
471
|
+
# @param private_endpoint_connection_name [String] Private endpoint connection
|
472
|
+
# name
|
473
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
474
|
+
# will be added to the HTTP request.
|
475
|
+
#
|
476
|
+
#
|
477
|
+
def begin_delete(resource_group_name, config_store_name, private_endpoint_connection_name, custom_headers:nil)
|
478
|
+
response = begin_delete_async(resource_group_name, config_store_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
|
479
|
+
nil
|
480
|
+
end
|
481
|
+
|
482
|
+
#
|
483
|
+
# Deletes a private endpoint connection.
|
484
|
+
#
|
485
|
+
# @param resource_group_name [String] The name of the resource group to which
|
486
|
+
# the container registry belongs.
|
487
|
+
# @param config_store_name [String] The name of the configuration store.
|
488
|
+
# @param private_endpoint_connection_name [String] Private endpoint connection
|
489
|
+
# name
|
490
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
491
|
+
# will be added to the HTTP request.
|
492
|
+
#
|
493
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
494
|
+
#
|
495
|
+
def begin_delete_with_http_info(resource_group_name, config_store_name, private_endpoint_connection_name, custom_headers:nil)
|
496
|
+
begin_delete_async(resource_group_name, config_store_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
|
497
|
+
end
|
498
|
+
|
499
|
+
#
|
500
|
+
# Deletes a private endpoint connection.
|
501
|
+
#
|
502
|
+
# @param resource_group_name [String] The name of the resource group to which
|
503
|
+
# the container registry belongs.
|
504
|
+
# @param config_store_name [String] The name of the configuration store.
|
505
|
+
# @param private_endpoint_connection_name [String] Private endpoint connection
|
506
|
+
# name
|
507
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
508
|
+
# to the HTTP request.
|
509
|
+
#
|
510
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
511
|
+
#
|
512
|
+
def begin_delete_async(resource_group_name, config_store_name, private_endpoint_connection_name, custom_headers:nil)
|
513
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
514
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
515
|
+
fail ArgumentError, 'config_store_name is nil' if config_store_name.nil?
|
516
|
+
fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MaxLength': '50'" if !config_store_name.nil? && config_store_name.length > 50
|
517
|
+
fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MinLength': '5'" if !config_store_name.nil? && config_store_name.length < 5
|
518
|
+
fail ArgumentError, "'config_store_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9_-]*$'" if !config_store_name.nil? && config_store_name.match(Regexp.new('^^[a-zA-Z0-9_-]*$$')).nil?
|
519
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
520
|
+
fail ArgumentError, 'private_endpoint_connection_name is nil' if private_endpoint_connection_name.nil?
|
521
|
+
|
522
|
+
|
523
|
+
request_headers = {}
|
524
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
525
|
+
|
526
|
+
# Set Headers
|
527
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
528
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
529
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}'
|
530
|
+
|
531
|
+
request_url = @base_url || @client.base_url
|
532
|
+
|
533
|
+
options = {
|
534
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
535
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'configStoreName' => config_store_name,'privateEndpointConnectionName' => private_endpoint_connection_name},
|
536
|
+
query_params: {'api-version' => @client.api_version},
|
537
|
+
headers: request_headers.merge(custom_headers || {}),
|
538
|
+
base_url: request_url
|
539
|
+
}
|
540
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
541
|
+
|
542
|
+
promise = promise.then do |result|
|
543
|
+
http_response = result.response
|
544
|
+
status_code = http_response.status
|
545
|
+
response_content = http_response.body
|
546
|
+
unless status_code == 200 || status_code == 202 || status_code == 204
|
547
|
+
error_model = JSON.load(response_content)
|
548
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
549
|
+
end
|
550
|
+
|
551
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
552
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
553
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
554
|
+
|
555
|
+
result
|
556
|
+
end
|
557
|
+
|
558
|
+
promise.execute
|
559
|
+
end
|
560
|
+
|
561
|
+
#
|
562
|
+
# Lists all private endpoint connections for a configuration store.
|
563
|
+
#
|
564
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
565
|
+
# to List operation.
|
566
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
567
|
+
# will be added to the HTTP request.
|
568
|
+
#
|
569
|
+
# @return [PrivateEndpointConnectionListResult] operation results.
|
570
|
+
#
|
571
|
+
def list_by_configuration_store_next(next_page_link, custom_headers:nil)
|
572
|
+
response = list_by_configuration_store_next_async(next_page_link, custom_headers:custom_headers).value!
|
573
|
+
response.body unless response.nil?
|
574
|
+
end
|
575
|
+
|
576
|
+
#
|
577
|
+
# Lists all private endpoint connections for a configuration store.
|
578
|
+
#
|
579
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
580
|
+
# to List operation.
|
581
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
582
|
+
# will be added to the HTTP request.
|
583
|
+
#
|
584
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
585
|
+
#
|
586
|
+
def list_by_configuration_store_next_with_http_info(next_page_link, custom_headers:nil)
|
587
|
+
list_by_configuration_store_next_async(next_page_link, custom_headers:custom_headers).value!
|
588
|
+
end
|
589
|
+
|
590
|
+
#
|
591
|
+
# Lists all private endpoint connections for a configuration store.
|
592
|
+
#
|
593
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
594
|
+
# to List operation.
|
595
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
596
|
+
# to the HTTP request.
|
597
|
+
#
|
598
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
599
|
+
#
|
600
|
+
def list_by_configuration_store_next_async(next_page_link, custom_headers:nil)
|
601
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
602
|
+
|
603
|
+
|
604
|
+
request_headers = {}
|
605
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
606
|
+
|
607
|
+
# Set Headers
|
608
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
609
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
610
|
+
path_template = '{nextLink}'
|
611
|
+
|
612
|
+
request_url = @base_url || @client.base_url
|
613
|
+
|
614
|
+
options = {
|
615
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
616
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
617
|
+
headers: request_headers.merge(custom_headers || {}),
|
618
|
+
base_url: request_url
|
619
|
+
}
|
620
|
+
promise = @client.make_request_async(:get, path_template, options)
|
621
|
+
|
622
|
+
promise = promise.then do |result|
|
623
|
+
http_response = result.response
|
624
|
+
status_code = http_response.status
|
625
|
+
response_content = http_response.body
|
626
|
+
unless status_code == 200
|
627
|
+
error_model = JSON.load(response_content)
|
628
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
629
|
+
end
|
630
|
+
|
631
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
632
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
633
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
634
|
+
# Deserialize Response
|
635
|
+
if status_code == 200
|
636
|
+
begin
|
637
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
638
|
+
result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PrivateEndpointConnectionListResult.mapper()
|
639
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
640
|
+
rescue Exception => e
|
641
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
642
|
+
end
|
643
|
+
end
|
644
|
+
|
645
|
+
result
|
646
|
+
end
|
647
|
+
|
648
|
+
promise.execute
|
649
|
+
end
|
650
|
+
|
651
|
+
#
|
652
|
+
# Lists all private endpoint connections for a configuration store.
|
653
|
+
#
|
654
|
+
# @param resource_group_name [String] The name of the resource group to which
|
655
|
+
# the container registry belongs.
|
656
|
+
# @param config_store_name [String] The name of the configuration store.
|
657
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
658
|
+
# will be added to the HTTP request.
|
659
|
+
#
|
660
|
+
# @return [PrivateEndpointConnectionListResult] which provide lazy access to
|
661
|
+
# pages of the response.
|
662
|
+
#
|
663
|
+
def list_by_configuration_store_as_lazy(resource_group_name, config_store_name, custom_headers:nil)
|
664
|
+
response = list_by_configuration_store_async(resource_group_name, config_store_name, custom_headers:custom_headers).value!
|
665
|
+
unless response.nil?
|
666
|
+
page = response.body
|
667
|
+
page.next_method = Proc.new do |next_page_link|
|
668
|
+
list_by_configuration_store_next_async(next_page_link, custom_headers:custom_headers)
|
669
|
+
end
|
670
|
+
page
|
671
|
+
end
|
672
|
+
end
|
673
|
+
|
674
|
+
end
|
675
|
+
end
|