Class: Azure::Appconfiguration::Mgmt::V2020_06_01::ConfigurationStores

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb

Overview

ConfigurationStores

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ ConfigurationStores

Creates and initializes a new instance of the ConfigurationStores class.

Parameters:

  • client

    service class for accessing basic functionality.



17
18
19
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 17

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientAppConfigurationManagementClient (readonly)

Returns reference to the AppConfigurationManagementClient.

Returns:



22
23
24
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 22

def client
  @client
end

Instance Method Details

#begin_create(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers: nil) ⇒ ConfigurationStore

Creates a configuration store with the specified parameters.

the container registry belongs. for creating a configuration store. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • config_store_creation_parameters (ConfigurationStore)

    The parameters

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ConfigurationStore)

    operation results.



825
826
827
828
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 825

def begin_create(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers:nil)
  response = begin_create_async(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#begin_create_async(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers: nil) ⇒ Concurrent::Promise

Creates a configuration store with the specified parameters.

the container registry belongs. for creating a configuration store. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • config_store_creation_parameters (ConfigurationStore)

    The parameters

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 860

def begin_create_async(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'config_store_name is nil' if config_store_name.nil?
  fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MaxLength': '50'" if !config_store_name.nil? && config_store_name.length > 50
  fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MinLength': '5'" if !config_store_name.nil? && config_store_name.length < 5
  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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, 'config_store_creation_parameters is nil' if config_store_creation_parameters.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStore.mapper()
  request_content = @client.serialize(request_mapper,  config_store_creation_parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'configStoreName' => config_store_name},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:put, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 201
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStore.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end
    # Deserialize Response
    if status_code == 201
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStore.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#begin_create_with_http_info(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Creates a configuration store with the specified parameters.

the container registry belongs. for creating a configuration store. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • config_store_creation_parameters (ConfigurationStore)

    The parameters

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



843
844
845
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 843

def begin_create_with_http_info(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers:nil)
  begin_create_async(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers:custom_headers).value!
end

#begin_delete(resource_group_name, config_store_name, custom_headers: nil) ⇒ Object

Deletes a configuration store.

the container registry belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



946
947
948
949
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 946

def begin_delete(resource_group_name, config_store_name, custom_headers:nil)
  response = begin_delete_async(resource_group_name, config_store_name, custom_headers:custom_headers).value!
  nil
end

#begin_delete_async(resource_group_name, config_store_name, custom_headers: nil) ⇒ Concurrent::Promise

Deletes a configuration store.

the container registry belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 977

def begin_delete_async(resource_group_name, config_store_name, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'config_store_name is nil' if config_store_name.nil?
  fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MaxLength': '50'" if !config_store_name.nil? && config_store_name.length > 50
  fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MinLength': '5'" if !config_store_name.nil? && config_store_name.length < 5
  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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'configStoreName' => config_store_name},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 202 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end

#begin_delete_with_http_info(resource_group_name, config_store_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Deletes a configuration store.

the container registry belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



962
963
964
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 962

def begin_delete_with_http_info(resource_group_name, config_store_name, custom_headers:nil)
  begin_delete_async(resource_group_name, config_store_name, custom_headers:custom_headers).value!
end

#begin_update(resource_group_name, config_store_name, config_store_update_parameters, custom_headers: nil) ⇒ ConfigurationStore

Updates a configuration store with the specified parameters.

the container registry belongs. The parameters for updating a configuration store. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • config_store_update_parameters (ConfigurationStoreUpdateParameters)
  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ConfigurationStore)

    operation results.



1038
1039
1040
1041
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1038

def begin_update(resource_group_name, config_store_name, config_store_update_parameters, custom_headers:nil)
  response = begin_update_async(resource_group_name, config_store_name, config_store_update_parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#begin_update_async(resource_group_name, config_store_name, config_store_update_parameters, custom_headers: nil) ⇒ Concurrent::Promise

Updates a configuration store with the specified parameters.

the container registry belongs. The parameters for updating a configuration store. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • config_store_update_parameters (ConfigurationStoreUpdateParameters)
  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1073

def begin_update_async(resource_group_name, config_store_name, config_store_update_parameters, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'config_store_name is nil' if config_store_name.nil?
  fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MaxLength': '50'" if !config_store_name.nil? && config_store_name.length > 50
  fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MinLength': '5'" if !config_store_name.nil? && config_store_name.length < 5
  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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, 'config_store_update_parameters is nil' if config_store_update_parameters.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStoreUpdateParameters.mapper()
  request_content = @client.serialize(request_mapper,  config_store_update_parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'configStoreName' => config_store_name},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:patch, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 201
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStore.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end
    # Deserialize Response
    if status_code == 201
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStore.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#begin_update_with_http_info(resource_group_name, config_store_name, config_store_update_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Updates a configuration store with the specified parameters.

the container registry belongs. The parameters for updating a configuration store. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • config_store_update_parameters (ConfigurationStoreUpdateParameters)
  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1056
1057
1058
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1056

def begin_update_with_http_info(resource_group_name, config_store_name, config_store_update_parameters, custom_headers:nil)
  begin_update_async(resource_group_name, config_store_name, config_store_update_parameters, custom_headers:custom_headers).value!
end

#create(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers: nil) ⇒ ConfigurationStore

Creates a configuration store with the specified parameters.

the container registry belongs. for creating a configuration store. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • config_store_creation_parameters (ConfigurationStore)

    The parameters

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ConfigurationStore)

    operation results.



346
347
348
349
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 346

def create(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers:nil)
  response = create_async(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#create_async(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers: nil) ⇒ Concurrent::Promise

the container registry belongs. for creating a configuration store. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • config_store_creation_parameters (ConfigurationStore)

    The parameters

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 363

def create_async(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers:nil)
  # Send request
  promise = begin_create_async(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStore.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response)
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#delete(resource_group_name, config_store_name, custom_headers: nil) ⇒ Object

Deletes a configuration store.

the container registry belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



390
391
392
393
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 390

def delete(resource_group_name, config_store_name, custom_headers:nil)
  response = delete_async(resource_group_name, config_store_name, custom_headers:custom_headers).value!
  nil
end

#delete_async(resource_group_name, config_store_name, custom_headers: nil) ⇒ Concurrent::Promise

the container registry belongs. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 405

def delete_async(resource_group_name, config_store_name, custom_headers:nil)
  # Send request
  promise = begin_delete_async(resource_group_name, config_store_name, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#get(resource_group_name, config_store_name, custom_headers: nil) ⇒ ConfigurationStore

Gets the properties of the specified configuration store.

the container registry belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ConfigurationStore)

    operation results.



244
245
246
247
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 244

def get(resource_group_name, config_store_name, custom_headers:nil)
  response = get_async(resource_group_name, config_store_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#get_async(resource_group_name, config_store_name, custom_headers: nil) ⇒ Concurrent::Promise

Gets the properties of the specified configuration store.

the container registry belongs. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 275

def get_async(resource_group_name, config_store_name, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'config_store_name is nil' if config_store_name.nil?
  fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MaxLength': '50'" if !config_store_name.nil? && config_store_name.length > 50
  fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MinLength': '5'" if !config_store_name.nil? && config_store_name.length < 5
  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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'configStoreName' => config_store_name},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStore.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#get_with_http_info(resource_group_name, config_store_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets the properties of the specified configuration store.

the container registry belongs. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



260
261
262
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 260

def get_with_http_info(resource_group_name, config_store_name, custom_headers:nil)
  get_async(resource_group_name, config_store_name, custom_headers:custom_headers).value!
end

#list(skip_token: nil, custom_headers: nil) ⇒ Array<ConfigurationStore>

Lists the configuration stores for a given subscription.

after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. will be added to the HTTP request.

Parameters:

  • skip_token (String) (defaults to: nil)

    A skip token is used to continue retrieving items

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<ConfigurationStore>)

    operation results.



37
38
39
40
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 37

def list(skip_token:nil, custom_headers:nil)
  first_page = list_as_lazy(skip_token:skip_token, custom_headers:custom_headers)
  first_page.get_all_items
end

#list_as_lazy(skip_token: nil, custom_headers: nil) ⇒ ConfigurationStoreListResult

Lists the configuration stores for a given subscription.

after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. will be added to the HTTP request.

the response.

Parameters:

  • skip_token (String) (defaults to: nil)

    A skip token is used to continue retrieving items

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ConfigurationStoreListResult)

    which provide lazy access to pages of



1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1433

def list_as_lazy(skip_token:nil, custom_headers:nil)
  response = list_async(skip_token:skip_token, custom_headers:custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_next_async(next_page_link, custom_headers:custom_headers)
    end
    page
  end
end

#list_async(skip_token: nil, custom_headers: nil) ⇒ Concurrent::Promise

Lists the configuration stores for a given subscription.

after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. to the HTTP request.

Parameters:

  • skip_token (String) (defaults to: nil)

    A skip token is used to continue retrieving items

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 72

def list_async(skip_token:nil, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/configurationStores'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version,'$skipToken' => skip_token},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStoreListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_by_resource_group(resource_group_name, skip_token: nil, custom_headers: nil) ⇒ Array<ConfigurationStore>

Lists the configuration stores for a given resource group.

the container registry belongs. after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • skip_token (String) (defaults to: nil)

    A skip token is used to continue retrieving items

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<ConfigurationStore>)

    operation results.



140
141
142
143
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 140

def list_by_resource_group(resource_group_name, skip_token:nil, custom_headers:nil)
  first_page = list_by_resource_group_as_lazy(resource_group_name, skip_token:skip_token, custom_headers:custom_headers)
  first_page.get_all_items
end

#list_by_resource_group_as_lazy(resource_group_name, skip_token: nil, custom_headers: nil) ⇒ ConfigurationStoreListResult

Lists the configuration stores for a given resource group.

the container registry belongs. after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • skip_token (String) (defaults to: nil)

    A skip token is used to continue retrieving items

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ConfigurationStoreListResult)

    which provide lazy access to pages of



1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1460

def list_by_resource_group_as_lazy(resource_group_name, skip_token:nil, custom_headers:nil)
  response = list_by_resource_group_async(resource_group_name, skip_token:skip_token, custom_headers:custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
    end
    page
  end
end

#list_by_resource_group_async(resource_group_name, skip_token: nil, custom_headers: nil) ⇒ Concurrent::Promise

Lists the configuration stores for a given resource group.

the container registry belongs. after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • skip_token (String) (defaults to: nil)

    A skip token is used to continue retrieving items

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 179

def list_by_resource_group_async(resource_group_name, skip_token:nil, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
      query_params: {'api-version' => @client.api_version,'$skipToken' => skip_token},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStoreListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_by_resource_group_next(next_page_link, custom_headers: nil) ⇒ ConfigurationStoreListResult

Lists the configuration stores for a given resource group.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ConfigurationStoreListResult)

    operation results.



1249
1250
1251
1252
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1249

def list_by_resource_group_next(next_page_link, custom_headers:nil)
  response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_by_resource_group_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise

Lists the configuration stores for a given resource group.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1278

def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStoreListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_by_resource_group_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Lists the configuration stores for a given resource group.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1264
1265
1266
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1264

def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
  list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
end

#list_by_resource_group_with_http_info(resource_group_name, skip_token: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Lists the configuration stores for a given resource group.

the container registry belongs. after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • skip_token (String) (defaults to: nil)

    A skip token is used to continue retrieving items

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



160
161
162
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 160

def list_by_resource_group_with_http_info(resource_group_name, skip_token:nil, custom_headers:nil)
  list_by_resource_group_async(resource_group_name, skip_token:skip_token, custom_headers:custom_headers).value!
end

#list_key_value(resource_group_name, config_store_name, list_key_value_parameters, custom_headers: nil) ⇒ KeyValue

Lists a configuration store key-value.

the container registry belongs. retrieving a key-value. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • list_key_value_parameters (ListKeyValueParameters)

    The parameters for

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (KeyValue)

    operation results.



711
712
713
714
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 711

def list_key_value(resource_group_name, config_store_name, list_key_value_parameters, custom_headers:nil)
  response = list_key_value_async(resource_group_name, config_store_name, list_key_value_parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_key_value_async(resource_group_name, config_store_name, list_key_value_parameters, custom_headers: nil) ⇒ Concurrent::Promise

Lists a configuration store key-value.

the container registry belongs. retrieving a key-value. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • list_key_value_parameters (ListKeyValueParameters)

    The parameters for

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 746

def list_key_value_async(resource_group_name, config_store_name, list_key_value_parameters, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'config_store_name is nil' if config_store_name.nil?
  fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MaxLength': '50'" if !config_store_name.nil? && config_store_name.length > 50
  fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MinLength': '5'" if !config_store_name.nil? && config_store_name.length < 5
  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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, 'list_key_value_parameters is nil' if list_key_value_parameters.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ListKeyValueParameters.mapper()
  request_content = @client.serialize(request_mapper,  list_key_value_parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/listKeyValue'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'configStoreName' => config_store_name},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::KeyValue.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_key_value_with_http_info(resource_group_name, config_store_name, list_key_value_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Lists a configuration store key-value.

the container registry belongs. retrieving a key-value. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • list_key_value_parameters (ListKeyValueParameters)

    The parameters for

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



729
730
731
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 729

def list_key_value_with_http_info(resource_group_name, config_store_name, list_key_value_parameters, custom_headers:nil)
  list_key_value_async(resource_group_name, config_store_name, list_key_value_parameters, custom_headers:custom_headers).value!
end

#list_keys(resource_group_name, config_store_name, skip_token: nil, custom_headers: nil) ⇒ Array<ApiKey>

Lists the access key for the specified configuration store.

the container registry belongs. after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • skip_token (String) (defaults to: nil)

    A skip token is used to continue retrieving items

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<ApiKey>)

    operation results.



485
486
487
488
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 485

def list_keys(resource_group_name, config_store_name, skip_token:nil, custom_headers:nil)
  first_page = list_keys_as_lazy(resource_group_name, config_store_name, skip_token:skip_token, custom_headers:custom_headers)
  first_page.get_all_items
end

#list_keys_as_lazy(resource_group_name, config_store_name, skip_token: nil, custom_headers: nil) ⇒ ApiKeyListResult

Lists the access key for the specified configuration store.

the container registry belongs. after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • skip_token (String) (defaults to: nil)

    A skip token is used to continue retrieving items

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ApiKeyListResult)

    which provide lazy access to pages of the



1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1488

def list_keys_as_lazy(resource_group_name, config_store_name, skip_token:nil, custom_headers:nil)
  response = list_keys_async(resource_group_name, config_store_name, skip_token:skip_token, custom_headers:custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_keys_next_async(next_page_link, custom_headers:custom_headers)
    end
    page
  end
end

#list_keys_async(resource_group_name, config_store_name, skip_token: nil, custom_headers: nil) ⇒ Concurrent::Promise

Lists the access key for the specified configuration store.

the container registry belongs. after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • skip_token (String) (defaults to: nil)

    A skip token is used to continue retrieving items

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 526

def list_keys_async(resource_group_name, config_store_name, skip_token:nil, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'config_store_name is nil' if config_store_name.nil?
  fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MaxLength': '50'" if !config_store_name.nil? && config_store_name.length > 50
  fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MinLength': '5'" if !config_store_name.nil? && config_store_name.length < 5
  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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/ListKeys'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'configStoreName' => config_store_name},
      query_params: {'api-version' => @client.api_version,'$skipToken' => skip_token},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ApiKeyListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_keys_next(next_page_link, custom_headers: nil) ⇒ ApiKeyListResult

Lists the access key for the specified configuration store.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ApiKeyListResult)

    operation results.



1339
1340
1341
1342
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1339

def list_keys_next(next_page_link, custom_headers:nil)
  response = list_keys_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_keys_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise

Lists the access key for the specified configuration store.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1368

def list_keys_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ApiKeyListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_keys_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Lists the access key for the specified configuration store.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1354
1355
1356
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1354

def list_keys_next_with_http_info(next_page_link, custom_headers:nil)
  list_keys_next_async(next_page_link, custom_headers:custom_headers).value!
end

#list_keys_with_http_info(resource_group_name, config_store_name, skip_token: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Lists the access key for the specified configuration store.

the container registry belongs. after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • skip_token (String) (defaults to: nil)

    A skip token is used to continue retrieving items

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



506
507
508
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 506

def list_keys_with_http_info(resource_group_name, config_store_name, skip_token:nil, custom_headers:nil)
  list_keys_async(resource_group_name, config_store_name, skip_token:skip_token, custom_headers:custom_headers).value!
end

#list_next(next_page_link, custom_headers: nil) ⇒ ConfigurationStoreListResult

Lists the configuration stores for a given subscription.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ConfigurationStoreListResult)

    operation results.



1159
1160
1161
1162
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1159

def list_next(next_page_link, custom_headers:nil)
  response = list_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise

Lists the configuration stores for a given subscription.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1188

def list_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStoreListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Lists the configuration stores for a given subscription.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1174
1175
1176
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1174

def list_next_with_http_info(next_page_link, custom_headers:nil)
  list_next_async(next_page_link, custom_headers:custom_headers).value!
end

#list_with_http_info(skip_token: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Lists the configuration stores for a given subscription.

after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. will be added to the HTTP request.

Parameters:

  • skip_token (String) (defaults to: nil)

    A skip token is used to continue retrieving items

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



55
56
57
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 55

def list_with_http_info(skip_token:nil, custom_headers:nil)
  list_async(skip_token:skip_token, custom_headers:custom_headers).value!
end

#regenerate_key(resource_group_name, config_store_name, regenerate_key_parameters, custom_headers: nil) ⇒ ApiKey

Regenerates an access key for the specified configuration store.

the container registry belongs. regenerating an access key. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • regenerate_key_parameters (RegenerateKeyParameters)

    The parameters for

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ApiKey)

    operation results.



597
598
599
600
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 597

def regenerate_key(resource_group_name, config_store_name, regenerate_key_parameters, custom_headers:nil)
  response = regenerate_key_async(resource_group_name, config_store_name, regenerate_key_parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#regenerate_key_async(resource_group_name, config_store_name, regenerate_key_parameters, custom_headers: nil) ⇒ Concurrent::Promise

Regenerates an access key for the specified configuration store.

the container registry belongs. regenerating an access key. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • regenerate_key_parameters (RegenerateKeyParameters)

    The parameters for

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 632

def regenerate_key_async(resource_group_name, config_store_name, regenerate_key_parameters, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'config_store_name is nil' if config_store_name.nil?
  fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MaxLength': '50'" if !config_store_name.nil? && config_store_name.length > 50
  fail ArgumentError, "'config_store_name' should satisfy the constraint - 'MinLength': '5'" if !config_store_name.nil? && config_store_name.length < 5
  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?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, 'regenerate_key_parameters is nil' if regenerate_key_parameters.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::RegenerateKeyParameters.mapper()
  request_content = @client.serialize(request_mapper,  regenerate_key_parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/RegenerateKey'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'configStoreName' => config_store_name},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ApiKey.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#regenerate_key_with_http_info(resource_group_name, config_store_name, regenerate_key_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Regenerates an access key for the specified configuration store.

the container registry belongs. regenerating an access key. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • regenerate_key_parameters (RegenerateKeyParameters)

    The parameters for

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



615
616
617
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 615

def regenerate_key_with_http_info(resource_group_name, config_store_name, regenerate_key_parameters, custom_headers:nil)
  regenerate_key_async(resource_group_name, config_store_name, regenerate_key_parameters, custom_headers:custom_headers).value!
end

#update(resource_group_name, config_store_name, config_store_update_parameters, custom_headers: nil) ⇒ ConfigurationStore

Updates a configuration store with the specified parameters.

the container registry belongs. The parameters for updating a configuration store. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • config_store_update_parameters (ConfigurationStoreUpdateParameters)
  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ConfigurationStore)

    operation results.



434
435
436
437
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 434

def update(resource_group_name, config_store_name, config_store_update_parameters, custom_headers:nil)
  response = update_async(resource_group_name, config_store_name, config_store_update_parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#update_async(resource_group_name, config_store_name, config_store_update_parameters, custom_headers: nil) ⇒ Concurrent::Promise

the container registry belongs. The parameters for updating a configuration store. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group to which

  • config_store_name (String)

    The name of the configuration store.

  • config_store_update_parameters (ConfigurationStoreUpdateParameters)
  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
# File 'lib/2020-06-01/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 451

def update_async(resource_group_name, config_store_name, config_store_update_parameters, custom_headers:nil)
  # Send request
  promise = begin_update_async(resource_group_name, config_store_name, config_store_update_parameters, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::Appconfiguration::Mgmt::V2020_06_01::Models::ConfigurationStore.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response)
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end