azure_mgmt_appconfiguration 0.17.2 → 0.17.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/app_configuration_management_client.rb +1 -1
  3. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/app_configuration_management_client.rb +1 -1
  4. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration.rb +63 -0
  5. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/app_configuration_management_client.rb +143 -0
  6. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb +1500 -0
  7. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/actions_required.rb +16 -0
  8. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/api_key.rb +111 -0
  9. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/api_key_list_result.rb +99 -0
  10. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/check_name_availability_parameters.rb +60 -0
  11. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/configuration_store.rb +199 -0
  12. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/configuration_store_list_result.rb +99 -0
  13. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/configuration_store_update_parameters.rb +92 -0
  14. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/connection_status.rb +18 -0
  15. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/encryption_properties.rb +47 -0
  16. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/error.rb +57 -0
  17. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/identity_type.rb +18 -0
  18. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/key_value.rb +150 -0
  19. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/key_vault_properties.rb +58 -0
  20. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/list_key_value_parameters.rb +57 -0
  21. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/name_availability_status.rb +73 -0
  22. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/operation_definition.rb +59 -0
  23. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/operation_definition_display.rb +81 -0
  24. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/operation_definition_list_result.rb +99 -0
  25. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/private_endpoint.rb +46 -0
  26. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/private_endpoint_connection.rb +111 -0
  27. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/private_endpoint_connection_list_result.rb +99 -0
  28. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/private_endpoint_connection_reference.rb +111 -0
  29. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/private_link_resource.rb +125 -0
  30. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/private_link_resource_list_result.rb +99 -0
  31. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/private_link_service_connection_state.rb +73 -0
  32. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/provisioning_state.rb +20 -0
  33. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/public_network_access.rb +16 -0
  34. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/regenerate_key_parameters.rb +46 -0
  35. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/resource.rb +111 -0
  36. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/resource_identity.rb +99 -0
  37. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/sku.rb +46 -0
  38. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/models/user_identity.rb +59 -0
  39. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/module_definition.rb +9 -0
  40. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/operations.rb +339 -0
  41. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/private_endpoint_connections.rb +675 -0
  42. data/lib/2020-06-01/generated/azure_mgmt_appconfiguration/private_link_resources.rb +352 -0
  43. data/lib/azure_mgmt_appconfiguration.rb +2 -1
  44. data/lib/profiles/latest/modules/appconfiguration_profile_module.rb +89 -81
  45. data/lib/version.rb +1 -1
  46. metadata +41 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d010289e0b9912740e0f6f0d6aa6a5f55b188354590a359c03f979627e8b259c
4
- data.tar.gz: af86f816fed5106ead133c21578aa00f9d1757958b46d3ee6281b9298cb74870
3
+ metadata.gz: 8c6201c594dc8764aa9e5772135d31e90490642ab30557e10e490ccd6496fec2
4
+ data.tar.gz: 6f8f93451c9918a63c3af1769957db774be316d5f4de5f3596b7bf5d88a03b0f
5
5
  SHA512:
6
- metadata.gz: 1ec4722adff6412ce28e57faf4147b0da081c51296533ac11a8fd61ade6846d27813e4fab9b8ecc14586ea3f38ac92cf9b9323b5749624cdde907cbac4a61c77
7
- data.tar.gz: f6b998ae9b98e8aa0e2e45dc1dacaaa59358ba3dcb801d36e021b4aec1a2d818ad1570bea690db97cacfc9d54a3161780aefbe410f4d94b4c27b809cbc6c2497
6
+ metadata.gz: 2a7d954bf8f3ce13ac203c153bf05ad2b827a0a34cc43e6e5868841116b70b088261517f35972e1ca9c34cdd1c0efd0bc0d8d155c2f88a758bd785097c8da157
7
+ data.tar.gz: 75f673a6b2fd6c32e32b9153b2be40ea3fb5f70b71bfed6274752159268179f0232732748413ed602ca0c54df83f8f3a910e80a3f897812952ec81bd7ea7eeb3
@@ -128,7 +128,7 @@ module Azure::Appconfiguration::Mgmt::V2019_02_01_preview
128
128
  #
129
129
  def add_telemetry
130
130
  sdk_information = 'azure_mgmt_appconfiguration'
131
- sdk_information = "#{sdk_information}/0.17.2"
131
+ sdk_information = "#{sdk_information}/0.17.3"
132
132
  add_user_agent_information(sdk_information)
133
133
  end
134
134
  end
@@ -136,7 +136,7 @@ module Azure::Appconfiguration::Mgmt::V2019_11_01_preview
136
136
  #
137
137
  def add_telemetry
138
138
  sdk_information = 'azure_mgmt_appconfiguration'
139
- sdk_information = "#{sdk_information}/0.17.2"
139
+ sdk_information = "#{sdk_information}/0.17.3"
140
140
  add_user_agent_information(sdk_information)
141
141
  end
142
142
  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
