Class: Google::Cloud::ParameterManager::V1::ParameterManager::Rest::Client
- Inherits:
-
Object
- Object
- Google::Cloud::ParameterManager::V1::ParameterManager::Rest::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/parameter_manager/v1/parameter_manager/rest/client.rb
Overview
REST client for the ParameterManager service.
Service describing handlers for resources
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client
readonly
Get the associated client for mix-in of the Locations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the ParameterManager Client class.
Instance Method Summary collapse
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the ParameterManager Client instance.
-
#create_parameter(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ParameterManager::V1::Parameter
Creates a new Parameter in a given project and location.
-
#create_parameter_version(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ParameterManager::V1::ParameterVersion
Creates a new ParameterVersion in a given project, location, and parameter.
-
#delete_parameter(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes a single Parameter.
-
#delete_parameter_version(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes a single ParameterVersion.
-
#get_parameter(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ParameterManager::V1::Parameter
Gets details of a single Parameter.
-
#get_parameter_version(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ParameterManager::V1::ParameterVersion
Gets details of a single ParameterVersion.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new ParameterManager REST client object.
-
#list_parameter_versions(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ParameterManager::V1::ParameterVersion>
Lists ParameterVersions in a given project, location, and parameter.
-
#list_parameters(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ParameterManager::V1::Parameter>
Lists Parameters in a given project and location.
-
#logger ⇒ Logger
The logger used for request/response debug logging.
-
#render_parameter_version(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ParameterManager::V1::RenderParameterVersionResponse
Gets rendered version of a ParameterVersion.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_parameter(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ParameterManager::V1::Parameter
Updates a single Parameter.
-
#update_parameter_version(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ParameterManager::V1::ParameterVersion
Updates a single ParameterVersion.
Methods included from Paths
#crypto_key_path, #location_path, #parameter_path, #parameter_version_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new ParameterManager REST client object.
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 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 |
# File 'lib/google/cloud/parameter_manager/v1/parameter_manager/rest/client.rb', line 164 def initialize # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint.nil? || (@config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-")) credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @parameter_manager_stub = ::Google::Cloud::ParameterManager::V1::ParameterManager::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, credentials: credentials, logger: @config.logger ) @parameter_manager_stub.logger(stub: true)&.info do |entry| entry.set_system_name entry.set_service entry. = "Created client for #{entry.service}" entry.set_credentials_fields credentials entry.set "customEndpoint", @config.endpoint if @config.endpoint entry.set "defaultTimeout", @config.timeout if @config.timeout entry.set "quotaProject", @quota_project_id if @quota_project_id end @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @parameter_manager_stub.endpoint config.universe_domain = @parameter_manager_stub.universe_domain config.bindings_override = @config.bindings_override config.logger = @parameter_manager_stub.logger if config.respond_to? :logger= end end |
Instance Attribute Details
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client (readonly)
Get the associated client for mix-in of the Locations.
220 221 222 |
# File 'lib/google/cloud/parameter_manager/v1/parameter_manager/rest/client.rb', line 220 def location_client @location_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the ParameterManager Client class.
See Configuration for a description of the configuration fields.
65 66 67 68 69 70 71 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 |
# File 'lib/google/cloud/parameter_manager/v1/parameter_manager/rest/client.rb', line 65 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "ParameterManager", "V1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.rpcs.list_parameters.timeout = 60.0 default_config.rpcs.list_parameters.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_parameter.timeout = 60.0 default_config.rpcs.get_parameter.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.create_parameter.timeout = 60.0 default_config.rpcs.update_parameter.timeout = 60.0 default_config.rpcs.delete_parameter.timeout = 60.0 default_config.rpcs.list_parameter_versions.timeout = 60.0 default_config.rpcs.list_parameter_versions.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_parameter_version.timeout = 60.0 default_config.rpcs.get_parameter_version.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.render_parameter_version.timeout = 60.0 default_config.rpcs.render_parameter_version.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.create_parameter_version.timeout = 60.0 default_config.rpcs.update_parameter_version.timeout = 60.0 default_config.rpcs.delete_parameter_version.timeout = 60.0 default_config end yield @configure if block_given? @configure end |
Instance Method Details
#configure {|config| ... } ⇒ Client::Configuration
Configure the ParameterManager Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.
See Configuration for a description of the configuration fields.
134 135 136 137 |
# File 'lib/google/cloud/parameter_manager/v1/parameter_manager/rest/client.rb', line 134 def configure yield @config if block_given? @config end |
#create_parameter(request, options = nil) ⇒ ::Google::Cloud::ParameterManager::V1::Parameter #create_parameter(parent: nil, parameter_id: nil, parameter: nil, request_id: nil) ⇒ ::Google::Cloud::ParameterManager::V1::Parameter
Creates a new Parameter in a given project and location.
468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 |
# File 'lib/google/cloud/parameter_manager/v1/parameter_manager/rest/client.rb', line 468 def create_parameter request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::CreateParameterRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_parameter..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_parameter.timeout, metadata: , retry_policy: @config.rpcs.create_parameter.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @parameter_manager_stub.create_parameter request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_parameter_version(request, options = nil) ⇒ ::Google::Cloud::ParameterManager::V1::ParameterVersion #create_parameter_version(parent: nil, parameter_version_id: nil, parameter_version: nil, request_id: nil) ⇒ ::Google::Cloud::ParameterManager::V1::ParameterVersion
Creates a new ParameterVersion in a given project, location, and parameter.
1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 |
# File 'lib/google/cloud/parameter_manager/v1/parameter_manager/rest/client.rb', line 1012 def create_parameter_version request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::CreateParameterVersionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_parameter_version..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_parameter_version.timeout, metadata: , retry_policy: @config.rpcs.create_parameter_version.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @parameter_manager_stub.create_parameter_version request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_parameter(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_parameter(name: nil, request_id: nil) ⇒ ::Google::Protobuf::Empty
Deletes a single Parameter.
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 |
# File 'lib/google/cloud/parameter_manager/v1/parameter_manager/rest/client.rb', line 660 def delete_parameter request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::DeleteParameterRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_parameter..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_parameter.timeout, metadata: , retry_policy: @config.rpcs.delete_parameter.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @parameter_manager_stub.delete_parameter request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_parameter_version(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_parameter_version(name: nil, request_id: nil) ⇒ ::Google::Protobuf::Empty
Deletes a single ParameterVersion.
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/google/cloud/parameter_manager/v1/parameter_manager/rest/client.rb', line 1204 def delete_parameter_version request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::DeleteParameterVersionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_parameter_version..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_parameter_version.timeout, metadata: , retry_policy: @config.rpcs.delete_parameter_version.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @parameter_manager_stub.delete_parameter_version request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_parameter(request, options = nil) ⇒ ::Google::Cloud::ParameterManager::V1::Parameter #get_parameter(name: nil) ⇒ ::Google::Cloud::ParameterManager::V1::Parameter
Gets details of a single Parameter.
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 |
# File 'lib/google/cloud/parameter_manager/v1/parameter_manager/rest/client.rb', line 371 def get_parameter request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::GetParameterRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_parameter..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_parameter.timeout, metadata: , retry_policy: @config.rpcs.get_parameter.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @parameter_manager_stub.get_parameter request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_parameter_version(request, options = nil) ⇒ ::Google::Cloud::ParameterManager::V1::ParameterVersion #get_parameter_version(name: nil, view: nil) ⇒ ::Google::Cloud::ParameterManager::V1::ParameterVersion
Gets details of a single ParameterVersion.
837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 |
# File 'lib/google/cloud/parameter_manager/v1/parameter_manager/rest/client.rb', line 837 def get_parameter_version request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::GetParameterVersionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_parameter_version..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_parameter_version.timeout, metadata: , retry_policy: @config.rpcs.get_parameter_version.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @parameter_manager_stub.get_parameter_version request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_parameter_versions(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ParameterManager::V1::ParameterVersion> #list_parameter_versions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ParameterManager::V1::ParameterVersion>
Lists ParameterVersions in a given project, location, and parameter.
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 |
# File 'lib/google/cloud/parameter_manager/v1/parameter_manager/rest/client.rb', line 752 def list_parameter_versions request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::ListParameterVersionsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_parameter_versions..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_parameter_versions.timeout, metadata: , retry_policy: @config.rpcs.list_parameter_versions.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @parameter_manager_stub.list_parameter_versions request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @parameter_manager_stub, :list_parameter_versions, "parameter_versions", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_parameters(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ParameterManager::V1::Parameter> #list_parameters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ParameterManager::V1::Parameter>
Lists Parameters in a given project and location.
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 |
# File 'lib/google/cloud/parameter_manager/v1/parameter_manager/rest/client.rb', line 290 def list_parameters request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::ListParametersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_parameters..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_parameters.timeout, metadata: , retry_policy: @config.rpcs.list_parameters.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @parameter_manager_stub.list_parameters request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @parameter_manager_stub, :list_parameters, "parameters", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#logger ⇒ Logger
The logger used for request/response debug logging.
227 228 229 |
# File 'lib/google/cloud/parameter_manager/v1/parameter_manager/rest/client.rb', line 227 def logger @parameter_manager_stub.logger end |
#render_parameter_version(request, options = nil) ⇒ ::Google::Cloud::ParameterManager::V1::RenderParameterVersionResponse #render_parameter_version(name: nil) ⇒ ::Google::Cloud::ParameterManager::V1::RenderParameterVersionResponse
Gets rendered version of a ParameterVersion.
915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 |
# File 'lib/google/cloud/parameter_manager/v1/parameter_manager/rest/client.rb', line 915 def render_parameter_version request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::RenderParameterVersionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.render_parameter_version..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.render_parameter_version.timeout, metadata: , retry_policy: @config.rpcs.render_parameter_version.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @parameter_manager_stub.render_parameter_version request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#universe_domain ⇒ String
The effective universe domain
144 145 146 |
# File 'lib/google/cloud/parameter_manager/v1/parameter_manager/rest/client.rb', line 144 def universe_domain @parameter_manager_stub.universe_domain end |
#update_parameter(request, options = nil) ⇒ ::Google::Cloud::ParameterManager::V1::Parameter #update_parameter(update_mask: nil, parameter: nil, request_id: nil) ⇒ ::Google::Cloud::ParameterManager::V1::Parameter
Updates a single Parameter.
567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 |
# File 'lib/google/cloud/parameter_manager/v1/parameter_manager/rest/client.rb', line 567 def update_parameter request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::UpdateParameterRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_parameter..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_parameter.timeout, metadata: , retry_policy: @config.rpcs.update_parameter.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @parameter_manager_stub.update_parameter request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_parameter_version(request, options = nil) ⇒ ::Google::Cloud::ParameterManager::V1::ParameterVersion #update_parameter_version(update_mask: nil, parameter_version: nil, request_id: nil) ⇒ ::Google::Cloud::ParameterManager::V1::ParameterVersion
Updates a single ParameterVersion.
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 |
# File 'lib/google/cloud/parameter_manager/v1/parameter_manager/rest/client.rb', line 1111 def update_parameter_version request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::UpdateParameterVersionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_parameter_version..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_parameter_version.timeout, metadata: , retry_policy: @config.rpcs.update_parameter_version.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @parameter_manager_stub.update_parameter_version request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |