azure_mgmt_appconfiguration 0.17.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) 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/2019-11-01-preview/generated/azure_mgmt_appconfiguration.rb +61 -0
  23. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/app_configuration_management_client.rb +143 -0
  24. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb +1500 -0
  25. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/actions_required.rb +16 -0
  26. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/api_key.rb +111 -0
  27. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/api_key_list_result.rb +99 -0
  28. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/check_name_availability_parameters.rb +60 -0
  29. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/configuration_store.rb +164 -0
  30. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/configuration_store_list_result.rb +99 -0
  31. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/configuration_store_update_parameters.rb +92 -0
  32. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/connection_status.rb +18 -0
  33. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/encryption_properties.rb +47 -0
  34. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/error.rb +57 -0
  35. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/identity_type.rb +18 -0
  36. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/key_value.rb +150 -0
  37. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/key_vault_properties.rb +58 -0
  38. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/list_key_value_parameters.rb +57 -0
  39. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/name_availability_status.rb +73 -0
  40. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/operation_definition.rb +59 -0
  41. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/operation_definition_display.rb +81 -0
  42. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/operation_definition_list_result.rb +99 -0
  43. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/private_endpoint.rb +46 -0
  44. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/private_endpoint_connection.rb +111 -0
  45. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/private_endpoint_connection_list_result.rb +99 -0
  46. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/private_link_resource.rb +104 -0
  47. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/private_link_resource_list_result.rb +99 -0
  48. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/private_link_service_connection_state.rb +73 -0
  49. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/provisioning_state.rb +20 -0
  50. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/regenerate_key_parameters.rb +46 -0
  51. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/resource.rb +111 -0
  52. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/resource_identity.rb +99 -0
  53. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/sku.rb +46 -0
  54. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/user_identity.rb +59 -0
  55. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/module_definition.rb +9 -0
  56. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/operations.rb +339 -0
  57. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/private_endpoint_connections.rb +675 -0
  58. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/private_link_resources.rb +352 -0
  59. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration.rb +63 -0
  60. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/app_configuration_management_client.rb +143 -0
  61. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb +1500 -0
  62. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/actions_required.rb +16 -0
  63. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/api_key.rb +111 -0
  64. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/api_key_list_result.rb +99 -0
  65. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/check_name_availability_parameters.rb +60 -0
  66. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/configuration_store.rb +199 -0
  67. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/configuration_store_list_result.rb +99 -0
  68. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/configuration_store_update_parameters.rb +92 -0
  69. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/connection_status.rb +18 -0
  70. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/encryption_properties.rb +47 -0
  71. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/error.rb +57 -0
  72. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/identity_type.rb +18 -0
  73. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/key_value.rb +150 -0
  74. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/key_vault_properties.rb +58 -0
  75. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/list_key_value_parameters.rb +57 -0
  76. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/name_availability_status.rb +73 -0
  77. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/operation_definition.rb +59 -0
  78. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/operation_definition_display.rb +81 -0
  79. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/operation_definition_list_result.rb +99 -0
  80. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/private_endpoint.rb +46 -0
  81. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/private_endpoint_connection.rb +111 -0
  82. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/private_endpoint_connection_list_result.rb +99 -0
  83. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/private_endpoint_connection_reference.rb +111 -0
  84. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/private_link_resource.rb +125 -0
  85. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/private_link_resource_list_result.rb +99 -0
  86. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/private_link_service_connection_state.rb +73 -0
  87. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/provisioning_state.rb +20 -0
  88. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/public_network_access.rb +16 -0
  89. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/regenerate_key_parameters.rb +46 -0
  90. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/resource.rb +111 -0
  91. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/resource_identity.rb +99 -0
  92. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/sku.rb +46 -0
  93. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/user_identity.rb +59 -0
  94. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/module_definition.rb +9 -0
  95. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/operations.rb +339 -0
  96. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/private_endpoint_connections.rb +675 -0
  97. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/private_link_resources.rb +352 -0
  98. data/lib/azure_mgmt_appconfiguration.rb +8 -0
  99. data/lib/module_definition.rb +7 -0
  100. data/lib/profiles/latest/appconfiguration_latest_profile_client.rb +40 -0
  101. data/lib/profiles/latest/appconfiguration_module_definition.rb +8 -0
  102. data/lib/profiles/latest/modules/appconfiguration_profile_module.rb +195 -0
  103. data/lib/version.rb +7 -0
  104. metadata +219 -0