@@ -0,0 +1,1500 @@
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
+ # ConfigurationStores
9
+ #
10
+ class ConfigurationStores
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ConfigurationStores class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [AppConfigurationManagementClient] reference to the AppConfigurationManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Lists the configuration stores for a given subscription.
26
+ #
27
+ # @param skip_token [String] A skip token is used to continue retrieving items
28
+ # after an operation returns a partial result. If a previous response contains
29
+ # a nextLink element, the value of the nextLink element will include a
30
+ # skipToken parameter that specifies a starting point to use for subsequent
31
+ # calls.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [Array<ConfigurationStore>] operation results.
36
+ #
37
+ def list(skip_token:nil, custom_headers:nil)
38
+ first_page = list_as_lazy(skip_token:skip_token, custom_headers:custom_headers)
39
+ first_page.get_all_items
40
+ end
41
+
42
+ #
43
+ # Lists the configuration stores for a given subscription.
44
+ #
45
+ # @param skip_token [String] A skip token is used to continue retrieving items
46
+ # after an operation returns a partial result. If a previous response contains
47
+ # a nextLink element, the value of the nextLink element will include a
48
+ # skipToken parameter that specifies a starting point to use for subsequent
49
+ # calls.
50
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
51
+ # will be added to the HTTP request.
52
+ #
53
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
54
+ #
55
+ def list_with_http_info(skip_token:nil, custom_headers:nil)
56
+ list_async(skip_token:skip_token, custom_headers:custom_headers).value!
57
+ end
58
+
59
+ #
60
+ # Lists the configuration stores for a given subscription.
61
+ #
62
+ # @param skip_token [String] A skip token is used to continue retrieving items
63
+ # after an operation returns a partial result. If a previous response contains
64
+ # a nextLink element, the value of the nextLink element will include a
65
+ # skipToken parameter that specifies a starting point to use for subsequent
66
+ # calls.
67
+ # @param [Hash{String => String}] A hash of custom headers that will be added
68
+ # to the HTTP request.
69
+ #
70
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
71
+ #
72
+ def list_async(skip_token:nil, custom_headers:nil)
73
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
74
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
75
+
76
+
77
+ request_headers = {}
78
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
79
+
80
+ # Set Headers
81
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
82
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
83
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/configurationStores'
84
+
85
+ request_url = @base_url || @client.base_url
86
+
87
+ options = {
88
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
89
+ path_params: {'subscriptionId' => @client.subscription_id},
90
+ query_params: {'api-version' => @client.api_version,'$skipToken' => skip_token},
91
+ headers: request_headers.merge(custom_headers || {}),
92
+ base_url: request_url
93
+ }
94
+ promise = @client.make_request_async(:get, path_template, options)
95
+
96
+ promise = promise.then do |result|
97
+ http_response = result.response
98
+ status_code = http_response.status
99
+ response_content = http_response.body
100
+ unless status_code == 200
101
+ error_model = JSON.load(response_content)
102
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
103
+ end
104
+
105
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
106
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
107
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
108
+ # Deserialize Response
109
+ if status_code == 200
110
+ begin
111
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
112
+ result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStoreListResult.mapper()
113
+ result.body = @client.deserialize(result_mapper, parsed_response)
114
+ rescue Exception => e
115
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
116
+ end
117
+ end
118
+
119
+ result
120
+ end
121
+
122
+ promise.execute
123
+ end
124
+
125
+ #
126
+ # Lists the configuration stores for a given resource group.
127
+ #
128
+ # @param resource_group_name [String] The name of the resource group to which
129
+ # the container registry belongs.
130
+ # @param skip_token [String] A skip token is used to continue retrieving items
131
+ # after an operation returns a partial result. If a previous response contains
132
+ # a nextLink element, the value of the nextLink element will include a
133
+ # skipToken parameter that specifies a starting point to use for subsequent
134
+ # calls.
135
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
136
+ # will be added to the HTTP request.
137
+ #
138
+ # @return [Array<ConfigurationStore>] operation results.
139
+ #
140
+ def list_by_resource_group(resource_group_name, skip_token:nil, custom_headers:nil)
141
+ first_page = list_by_resource_group_as_lazy(resource_group_name, skip_token:skip_token, custom_headers:custom_headers)
142
+ first_page.get_all_items
143
+ end
144
+
145
+ #
146
+ # Lists the configuration stores for a given resource group.
147
+ #
148
+ # @param resource_group_name [String] The name of the resource group to which
149
+ # the container registry belongs.
150
+ # @param skip_token [String] A skip token is used to continue retrieving items
151
+ # after an operation returns a partial result. If a previous response contains
152
+ # a nextLink element, the value of the nextLink element will include a
153
+ # skipToken parameter that specifies a starting point to use for subsequent
154
+ # calls.
155
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
156
+ # will be added to the HTTP request.
157
+ #
158
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
159
+ #
160
+ def list_by_resource_group_with_http_info(resource_group_name, skip_token:nil, custom_headers:nil)
161
+ list_by_resource_group_async(resource_group_name, skip_token:skip_token, custom_headers:custom_headers).value!
162
+ end
163
+
164
+ #
165
+ # Lists the configuration stores for a given resource group.
166
+ #
167
+ # @param resource_group_name [String] The name of the resource group to which
168
+ # the container registry belongs.
169
+ # @param skip_token [String] A skip token is used to continue retrieving items
170
+ # after an operation returns a partial result. If a previous response contains
171
+ # a nextLink element, the value of the nextLink element will include a
172
+ # skipToken parameter that specifies a starting point to use for subsequent
173
+ # calls.
174
+ # @param [Hash{String => String}] A hash of custom headers that will be added
175
+ # to the HTTP request.
176
+ #
177
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
178
+ #
179
+ def list_by_resource_group_async(resource_group_name, skip_token:nil, custom_headers:nil)
180
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
181
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
182
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
183
+
184
+
185
+ request_headers = {}
186
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
187
+
188
+ # Set Headers
189
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
190
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
191
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores'
192
+
193
+ request_url = @base_url || @client.base_url
194
+
195
+ options = {
196
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
197
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
198
+ query_params: {'api-version' => @client.api_version,'$skipToken' => skip_token},
199
+ headers: request_headers.merge(custom_headers || {}),
200
+ base_url: request_url
201
+ }
202
+ promise = @client.make_request_async(:get, path_template, options)
203
+
204
+ promise = promise.then do |result|
205
+ http_response = result.response
206
+ status_code = http_response.status
207
+ response_content = http_response.body
208
+ unless status_code == 200
209
+ error_model = JSON.load(response_content)
210
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
211
+ end
212
+
213
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
214
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
215
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
216
+ # Deserialize Response
217
+ if status_code == 200
218
+ begin
219
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
220
+ result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStoreListResult.mapper()
221
+ result.body = @client.deserialize(result_mapper, parsed_response)
222
+ rescue Exception => e
223
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
224
+ end
225
+ end
226
+
227
+ result
228
+ end
229
+
230
+ promise.execute
231
+ end
232
+
233
+ #
234
+ # Gets the properties of the specified configuration store.
235
+ #
236
+ # @param resource_group_name [String] The name of the resource group to which
237
+ # the container registry belongs.
238
+ # @param config_store_name [String] The name of the configuration store.
239
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
240
+ # will be added to the HTTP request.
241
+ #
242
+ # @return [ConfigurationStore] operation results.
243
+ #
244
+ def get(resource_group_name, config_store_name, custom_headers:nil)
245
+ response = get_async(resource_group_name, config_store_name, custom_headers:custom_headers).value!
246
+ response.body unless response.nil?
247
+ end
248
+
249
+ #
250
+ # Gets the properties of the specified configuration store.
251
+ #
252
+ # @param resource_group_name [String] The name of the resource group to which
253
+ # the container registry belongs.
254
+ # @param config_store_name [String] The name of the configuration store.
255
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
256
+ # will be added to the HTTP request.
257
+ #
258
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
259
+ #
260
+ def get_with_http_info(resource_group_name, config_store_name, custom_headers:nil)
261
+ get_async(resource_group_name, config_store_name, custom_headers:custom_headers).value!
262
+ end
263
+
264
+ #
265
+ # Gets the properties of the specified configuration store.
266
+ #
267
+ # @param resource_group_name [String] The name of the resource group to which
268
+ # the container registry belongs.
269
+ # @param config_store_name [String] The name of the configuration store.
270
+ # @param [Hash{String => String}] A hash of custom headers that will be added
271
+ # to the HTTP request.
272
+ #
273
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
274
+ #
275
+ def get_async(resource_group_name, config_store_name, custom_headers:nil)
276
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
277
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
278
+ fail ArgumentError, 'config_store_name is nil' if config_store_name.nil?
279
+ fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MaxLength': '50'" if !config_store_name.nil? && config_store_name.length > 50
280
+ fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MinLength': '5'" if !config_store_name.nil? && config_store_name.length < 5
281
+ 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?
282
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
283
+
284
+
285
+ request_headers = {}
286
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
287
+
288
+ # Set Headers
289
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
290
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
291
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}'
292
+
293
+ request_url = @base_url || @client.base_url
294
+
295
+ options = {
296
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
297
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'configStoreName' => config_store_name},
298
+ query_params: {'api-version' => @client.api_version},
299
+ headers: request_headers.merge(custom_headers || {}),
300
+ base_url: request_url
301
+ }
302
+ promise = @client.make_request_async(:get, path_template, options)
303
+
304
+ promise = promise.then do |result|
305
+ http_response = result.response
306
+ status_code = http_response.status
307
+ response_content = http_response.body
308
+ unless status_code == 200
309
+ error_model = JSON.load(response_content)
310
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
311
+ end
312
+
313
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
314
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
315
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
316
+ # Deserialize Response
317
+ if status_code == 200
318
+ begin
319
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
320
+ result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStore.mapper()
321
+ result.body = @client.deserialize(result_mapper, parsed_response)
322
+ rescue Exception => e
323
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
324
+ end
325
+ end
326
+
327
+ result
328
+ end
329
+
330
+ promise.execute
331
+ end
332
+
333
+ #
334
+ # Creates a configuration store with the specified parameters.
335
+ #
336
+ # @param resource_group_name [String] The name of the resource group to which
337
+ # the container registry belongs.
338
+ # @param config_store_name [String] The name of the configuration store.
339
+ # @param config_store_creation_parameters [ConfigurationStore] The parameters
340
+ # for creating a configuration store.
341
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
342
+ # will be added to the HTTP request.
343
+ #
344
+ # @return [ConfigurationStore] operation results.
345
+ #
346
+ def create(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers:nil)
347
+ response = create_async(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers:custom_headers).value!
348
+ response.body unless response.nil?
349
+ end
350
+
351
+ #
352
+ # @param resource_group_name [String] The name of the resource group to which
353
+ # the container registry belongs.
354
+ # @param config_store_name [String] The name of the configuration store.
355
+ # @param config_store_creation_parameters [ConfigurationStore] The parameters
356
+ # for creating a configuration store.
357
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
358
+ # will be added to the HTTP request.
359
+ #
360
+ # @return [Concurrent::Promise] promise which provides async access to http
361
+ # response.
362
+ #
363
+ def create_async(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers:nil)
364
+ # Send request
365
+ promise = begin_create_async(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers:custom_headers)
366
+
367
+ promise = promise.then do |response|
368
+ # Defining deserialization method.
369
+ deserialize_method = lambda do |parsed_response|
370
+ result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStore.mapper()
371
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
372
+ end
373
+
374
+ # Waiting for response.
375
+ @client.get_long_running_operation_result(response, deserialize_method)
376
+ end
377
+
378
+ promise
379
+ end
380
+
381
+ #
382
+ # Deletes a configuration store.
383
+ #
384
+ # @param resource_group_name [String] The name of the resource group to which
385
+ # the container registry belongs.
386
+ # @param config_store_name [String] The name of the configuration store.
387
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
388
+ # will be added to the HTTP request.
389
+ #
390
+ def delete(resource_group_name, config_store_name, custom_headers:nil)
391
+ response = delete_async(resource_group_name, config_store_name, custom_headers:custom_headers).value!
392
+ nil
393
+ end
394
+
395
+ #
396
+ # @param resource_group_name [String] The name of the resource group to which
397
+ # the container registry belongs.
398
+ # @param config_store_name [String] The name of the configuration store.
399
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
400
+ # will be added to the HTTP request.
401
+ #
402
+ # @return [Concurrent::Promise] promise which provides async access to http
403
+ # response.
404
+ #
405
+ def delete_async(resource_group_name, config_store_name, custom_headers:nil)
406
+ # Send request
407
+ promise = begin_delete_async(resource_group_name, config_store_name, custom_headers:custom_headers)
408
+
409
+ promise = promise.then do |response|
410
+ # Defining deserialization method.
411
+ deserialize_method = lambda do |parsed_response|
412
+ end
413
+
414
+ # Waiting for response.
415
+ @client.get_long_running_operation_result(response, deserialize_method)
416
+ end
417
+
418
+ promise
419
+ end
420
+
421
+ #
422
+ # Updates a configuration store with the specified parameters.
423
+ #
424
+ # @param resource_group_name [String] The name of the resource group to which
425
+ # the container registry belongs.
426
+ # @param config_store_name [String] The name of the configuration store.
427
+ # @param config_store_update_parameters [ConfigurationStoreUpdateParameters]
428
+ # The parameters for updating a configuration store.
429
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
430
+ # will be added to the HTTP request.
431
+ #
432
+ # @return [ConfigurationStore] operation results.
433
+ #
434
+ def update(resource_group_name, config_store_name, config_store_update_parameters, custom_headers:nil)
435
+ response = update_async(resource_group_name, config_store_name, config_store_update_parameters, custom_headers:custom_headers).value!
436
+ response.body unless response.nil?
437
+ end
438
+
439
+ #
440
+ # @param resource_group_name [String] The name of the resource group to which
441
+ # the container registry belongs.
442
+ # @param config_store_name [String] The name of the configuration store.
443
+ # @param config_store_update_parameters [ConfigurationStoreUpdateParameters]
444
+ # The parameters for updating a configuration store.
445
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
446
+ # will be added to the HTTP request.
447
+ #
448
+ # @return [Concurrent::Promise] promise which provides async access to http
449
+ # response.
450
+ #
451
+ def update_async(resource_group_name, config_store_name, config_store_update_parameters, custom_headers:nil)
452
+ # Send request
453
+ promise = begin_update_async(resource_group_name, config_store_name, config_store_update_parameters, custom_headers:custom_headers)
454
+
455
+ promise = promise.then do |response|
456
+ # Defining deserialization method.
457
+ deserialize_method = lambda do |parsed_response|
458
+ result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStore.mapper()
459
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
460
+ end
461
+
462
+ # Waiting for response.
463
+ @client.get_long_running_operation_result(response, deserialize_method)
464
+ end
465
+
466
+ promise
467
+ end
468
+
469
+ #
470
+ # Lists the access key for the specified configuration store.
471
+ #
472
+ # @param resource_group_name [String] The name of the resource group to which
473
+ # the container registry belongs.
474
+ # @param config_store_name [String] The name of the configuration store.
475
+ # @param skip_token [String] A skip token is used to continue retrieving items
476
+ # after an operation returns a partial result. If a previous response contains
477
+ # a nextLink element, the value of the nextLink element will include a
478
+ # skipToken parameter that specifies a starting point to use for subsequent
479
+ # calls.
480
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
481
+ # will be added to the HTTP request.
482
+ #
483
+ # @return [Array<ApiKey>] operation results.
484
+ #
485
+ def list_keys(resource_group_name, config_store_name, skip_token:nil, custom_headers:nil)
486
+ first_page = list_keys_as_lazy(resource_group_name, config_store_name, skip_token:skip_token, custom_headers:custom_headers)
487
+ first_page.get_all_items
488
+ end
489
+
490
+ #
491
+ # Lists the access key for the specified configuration store.
492
+ #
493
+ # @param resource_group_name [String] The name of the resource group to which
494
+ # the container registry belongs.
495
+ # @param config_store_name [String] The name of the configuration store.
496
+ # @param skip_token [String] A skip token is used to continue retrieving items
497
+ # after an operation returns a partial result. If a previous response contains
498
+ # a nextLink element, the value of the nextLink element will include a
499
+ # skipToken parameter that specifies a starting point to use for subsequent
500
+ # calls.
501
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
502
+ # will be added to the HTTP request.
503
+ #
504
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
505
+ #
506
+ def list_keys_with_http_info(resource_group_name, config_store_name, skip_token:nil, custom_headers:nil)
507
+ list_keys_async(resource_group_name, config_store_name, skip_token:skip_token, custom_headers:custom_headers).value!
508
+ end
509
+
510
+ #
511
+ # Lists the access key for the specified configuration store.
512
+ #
513
+ # @param resource_group_name [String] The name of the resource group to which
514
+ # the container registry belongs.
515
+ # @param config_store_name [String] The name of the configuration store.
516
+ # @param skip_token [String] A skip token is used to continue retrieving items
517
+ # after an operation returns a partial result. If a previous response contains
518
+ # a nextLink element, the value of the nextLink element will include a
519
+ # skipToken parameter that specifies a starting point to use for subsequent
520
+ # calls.
521
+ # @param [Hash{String => String}] A hash of custom headers that will be added
522
+ # to the HTTP request.
523
+ #
524
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
525
+ #
526
+ def list_keys_async(resource_group_name, config_store_name, skip_token:nil, custom_headers:nil)
527
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
528
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
529
+ fail ArgumentError, 'config_store_name is nil' if config_store_name.nil?
530
+ fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MaxLength': '50'" if !config_store_name.nil? && config_store_name.length > 50
531
+ fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MinLength': '5'" if !config_store_name.nil? && config_store_name.length < 5
532
+ 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?
533
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
534
+
535
+
536
+ request_headers = {}
537
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
538
+
539
+ # Set Headers
540
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
541
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
542
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/ListKeys'
543
+
544
+ request_url = @base_url || @client.base_url
545
+
546
+ options = {
547
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
548
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'configStoreName' => config_store_name},
549
+ query_params: {'api-version' => @client.api_version,'$skipToken' => skip_token},
550
+ headers: request_headers.merge(custom_headers || {}),
551
+ base_url: request_url
552
+ }
553
+ promise = @client.make_request_async(:post, path_template, options)
554
+
555
+ promise = promise.then do |result|
556
+ http_response = result.response
557
+ status_code = http_response.status
558
+ response_content = http_response.body
559
+ unless status_code == 200
560
+ error_model = JSON.load(response_content)
561
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
562
+ end
563
+
564
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
565
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
566
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
567
+ # Deserialize Response
568
+ if status_code == 200
569
+ begin
570
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
571
+ result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ApiKeyListResult.mapper()
572
+ result.body = @client.deserialize(result_mapper, parsed_response)
573
+ rescue Exception => e
574
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
575
+ end
576
+ end
577
+
578
+ result
579
+ end
580
+
581
+ promise.execute
582
+ end
583
+
584
+ #
585
+ # Regenerates an access key for the specified configuration store.
586
+ #
587
+ # @param resource_group_name [String] The name of the resource group to which
588
+ # the container registry belongs.
589
+ # @param config_store_name [String] The name of the configuration store.
590
+ # @param regenerate_key_parameters [RegenerateKeyParameters] The parameters for
591
+ # regenerating an access key.
592
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
593
+ # will be added to the HTTP request.
594
+ #
595
+ # @return [ApiKey] operation results.
596
+ #
597
+ def regenerate_key(resource_group_name, config_store_name, regenerate_key_parameters, custom_headers:nil)
598
+ response = regenerate_key_async(resource_group_name, config_store_name, regenerate_key_parameters, custom_headers:custom_headers).value!
599
+ response.body unless response.nil?
600
+ end
601
+
602
+ #
603
+ # Regenerates an access key for the specified configuration store.
604
+ #
605
+ # @param resource_group_name [String] The name of the resource group to which
606
+ # the container registry belongs.
607
+ # @param config_store_name [String] The name of the configuration store.
608
+ # @param regenerate_key_parameters [RegenerateKeyParameters] The parameters for
609
+ # regenerating an access key.
610
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
611
+ # will be added to the HTTP request.
612
+ #
613
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
614
+ #
615
+ def regenerate_key_with_http_info(resource_group_name, config_store_name, regenerate_key_parameters, custom_headers:nil)
616
+ regenerate_key_async(resource_group_name, config_store_name, regenerate_key_parameters, custom_headers:custom_headers).value!
617
+ end
618
+
619
+ #
620
+ # Regenerates an access key for the specified configuration store.
621
+ #
622
+ # @param resource_group_name [String] The name of the resource group to which
623
+ # the container registry belongs.
624
+ # @param config_store_name [String] The name of the configuration store.
625
+ # @param regenerate_key_parameters [RegenerateKeyParameters] The parameters for
626
+ # regenerating an access key.
627
+ # @param [Hash{String => String}] A hash of custom headers that will be added
628
+ # to the HTTP request.
629
+ #
630
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
631
+ #
632
+ def regenerate_key_async(resource_group_name, config_store_name, regenerate_key_parameters, custom_headers:nil)
633
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
634
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
635
+ fail ArgumentError, 'config_store_name is nil' if config_store_name.nil?
636
+ fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MaxLength': '50'" if !config_store_name.nil? && config_store_name.length > 50
637
+ fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MinLength': '5'" if !config_store_name.nil? && config_store_name.length < 5
638
+ 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?
639
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
640
+ fail ArgumentError, 'regenerate_key_parameters is nil' if regenerate_key_parameters.nil?
641
+
642
+
643
+ request_headers = {}
644
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
645
+
646
+ # Set Headers
647
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
648
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
649
+
650
+ # Serialize Request
651
+ request_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::RegenerateKeyParameters.mapper()
652
+ request_content = @client.serialize(request_mapper, regenerate_key_parameters)
653
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
654
+
655
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/RegenerateKey'
656
+
657
+ request_url = @base_url || @client.base_url
658
+
659
+ options = {
660
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
661
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'configStoreName' => config_store_name},
662
+ query_params: {'api-version' => @client.api_version},
663
+ body: request_content,
664
+ headers: request_headers.merge(custom_headers || {}),
665
+ base_url: request_url
666
+ }
667
+ promise = @client.make_request_async(:post, path_template, options)
668
+
669
+ promise = promise.then do |result|
670
+ http_response = result.response
671
+ status_code = http_response.status
672
+ response_content = http_response.body
673
+ unless status_code == 200
674
+ error_model = JSON.load(response_content)
675
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
676
+ end
677
+
678
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
679
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
680
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
681
+ # Deserialize Response
682
+ if status_code == 200
683
+ begin
684
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
685
+ result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ApiKey.mapper()
686
+ result.body = @client.deserialize(result_mapper, parsed_response)
687
+ rescue Exception => e
688
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
689
+ end
690
+ end
691
+
692
+ result
693
+ end
694
+
695
+ promise.execute
696
+ end
697
+
698
+ #
699
+ # Lists a configuration store key-value.
700
+ #
701
+ # @param resource_group_name [String] The name of the resource group to which
702
+ # the container registry belongs.
703
+ # @param config_store_name [String] The name of the configuration store.
704
+ # @param list_key_value_parameters [ListKeyValueParameters] The parameters for
705
+ # retrieving a key-value.
706
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
707
+ # will be added to the HTTP request.
708
+ #
709
+ # @return [KeyValue] operation results.
710
+ #
711
+ def list_key_value(resource_group_name, config_store_name, list_key_value_parameters, custom_headers:nil)
712
+ response = list_key_value_async(resource_group_name, config_store_name, list_key_value_parameters, custom_headers:custom_headers).value!
713
+ response.body unless response.nil?
714
+ end
715
+
716
+ #
717
+ # Lists a configuration store key-value.
718
+ #
719
+ # @param resource_group_name [String] The name of the resource group to which
720
+ # the container registry belongs.
721
+ # @param config_store_name [String] The name of the configuration store.
722
+ # @param list_key_value_parameters [ListKeyValueParameters] The parameters for
723
+ # retrieving a key-value.
724
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
725
+ # will be added to the HTTP request.
726
+ #
727
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
728
+ #
729
+ def list_key_value_with_http_info(resource_group_name, config_store_name, list_key_value_parameters, custom_headers:nil)
730
+ list_key_value_async(resource_group_name, config_store_name, list_key_value_parameters, custom_headers:custom_headers).value!
731
+ end
732
+
733
+ #
734
+ # Lists a configuration store key-value.
735
+ #
736
+ # @param resource_group_name [String] The name of the resource group to which
737
+ # the container registry belongs.
738
+ # @param config_store_name [String] The name of the configuration store.
739
+ # @param list_key_value_parameters [ListKeyValueParameters] The parameters for
740
+ # retrieving a key-value.
741
+ # @param [Hash{String => String}] A hash of custom headers that will be added
742
+ # to the HTTP request.
743
+ #
744
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
745
+ #
746
+ def list_key_value_async(resource_group_name, config_store_name, list_key_value_parameters, custom_headers:nil)
747
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
748
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
749
+ fail ArgumentError, 'config_store_name is nil' if config_store_name.nil?
750
+ fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MaxLength': '50'" if !config_store_name.nil? && config_store_name.length > 50
751
+ fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MinLength': '5'" if !config_store_name.nil? && config_store_name.length < 5
752
+ 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?
753
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
754
+ fail ArgumentError, 'list_key_value_parameters is nil' if list_key_value_parameters.nil?
755
+
756
+
757
+ request_headers = {}
758
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
759
+
760
+ # Set Headers
761
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
762
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
763
+
764
+ # Serialize Request
765
+ request_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ListKeyValueParameters.mapper()
766
+ request_content = @client.serialize(request_mapper, list_key_value_parameters)
767
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
768
+
769
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/listKeyValue'
770
+
771
+ request_url = @base_url || @client.base_url
772
+
773
+ options = {
774
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
775
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'configStoreName' => config_store_name},
776
+ query_params: {'api-version' => @client.api_version},
777
+ body: request_content,
778
+ headers: request_headers.merge(custom_headers || {}),
779
+ base_url: request_url
780
+ }
781
+ promise = @client.make_request_async(:post, path_template, options)
782
+
783
+ promise = promise.then do |result|
784
+ http_response = result.response
785
+ status_code = http_response.status
786
+ response_content = http_response.body
787
+ unless status_code == 200
788
+ error_model = JSON.load(response_content)
789
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
790
+ end
791
+
792
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
793
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
794
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
795
+ # Deserialize Response
796
+ if status_code == 200
797
+ begin
798
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
799
+ result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::KeyValue.mapper()
800
+ result.body = @client.deserialize(result_mapper, parsed_response)
801
+ rescue Exception => e
802
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
803
+ end
804
+ end
805
+
806
+ result
807
+ end
808
+
809
+ promise.execute
810
+ end
811
+
812
+ #
813
+ # Creates a configuration store with the specified parameters.
814
+ #
815
+ # @param resource_group_name [String] The name of the resource group to which
816
+ # the container registry belongs.
817
+ # @param config_store_name [String] The name of the configuration store.
818
+ # @param config_store_creation_parameters [ConfigurationStore] The parameters
819
+ # for creating a configuration store.
820
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
821
+ # will be added to the HTTP request.
822
+ #
823
+ # @return [ConfigurationStore] operation results.
824
+ #
825
+ def begin_create(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers:nil)
826
+ response = begin_create_async(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers:custom_headers).value!
827
+ response.body unless response.nil?
828
+ end
829
+
830
+ #
831
+ # Creates a configuration store with the specified parameters.
832
+ #
833
+ # @param resource_group_name [String] The name of the resource group to which
834
+ # the container registry belongs.
835
+ # @param config_store_name [String] The name of the configuration store.
836
+ # @param config_store_creation_parameters [ConfigurationStore] The parameters
837
+ # for creating a configuration store.
838
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
839
+ # will be added to the HTTP request.
840
+ #
841
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
842
+ #
843
+ def begin_create_with_http_info(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers:nil)
844
+ begin_create_async(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers:custom_headers).value!
845
+ end
846
+
847
+ #
848
+ # Creates a configuration store with the specified parameters.
849
+ #
850
+ # @param resource_group_name [String] The name of the resource group to which
851
+ # the container registry belongs.
852
+ # @param config_store_name [String] The name of the configuration store.
853
+ # @param config_store_creation_parameters [ConfigurationStore] The parameters
854
+ # for creating a configuration store.
855
+ # @param [Hash{String => String}] A hash of custom headers that will be added
856
+ # to the HTTP request.
857
+ #
858
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
859
+ #
860
+ def begin_create_async(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers:nil)
861
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
862
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
863
+ fail ArgumentError, 'config_store_name is nil' if config_store_name.nil?
864
+ fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MaxLength': '50'" if !config_store_name.nil? && config_store_name.length > 50
865
+ fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MinLength': '5'" if !config_store_name.nil? && config_store_name.length < 5
866
+ 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?
867
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
868
+ fail ArgumentError, 'config_store_creation_parameters is nil' if config_store_creation_parameters.nil?
869
+
870
+
871
+ request_headers = {}
872
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
873
+
874
+ # Set Headers
875
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
876
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
877
+
878
+ # Serialize Request
879
+ request_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStore.mapper()
880
+ request_content = @client.serialize(request_mapper, config_store_creation_parameters)
881
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
882
+
883
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}'
884
+
885
+ request_url = @base_url || @client.base_url
886
+
887
+ options = {
888
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
889
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'configStoreName' => config_store_name},
890
+ query_params: {'api-version' => @client.api_version},
891
+ body: request_content,
892
+ headers: request_headers.merge(custom_headers || {}),
893
+ base_url: request_url
894
+ }
895
+ promise = @client.make_request_async(:put, path_template, options)
896
+
897
+ promise = promise.then do |result|
898
+ http_response = result.response
899
+ status_code = http_response.status
900
+ response_content = http_response.body
901
+ unless status_code == 200 || status_code == 201
902
+ error_model = JSON.load(response_content)
903
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
904
+ end
905
+
906
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
907
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
908
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
909
+ # Deserialize Response
910
+ if status_code == 200
911
+ begin
912
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
913
+ result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStore.mapper()
914
+ result.body = @client.deserialize(result_mapper, parsed_response)
915
+ rescue Exception => e
916
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
917
+ end
918
+ end
919
+ # Deserialize Response
920
+ if status_code == 201
921
+ begin
922
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
923
+ result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStore.mapper()
924
+ result.body = @client.deserialize(result_mapper, parsed_response)
925
+ rescue Exception => e
926
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
927
+ end
928
+ end
929
+
930
+ result
931
+ end
932
+
933
+ promise.execute
934
+ end
935
+
936
+ #
937
+ # Deletes a configuration store.
938
+ #
939
+ # @param resource_group_name [String] The name of the resource group to which
940
+ # the container registry belongs.
941
+ # @param config_store_name [String] The name of the configuration store.
942
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
943
+ # will be added to the HTTP request.
944
+ #
945
+ #
946
+ def begin_delete(resource_group_name, config_store_name, custom_headers:nil)
947
+ response = begin_delete_async(resource_group_name, config_store_name, custom_headers:custom_headers).value!
948
+ nil
949
+ end
950
+
951
+ #
952
+ # Deletes a configuration store.
953
+ #
954
+ # @param resource_group_name [String] The name of the resource group to which
955
+ # the container registry belongs.
956
+ # @param config_store_name [String] The name of the configuration store.
957
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
958
+ # will be added to the HTTP request.
959
+ #
960
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
961
+ #
962
+ def begin_delete_with_http_info(resource_group_name, config_store_name, custom_headers:nil)
963
+ begin_delete_async(resource_group_name, config_store_name, custom_headers:custom_headers).value!
964
+ end
965
+
966
+ #
967
+ # Deletes a configuration store.
968
+ #
969
+ # @param resource_group_name [String] The name of the resource group to which
970
+ # the container registry belongs.
971
+ # @param config_store_name [String] The name of the configuration store.
972
+ # @param [Hash{String => String}] A hash of custom headers that will be added
973
+ # to the HTTP request.
974
+ #
975
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
976
+ #
977
+ def begin_delete_async(resource_group_name, config_store_name, custom_headers:nil)
978
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
979
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
980
+ fail ArgumentError, 'config_store_name is nil' if config_store_name.nil?
981
+ fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MaxLength': '50'" if !config_store_name.nil? && config_store_name.length > 50
982
+ fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MinLength': '5'" if !config_store_name.nil? && config_store_name.length < 5
983
+ 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?
984
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
985
+
986
+
987
+ request_headers = {}
988
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
989
+
990
+ # Set Headers
991
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
992
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
993
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}'
994
+
995
+ request_url = @base_url || @client.base_url
996
+
997
+ options = {
998
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
999
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'configStoreName' => config_store_name},
1000
+ query_params: {'api-version' => @client.api_version},
1001
+ headers: request_headers.merge(custom_headers || {}),
1002
+ base_url: request_url
1003
+ }
1004
+ promise = @client.make_request_async(:delete, path_template, options)
1005
+
1006
+ promise = promise.then do |result|
1007
+ http_response = result.response
1008
+ status_code = http_response.status
1009
+ response_content = http_response.body
1010
+ unless status_code == 200 || status_code == 202 || status_code == 204
1011
+ error_model = JSON.load(response_content)
1012
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1013
+ end
1014
+
1015
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1016
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1017
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1018
+
1019
+ result
1020
+ end
1021
+
1022
+ promise.execute
1023
+ end
1024
+
1025
+ #
1026
+ # Updates a configuration store with the specified parameters.
1027
+ #
1028
+ # @param resource_group_name [String] The name of the resource group to which
1029
+ # the container registry belongs.
1030
+ # @param config_store_name [String] The name of the configuration store.
1031
+ # @param config_store_update_parameters [ConfigurationStoreUpdateParameters]
1032
+ # The parameters for updating a configuration store.
1033
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1034
+ # will be added to the HTTP request.
1035
+ #
1036
+ # @return [ConfigurationStore] operation results.
1037
+ #
1038
+ def begin_update(resource_group_name, config_store_name, config_store_update_parameters, custom_headers:nil)
1039
+ response = begin_update_async(resource_group_name, config_store_name, config_store_update_parameters, custom_headers:custom_headers).value!
1040
+ response.body unless response.nil?
1041
+ end
1042
+
1043
+ #
1044
+ # Updates a configuration store with the specified parameters.
1045
+ #
1046
+ # @param resource_group_name [String] The name of the resource group to which
1047
+ # the container registry belongs.
1048
+ # @param config_store_name [String] The name of the configuration store.
1049
+ # @param config_store_update_parameters [ConfigurationStoreUpdateParameters]
1050
+ # The parameters for updating a configuration store.
1051
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1052
+ # will be added to the HTTP request.
1053
+ #
1054
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1055
+ #
1056
+ def begin_update_with_http_info(resource_group_name, config_store_name, config_store_update_parameters, custom_headers:nil)
1057
+ begin_update_async(resource_group_name, config_store_name, config_store_update_parameters, custom_headers:custom_headers).value!
1058
+ end
1059
+
1060
+ #
1061
+ # Updates a configuration store with the specified parameters.
1062
+ #
1063
+ # @param resource_group_name [String] The name of the resource group to which
1064
+ # the container registry belongs.
1065
+ # @param config_store_name [String] The name of the configuration store.
1066
+ # @param config_store_update_parameters [ConfigurationStoreUpdateParameters]
1067
+ # The parameters for updating a configuration store.
1068
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1069
+ # to the HTTP request.
1070
+ #
1071
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1072
+ #
1073
+ def begin_update_async(resource_group_name, config_store_name, config_store_update_parameters, custom_headers:nil)
1074
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1075
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1076
+ fail ArgumentError, 'config_store_name is nil' if config_store_name.nil?
1077
+ fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MaxLength': '50'" if !config_store_name.nil? && config_store_name.length > 50
1078
+ fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MinLength': '5'" if !config_store_name.nil? && config_store_name.length < 5
1079
+ 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?
1080
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1081
+ fail ArgumentError, 'config_store_update_parameters is nil' if config_store_update_parameters.nil?
1082
+
1083
+
1084
+ request_headers = {}
1085
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1086
+
1087
+ # Set Headers
1088
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1089
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1090
+
1091
+ # Serialize Request
1092
+ request_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStoreUpdateParameters.mapper()
1093
+ request_content = @client.serialize(request_mapper, config_store_update_parameters)
1094
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1095
+
1096
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}'
1097
+
1098
+ request_url = @base_url || @client.base_url
1099
+
1100
+ options = {
1101
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1102
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'configStoreName' => config_store_name},
1103
+ query_params: {'api-version' => @client.api_version},
1104
+ body: request_content,
1105
+ headers: request_headers.merge(custom_headers || {}),
1106
+ base_url: request_url
1107
+ }
1108
+ promise = @client.make_request_async(:patch, path_template, options)
1109
+
1110
+ promise = promise.then do |result|
1111
+ http_response = result.response
1112
+ status_code = http_response.status
1113
+ response_content = http_response.body
1114
+ unless status_code == 200 || status_code == 201
1115
+ error_model = JSON.load(response_content)
1116
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1117
+ end
1118
+
1119
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1120
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1121
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1122
+ # Deserialize Response
1123
+ if status_code == 200
1124
+ begin
1125
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1126
+ result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStore.mapper()
1127
+ result.body = @client.deserialize(result_mapper, parsed_response)
1128
+ rescue Exception => e
1129
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1130
+ end
1131
+ end
1132
+ # Deserialize Response
1133
+ if status_code == 201
1134
+ begin
1135
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1136
+ result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStore.mapper()
1137
+ result.body = @client.deserialize(result_mapper, parsed_response)
1138
+ rescue Exception => e
1139
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1140
+ end
1141
+ end
1142
+
1143
+ result
1144
+ end
1145
+
1146
+ promise.execute
1147
+ end
1148
+
1149
+ #
1150
+ # Lists the configuration stores for a given subscription.
1151
+ #
1152
+ # @param next_page_link [String] The NextLink from the previous successful call
1153
+ # to List operation.
1154
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1155
+ # will be added to the HTTP request.
1156
+ #
1157
+ # @return [ConfigurationStoreListResult] operation results.
1158
+ #
1159
+ def list_next(next_page_link, custom_headers:nil)
1160
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
1161
+ response.body unless response.nil?
1162
+ end
1163
+
1164
+ #
1165
+ # Lists the configuration stores for a given subscription.
1166
+ #
1167
+ # @param next_page_link [String] The NextLink from the previous successful call
1168
+ # to List operation.
1169
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1170
+ # will be added to the HTTP request.
1171
+ #
1172
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1173
+ #
1174
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
1175
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
1176
+ end
1177
+
1178
+ #
1179
+ # Lists the configuration stores for a given subscription.
1180
+ #
1181
+ # @param next_page_link [String] The NextLink from the previous successful call
1182
+ # to List operation.
1183
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1184
+ # to the HTTP request.
1185
+ #
1186
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1187
+ #
1188
+ def list_next_async(next_page_link, custom_headers:nil)
1189
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1190
+
1191
+
1192
+ request_headers = {}
1193
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1194
+
1195
+ # Set Headers
1196
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1197
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1198
+ path_template = '{nextLink}'
1199
+
1200
+ request_url = @base_url || @client.base_url
1201
+
1202
+ options = {
1203
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1204
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1205
+ headers: request_headers.merge(custom_headers || {}),
1206
+ base_url: request_url
1207
+ }
1208
+ promise = @client.make_request_async(:get, path_template, options)
1209
+
1210
+ promise = promise.then do |result|
1211
+ http_response = result.response
1212
+ status_code = http_response.status
1213
+ response_content = http_response.body
1214
+ unless status_code == 200
1215
+ error_model = JSON.load(response_content)
1216
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1217
+ end
1218
+
1219
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1220
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1221
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1222
+ # Deserialize Response
1223
+ if status_code == 200
1224
+ begin
1225
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1226
+ result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStoreListResult.mapper()
1227
+ result.body = @client.deserialize(result_mapper, parsed_response)
1228
+ rescue Exception => e
1229
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1230
+ end
1231
+ end
1232
+
1233
+ result
1234
+ end
1235
+
1236
+ promise.execute
1237
+ end
1238
+
1239
+ #
1240
+ # Lists the configuration stores for a given resource group.
1241
+ #
1242
+ # @param next_page_link [String] The NextLink from the previous successful call
1243
+ # to List operation.
1244
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1245
+ # will be added to the HTTP request.
1246
+ #
1247
+ # @return [ConfigurationStoreListResult] operation results.
1248
+ #
1249
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
1250
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1251
+ response.body unless response.nil?
1252
+ end
1253
+
1254
+ #
1255
+ # Lists the configuration stores for a given resource group.
1256
+ #
1257
+ # @param next_page_link [String] The NextLink from the previous successful call
1258
+ # to List operation.
1259
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1260
+ # will be added to the HTTP request.
1261
+ #
1262
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1263
+ #
1264
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
1265
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1266
+ end
1267
+
1268
+ #
1269
+ # Lists the configuration stores for a given resource group.
1270
+ #
1271
+ # @param next_page_link [String] The NextLink from the previous successful call
1272
+ # to List operation.
1273
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1274
+ # to the HTTP request.
1275
+ #
1276
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1277
+ #
1278
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
1279
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1280
+
1281
+
1282
+ request_headers = {}
1283
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1284
+
1285
+ # Set Headers
1286
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1287
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1288
+ path_template = '{nextLink}'
1289
+
1290
+ request_url = @base_url || @client.base_url
1291
+
1292
+ options = {
1293
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1294
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1295
+ headers: request_headers.merge(custom_headers || {}),
1296
+ base_url: request_url
1297
+ }
1298
+ promise = @client.make_request_async(:get, path_template, options)
1299
+
1300
+ promise = promise.then do |result|
1301
+ http_response = result.response
1302
+ status_code = http_response.status
1303
+ response_content = http_response.body
1304
+ unless status_code == 200
1305
+ error_model = JSON.load(response_content)
1306
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1307
+ end
1308
+
1309
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1310
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1311
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1312
+ # Deserialize Response
1313
+ if status_code == 200
1314
+ begin
1315
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1316
+ result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStoreListResult.mapper()
1317
+ result.body = @client.deserialize(result_mapper, parsed_response)
1318
+ rescue Exception => e
1319
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1320
+ end
1321
+ end
1322
+
1323
+ result
1324
+ end
1325
+
1326
+ promise.execute
1327
+ end
1328
+
1329
+ #
1330
+ # Lists the access key for the specified configuration store.
1331
+ #
1332
+ # @param next_page_link [String] The NextLink from the previous successful call
1333
+ # to List operation.
1334
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1335
+ # will be added to the HTTP request.
1336
+ #
1337
+ # @return [ApiKeyListResult] operation results.
1338
+ #
1339
+ def list_keys_next(next_page_link, custom_headers:nil)
1340
+ response = list_keys_next_async(next_page_link, custom_headers:custom_headers).value!
1341
+ response.body unless response.nil?
1342
+ end
1343
+
1344
+ #
1345
+ # Lists the access key for the specified configuration store.
1346
+ #
1347
+ # @param next_page_link [String] The NextLink from the previous successful call
1348
+ # to List operation.
1349
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1350
+ # will be added to the HTTP request.
1351
+ #
1352
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1353
+ #
1354
+ def list_keys_next_with_http_info(next_page_link, custom_headers:nil)
1355
+ list_keys_next_async(next_page_link, custom_headers:custom_headers).value!
1356
+ end
1357
+
1358
+ #
1359
+ # Lists the access key for the specified configuration store.
1360
+ #
1361
+ # @param next_page_link [String] The NextLink from the previous successful call
1362
+ # to List operation.
1363
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1364
+ # to the HTTP request.
1365
+ #
1366
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1367
+ #
1368
+ def list_keys_next_async(next_page_link, custom_headers:nil)
1369
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1370
+
1371
+
1372
+ request_headers = {}
1373
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1374
+
1375
+ # Set Headers
1376
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1377
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1378
+ path_template = '{nextLink}'
1379
+
1380
+ request_url = @base_url || @client.base_url
1381
+
1382
+ options = {
1383
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1384
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1385
+ headers: request_headers.merge(custom_headers || {}),
1386
+ base_url: request_url
1387
+ }
1388
+ promise = @client.make_request_async(:post, path_template, options)
1389
+
1390
+ promise = promise.then do |result|
1391
+ http_response = result.response
1392
+ status_code = http_response.status
1393
+ response_content = http_response.body
1394
+ unless status_code == 200
1395
+ error_model = JSON.load(response_content)
1396
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1397
+ end
1398
+
1399
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1400
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1401
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1402
+ # Deserialize Response
1403
+ if status_code == 200
1404
+ begin
1405
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1406
+ result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ApiKeyListResult.mapper()
1407
+ result.body = @client.deserialize(result_mapper, parsed_response)
1408
+ rescue Exception => e
1409
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1410
+ end
1411
+ end
1412
+
1413
+ result
1414
+ end
1415
+
1416
+ promise.execute
1417
+ end
1418
+
1419
+ #
1420
+ # Lists the configuration stores for a given subscription.
1421
+ #
1422
+ # @param skip_token [String] A skip token is used to continue retrieving items
1423
+ # after an operation returns a partial result. If a previous response contains
1424
+ # a nextLink element, the value of the nextLink element will include a
1425
+ # skipToken parameter that specifies a starting point to use for subsequent
1426
+ # calls.
1427
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1428
+ # will be added to the HTTP request.
1429
+ #
1430
+ # @return [ConfigurationStoreListResult] which provide lazy access to pages of
1431
+ # the response.
1432
+ #
1433
+ def list_as_lazy(skip_token:nil, custom_headers:nil)
1434
+ response = list_async(skip_token:skip_token, custom_headers:custom_headers).value!
1435
+ unless response.nil?
1436
+ page = response.body
1437
+ page.next_method = Proc.new do |next_page_link|
1438
+ list_next_async(next_page_link, custom_headers:custom_headers)
1439
+ end
1440
+ page
1441
+ end
1442
+ end
1443
+
1444
+ #
1445
+ # Lists the configuration stores for a given resource group.
1446
+ #
1447
+ # @param resource_group_name [String] The name of the resource group to which
1448
+ # the container registry belongs.
1449
+ # @param skip_token [String] A skip token is used to continue retrieving items
1450
+ # after an operation returns a partial result. If a previous response contains
1451
+ # a nextLink element, the value of the nextLink element will include a
1452
+ # skipToken parameter that specifies a starting point to use for subsequent
1453
+ # calls.
1454
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1455
+ # will be added to the HTTP request.
1456
+ #
1457
+ # @return [ConfigurationStoreListResult] which provide lazy access to pages of
1458
+ # the response.
1459
+ #
1460
+ def list_by_resource_group_as_lazy(resource_group_name, skip_token:nil, custom_headers:nil)
1461
+ response = list_by_resource_group_async(resource_group_name, skip_token:skip_token, custom_headers:custom_headers).value!
1462
+ unless response.nil?
1463
+ page = response.body
1464
+ page.next_method = Proc.new do |next_page_link|
1465
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1466
+ end
1467
+ page
1468
+ end
1469
+ end
1470
+
1471
+ #
1472
+ # Lists the access key for the specified configuration store.
1473
+ #
1474
+ # @param resource_group_name [String] The name of the resource group to which
1475
+ # the container registry belongs.
1476
+ # @param config_store_name [String] The name of the configuration store.
1477
+ # @param skip_token [String] A skip token is used to continue retrieving items
1478
+ # after an operation returns a partial result. If a previous response contains
1479
+ # a nextLink element, the value of the nextLink element will include a
1480
+ # skipToken parameter that specifies a starting point to use for subsequent
1481
+ # calls.
1482
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1483
+ # will be added to the HTTP request.
1484
+ #
1485
+ # @return [ApiKeyListResult] which provide lazy access to pages of the
1486
+ # response.
1487
+ #
1488
+ def list_keys_as_lazy(resource_group_name, config_store_name, skip_token:nil, custom_headers:nil)
1489
+ response = list_keys_async(resource_group_name, config_store_name, skip_token:skip_token, custom_headers:custom_headers).value!
1490
+ unless response.nil?
1491
+ page = response.body
1492
+ page.next_method = Proc.new do |next_page_link|
1493
+ list_keys_next_async(next_page_link, custom_headers:custom_headers)
1494
+ end
1495
+ page
1496
+ end
1497
+ end
1498
+
1499
+ end
1500
+ end