azure_mgmt_appconfiguration 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration.rb +43 -0
  4. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/app_configuration_management_client.rb +135 -0
  5. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb +1386 -0
  6. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/api_key.rb +111 -0
  7. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/api_key_list_result.rb +99 -0
  8. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/check_name_availability_parameters.rb +60 -0
  9. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/configuration_store.rb +126 -0
  10. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/configuration_store_list_result.rb +99 -0
  11. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/configuration_store_update_parameters.rb +65 -0
  12. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/error.rb +57 -0
  13. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/name_availability_status.rb +73 -0
  14. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/operation_definition.rb +59 -0
  15. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/operation_definition_display.rb +81 -0
  16. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/operation_definition_list_result.rb +99 -0
  17. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/provisioning_state.rb +20 -0
  18. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/regenerate_key_parameters.rb +46 -0
  19. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/resource.rb +111 -0
  20. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/module_definition.rb +9 -0
  21. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/operations.rb +339 -0
  22. data/lib/azure_mgmt_appconfiguration.rb +6 -0
  23. data/lib/module_definition.rb +7 -0
  24. data/lib/profiles/latest/appconfiguration_latest_profile_client.rb +40 -0
  25. data/lib/profiles/latest/appconfiguration_module_definition.rb +8 -0
  26. data/lib/profiles/latest/modules/appconfiguration_profile_module.rb +119 -0
  27. data/lib/version.rb +7 -0
  28. metadata +143 -0
@@ -0,0 +1,46 @@
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::V2019_02_01_preview
7
+ module Models
8
+ #
9
+ # The parameters used to regenerate an API key.
10
+ #
11
+ class RegenerateKeyParameters
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The id of the key to regenerate.
16
+ attr_accessor :id
17
+
18
+
19
+ #
20
+ # Mapper for RegenerateKeyParameters class as Ruby Hash.
21
+ # This will be used for serialization/deserialization.
22
+ #
23
+ def self.mapper()
24
+ {
25
+ client_side_validation: true,
26
+ required: false,
27
+ serialized_name: 'RegenerateKeyParameters',
28
+ type: {
29
+ name: 'Composite',
30
+ class_name: 'RegenerateKeyParameters',
31
+ model_properties: {
32
+ id: {
33
+ client_side_validation: true,
34
+ required: false,
35
+ serialized_name: 'id',
36
+ type: {
37
+ name: 'String'
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,111 @@
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::V2019_02_01_preview
7
+ module Models
8
+ #
9
+ # An Azure resource.
10
+ #
11
+ class Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The resource ID.
16
+ attr_accessor :id
17
+
18
+ # @return [String] The name of the resource.
19
+ attr_accessor :name
20
+
21
+ # @return [String] The type of the resource.
22
+ attr_accessor :type
23
+
24
+ # @return [String] The location of the resource. This cannot be changed
25
+ # after the resource is created.
26
+ attr_accessor :location
27
+
28
+ # @return [Hash{String => String}] The tags of the resource.
29
+ attr_accessor :tags
30
+
31
+
32
+ # @return [String] the name of the resource group of the resource.
33
+ def resource_group
34
+ unless self.id.nil?
35
+ groups = self.id.match(/.+\/resourceGroups\/([^\/]+)\/.+/)
36
+ groups.captures[0].strip if groups
37
+ end
38
+ end
39
+
40
+
41
+ #
42
+ # Mapper for Resource class as Ruby Hash.
43
+ # This will be used for serialization/deserialization.
44
+ #
45
+ def self.mapper()
46
+ {
47
+ client_side_validation: true,
48
+ required: false,
49
+ serialized_name: 'Resource',
50
+ type: {
51
+ name: 'Composite',
52
+ class_name: 'Resource',
53
+ model_properties: {
54
+ id: {
55
+ client_side_validation: true,
56
+ required: false,
57
+ read_only: true,
58
+ serialized_name: 'id',
59
+ type: {
60
+ name: 'String'
61
+ }
62
+ },
63
+ name: {
64
+ client_side_validation: true,
65
+ required: false,
66
+ read_only: true,
67
+ serialized_name: 'name',
68
+ type: {
69
+ name: 'String'
70
+ }
71
+ },
72
+ type: {
73
+ client_side_validation: true,
74
+ required: false,
75
+ read_only: true,
76
+ serialized_name: 'type',
77
+ type: {
78
+ name: 'String'
79
+ }
80
+ },
81
+ location: {
82
+ client_side_validation: true,
83
+ required: true,
84
+ serialized_name: 'location',
85
+ type: {
86
+ name: 'String'
87
+ }
88
+ },
89
+ tags: {
90
+ client_side_validation: true,
91
+ required: false,
92
+ serialized_name: 'tags',
93
+ type: {
94
+ name: 'Dictionary',
95
+ value: {
96
+ client_side_validation: true,
97
+ required: false,
98
+ serialized_name: 'StringElementType',
99
+ type: {
100
+ name: 'String'
101
+ }
102
+ }
103
+ }
104
+ }
105
+ }
106
+ }
107
+ }
108
+ end
109
+ end
110
+ end
111
+ end
@@ -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::V2019_02_01_preview 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::V2019_02_01_preview
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::V2019_02_01_preview::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::V2019_02_01_preview::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::V2019_02_01_preview::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::V2019_02_01_preview::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