Class: Azure::Appconfiguration::Mgmt::V2019_02_01_preview::ConfigurationStores
- Inherits:
-
Object
- Object
- Azure::Appconfiguration::Mgmt::V2019_02_01_preview::ConfigurationStores
- Includes:
- MsRestAzure
- Defined in:
- lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb
Overview
ConfigurationStores
Instance Attribute Summary collapse
-
#client ⇒ AppConfigurationManagementClient
readonly
Reference to the AppConfigurationManagementClient.
Instance Method Summary collapse
-
#begin_create(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers: nil) ⇒ ConfigurationStore
Creates a configuration store with the specified parameters.
-
#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.
-
#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.
-
#begin_delete(resource_group_name, config_store_name, custom_headers: nil) ⇒ Object
Deletes a configuration store.
-
#begin_delete_async(resource_group_name, config_store_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a configuration store.
-
#begin_delete_with_http_info(resource_group_name, config_store_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a configuration store.
-
#begin_update(resource_group_name, config_store_name, config_store_update_parameters, custom_headers: nil) ⇒ ConfigurationStore
Updates a configuration store with the specified parameters.
-
#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.
-
#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.
-
#create(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers: nil) ⇒ ConfigurationStore
Creates a configuration store with the specified parameters.
-
#create_async(resource_group_name, config_store_name, config_store_creation_parameters, custom_headers: nil) ⇒ Concurrent::Promise
the container registry belongs.
-
#delete(resource_group_name, config_store_name, custom_headers: nil) ⇒ Object
Deletes a configuration store.
-
#delete_async(resource_group_name, config_store_name, custom_headers: nil) ⇒ Concurrent::Promise
the container registry belongs.
-
#get(resource_group_name, config_store_name, custom_headers: nil) ⇒ ConfigurationStore
Gets the properties of the specified configuration store.
-
#get_async(resource_group_name, config_store_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the properties of the specified configuration store.
-
#get_with_http_info(resource_group_name, config_store_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the properties of the specified configuration store.
-
#initialize(client) ⇒ ConfigurationStores
constructor
Creates and initializes a new instance of the ConfigurationStores class.
-
#list(skip_token: nil, custom_headers: nil) ⇒ Array<ConfigurationStore>
Lists the configuration stores for a given subscription.
-
#list_as_lazy(skip_token: nil, custom_headers: nil) ⇒ ConfigurationStoreListResult
Lists the configuration stores for a given subscription.
-
#list_async(skip_token: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists the configuration stores for a given subscription.
-
#list_by_resource_group(resource_group_name, skip_token: nil, custom_headers: nil) ⇒ Array<ConfigurationStore>
Lists the configuration stores for a given resource group.
-
#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.
-
#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.
-
#list_by_resource_group_next(next_page_link, custom_headers: nil) ⇒ ConfigurationStoreListResult
Lists the configuration stores for a given resource group.
-
#list_by_resource_group_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists the configuration stores for a given resource group.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#list_keys_next(next_page_link, custom_headers: nil) ⇒ ApiKeyListResult
Lists the access key for the specified configuration store.
-
#list_keys_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists the access key for the specified configuration store.
-
#list_keys_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists the access key for the specified configuration store.
-
#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.
-
#list_next(next_page_link, custom_headers: nil) ⇒ ConfigurationStoreListResult
Lists the configuration stores for a given subscription.
-
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists the configuration stores for a given subscription.
-
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists the configuration stores for a given subscription.
-
#list_with_http_info(skip_token: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists the configuration stores for a given subscription.
-
#regenerate_key(resource_group_name, config_store_name, regenerate_key_parameters, custom_headers: nil) ⇒ ApiKey
Regenerates an access key for the specified configuration store.
-
#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.
-
#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.
-
#update(resource_group_name, config_store_name, config_store_update_parameters, custom_headers: nil) ⇒ ConfigurationStore
Updates a configuration store with the specified parameters.
-
#update_async(resource_group_name, config_store_name, config_store_update_parameters, custom_headers: nil) ⇒ Concurrent::Promise
the container registry belongs.
Constructor Details
#initialize(client) ⇒ ConfigurationStores
Creates and initializes a new instance of the ConfigurationStores class.
17 18 19 |
# File 'lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ AppConfigurationManagementClient (readonly)
Returns reference to the AppConfigurationManagementClient.
22 23 24 |
# File 'lib/2019-02-01-preview/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.
711 712 713 714 |
# File 'lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 711 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.
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 811 812 813 814 815 816 817 818 819 820 |
# File 'lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 746 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::V2019_02_01_preview::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 = { 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, ) 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::V2019_02_01_preview::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., 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::V2019_02_01_preview::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., 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.
729 730 731 |
# File 'lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 729 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.
832 833 834 835 |
# File 'lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 832 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.
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 |
# File 'lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 863 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 = { 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, ) 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.
848 849 850 |
# File 'lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 848 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.
924 925 926 927 |
# File 'lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 924 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.
959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 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 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 |
# File 'lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 959 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::V2019_02_01_preview::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 = { 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, ) 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::V2019_02_01_preview::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., 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::V2019_02_01_preview::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., 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.
942 943 944 |
# File 'lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 942 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.
346 347 348 349 |
# File 'lib/2019-02-01-preview/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.
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 |
# File 'lib/2019-02-01-preview/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::V2019_02_01_preview::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.
390 391 392 393 |
# File 'lib/2019-02-01-preview/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.
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 |
# File 'lib/2019-02-01-preview/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.
244 245 246 247 |
# File 'lib/2019-02-01-preview/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.
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/2019-02-01-preview/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 = { 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, ) 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::V2019_02_01_preview::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., 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.
260 261 262 |
# File 'lib/2019-02-01-preview/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.
37 38 39 40 |
# File 'lib/2019-02-01-preview/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.
1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 |
# File 'lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1319 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.
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/2019-02-01-preview/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 = { 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, ) 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::V2019_02_01_preview::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., 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.
140 141 142 143 |
# File 'lib/2019-02-01-preview/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.
1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 |
# File 'lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1346 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.
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/2019-02-01-preview/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 = { 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, ) 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::V2019_02_01_preview::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., 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.
1135 1136 1137 1138 |
# File 'lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1135 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.
1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 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 |
# File 'lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1164 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 = { 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, ) 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::V2019_02_01_preview::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., 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.
1150 1151 1152 |
# File 'lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1150 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.
160 161 162 |
# File 'lib/2019-02-01-preview/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_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.
485 486 487 488 |
# File 'lib/2019-02-01-preview/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.
1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 |
# File 'lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1374 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.
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/2019-02-01-preview/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 = { 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, ) 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::V2019_02_01_preview::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., 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.
1225 1226 1227 1228 |
# File 'lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1225 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.
1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 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 |
# File 'lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1254 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 = { 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, ) 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::V2019_02_01_preview::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., 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.
1240 1241 1242 |
# File 'lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1240 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.
506 507 508 |
# File 'lib/2019-02-01-preview/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.
1045 1046 1047 1048 |
# File 'lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1045 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.
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 |
# File 'lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1074 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 = { 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, ) 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::V2019_02_01_preview::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., 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.
1060 1061 1062 |
# File 'lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb', line 1060 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.
55 56 57 |
# File 'lib/2019-02-01-preview/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.
597 598 599 600 |
# File 'lib/2019-02-01-preview/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.
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/2019-02-01-preview/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::V2019_02_01_preview::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 = { 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, ) 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::V2019_02_01_preview::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., 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.
615 616 617 |
# File 'lib/2019-02-01-preview/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.
434 435 436 437 |
# File 'lib/2019-02-01-preview/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.
451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 |
# File 'lib/2019-02-01-preview/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::V2019_02_01_preview::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 |