azure_mgmt_appconfiguration 0.17.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration.rb +43 -0
- data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/app_configuration_management_client.rb +135 -0
- data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb +1386 -0
- data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/api_key.rb +111 -0
- data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/api_key_list_result.rb +99 -0
- data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/check_name_availability_parameters.rb +60 -0
- data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/configuration_store.rb +126 -0
- data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/configuration_store_list_result.rb +99 -0
- data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/configuration_store_update_parameters.rb +65 -0
- data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/error.rb +57 -0
- data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/name_availability_status.rb +73 -0
- data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/operation_definition.rb +59 -0
- data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/operation_definition_display.rb +81 -0
- data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/operation_definition_list_result.rb +99 -0
- data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/provisioning_state.rb +20 -0
- data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/regenerate_key_parameters.rb +46 -0
- data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/resource.rb +111 -0
- data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/module_definition.rb +9 -0
- data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/operations.rb +339 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration.rb +61 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/app_configuration_management_client.rb +143 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb +1500 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/actions_required.rb +16 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/api_key.rb +111 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/api_key_list_result.rb +99 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/check_name_availability_parameters.rb +60 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/configuration_store.rb +164 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/configuration_store_list_result.rb +99 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/configuration_store_update_parameters.rb +92 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/connection_status.rb +18 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/encryption_properties.rb +47 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/error.rb +57 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/identity_type.rb +18 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/key_value.rb +150 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/key_vault_properties.rb +58 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/list_key_value_parameters.rb +57 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/name_availability_status.rb +73 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/operation_definition.rb +59 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/operation_definition_display.rb +81 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/operation_definition_list_result.rb +99 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/private_endpoint.rb +46 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/private_endpoint_connection.rb +111 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/private_endpoint_connection_list_result.rb +99 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/private_link_resource.rb +104 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/private_link_resource_list_result.rb +99 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/private_link_service_connection_state.rb +73 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/provisioning_state.rb +20 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/regenerate_key_parameters.rb +46 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/resource.rb +111 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/resource_identity.rb +99 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/sku.rb +46 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/user_identity.rb +59 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/module_definition.rb +9 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/operations.rb +339 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/private_endpoint_connections.rb +675 -0
- data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/private_link_resources.rb +352 -0
- 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 +8 -0
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/latest/appconfiguration_latest_profile_client.rb +40 -0
- data/lib/profiles/latest/appconfiguration_module_definition.rb +8 -0
- data/lib/profiles/latest/modules/appconfiguration_profile_module.rb +195 -0
- data/lib/version.rb +7 -0
- 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::V2020_06_01
|
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::V2020_06_01::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::V2020_06_01::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::V2020_06_01::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,8 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
require '2019-11-01-preview/generated/azure_mgmt_appconfiguration'
|
6
|
+
require '2020-06-01/generated/azure_mgmt_appconfiguration'
|
7
|
+
require '2019-02-01-preview/generated/azure_mgmt_appconfiguration'
|
8
|
+
require 'profiles/latest/appconfiguration_latest_profile_client'
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
module Azure end
|
6
|
+
module Azure::Appconfiguration end
|
7
|
+
module Azure::Appconfiguration::Mgmt end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
require 'profiles/latest/appconfiguration_module_definition'
|
6
|
+
require 'profiles/latest/modules/appconfiguration_profile_module'
|
7
|
+
|
8
|
+
module Azure::Appconfiguration::Profiles::Latest
|
9
|
+
module Mgmt
|
10
|
+
#
|
11
|
+
# Client class for the Latest profile SDK.
|
12
|
+
#
|
13
|
+
class Client < AppconfigurationManagementClass
|
14
|
+
include MsRestAzure::Common::Configurable
|
15
|
+
|
16
|
+
#
|
17
|
+
# Initializes a new instance of the Client class.
|
18
|
+
# @param options [Hash] hash of client options.
|
19
|
+
# options = {
|
20
|
+
# tenant_id: 'YOUR TENANT ID',
|
21
|
+
# client_id: 'YOUR CLIENT ID',
|
22
|
+
# client_secret: 'YOUR CLIENT SECRET',
|
23
|
+
# subscription_id: 'YOUR SUBSCRIPTION ID',
|
24
|
+
# credentials: credentials,
|
25
|
+
# active_directory_settings: active_directory_settings,
|
26
|
+
# base_url: 'YOUR BASE URL',
|
27
|
+
# options: options
|
28
|
+
# }
|
29
|
+
# 'credentials' are optional and if not passed in the hash, will be obtained
|
30
|
+
# from MsRest::TokenCredentials using MsRestAzure::ApplicationTokenProvider.
|
31
|
+
#
|
32
|
+
# Also, base_url, active_directory_settings & options are optional.
|
33
|
+
#
|
34
|
+
def initialize(options = {})
|
35
|
+
super(options)
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
module Azure end
|
6
|
+
module Azure::Appconfiguration end
|
7
|
+
module Azure::Appconfiguration::Profiles end
|
8
|
+
module Azure::Appconfiguration::Profiles::Latest end
|
@@ -0,0 +1,195 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
require 'azure_mgmt_appconfiguration'
|
6
|
+
|
7
|
+
module Azure::Appconfiguration::Profiles::Latest
|
8
|
+
module Mgmt
|
9
|
+
ConfigurationStores = Azure::Appconfiguration::Mgmt::V2020_06_01::ConfigurationStores
|
10
|
+
Operations = Azure::Appconfiguration::Mgmt::V2020_06_01::Operations
|
11
|
+
PrivateEndpointConnections = Azure::Appconfiguration::Mgmt::V2020_06_01::PrivateEndpointConnections
|
12
|
+
PrivateLinkResources = Azure::Appconfiguration::Mgmt::V2020_06_01::PrivateLinkResources
|
13
|
+
|
14
|
+
module Models
|
15
|
+
ApiKey = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ApiKey
|
16
|
+
ApiKeyListResult = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ApiKeyListResult
|
17
|
+
ResourceIdentity = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ResourceIdentity
|
18
|
+
RegenerateKeyParameters = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::RegenerateKeyParameters
|
19
|
+
EncryptionProperties = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::EncryptionProperties
|
20
|
+
ListKeyValueParameters = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ListKeyValueParameters
|
21
|
+
PrivateLinkServiceConnectionState = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PrivateLinkServiceConnectionState
|
22
|
+
KeyValue = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::KeyValue
|
23
|
+
Sku = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::Sku
|
24
|
+
OperationDefinitionDisplay = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::OperationDefinitionDisplay
|
25
|
+
ConfigurationStoreListResult = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStoreListResult
|
26
|
+
OperationDefinition = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::OperationDefinition
|
27
|
+
CheckNameAvailabilityParameters = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::CheckNameAvailabilityParameters
|
28
|
+
OperationDefinitionListResult = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::OperationDefinitionListResult
|
29
|
+
UserIdentity = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::UserIdentity
|
30
|
+
Error = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::Error
|
31
|
+
PrivateEndpoint = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PrivateEndpoint
|
32
|
+
Resource = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::Resource
|
33
|
+
ConfigurationStoreUpdateParameters = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStoreUpdateParameters
|
34
|
+
PrivateEndpointConnection = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PrivateEndpointConnection
|
35
|
+
KeyVaultProperties = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::KeyVaultProperties
|
36
|
+
PrivateEndpointConnectionListResult = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PrivateEndpointConnectionListResult
|
37
|
+
NameAvailabilityStatus = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::NameAvailabilityStatus
|
38
|
+
PrivateLinkResource = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PrivateLinkResource
|
39
|
+
PrivateEndpointConnectionReference = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PrivateEndpointConnectionReference
|
40
|
+
PrivateLinkResourceListResult = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PrivateLinkResourceListResult
|
41
|
+
ConfigurationStore = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStore
|
42
|
+
IdentityType = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::IdentityType
|
43
|
+
ProvisioningState = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ProvisioningState
|
44
|
+
ConnectionStatus = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConnectionStatus
|
45
|
+
ActionsRequired = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ActionsRequired
|
46
|
+
PublicNetworkAccess = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PublicNetworkAccess
|
47
|
+
end
|
48
|
+
|
49
|
+
#
|
50
|
+
# AppconfigurationManagementClass
|
51
|
+
#
|
52
|
+
class AppconfigurationManagementClass
|
53
|
+
attr_reader :configuration_stores, :operations, :private_endpoint_connections, :private_link_resources, :configurable, :base_url, :options, :model_classes
|
54
|
+
|
55
|
+
def initialize(options = {})
|
56
|
+
if options.is_a?(Hash) && options.length == 0
|
57
|
+
@options = setup_default_options
|
58
|
+
else
|
59
|
+
@options = options
|
60
|
+
end
|
61
|
+
|
62
|
+
reset!(options)
|
63
|
+
|
64
|
+
@configurable = self
|
65
|
+
@base_url = options[:base_url].nil? ? nil:options[:base_url]
|
66
|
+
@options = options[:options].nil? ? nil:options[:options]
|
67
|
+
|
68
|
+
@client_0 = Azure::Appconfiguration::Mgmt::V2020_06_01::AppConfigurationManagementClient.new(configurable.credentials, base_url, options)
|
69
|
+
if(@client_0.respond_to?(:subscription_id))
|
70
|
+
@client_0.subscription_id = configurable.subscription_id
|
71
|
+
end
|
72
|
+
add_telemetry(@client_0)
|
73
|
+
@configuration_stores = @client_0.configuration_stores
|
74
|
+
@operations = @client_0.operations
|
75
|
+
@private_endpoint_connections = @client_0.private_endpoint_connections
|
76
|
+
@private_link_resources = @client_0.private_link_resources
|
77
|
+
|
78
|
+
@model_classes = ModelClasses.new
|
79
|
+
end
|
80
|
+
|
81
|
+
def add_telemetry(client)
|
82
|
+
profile_information = 'Profiles/Latest/Appconfiguration/Mgmt'
|
83
|
+
client.add_user_agent_information(profile_information)
|
84
|
+
end
|
85
|
+
|
86
|
+
def method_missing(method, *args)
|
87
|
+
if @client_0.respond_to?method
|
88
|
+
@client_0.send(method, *args)
|
89
|
+
else
|
90
|
+
super
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
end
|
95
|
+
|
96
|
+
class ModelClasses
|
97
|
+
def api_key
|
98
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ApiKey
|
99
|
+
end
|
100
|
+
def api_key_list_result
|
101
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ApiKeyListResult
|
102
|
+
end
|
103
|
+
def resource_identity
|
104
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ResourceIdentity
|
105
|
+
end
|
106
|
+
def regenerate_key_parameters
|
107
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::RegenerateKeyParameters
|
108
|
+
end
|
109
|
+
def encryption_properties
|
110
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::EncryptionProperties
|
111
|
+
end
|
112
|
+
def list_key_value_parameters
|
113
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ListKeyValueParameters
|
114
|
+
end
|
115
|
+
def private_link_service_connection_state
|
116
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PrivateLinkServiceConnectionState
|
117
|
+
end
|
118
|
+
def key_value
|
119
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::KeyValue
|
120
|
+
end
|
121
|
+
def sku
|
122
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::Sku
|
123
|
+
end
|
124
|
+
def operation_definition_display
|
125
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::OperationDefinitionDisplay
|
126
|
+
end
|
127
|
+
def configuration_store_list_result
|
128
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStoreListResult
|
129
|
+
end
|
130
|
+
def operation_definition
|
131
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::OperationDefinition
|
132
|
+
end
|
133
|
+
def check_name_availability_parameters
|
134
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::CheckNameAvailabilityParameters
|
135
|
+
end
|
136
|
+
def operation_definition_list_result
|
137
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::OperationDefinitionListResult
|
138
|
+
end
|
139
|
+
def user_identity
|
140
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::UserIdentity
|
141
|
+
end
|
142
|
+
def error
|
143
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::Error
|
144
|
+
end
|
145
|
+
def private_endpoint
|
146
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PrivateEndpoint
|
147
|
+
end
|
148
|
+
def resource
|
149
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::Resource
|
150
|
+
end
|
151
|
+
def configuration_store_update_parameters
|
152
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStoreUpdateParameters
|
153
|
+
end
|
154
|
+
def private_endpoint_connection
|
155
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PrivateEndpointConnection
|
156
|
+
end
|
157
|
+
def key_vault_properties
|
158
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::KeyVaultProperties
|
159
|
+
end
|
160
|
+
def private_endpoint_connection_list_result
|
161
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PrivateEndpointConnectionListResult
|
162
|
+
end
|
163
|
+
def name_availability_status
|
164
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::NameAvailabilityStatus
|
165
|
+
end
|
166
|
+
def private_link_resource
|
167
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PrivateLinkResource
|
168
|
+
end
|
169
|
+
def private_endpoint_connection_reference
|
170
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PrivateEndpointConnectionReference
|
171
|
+
end
|
172
|
+
def private_link_resource_list_result
|
173
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PrivateLinkResourceListResult
|
174
|
+
end
|
175
|
+
def configuration_store
|
176
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStore
|
177
|
+
end
|
178
|
+
def identity_type
|
179
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::IdentityType
|
180
|
+
end
|
181
|
+
def provisioning_state
|
182
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ProvisioningState
|
183
|
+
end
|
184
|
+
def connection_status
|
185
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConnectionStatus
|
186
|
+
end
|
187
|
+
def actions_required
|
188
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ActionsRequired
|
189
|
+
end
|
190
|
+
def public_network_access
|
191
|
+
Azure::Appconfiguration::Mgmt::V2020_06_01::Models::PublicNetworkAccess
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|