@@ -0,0 +1,352 @@
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_11_01_preview
7
+ #
8
+ # PrivateLinkResources
9
+ #
10
+ class PrivateLinkResources
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the PrivateLinkResources 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
+ # Gets the private link resources that need to be created for a configuration
26
+ # store.
27
+ #
28
+ # @param resource_group_name [String] The name of the resource group to which
29
+ # the container registry belongs.
30
+ # @param config_store_name [String] The name of the configuration store.
31
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
+ #
34
+ # @return [Array<PrivateLinkResource>] operation results.
35
+ #
36
+ def list_by_configuration_store(resource_group_name, config_store_name, custom_headers:nil)
37
+ first_page = list_by_configuration_store_as_lazy(resource_group_name, config_store_name, custom_headers:custom_headers)
38
+ first_page.get_all_items
39
+ end
40
+
41
+ #
42
+ # Gets the private link resources that need to be created for a configuration
43
+ # store.
44
+ #
45
+ # @param resource_group_name [String] The name of the resource group to which
46
+ # the container registry belongs.
47
+ # @param config_store_name [String] The name of the configuration store.
48
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
+ # will be added to the HTTP request.
50
+ #
51
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
52
+ #
53
+ def list_by_configuration_store_with_http_info(resource_group_name, config_store_name, custom_headers:nil)
54
+ list_by_configuration_store_async(resource_group_name, config_store_name, custom_headers:custom_headers).value!
55
+ end
56
+
57
+ #
58
+ # Gets the private link resources that need to be created for a configuration
59
+ # store.
60
+ #
61
+ # @param resource_group_name [String] The name of the resource group to which
62
+ # the container registry belongs.
63
+ # @param config_store_name [String] The name of the configuration store.
64
+ # @param [Hash{String => String}] A hash of custom headers that will be added
65
+ # to the HTTP request.
66
+ #
67
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
68
+ #
69
+ def list_by_configuration_store_async(resource_group_name, config_store_name, custom_headers:nil)
70
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
71
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
72
+ fail ArgumentError, 'config_store_name is nil' if config_store_name.nil?
73
+ fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MaxLength': '50'" if !config_store_name.nil? && config_store_name.length > 50
74
+ fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MinLength': '5'" if !config_store_name.nil? && config_store_name.length < 5
75
+ 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?
76
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
77
+
78
+
79
+ request_headers = {}
80
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
81
+
82
+ # Set Headers
83
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
84
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
85
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateLinkResources'
86
+
87
+ request_url = @base_url || @client.base_url
88
+
89
+ options = {
90
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
91
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'configStoreName' => config_store_name},
92
+ query_params: {'api-version' => @client.api_version},
93
+ headers: request_headers.merge(custom_headers || {}),
94
+ base_url: request_url
95
+ }
96
+ promise = @client.make_request_async(:get, path_template, options)
97
+
98
+ promise = promise.then do |result|
99
+ http_response = result.response
100
+ status_code = http_response.status
101
+ response_content = http_response.body
102
+ unless status_code == 200
103
+ error_model = JSON.load(response_content)
104
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
105
+ end
106
+
107
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
108
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
109
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
110
+ # Deserialize Response
111
+ if status_code == 200
112
+ begin
113
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
114
+ result_mapper = Azure::Appconfiguration::Mgmt::V2019_11_01_preview::Models::PrivateLinkResourceListResult.mapper()
115
+ result.body = @client.deserialize(result_mapper, parsed_response)
116
+ rescue Exception => e
117
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
118
+ end
119
+ end
120
+
121
+ result
122
+ end
123
+
124
+ promise.execute
125
+ end
126
+
127
+ #
128
+ # Gets a private link resource that need to be created for a configuration
129
+ # store.
130
+ #
131
+ # @param resource_group_name [String] The name of the resource group to which
132
+ # the container registry belongs.
133
+ # @param config_store_name [String] The name of the configuration store.
134
+ # @param group_name [String] The name of the private link resource group.
135
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
136
+ # will be added to the HTTP request.
137
+ #
138
+ # @return [PrivateLinkResource] operation results.
139
+ #
140
+ def get(resource_group_name, config_store_name, group_name, custom_headers:nil)
141
+ response = get_async(resource_group_name, config_store_name, group_name, custom_headers:custom_headers).value!
142
+ response.body unless response.nil?
143
+ end
144
+
145
+ #
146
+ # Gets a private link resource that need to be created for a configuration
147
+ # store.
148
+ #
149
+ # @param resource_group_name [String] The name of the resource group to which
150
+ # the container registry belongs.
151
+ # @param config_store_name [String] The name of the configuration store.
152
+ # @param group_name [String] The name of the private link resource group.
153
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
154
+ # will be added to the HTTP request.
155
+ #
156
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
157
+ #
158
+ def get_with_http_info(resource_group_name, config_store_name, group_name, custom_headers:nil)
159
+ get_async(resource_group_name, config_store_name, group_name, custom_headers:custom_headers).value!
160
+ end
161
+
162
+ #
163
+ # Gets a private link resource that need to be created for a configuration
164
+ # store.
165
+ #
166
+ # @param resource_group_name [String] The name of the resource group to which
167
+ # the container registry belongs.
168
+ # @param config_store_name [String] The name of the configuration store.
169
+ # @param group_name [String] The name of the private link resource group.
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, group_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, 'group_name is nil' if group_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}/privateLinkResources/{groupName}'
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,'groupName' => group_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::V2019_11_01_preview::Models::PrivateLinkResource.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
+ # Gets the private link resources that need to be created for a configuration
236
+ # store.
237
+ #
238
+ # @param next_page_link [String] The NextLink from the previous successful call
239
+ # to List operation.
240
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
241
+ # will be added to the HTTP request.
242
+ #
243
+ # @return [PrivateLinkResourceListResult] operation results.
244
+ #
245
+ def list_by_configuration_store_next(next_page_link, custom_headers:nil)
246
+ response = list_by_configuration_store_next_async(next_page_link, custom_headers:custom_headers).value!
247
+ response.body unless response.nil?
248
+ end
249
+
250
+ #
251
+ # Gets the private link resources that need to be created for a configuration
252
+ # store.
253
+ #
254
+ # @param next_page_link [String] The NextLink from the previous successful call
255
+ # to List operation.
256
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
257
+ # will be added to the HTTP request.
258
+ #
259
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
260
+ #
261
+ def list_by_configuration_store_next_with_http_info(next_page_link, custom_headers:nil)
262
+ list_by_configuration_store_next_async(next_page_link, custom_headers:custom_headers).value!
263
+ end
264
+
265
+ #
266
+ # Gets the private link resources that need to be created for a configuration
267
+ # store.
268
+ #
269
+ # @param next_page_link [String] The NextLink from the previous successful call
270
+ # to List operation.
271
+ # @param [Hash{String => String}] A hash of custom headers that will be added
272
+ # to the HTTP request.
273
+ #
274
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
275
+ #
276
+ def list_by_configuration_store_next_async(next_page_link, custom_headers:nil)
277
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
278
+
279
+
280
+ request_headers = {}
281
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
282
+
283
+ # Set Headers
284
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
285
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
286
+ path_template = '{nextLink}'
287
+
288
+ request_url = @base_url || @client.base_url
289
+
290
+ options = {
291
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
292
+ skip_encoding_path_params: {'nextLink' => next_page_link},
293
+ headers: request_headers.merge(custom_headers || {}),
294
+ base_url: request_url
295
+ }
296
+ promise = @client.make_request_async(:get, path_template, options)
297
+
298
+ promise = promise.then do |result|
299
+ http_response = result.response
300
+ status_code = http_response.status
301
+ response_content = http_response.body
302
+ unless status_code == 200
303
+ error_model = JSON.load(response_content)
304
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
305
+ end
306
+
307
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
308
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
309
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
310
+ # Deserialize Response
311
+ if status_code == 200
312
+ begin
313
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
314
+ result_mapper = Azure::Appconfiguration::Mgmt::V2019_11_01_preview::Models::PrivateLinkResourceListResult.mapper()
315
+ result.body = @client.deserialize(result_mapper, parsed_response)
316
+ rescue Exception => e
317
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
318
+ end
319
+ end
320
+
321
+ result
322
+ end
323
+
324
+ promise.execute
325
+ end
326
+
327
+ #
328
+ # Gets the private link resources that need to be created for a configuration
329
+ # store.
330
+ #
331
+ # @param resource_group_name [String] The name of the resource group to which
332
+ # the container registry belongs.
333
+ # @param config_store_name [String] The name of the configuration store.
334
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
335
+ # will be added to the HTTP request.
336
+ #
337
+ # @return [PrivateLinkResourceListResult] which provide lazy access to pages of
338
+ # the response.
339
+ #
340
+ def list_by_configuration_store_as_lazy(resource_group_name, config_store_name, custom_headers:nil)
341
+ response = list_by_configuration_store_async(resource_group_name, config_store_name, custom_headers:custom_headers).value!
342
+ unless response.nil?
343
+ page = response.body
344
+ page.next_method = Proc.new do |next_page_link|
345
+ list_by_configuration_store_next_async(next_page_link, custom_headers:custom_headers)
346
+ end
347
+ page
348
+ end
349
+ end
350
+
351
+ end
352
+ end
@@ -0,0 +1,63 @@
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
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '2020-06-01/generated/azure_mgmt_appconfiguration/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::Appconfiguration::Mgmt::V2020_06_01
23
+ autoload :ConfigurationStores, '2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb'
24
+ autoload :Operations, '2020-06-01/generated/azure_mgmt_appconfiguration/operations.rb'
25
+ autoload :PrivateEndpointConnections, '2020-06-01/generated/azure_mgmt_appconfiguration/private_endpoint_connections.rb'
26
+ autoload :PrivateLinkResources, '2020-06-01/generated/azure_mgmt_appconfiguration/private_link_resources.rb'
27
+ autoload :AppConfigurationManagementClient, '2020-06-01/generated/azure_mgmt_appconfiguration/app_configuration_management_client.rb'
28
+
29
+ module Models
30
+ autoload :ApiKey, '2020-06-01/generated/azure_mgmt_appconfiguration/models/api_key.rb'
31
+ autoload :ApiKeyListResult, '2020-06-01/generated/azure_mgmt_appconfiguration/models/api_key_list_result.rb'
32
+ autoload :ResourceIdentity, '2020-06-01/generated/azure_mgmt_appconfiguration/models/resource_identity.rb'
33
+ autoload :RegenerateKeyParameters, '2020-06-01/generated/azure_mgmt_appconfiguration/models/regenerate_key_parameters.rb'
34
+ autoload :EncryptionProperties, '2020-06-01/generated/azure_mgmt_appconfiguration/models/encryption_properties.rb'
35
+ autoload :ListKeyValueParameters, '2020-06-01/generated/azure_mgmt_appconfiguration/models/list_key_value_parameters.rb'
36
+ autoload :PrivateLinkServiceConnectionState, '2020-06-01/generated/azure_mgmt_appconfiguration/models/private_link_service_connection_state.rb'
37
+ autoload :KeyValue, '2020-06-01/generated/azure_mgmt_appconfiguration/models/key_value.rb'
38
+ autoload :Sku, '2020-06-01/generated/azure_mgmt_appconfiguration/models/sku.rb'
39
+ autoload :OperationDefinitionDisplay, '2020-06-01/generated/azure_mgmt_appconfiguration/models/operation_definition_display.rb'
40
+ autoload :ConfigurationStoreListResult, '2020-06-01/generated/azure_mgmt_appconfiguration/models/configuration_store_list_result.rb'
41
+ autoload :OperationDefinition, '2020-06-01/generated/azure_mgmt_appconfiguration/models/operation_definition.rb'
42
+ autoload :CheckNameAvailabilityParameters, '2020-06-01/generated/azure_mgmt_appconfiguration/models/check_name_availability_parameters.rb'
43
+ autoload :OperationDefinitionListResult, '2020-06-01/generated/azure_mgmt_appconfiguration/models/operation_definition_list_result.rb'
44
+ autoload :UserIdentity, '2020-06-01/generated/azure_mgmt_appconfiguration/models/user_identity.rb'
45
+ autoload :Error, '2020-06-01/generated/azure_mgmt_appconfiguration/models/error.rb'
46
+ autoload :PrivateEndpoint, '2020-06-01/generated/azure_mgmt_appconfiguration/models/private_endpoint.rb'
47
+ autoload :Resource, '2020-06-01/generated/azure_mgmt_appconfiguration/models/resource.rb'
48
+ autoload :ConfigurationStoreUpdateParameters, '2020-06-01/generated/azure_mgmt_appconfiguration/models/configuration_store_update_parameters.rb'
49
+ autoload :PrivateEndpointConnection, '2020-06-01/generated/azure_mgmt_appconfiguration/models/private_endpoint_connection.rb'
50
+ autoload :KeyVaultProperties, '2020-06-01/generated/azure_mgmt_appconfiguration/models/key_vault_properties.rb'
51
+ autoload :PrivateEndpointConnectionListResult, '2020-06-01/generated/azure_mgmt_appconfiguration/models/private_endpoint_connection_list_result.rb'
52
+ autoload :NameAvailabilityStatus, '2020-06-01/generated/azure_mgmt_appconfiguration/models/name_availability_status.rb'
53
+ autoload :PrivateLinkResource, '2020-06-01/generated/azure_mgmt_appconfiguration/models/private_link_resource.rb'
54
+ autoload :PrivateEndpointConnectionReference, '2020-06-01/generated/azure_mgmt_appconfiguration/models/private_endpoint_connection_reference.rb'
55
+ autoload :PrivateLinkResourceListResult, '2020-06-01/generated/azure_mgmt_appconfiguration/models/private_link_resource_list_result.rb'
56
+ autoload :ConfigurationStore, '2020-06-01/generated/azure_mgmt_appconfiguration/models/configuration_store.rb'
57
+ autoload :IdentityType, '2020-06-01/generated/azure_mgmt_appconfiguration/models/identity_type.rb'
58
+ autoload :ProvisioningState, '2020-06-01/generated/azure_mgmt_appconfiguration/models/provisioning_state.rb'
59
+ autoload :ConnectionStatus, '2020-06-01/generated/azure_mgmt_appconfiguration/models/connection_status.rb'
60
+ autoload :ActionsRequired, '2020-06-01/generated/azure_mgmt_appconfiguration/models/actions_required.rb'
61
+ autoload :PublicNetworkAccess, '2020-06-01/generated/azure_mgmt_appconfiguration/models/public_network_access.rb'
62
+ end
63
+ end
@@ -0,0 +1,143 @@
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
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class AppConfigurationManagementClient < MsRestAzure::AzureServiceClient
11
+ include MsRestAzure
12
+ include MsRestAzure::Serialization
13
+
14
+ # @return [String] the base URI of the service.
15
+ attr_accessor :base_url
16
+
17
+ # @return Credentials needed for the client to connect to Azure.
18
+ attr_reader :credentials
19
+
20
+ # @return [String] The Microsoft Azure subscription ID.
21
+ attr_accessor :subscription_id
22
+
23
+ # @return [String] The client API version.
24
+ attr_reader :api_version
25
+
26
+ # @return [String] The preferred language for the response.
27
+ attr_accessor :accept_language
28
+
29
+ # @return [Integer] The retry timeout in seconds for Long Running
30
+ # Operations. Default value is 30.
31
+ attr_accessor :long_running_operation_retry_timeout
32
+
33
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
34
+ # generated. When set to true a unique x-ms-client-request-id value is
35
+ # generated and included in each request. Default is true.
36
+ attr_accessor :generate_client_request_id
37
+
38
+ # @return [ConfigurationStores] configuration_stores
39
+ attr_reader :configuration_stores
40
+
41
+ # @return [Operations] operations
42
+ attr_reader :operations
43
+
44
+ # @return [PrivateEndpointConnections] private_endpoint_connections
45
+ attr_reader :private_endpoint_connections
46
+
47
+ # @return [PrivateLinkResources] private_link_resources
48
+ attr_reader :private_link_resources
49
+
50
+ #
51
+ # Creates initializes a new instance of the AppConfigurationManagementClient class.
52
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
53
+ # @param base_url [String] the base URI of the service.
54
+ # @param options [Array] filters to be applied to the HTTP requests.
55
+ #
56
+ def initialize(credentials = nil, base_url = nil, options = nil)
57
+ super(credentials, options)
58
+ @base_url = base_url || 'https://management.azure.com'
59
+
60
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
61
+ @credentials = credentials
62
+
63
+ @configuration_stores = ConfigurationStores.new(self)
64
+ @operations = Operations.new(self)
65
+ @private_endpoint_connections = PrivateEndpointConnections.new(self)
66
+ @private_link_resources = PrivateLinkResources.new(self)
67
+ @api_version = '2020-06-01'
68
+ @accept_language = 'en-US'
69
+ @long_running_operation_retry_timeout = 30
70
+ @generate_client_request_id = true
71
+ add_telemetry
72
+ end
73
+
74
+ #
75
+ # Makes a request and returns the body of the response.
76
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
77
+ # @param path [String] the path, relative to {base_url}.
78
+ # @param options [Hash{String=>String}] specifying any request options like :body.
79
+ # @return [Hash{String=>String}] containing the body of the response.
80
+ # Example:
81
+ #
82
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
83
+ # path = "/path"
84
+ # options = {
85
+ # body: request_content,
86
+ # query_params: {'api-version' => '2016-02-01'}
87
+ # }
88
+ # result = @client.make_request(:put, path, options)
89
+ #
90
+ def make_request(method, path, options = {})
91
+ result = make_request_with_http_info(method, path, options)
92
+ result.body unless result.nil?
93
+ end
94
+
95
+ #
96
+ # Makes a request and returns the operation response.
97
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
98
+ # @param path [String] the path, relative to {base_url}.
99
+ # @param options [Hash{String=>String}] specifying any request options like :body.
100
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
101
+ #
102
+ def make_request_with_http_info(method, path, options = {})
103
+ result = make_request_async(method, path, options).value!
104
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
105
+ result
106
+ end
107
+
108
+ #
109
+ # Makes a request asynchronously.
110
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
111
+ # @param path [String] the path, relative to {base_url}.
112
+ # @param options [Hash{String=>String}] specifying any request options like :body.
113
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
114
+ #
115
+ def make_request_async(method, path, options = {})
116
+ fail ArgumentError, 'method is nil' if method.nil?
117
+ fail ArgumentError, 'path is nil' if path.nil?
118
+
119
+ request_url = options[:base_url] || @base_url
120
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
121
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
122
+ end
123
+
124
+ request_headers = @request_headers
125
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
126
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
127
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
128
+
129
+ super(request_url, method, path, options)
130
+ end
131
+
132
+
133
+ private
134
+ #
135
+ # Adds telemetry information.
136
+ #
137
+ def add_telemetry
138
+ sdk_information = 'azure_mgmt_appconfiguration'
139
+ sdk_information = "#{sdk_information}/0.17.3"
140
+ add_user_agent_information(sdk_information)
141
+ end
142
+ end
143
+ end