google-cloud-parameter_manager-v1 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/LICENSE.md +201 -0
- data/README.md +154 -0
- data/lib/google/cloud/parameter_manager/v1/bindings_override.rb +102 -0
- data/lib/google/cloud/parameter_manager/v1/parameter_manager/client.rb +1578 -0
- data/lib/google/cloud/parameter_manager/v1/parameter_manager/credentials.rb +47 -0
- data/lib/google/cloud/parameter_manager/v1/parameter_manager/paths.rb +90 -0
- data/lib/google/cloud/parameter_manager/v1/parameter_manager/rest/client.rb +1483 -0
- data/lib/google/cloud/parameter_manager/v1/parameter_manager/rest/service_stub.rb +756 -0
- data/lib/google/cloud/parameter_manager/v1/parameter_manager/rest.rb +53 -0
- data/lib/google/cloud/parameter_manager/v1/parameter_manager.rb +55 -0
- data/lib/google/cloud/parameter_manager/v1/rest.rb +38 -0
- data/lib/google/cloud/parameter_manager/v1/version.rb +28 -0
- data/lib/google/cloud/parameter_manager/v1.rb +45 -0
- data/lib/google/cloud/parametermanager/v1/service_pb.rb +73 -0
- data/lib/google/cloud/parametermanager/v1/service_services_pb.rb +65 -0
- data/lib/google-cloud-parameter_manager-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +473 -0
- data/proto_docs/google/api/field_behavior.rb +85 -0
- data/proto_docs/google/api/field_info.rb +88 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +227 -0
- data/proto_docs/google/cloud/parametermanager/v1/service.rb +436 -0
- data/proto_docs/google/iam/v1/resource_policy_member.rb +49 -0
- data/proto_docs/google/protobuf/any.rb +145 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +127 -0
- metadata +147 -0
@@ -0,0 +1,1483 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/errors"
|
20
|
+
require "google/cloud/parametermanager/v1/service_pb"
|
21
|
+
require "google/cloud/parameter_manager/v1/parameter_manager/rest/service_stub"
|
22
|
+
require "google/cloud/location/rest"
|
23
|
+
|
24
|
+
module Google
|
25
|
+
module Cloud
|
26
|
+
module ParameterManager
|
27
|
+
module V1
|
28
|
+
module ParameterManager
|
29
|
+
module Rest
|
30
|
+
##
|
31
|
+
# REST client for the ParameterManager service.
|
32
|
+
#
|
33
|
+
# Service describing handlers for resources
|
34
|
+
#
|
35
|
+
class Client
|
36
|
+
# @private
|
37
|
+
API_VERSION = ""
|
38
|
+
|
39
|
+
# @private
|
40
|
+
DEFAULT_ENDPOINT_TEMPLATE = "parametermanager.$UNIVERSE_DOMAIN$"
|
41
|
+
|
42
|
+
include Paths
|
43
|
+
|
44
|
+
# @private
|
45
|
+
attr_reader :parameter_manager_stub
|
46
|
+
|
47
|
+
##
|
48
|
+
# Configure the ParameterManager Client class.
|
49
|
+
#
|
50
|
+
# See {::Google::Cloud::ParameterManager::V1::ParameterManager::Rest::Client::Configuration}
|
51
|
+
# for a description of the configuration fields.
|
52
|
+
#
|
53
|
+
# @example
|
54
|
+
#
|
55
|
+
# # Modify the configuration for all ParameterManager clients
|
56
|
+
# ::Google::Cloud::ParameterManager::V1::ParameterManager::Rest::Client.configure do |config|
|
57
|
+
# config.timeout = 10.0
|
58
|
+
# end
|
59
|
+
#
|
60
|
+
# @yield [config] Configure the Client client.
|
61
|
+
# @yieldparam config [Client::Configuration]
|
62
|
+
#
|
63
|
+
# @return [Client::Configuration]
|
64
|
+
#
|
65
|
+
def self.configure
|
66
|
+
@configure ||= begin
|
67
|
+
namespace = ["Google", "Cloud", "ParameterManager", "V1"]
|
68
|
+
parent_config = while namespace.any?
|
69
|
+
parent_name = namespace.join "::"
|
70
|
+
parent_const = const_get parent_name
|
71
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
72
|
+
namespace.pop
|
73
|
+
end
|
74
|
+
default_config = Client::Configuration.new parent_config
|
75
|
+
|
76
|
+
default_config.rpcs.list_parameters.timeout = 60.0
|
77
|
+
default_config.rpcs.list_parameters.retry_policy = {
|
78
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
79
|
+
}
|
80
|
+
|
81
|
+
default_config.rpcs.get_parameter.timeout = 60.0
|
82
|
+
default_config.rpcs.get_parameter.retry_policy = {
|
83
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
84
|
+
}
|
85
|
+
|
86
|
+
default_config.rpcs.create_parameter.timeout = 60.0
|
87
|
+
|
88
|
+
default_config.rpcs.update_parameter.timeout = 60.0
|
89
|
+
|
90
|
+
default_config.rpcs.delete_parameter.timeout = 60.0
|
91
|
+
|
92
|
+
default_config.rpcs.list_parameter_versions.timeout = 60.0
|
93
|
+
default_config.rpcs.list_parameter_versions.retry_policy = {
|
94
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
95
|
+
}
|
96
|
+
|
97
|
+
default_config.rpcs.get_parameter_version.timeout = 60.0
|
98
|
+
default_config.rpcs.get_parameter_version.retry_policy = {
|
99
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
100
|
+
}
|
101
|
+
|
102
|
+
default_config.rpcs.render_parameter_version.timeout = 60.0
|
103
|
+
default_config.rpcs.render_parameter_version.retry_policy = {
|
104
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
105
|
+
}
|
106
|
+
|
107
|
+
default_config.rpcs.create_parameter_version.timeout = 60.0
|
108
|
+
|
109
|
+
default_config.rpcs.update_parameter_version.timeout = 60.0
|
110
|
+
|
111
|
+
default_config.rpcs.delete_parameter_version.timeout = 60.0
|
112
|
+
|
113
|
+
default_config
|
114
|
+
end
|
115
|
+
yield @configure if block_given?
|
116
|
+
@configure
|
117
|
+
end
|
118
|
+
|
119
|
+
##
|
120
|
+
# Configure the ParameterManager Client instance.
|
121
|
+
#
|
122
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
123
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
124
|
+
# should be made on {Client.configure}.
|
125
|
+
#
|
126
|
+
# See {::Google::Cloud::ParameterManager::V1::ParameterManager::Rest::Client::Configuration}
|
127
|
+
# for a description of the configuration fields.
|
128
|
+
#
|
129
|
+
# @yield [config] Configure the Client client.
|
130
|
+
# @yieldparam config [Client::Configuration]
|
131
|
+
#
|
132
|
+
# @return [Client::Configuration]
|
133
|
+
#
|
134
|
+
def configure
|
135
|
+
yield @config if block_given?
|
136
|
+
@config
|
137
|
+
end
|
138
|
+
|
139
|
+
##
|
140
|
+
# The effective universe domain
|
141
|
+
#
|
142
|
+
# @return [String]
|
143
|
+
#
|
144
|
+
def universe_domain
|
145
|
+
@parameter_manager_stub.universe_domain
|
146
|
+
end
|
147
|
+
|
148
|
+
##
|
149
|
+
# Create a new ParameterManager REST client object.
|
150
|
+
#
|
151
|
+
# @example
|
152
|
+
#
|
153
|
+
# # Create a client using the default configuration
|
154
|
+
# client = ::Google::Cloud::ParameterManager::V1::ParameterManager::Rest::Client.new
|
155
|
+
#
|
156
|
+
# # Create a client using a custom configuration
|
157
|
+
# client = ::Google::Cloud::ParameterManager::V1::ParameterManager::Rest::Client.new do |config|
|
158
|
+
# config.timeout = 10.0
|
159
|
+
# end
|
160
|
+
#
|
161
|
+
# @yield [config] Configure the ParameterManager client.
|
162
|
+
# @yieldparam config [Client::Configuration]
|
163
|
+
#
|
164
|
+
def initialize
|
165
|
+
# Create the configuration object
|
166
|
+
@config = Configuration.new Client.configure
|
167
|
+
|
168
|
+
# Yield the configuration if needed
|
169
|
+
yield @config if block_given?
|
170
|
+
|
171
|
+
# Create credentials
|
172
|
+
credentials = @config.credentials
|
173
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
174
|
+
# but only if the default endpoint does not have a region prefix.
|
175
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
176
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
177
|
+
!@config.endpoint.split(".").first.include?("-"))
|
178
|
+
credentials ||= Credentials.default scope: @config.scope,
|
179
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
180
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
181
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
182
|
+
end
|
183
|
+
|
184
|
+
@quota_project_id = @config.quota_project
|
185
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
186
|
+
|
187
|
+
@parameter_manager_stub = ::Google::Cloud::ParameterManager::V1::ParameterManager::Rest::ServiceStub.new(
|
188
|
+
endpoint: @config.endpoint,
|
189
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
190
|
+
universe_domain: @config.universe_domain,
|
191
|
+
credentials: credentials,
|
192
|
+
logger: @config.logger
|
193
|
+
)
|
194
|
+
|
195
|
+
@parameter_manager_stub.logger(stub: true)&.info do |entry|
|
196
|
+
entry.set_system_name
|
197
|
+
entry.set_service
|
198
|
+
entry.message = "Created client for #{entry.service}"
|
199
|
+
entry.set_credentials_fields credentials
|
200
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
201
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
202
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
203
|
+
end
|
204
|
+
|
205
|
+
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
206
|
+
config.credentials = credentials
|
207
|
+
config.quota_project = @quota_project_id
|
208
|
+
config.endpoint = @parameter_manager_stub.endpoint
|
209
|
+
config.universe_domain = @parameter_manager_stub.universe_domain
|
210
|
+
config.bindings_override = @config.bindings_override
|
211
|
+
config.logger = @parameter_manager_stub.logger if config.respond_to? :logger=
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
##
|
216
|
+
# Get the associated client for mix-in of the Locations.
|
217
|
+
#
|
218
|
+
# @return [Google::Cloud::Location::Locations::Rest::Client]
|
219
|
+
#
|
220
|
+
attr_reader :location_client
|
221
|
+
|
222
|
+
##
|
223
|
+
# The logger used for request/response debug logging.
|
224
|
+
#
|
225
|
+
# @return [Logger]
|
226
|
+
#
|
227
|
+
def logger
|
228
|
+
@parameter_manager_stub.logger
|
229
|
+
end
|
230
|
+
|
231
|
+
# Service calls
|
232
|
+
|
233
|
+
##
|
234
|
+
# Lists Parameters in a given project and location.
|
235
|
+
#
|
236
|
+
# @overload list_parameters(request, options = nil)
|
237
|
+
# Pass arguments to `list_parameters` via a request object, either of type
|
238
|
+
# {::Google::Cloud::ParameterManager::V1::ListParametersRequest} or an equivalent Hash.
|
239
|
+
#
|
240
|
+
# @param request [::Google::Cloud::ParameterManager::V1::ListParametersRequest, ::Hash]
|
241
|
+
# A request object representing the call parameters. Required. To specify no
|
242
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
243
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
244
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
245
|
+
#
|
246
|
+
# @overload list_parameters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
247
|
+
# Pass arguments to `list_parameters` via keyword arguments. Note that at
|
248
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
249
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
250
|
+
#
|
251
|
+
# @param parent [::String]
|
252
|
+
# Required. Parent value for ListParametersRequest in the format
|
253
|
+
# `projects/*/locations/*`.
|
254
|
+
# @param page_size [::Integer]
|
255
|
+
# Optional. Requested page size. Server may return fewer items than
|
256
|
+
# requested. If unspecified, server will pick an appropriate default.
|
257
|
+
# @param page_token [::String]
|
258
|
+
# Optional. A token identifying a page of results the server should return.
|
259
|
+
# @param filter [::String]
|
260
|
+
# Optional. Filtering results
|
261
|
+
# @param order_by [::String]
|
262
|
+
# Optional. Hint for how to order the results
|
263
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
264
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ParameterManager::V1::Parameter>]
|
265
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
266
|
+
#
|
267
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ParameterManager::V1::Parameter>]
|
268
|
+
#
|
269
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
270
|
+
#
|
271
|
+
# @example Basic example
|
272
|
+
# require "google/cloud/parameter_manager/v1"
|
273
|
+
#
|
274
|
+
# # Create a client object. The client can be reused for multiple calls.
|
275
|
+
# client = Google::Cloud::ParameterManager::V1::ParameterManager::Rest::Client.new
|
276
|
+
#
|
277
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
278
|
+
# request = Google::Cloud::ParameterManager::V1::ListParametersRequest.new
|
279
|
+
#
|
280
|
+
# # Call the list_parameters method.
|
281
|
+
# result = client.list_parameters request
|
282
|
+
#
|
283
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
284
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
285
|
+
# result.each do |item|
|
286
|
+
# # Each element is of type ::Google::Cloud::ParameterManager::V1::Parameter.
|
287
|
+
# p item
|
288
|
+
# end
|
289
|
+
#
|
290
|
+
def list_parameters request, options = nil
|
291
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
292
|
+
|
293
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::ListParametersRequest
|
294
|
+
|
295
|
+
# Converts hash and nil to an options object
|
296
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
297
|
+
|
298
|
+
# Customize the options with defaults
|
299
|
+
call_metadata = @config.rpcs.list_parameters.metadata.to_h
|
300
|
+
|
301
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
302
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
303
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
304
|
+
gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION,
|
305
|
+
transports_version_send: [:rest]
|
306
|
+
|
307
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
308
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
309
|
+
|
310
|
+
options.apply_defaults timeout: @config.rpcs.list_parameters.timeout,
|
311
|
+
metadata: call_metadata,
|
312
|
+
retry_policy: @config.rpcs.list_parameters.retry_policy
|
313
|
+
|
314
|
+
options.apply_defaults timeout: @config.timeout,
|
315
|
+
metadata: @config.metadata,
|
316
|
+
retry_policy: @config.retry_policy
|
317
|
+
|
318
|
+
@parameter_manager_stub.list_parameters request, options do |result, operation|
|
319
|
+
result = ::Gapic::Rest::PagedEnumerable.new @parameter_manager_stub, :list_parameters, "parameters", request, result, options
|
320
|
+
yield result, operation if block_given?
|
321
|
+
throw :response, result
|
322
|
+
end
|
323
|
+
rescue ::Gapic::Rest::Error => e
|
324
|
+
raise ::Google::Cloud::Error.from_error(e)
|
325
|
+
end
|
326
|
+
|
327
|
+
##
|
328
|
+
# Gets details of a single Parameter.
|
329
|
+
#
|
330
|
+
# @overload get_parameter(request, options = nil)
|
331
|
+
# Pass arguments to `get_parameter` via a request object, either of type
|
332
|
+
# {::Google::Cloud::ParameterManager::V1::GetParameterRequest} or an equivalent Hash.
|
333
|
+
#
|
334
|
+
# @param request [::Google::Cloud::ParameterManager::V1::GetParameterRequest, ::Hash]
|
335
|
+
# A request object representing the call parameters. Required. To specify no
|
336
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
337
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
338
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
339
|
+
#
|
340
|
+
# @overload get_parameter(name: nil)
|
341
|
+
# Pass arguments to `get_parameter` via keyword arguments. Note that at
|
342
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
343
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
344
|
+
#
|
345
|
+
# @param name [::String]
|
346
|
+
# Required. Name of the resource in the format
|
347
|
+
# `projects/*/locations/*/parameters/*`.
|
348
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
349
|
+
# @yieldparam result [::Google::Cloud::ParameterManager::V1::Parameter]
|
350
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
351
|
+
#
|
352
|
+
# @return [::Google::Cloud::ParameterManager::V1::Parameter]
|
353
|
+
#
|
354
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
355
|
+
#
|
356
|
+
# @example Basic example
|
357
|
+
# require "google/cloud/parameter_manager/v1"
|
358
|
+
#
|
359
|
+
# # Create a client object. The client can be reused for multiple calls.
|
360
|
+
# client = Google::Cloud::ParameterManager::V1::ParameterManager::Rest::Client.new
|
361
|
+
#
|
362
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
363
|
+
# request = Google::Cloud::ParameterManager::V1::GetParameterRequest.new
|
364
|
+
#
|
365
|
+
# # Call the get_parameter method.
|
366
|
+
# result = client.get_parameter request
|
367
|
+
#
|
368
|
+
# # The returned object is of type Google::Cloud::ParameterManager::V1::Parameter.
|
369
|
+
# p result
|
370
|
+
#
|
371
|
+
def get_parameter request, options = nil
|
372
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
373
|
+
|
374
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::GetParameterRequest
|
375
|
+
|
376
|
+
# Converts hash and nil to an options object
|
377
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
378
|
+
|
379
|
+
# Customize the options with defaults
|
380
|
+
call_metadata = @config.rpcs.get_parameter.metadata.to_h
|
381
|
+
|
382
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
383
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
384
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
385
|
+
gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION,
|
386
|
+
transports_version_send: [:rest]
|
387
|
+
|
388
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
389
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
390
|
+
|
391
|
+
options.apply_defaults timeout: @config.rpcs.get_parameter.timeout,
|
392
|
+
metadata: call_metadata,
|
393
|
+
retry_policy: @config.rpcs.get_parameter.retry_policy
|
394
|
+
|
395
|
+
options.apply_defaults timeout: @config.timeout,
|
396
|
+
metadata: @config.metadata,
|
397
|
+
retry_policy: @config.retry_policy
|
398
|
+
|
399
|
+
@parameter_manager_stub.get_parameter request, options do |result, operation|
|
400
|
+
yield result, operation if block_given?
|
401
|
+
end
|
402
|
+
rescue ::Gapic::Rest::Error => e
|
403
|
+
raise ::Google::Cloud::Error.from_error(e)
|
404
|
+
end
|
405
|
+
|
406
|
+
##
|
407
|
+
# Creates a new Parameter in a given project and location.
|
408
|
+
#
|
409
|
+
# @overload create_parameter(request, options = nil)
|
410
|
+
# Pass arguments to `create_parameter` via a request object, either of type
|
411
|
+
# {::Google::Cloud::ParameterManager::V1::CreateParameterRequest} or an equivalent Hash.
|
412
|
+
#
|
413
|
+
# @param request [::Google::Cloud::ParameterManager::V1::CreateParameterRequest, ::Hash]
|
414
|
+
# A request object representing the call parameters. Required. To specify no
|
415
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
416
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
417
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
418
|
+
#
|
419
|
+
# @overload create_parameter(parent: nil, parameter_id: nil, parameter: nil, request_id: nil)
|
420
|
+
# Pass arguments to `create_parameter` via keyword arguments. Note that at
|
421
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
422
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
423
|
+
#
|
424
|
+
# @param parent [::String]
|
425
|
+
# Required. Value for parent in the format
|
426
|
+
# `projects/*/locations/*`.
|
427
|
+
# @param parameter_id [::String]
|
428
|
+
# Required. Id of the Parameter resource
|
429
|
+
# @param parameter [::Google::Cloud::ParameterManager::V1::Parameter, ::Hash]
|
430
|
+
# Required. The Parameter resource being created
|
431
|
+
# @param request_id [::String]
|
432
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
433
|
+
# request ID so that if you must retry your request, the server will know to
|
434
|
+
# ignore the request if it has already been completed. The server will
|
435
|
+
# guarantee that for at least 60 minutes since the first request.
|
436
|
+
#
|
437
|
+
# For example, consider a situation where you make an initial request and the
|
438
|
+
# request times out. If you make the request again with the same request
|
439
|
+
# ID, the server can check if original operation with the same request ID
|
440
|
+
# was received, and if so, will ignore the second request. This prevents
|
441
|
+
# clients from accidentally creating duplicate commitments.
|
442
|
+
#
|
443
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
444
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
445
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
446
|
+
# @yieldparam result [::Google::Cloud::ParameterManager::V1::Parameter]
|
447
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
448
|
+
#
|
449
|
+
# @return [::Google::Cloud::ParameterManager::V1::Parameter]
|
450
|
+
#
|
451
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
452
|
+
#
|
453
|
+
# @example Basic example
|
454
|
+
# require "google/cloud/parameter_manager/v1"
|
455
|
+
#
|
456
|
+
# # Create a client object. The client can be reused for multiple calls.
|
457
|
+
# client = Google::Cloud::ParameterManager::V1::ParameterManager::Rest::Client.new
|
458
|
+
#
|
459
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
460
|
+
# request = Google::Cloud::ParameterManager::V1::CreateParameterRequest.new
|
461
|
+
#
|
462
|
+
# # Call the create_parameter method.
|
463
|
+
# result = client.create_parameter request
|
464
|
+
#
|
465
|
+
# # The returned object is of type Google::Cloud::ParameterManager::V1::Parameter.
|
466
|
+
# p result
|
467
|
+
#
|
468
|
+
def create_parameter request, options = nil
|
469
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
470
|
+
|
471
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::CreateParameterRequest
|
472
|
+
|
473
|
+
# Converts hash and nil to an options object
|
474
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
475
|
+
|
476
|
+
# Customize the options with defaults
|
477
|
+
call_metadata = @config.rpcs.create_parameter.metadata.to_h
|
478
|
+
|
479
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
480
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
481
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
482
|
+
gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION,
|
483
|
+
transports_version_send: [:rest]
|
484
|
+
|
485
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
486
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
487
|
+
|
488
|
+
options.apply_defaults timeout: @config.rpcs.create_parameter.timeout,
|
489
|
+
metadata: call_metadata,
|
490
|
+
retry_policy: @config.rpcs.create_parameter.retry_policy
|
491
|
+
|
492
|
+
options.apply_defaults timeout: @config.timeout,
|
493
|
+
metadata: @config.metadata,
|
494
|
+
retry_policy: @config.retry_policy
|
495
|
+
|
496
|
+
@parameter_manager_stub.create_parameter request, options do |result, operation|
|
497
|
+
yield result, operation if block_given?
|
498
|
+
end
|
499
|
+
rescue ::Gapic::Rest::Error => e
|
500
|
+
raise ::Google::Cloud::Error.from_error(e)
|
501
|
+
end
|
502
|
+
|
503
|
+
##
|
504
|
+
# Updates a single Parameter.
|
505
|
+
#
|
506
|
+
# @overload update_parameter(request, options = nil)
|
507
|
+
# Pass arguments to `update_parameter` via a request object, either of type
|
508
|
+
# {::Google::Cloud::ParameterManager::V1::UpdateParameterRequest} or an equivalent Hash.
|
509
|
+
#
|
510
|
+
# @param request [::Google::Cloud::ParameterManager::V1::UpdateParameterRequest, ::Hash]
|
511
|
+
# A request object representing the call parameters. Required. To specify no
|
512
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
513
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
514
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
515
|
+
#
|
516
|
+
# @overload update_parameter(update_mask: nil, parameter: nil, request_id: nil)
|
517
|
+
# Pass arguments to `update_parameter` via keyword arguments. Note that at
|
518
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
519
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
520
|
+
#
|
521
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
522
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
523
|
+
# Parameter resource by the update.
|
524
|
+
# The fields specified in the update_mask are relative to the resource, not
|
525
|
+
# the full request. A mutable field will be overwritten if it is in the
|
526
|
+
# mask. If the user does not provide a mask then all mutable fields present
|
527
|
+
# in the request will be overwritten.
|
528
|
+
# @param parameter [::Google::Cloud::ParameterManager::V1::Parameter, ::Hash]
|
529
|
+
# Required. The Parameter resource being updated
|
530
|
+
# @param request_id [::String]
|
531
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
532
|
+
# request ID so that if you must retry your request, the server will know to
|
533
|
+
# ignore the request if it has already been completed. The server will
|
534
|
+
# guarantee that for at least 60 minutes since the first request.
|
535
|
+
#
|
536
|
+
# For example, consider a situation where you make an initial request and the
|
537
|
+
# request times out. If you make the request again with the same request
|
538
|
+
# ID, the server can check if original operation with the same request ID
|
539
|
+
# was received, and if so, will ignore the second request. This prevents
|
540
|
+
# clients from accidentally creating duplicate commitments.
|
541
|
+
#
|
542
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
543
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
544
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
545
|
+
# @yieldparam result [::Google::Cloud::ParameterManager::V1::Parameter]
|
546
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
547
|
+
#
|
548
|
+
# @return [::Google::Cloud::ParameterManager::V1::Parameter]
|
549
|
+
#
|
550
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
551
|
+
#
|
552
|
+
# @example Basic example
|
553
|
+
# require "google/cloud/parameter_manager/v1"
|
554
|
+
#
|
555
|
+
# # Create a client object. The client can be reused for multiple calls.
|
556
|
+
# client = Google::Cloud::ParameterManager::V1::ParameterManager::Rest::Client.new
|
557
|
+
#
|
558
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
559
|
+
# request = Google::Cloud::ParameterManager::V1::UpdateParameterRequest.new
|
560
|
+
#
|
561
|
+
# # Call the update_parameter method.
|
562
|
+
# result = client.update_parameter request
|
563
|
+
#
|
564
|
+
# # The returned object is of type Google::Cloud::ParameterManager::V1::Parameter.
|
565
|
+
# p result
|
566
|
+
#
|
567
|
+
def update_parameter request, options = nil
|
568
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
569
|
+
|
570
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::UpdateParameterRequest
|
571
|
+
|
572
|
+
# Converts hash and nil to an options object
|
573
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
574
|
+
|
575
|
+
# Customize the options with defaults
|
576
|
+
call_metadata = @config.rpcs.update_parameter.metadata.to_h
|
577
|
+
|
578
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
579
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
580
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
581
|
+
gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION,
|
582
|
+
transports_version_send: [:rest]
|
583
|
+
|
584
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
585
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
586
|
+
|
587
|
+
options.apply_defaults timeout: @config.rpcs.update_parameter.timeout,
|
588
|
+
metadata: call_metadata,
|
589
|
+
retry_policy: @config.rpcs.update_parameter.retry_policy
|
590
|
+
|
591
|
+
options.apply_defaults timeout: @config.timeout,
|
592
|
+
metadata: @config.metadata,
|
593
|
+
retry_policy: @config.retry_policy
|
594
|
+
|
595
|
+
@parameter_manager_stub.update_parameter request, options do |result, operation|
|
596
|
+
yield result, operation if block_given?
|
597
|
+
end
|
598
|
+
rescue ::Gapic::Rest::Error => e
|
599
|
+
raise ::Google::Cloud::Error.from_error(e)
|
600
|
+
end
|
601
|
+
|
602
|
+
##
|
603
|
+
# Deletes a single Parameter.
|
604
|
+
#
|
605
|
+
# @overload delete_parameter(request, options = nil)
|
606
|
+
# Pass arguments to `delete_parameter` via a request object, either of type
|
607
|
+
# {::Google::Cloud::ParameterManager::V1::DeleteParameterRequest} or an equivalent Hash.
|
608
|
+
#
|
609
|
+
# @param request [::Google::Cloud::ParameterManager::V1::DeleteParameterRequest, ::Hash]
|
610
|
+
# A request object representing the call parameters. Required. To specify no
|
611
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
612
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
613
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
614
|
+
#
|
615
|
+
# @overload delete_parameter(name: nil, request_id: nil)
|
616
|
+
# Pass arguments to `delete_parameter` via keyword arguments. Note that at
|
617
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
618
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
619
|
+
#
|
620
|
+
# @param name [::String]
|
621
|
+
# Required. Name of the resource in the format
|
622
|
+
# `projects/*/locations/*/parameters/*`.
|
623
|
+
# @param request_id [::String]
|
624
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
625
|
+
# request ID so that if you must retry your request, the server will know to
|
626
|
+
# ignore the request if it has already been completed. The server will
|
627
|
+
# guarantee that for at least 60 minutes after the first request.
|
628
|
+
#
|
629
|
+
# For example, consider a situation where you make an initial request and the
|
630
|
+
# request times out. If you make the request again with the same request
|
631
|
+
# ID, the server can check if original operation with the same request ID
|
632
|
+
# was received, and if so, will ignore the second request. This prevents
|
633
|
+
# clients from accidentally creating duplicate commitments.
|
634
|
+
#
|
635
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
636
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
637
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
638
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
639
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
640
|
+
#
|
641
|
+
# @return [::Google::Protobuf::Empty]
|
642
|
+
#
|
643
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
644
|
+
#
|
645
|
+
# @example Basic example
|
646
|
+
# require "google/cloud/parameter_manager/v1"
|
647
|
+
#
|
648
|
+
# # Create a client object. The client can be reused for multiple calls.
|
649
|
+
# client = Google::Cloud::ParameterManager::V1::ParameterManager::Rest::Client.new
|
650
|
+
#
|
651
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
652
|
+
# request = Google::Cloud::ParameterManager::V1::DeleteParameterRequest.new
|
653
|
+
#
|
654
|
+
# # Call the delete_parameter method.
|
655
|
+
# result = client.delete_parameter request
|
656
|
+
#
|
657
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
658
|
+
# p result
|
659
|
+
#
|
660
|
+
def delete_parameter request, options = nil
|
661
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
662
|
+
|
663
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::DeleteParameterRequest
|
664
|
+
|
665
|
+
# Converts hash and nil to an options object
|
666
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
667
|
+
|
668
|
+
# Customize the options with defaults
|
669
|
+
call_metadata = @config.rpcs.delete_parameter.metadata.to_h
|
670
|
+
|
671
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
672
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
673
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
674
|
+
gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION,
|
675
|
+
transports_version_send: [:rest]
|
676
|
+
|
677
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
678
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
679
|
+
|
680
|
+
options.apply_defaults timeout: @config.rpcs.delete_parameter.timeout,
|
681
|
+
metadata: call_metadata,
|
682
|
+
retry_policy: @config.rpcs.delete_parameter.retry_policy
|
683
|
+
|
684
|
+
options.apply_defaults timeout: @config.timeout,
|
685
|
+
metadata: @config.metadata,
|
686
|
+
retry_policy: @config.retry_policy
|
687
|
+
|
688
|
+
@parameter_manager_stub.delete_parameter request, options do |result, operation|
|
689
|
+
yield result, operation if block_given?
|
690
|
+
end
|
691
|
+
rescue ::Gapic::Rest::Error => e
|
692
|
+
raise ::Google::Cloud::Error.from_error(e)
|
693
|
+
end
|
694
|
+
|
695
|
+
##
|
696
|
+
# Lists ParameterVersions in a given project, location, and parameter.
|
697
|
+
#
|
698
|
+
# @overload list_parameter_versions(request, options = nil)
|
699
|
+
# Pass arguments to `list_parameter_versions` via a request object, either of type
|
700
|
+
# {::Google::Cloud::ParameterManager::V1::ListParameterVersionsRequest} or an equivalent Hash.
|
701
|
+
#
|
702
|
+
# @param request [::Google::Cloud::ParameterManager::V1::ListParameterVersionsRequest, ::Hash]
|
703
|
+
# A request object representing the call parameters. Required. To specify no
|
704
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
705
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
706
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
707
|
+
#
|
708
|
+
# @overload list_parameter_versions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
709
|
+
# Pass arguments to `list_parameter_versions` via keyword arguments. Note that at
|
710
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
711
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
712
|
+
#
|
713
|
+
# @param parent [::String]
|
714
|
+
# Required. Parent value for ListParameterVersionsRequest in the format
|
715
|
+
# `projects/*/locations/*/parameters/*`.
|
716
|
+
# @param page_size [::Integer]
|
717
|
+
# Optional. Requested page size. Server may return fewer items than
|
718
|
+
# requested. If unspecified, server will pick an appropriate default.
|
719
|
+
# @param page_token [::String]
|
720
|
+
# Optional. A token identifying a page of results the server should return.
|
721
|
+
# @param filter [::String]
|
722
|
+
# Optional. Filtering results
|
723
|
+
# @param order_by [::String]
|
724
|
+
# Optional. Hint for how to order the results
|
725
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
726
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ParameterManager::V1::ParameterVersion>]
|
727
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
728
|
+
#
|
729
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ParameterManager::V1::ParameterVersion>]
|
730
|
+
#
|
731
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
732
|
+
#
|
733
|
+
# @example Basic example
|
734
|
+
# require "google/cloud/parameter_manager/v1"
|
735
|
+
#
|
736
|
+
# # Create a client object. The client can be reused for multiple calls.
|
737
|
+
# client = Google::Cloud::ParameterManager::V1::ParameterManager::Rest::Client.new
|
738
|
+
#
|
739
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
740
|
+
# request = Google::Cloud::ParameterManager::V1::ListParameterVersionsRequest.new
|
741
|
+
#
|
742
|
+
# # Call the list_parameter_versions method.
|
743
|
+
# result = client.list_parameter_versions request
|
744
|
+
#
|
745
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
746
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
747
|
+
# result.each do |item|
|
748
|
+
# # Each element is of type ::Google::Cloud::ParameterManager::V1::ParameterVersion.
|
749
|
+
# p item
|
750
|
+
# end
|
751
|
+
#
|
752
|
+
def list_parameter_versions request, options = nil
|
753
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
754
|
+
|
755
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::ListParameterVersionsRequest
|
756
|
+
|
757
|
+
# Converts hash and nil to an options object
|
758
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
759
|
+
|
760
|
+
# Customize the options with defaults
|
761
|
+
call_metadata = @config.rpcs.list_parameter_versions.metadata.to_h
|
762
|
+
|
763
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
764
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
765
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
766
|
+
gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION,
|
767
|
+
transports_version_send: [:rest]
|
768
|
+
|
769
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
770
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
771
|
+
|
772
|
+
options.apply_defaults timeout: @config.rpcs.list_parameter_versions.timeout,
|
773
|
+
metadata: call_metadata,
|
774
|
+
retry_policy: @config.rpcs.list_parameter_versions.retry_policy
|
775
|
+
|
776
|
+
options.apply_defaults timeout: @config.timeout,
|
777
|
+
metadata: @config.metadata,
|
778
|
+
retry_policy: @config.retry_policy
|
779
|
+
|
780
|
+
@parameter_manager_stub.list_parameter_versions request, options do |result, operation|
|
781
|
+
result = ::Gapic::Rest::PagedEnumerable.new @parameter_manager_stub, :list_parameter_versions, "parameter_versions", request, result, options
|
782
|
+
yield result, operation if block_given?
|
783
|
+
throw :response, result
|
784
|
+
end
|
785
|
+
rescue ::Gapic::Rest::Error => e
|
786
|
+
raise ::Google::Cloud::Error.from_error(e)
|
787
|
+
end
|
788
|
+
|
789
|
+
##
|
790
|
+
# Gets details of a single ParameterVersion.
|
791
|
+
#
|
792
|
+
# @overload get_parameter_version(request, options = nil)
|
793
|
+
# Pass arguments to `get_parameter_version` via a request object, either of type
|
794
|
+
# {::Google::Cloud::ParameterManager::V1::GetParameterVersionRequest} or an equivalent Hash.
|
795
|
+
#
|
796
|
+
# @param request [::Google::Cloud::ParameterManager::V1::GetParameterVersionRequest, ::Hash]
|
797
|
+
# A request object representing the call parameters. Required. To specify no
|
798
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
799
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
800
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
801
|
+
#
|
802
|
+
# @overload get_parameter_version(name: nil, view: nil)
|
803
|
+
# Pass arguments to `get_parameter_version` via keyword arguments. Note that at
|
804
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
805
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
806
|
+
#
|
807
|
+
# @param name [::String]
|
808
|
+
# Required. Name of the resource in the format
|
809
|
+
# `projects/*/locations/*/parameters/*/versions/*`.
|
810
|
+
# @param view [::Google::Cloud::ParameterManager::V1::View]
|
811
|
+
# Optional. View of the ParameterVersion.
|
812
|
+
# In the default FULL view, all metadata & payload associated with the
|
813
|
+
# ParameterVersion will be returned.
|
814
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
815
|
+
# @yieldparam result [::Google::Cloud::ParameterManager::V1::ParameterVersion]
|
816
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
817
|
+
#
|
818
|
+
# @return [::Google::Cloud::ParameterManager::V1::ParameterVersion]
|
819
|
+
#
|
820
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
821
|
+
#
|
822
|
+
# @example Basic example
|
823
|
+
# require "google/cloud/parameter_manager/v1"
|
824
|
+
#
|
825
|
+
# # Create a client object. The client can be reused for multiple calls.
|
826
|
+
# client = Google::Cloud::ParameterManager::V1::ParameterManager::Rest::Client.new
|
827
|
+
#
|
828
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
829
|
+
# request = Google::Cloud::ParameterManager::V1::GetParameterVersionRequest.new
|
830
|
+
#
|
831
|
+
# # Call the get_parameter_version method.
|
832
|
+
# result = client.get_parameter_version request
|
833
|
+
#
|
834
|
+
# # The returned object is of type Google::Cloud::ParameterManager::V1::ParameterVersion.
|
835
|
+
# p result
|
836
|
+
#
|
837
|
+
def get_parameter_version request, options = nil
|
838
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
839
|
+
|
840
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::GetParameterVersionRequest
|
841
|
+
|
842
|
+
# Converts hash and nil to an options object
|
843
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
844
|
+
|
845
|
+
# Customize the options with defaults
|
846
|
+
call_metadata = @config.rpcs.get_parameter_version.metadata.to_h
|
847
|
+
|
848
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
849
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
850
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
851
|
+
gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION,
|
852
|
+
transports_version_send: [:rest]
|
853
|
+
|
854
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
855
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
856
|
+
|
857
|
+
options.apply_defaults timeout: @config.rpcs.get_parameter_version.timeout,
|
858
|
+
metadata: call_metadata,
|
859
|
+
retry_policy: @config.rpcs.get_parameter_version.retry_policy
|
860
|
+
|
861
|
+
options.apply_defaults timeout: @config.timeout,
|
862
|
+
metadata: @config.metadata,
|
863
|
+
retry_policy: @config.retry_policy
|
864
|
+
|
865
|
+
@parameter_manager_stub.get_parameter_version request, options do |result, operation|
|
866
|
+
yield result, operation if block_given?
|
867
|
+
end
|
868
|
+
rescue ::Gapic::Rest::Error => e
|
869
|
+
raise ::Google::Cloud::Error.from_error(e)
|
870
|
+
end
|
871
|
+
|
872
|
+
##
|
873
|
+
# Gets rendered version of a ParameterVersion.
|
874
|
+
#
|
875
|
+
# @overload render_parameter_version(request, options = nil)
|
876
|
+
# Pass arguments to `render_parameter_version` via a request object, either of type
|
877
|
+
# {::Google::Cloud::ParameterManager::V1::RenderParameterVersionRequest} or an equivalent Hash.
|
878
|
+
#
|
879
|
+
# @param request [::Google::Cloud::ParameterManager::V1::RenderParameterVersionRequest, ::Hash]
|
880
|
+
# A request object representing the call parameters. Required. To specify no
|
881
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
882
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
883
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
884
|
+
#
|
885
|
+
# @overload render_parameter_version(name: nil)
|
886
|
+
# Pass arguments to `render_parameter_version` via keyword arguments. Note that at
|
887
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
888
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
889
|
+
#
|
890
|
+
# @param name [::String]
|
891
|
+
# Required. Name of the resource
|
892
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
893
|
+
# @yieldparam result [::Google::Cloud::ParameterManager::V1::RenderParameterVersionResponse]
|
894
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
895
|
+
#
|
896
|
+
# @return [::Google::Cloud::ParameterManager::V1::RenderParameterVersionResponse]
|
897
|
+
#
|
898
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
899
|
+
#
|
900
|
+
# @example Basic example
|
901
|
+
# require "google/cloud/parameter_manager/v1"
|
902
|
+
#
|
903
|
+
# # Create a client object. The client can be reused for multiple calls.
|
904
|
+
# client = Google::Cloud::ParameterManager::V1::ParameterManager::Rest::Client.new
|
905
|
+
#
|
906
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
907
|
+
# request = Google::Cloud::ParameterManager::V1::RenderParameterVersionRequest.new
|
908
|
+
#
|
909
|
+
# # Call the render_parameter_version method.
|
910
|
+
# result = client.render_parameter_version request
|
911
|
+
#
|
912
|
+
# # The returned object is of type Google::Cloud::ParameterManager::V1::RenderParameterVersionResponse.
|
913
|
+
# p result
|
914
|
+
#
|
915
|
+
def render_parameter_version request, options = nil
|
916
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
917
|
+
|
918
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::RenderParameterVersionRequest
|
919
|
+
|
920
|
+
# Converts hash and nil to an options object
|
921
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
922
|
+
|
923
|
+
# Customize the options with defaults
|
924
|
+
call_metadata = @config.rpcs.render_parameter_version.metadata.to_h
|
925
|
+
|
926
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
927
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
928
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
929
|
+
gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION,
|
930
|
+
transports_version_send: [:rest]
|
931
|
+
|
932
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
933
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
934
|
+
|
935
|
+
options.apply_defaults timeout: @config.rpcs.render_parameter_version.timeout,
|
936
|
+
metadata: call_metadata,
|
937
|
+
retry_policy: @config.rpcs.render_parameter_version.retry_policy
|
938
|
+
|
939
|
+
options.apply_defaults timeout: @config.timeout,
|
940
|
+
metadata: @config.metadata,
|
941
|
+
retry_policy: @config.retry_policy
|
942
|
+
|
943
|
+
@parameter_manager_stub.render_parameter_version request, options do |result, operation|
|
944
|
+
yield result, operation if block_given?
|
945
|
+
end
|
946
|
+
rescue ::Gapic::Rest::Error => e
|
947
|
+
raise ::Google::Cloud::Error.from_error(e)
|
948
|
+
end
|
949
|
+
|
950
|
+
##
|
951
|
+
# Creates a new ParameterVersion in a given project, location, and parameter.
|
952
|
+
#
|
953
|
+
# @overload create_parameter_version(request, options = nil)
|
954
|
+
# Pass arguments to `create_parameter_version` via a request object, either of type
|
955
|
+
# {::Google::Cloud::ParameterManager::V1::CreateParameterVersionRequest} or an equivalent Hash.
|
956
|
+
#
|
957
|
+
# @param request [::Google::Cloud::ParameterManager::V1::CreateParameterVersionRequest, ::Hash]
|
958
|
+
# A request object representing the call parameters. Required. To specify no
|
959
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
960
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
961
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
962
|
+
#
|
963
|
+
# @overload create_parameter_version(parent: nil, parameter_version_id: nil, parameter_version: nil, request_id: nil)
|
964
|
+
# Pass arguments to `create_parameter_version` via keyword arguments. Note that at
|
965
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
966
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
967
|
+
#
|
968
|
+
# @param parent [::String]
|
969
|
+
# Required. Value for parent in the format
|
970
|
+
# `projects/*/locations/*/parameters/*`.
|
971
|
+
# @param parameter_version_id [::String]
|
972
|
+
# Required. Id of the ParameterVersion resource
|
973
|
+
# @param parameter_version [::Google::Cloud::ParameterManager::V1::ParameterVersion, ::Hash]
|
974
|
+
# Required. The ParameterVersion resource being created
|
975
|
+
# @param request_id [::String]
|
976
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
977
|
+
# request ID so that if you must retry your request, the server will know to
|
978
|
+
# ignore the request if it has already been completed. The server will
|
979
|
+
# guarantee that for at least 60 minutes since the first request.
|
980
|
+
#
|
981
|
+
# For example, consider a situation where you make an initial request and the
|
982
|
+
# request times out. If you make the request again with the same request
|
983
|
+
# ID, the server can check if original operation with the same request ID
|
984
|
+
# was received, and if so, will ignore the second request. This prevents
|
985
|
+
# clients from accidentally creating duplicate commitments.
|
986
|
+
#
|
987
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
988
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
989
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
990
|
+
# @yieldparam result [::Google::Cloud::ParameterManager::V1::ParameterVersion]
|
991
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
992
|
+
#
|
993
|
+
# @return [::Google::Cloud::ParameterManager::V1::ParameterVersion]
|
994
|
+
#
|
995
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
996
|
+
#
|
997
|
+
# @example Basic example
|
998
|
+
# require "google/cloud/parameter_manager/v1"
|
999
|
+
#
|
1000
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1001
|
+
# client = Google::Cloud::ParameterManager::V1::ParameterManager::Rest::Client.new
|
1002
|
+
#
|
1003
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1004
|
+
# request = Google::Cloud::ParameterManager::V1::CreateParameterVersionRequest.new
|
1005
|
+
#
|
1006
|
+
# # Call the create_parameter_version method.
|
1007
|
+
# result = client.create_parameter_version request
|
1008
|
+
#
|
1009
|
+
# # The returned object is of type Google::Cloud::ParameterManager::V1::ParameterVersion.
|
1010
|
+
# p result
|
1011
|
+
#
|
1012
|
+
def create_parameter_version request, options = nil
|
1013
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1014
|
+
|
1015
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::CreateParameterVersionRequest
|
1016
|
+
|
1017
|
+
# Converts hash and nil to an options object
|
1018
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1019
|
+
|
1020
|
+
# Customize the options with defaults
|
1021
|
+
call_metadata = @config.rpcs.create_parameter_version.metadata.to_h
|
1022
|
+
|
1023
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1024
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1025
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1026
|
+
gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION,
|
1027
|
+
transports_version_send: [:rest]
|
1028
|
+
|
1029
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1030
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1031
|
+
|
1032
|
+
options.apply_defaults timeout: @config.rpcs.create_parameter_version.timeout,
|
1033
|
+
metadata: call_metadata,
|
1034
|
+
retry_policy: @config.rpcs.create_parameter_version.retry_policy
|
1035
|
+
|
1036
|
+
options.apply_defaults timeout: @config.timeout,
|
1037
|
+
metadata: @config.metadata,
|
1038
|
+
retry_policy: @config.retry_policy
|
1039
|
+
|
1040
|
+
@parameter_manager_stub.create_parameter_version request, options do |result, operation|
|
1041
|
+
yield result, operation if block_given?
|
1042
|
+
end
|
1043
|
+
rescue ::Gapic::Rest::Error => e
|
1044
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1045
|
+
end
|
1046
|
+
|
1047
|
+
##
|
1048
|
+
# Updates a single ParameterVersion.
|
1049
|
+
#
|
1050
|
+
# @overload update_parameter_version(request, options = nil)
|
1051
|
+
# Pass arguments to `update_parameter_version` via a request object, either of type
|
1052
|
+
# {::Google::Cloud::ParameterManager::V1::UpdateParameterVersionRequest} or an equivalent Hash.
|
1053
|
+
#
|
1054
|
+
# @param request [::Google::Cloud::ParameterManager::V1::UpdateParameterVersionRequest, ::Hash]
|
1055
|
+
# A request object representing the call parameters. Required. To specify no
|
1056
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1057
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1058
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1059
|
+
#
|
1060
|
+
# @overload update_parameter_version(update_mask: nil, parameter_version: nil, request_id: nil)
|
1061
|
+
# Pass arguments to `update_parameter_version` via keyword arguments. Note that at
|
1062
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1063
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1064
|
+
#
|
1065
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1066
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
1067
|
+
# ParameterVersion resource by the update.
|
1068
|
+
# The fields specified in the update_mask are relative to the resource, not
|
1069
|
+
# the full request. A mutable field will be overwritten if it is in the
|
1070
|
+
# mask. If the user does not provide a mask then all mutable fields present
|
1071
|
+
# in the request will be overwritten.
|
1072
|
+
# @param parameter_version [::Google::Cloud::ParameterManager::V1::ParameterVersion, ::Hash]
|
1073
|
+
# Required. The ParameterVersion resource being updated
|
1074
|
+
# @param request_id [::String]
|
1075
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1076
|
+
# request ID so that if you must retry your request, the server will know to
|
1077
|
+
# ignore the request if it has already been completed. The server will
|
1078
|
+
# guarantee that for at least 60 minutes since the first request.
|
1079
|
+
#
|
1080
|
+
# For example, consider a situation where you make an initial request and the
|
1081
|
+
# request times out. If you make the request again with the same request
|
1082
|
+
# ID, the server can check if original operation with the same request ID
|
1083
|
+
# was received, and if so, will ignore the second request. This prevents
|
1084
|
+
# clients from accidentally creating duplicate commitments.
|
1085
|
+
#
|
1086
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1087
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1088
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1089
|
+
# @yieldparam result [::Google::Cloud::ParameterManager::V1::ParameterVersion]
|
1090
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1091
|
+
#
|
1092
|
+
# @return [::Google::Cloud::ParameterManager::V1::ParameterVersion]
|
1093
|
+
#
|
1094
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1095
|
+
#
|
1096
|
+
# @example Basic example
|
1097
|
+
# require "google/cloud/parameter_manager/v1"
|
1098
|
+
#
|
1099
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1100
|
+
# client = Google::Cloud::ParameterManager::V1::ParameterManager::Rest::Client.new
|
1101
|
+
#
|
1102
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1103
|
+
# request = Google::Cloud::ParameterManager::V1::UpdateParameterVersionRequest.new
|
1104
|
+
#
|
1105
|
+
# # Call the update_parameter_version method.
|
1106
|
+
# result = client.update_parameter_version request
|
1107
|
+
#
|
1108
|
+
# # The returned object is of type Google::Cloud::ParameterManager::V1::ParameterVersion.
|
1109
|
+
# p result
|
1110
|
+
#
|
1111
|
+
def update_parameter_version request, options = nil
|
1112
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1113
|
+
|
1114
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::UpdateParameterVersionRequest
|
1115
|
+
|
1116
|
+
# Converts hash and nil to an options object
|
1117
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1118
|
+
|
1119
|
+
# Customize the options with defaults
|
1120
|
+
call_metadata = @config.rpcs.update_parameter_version.metadata.to_h
|
1121
|
+
|
1122
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1123
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1124
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1125
|
+
gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION,
|
1126
|
+
transports_version_send: [:rest]
|
1127
|
+
|
1128
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1129
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1130
|
+
|
1131
|
+
options.apply_defaults timeout: @config.rpcs.update_parameter_version.timeout,
|
1132
|
+
metadata: call_metadata,
|
1133
|
+
retry_policy: @config.rpcs.update_parameter_version.retry_policy
|
1134
|
+
|
1135
|
+
options.apply_defaults timeout: @config.timeout,
|
1136
|
+
metadata: @config.metadata,
|
1137
|
+
retry_policy: @config.retry_policy
|
1138
|
+
|
1139
|
+
@parameter_manager_stub.update_parameter_version request, options do |result, operation|
|
1140
|
+
yield result, operation if block_given?
|
1141
|
+
end
|
1142
|
+
rescue ::Gapic::Rest::Error => e
|
1143
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1144
|
+
end
|
1145
|
+
|
1146
|
+
##
|
1147
|
+
# Deletes a single ParameterVersion.
|
1148
|
+
#
|
1149
|
+
# @overload delete_parameter_version(request, options = nil)
|
1150
|
+
# Pass arguments to `delete_parameter_version` via a request object, either of type
|
1151
|
+
# {::Google::Cloud::ParameterManager::V1::DeleteParameterVersionRequest} or an equivalent Hash.
|
1152
|
+
#
|
1153
|
+
# @param request [::Google::Cloud::ParameterManager::V1::DeleteParameterVersionRequest, ::Hash]
|
1154
|
+
# A request object representing the call parameters. Required. To specify no
|
1155
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1156
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1157
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1158
|
+
#
|
1159
|
+
# @overload delete_parameter_version(name: nil, request_id: nil)
|
1160
|
+
# Pass arguments to `delete_parameter_version` via keyword arguments. Note that at
|
1161
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1162
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1163
|
+
#
|
1164
|
+
# @param name [::String]
|
1165
|
+
# Required. Name of the resource in the format
|
1166
|
+
# `projects/*/locations/*/parameters/*/versions/*`.
|
1167
|
+
# @param request_id [::String]
|
1168
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1169
|
+
# request ID so that if you must retry your request, the server will know to
|
1170
|
+
# ignore the request if it has already been completed. The server will
|
1171
|
+
# guarantee that for at least 60 minutes after the first request.
|
1172
|
+
#
|
1173
|
+
# For example, consider a situation where you make an initial request and the
|
1174
|
+
# request times out. If you make the request again with the same request
|
1175
|
+
# ID, the server can check if original operation with the same request ID
|
1176
|
+
# was received, and if so, will ignore the second request. This prevents
|
1177
|
+
# clients from accidentally creating duplicate commitments.
|
1178
|
+
#
|
1179
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1180
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1181
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1182
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
1183
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1184
|
+
#
|
1185
|
+
# @return [::Google::Protobuf::Empty]
|
1186
|
+
#
|
1187
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1188
|
+
#
|
1189
|
+
# @example Basic example
|
1190
|
+
# require "google/cloud/parameter_manager/v1"
|
1191
|
+
#
|
1192
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1193
|
+
# client = Google::Cloud::ParameterManager::V1::ParameterManager::Rest::Client.new
|
1194
|
+
#
|
1195
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1196
|
+
# request = Google::Cloud::ParameterManager::V1::DeleteParameterVersionRequest.new
|
1197
|
+
#
|
1198
|
+
# # Call the delete_parameter_version method.
|
1199
|
+
# result = client.delete_parameter_version request
|
1200
|
+
#
|
1201
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1202
|
+
# p result
|
1203
|
+
#
|
1204
|
+
def delete_parameter_version request, options = nil
|
1205
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1206
|
+
|
1207
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ParameterManager::V1::DeleteParameterVersionRequest
|
1208
|
+
|
1209
|
+
# Converts hash and nil to an options object
|
1210
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1211
|
+
|
1212
|
+
# Customize the options with defaults
|
1213
|
+
call_metadata = @config.rpcs.delete_parameter_version.metadata.to_h
|
1214
|
+
|
1215
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1216
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1217
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1218
|
+
gapic_version: ::Google::Cloud::ParameterManager::V1::VERSION,
|
1219
|
+
transports_version_send: [:rest]
|
1220
|
+
|
1221
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1222
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1223
|
+
|
1224
|
+
options.apply_defaults timeout: @config.rpcs.delete_parameter_version.timeout,
|
1225
|
+
metadata: call_metadata,
|
1226
|
+
retry_policy: @config.rpcs.delete_parameter_version.retry_policy
|
1227
|
+
|
1228
|
+
options.apply_defaults timeout: @config.timeout,
|
1229
|
+
metadata: @config.metadata,
|
1230
|
+
retry_policy: @config.retry_policy
|
1231
|
+
|
1232
|
+
@parameter_manager_stub.delete_parameter_version request, options do |result, operation|
|
1233
|
+
yield result, operation if block_given?
|
1234
|
+
end
|
1235
|
+
rescue ::Gapic::Rest::Error => e
|
1236
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1237
|
+
end
|
1238
|
+
|
1239
|
+
##
|
1240
|
+
# Configuration class for the ParameterManager REST API.
|
1241
|
+
#
|
1242
|
+
# This class represents the configuration for ParameterManager REST,
|
1243
|
+
# providing control over timeouts, retry behavior, logging, transport
|
1244
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
1245
|
+
# applied individually to specific RPCs. See
|
1246
|
+
# {::Google::Cloud::ParameterManager::V1::ParameterManager::Rest::Client::Configuration::Rpcs}
|
1247
|
+
# for a list of RPCs that can be configured independently.
|
1248
|
+
#
|
1249
|
+
# Configuration can be applied globally to all clients, or to a single client
|
1250
|
+
# on construction.
|
1251
|
+
#
|
1252
|
+
# @example
|
1253
|
+
#
|
1254
|
+
# # Modify the global config, setting the timeout for
|
1255
|
+
# # list_parameters to 20 seconds,
|
1256
|
+
# # and all remaining timeouts to 10 seconds.
|
1257
|
+
# ::Google::Cloud::ParameterManager::V1::ParameterManager::Rest::Client.configure do |config|
|
1258
|
+
# config.timeout = 10.0
|
1259
|
+
# config.rpcs.list_parameters.timeout = 20.0
|
1260
|
+
# end
|
1261
|
+
#
|
1262
|
+
# # Apply the above configuration only to a new client.
|
1263
|
+
# client = ::Google::Cloud::ParameterManager::V1::ParameterManager::Rest::Client.new do |config|
|
1264
|
+
# config.timeout = 10.0
|
1265
|
+
# config.rpcs.list_parameters.timeout = 20.0
|
1266
|
+
# end
|
1267
|
+
#
|
1268
|
+
# @!attribute [rw] endpoint
|
1269
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
1270
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
1271
|
+
# @return [::String,nil]
|
1272
|
+
# @!attribute [rw] credentials
|
1273
|
+
# Credentials to send with calls. You may provide any of the following types:
|
1274
|
+
# * (`String`) The path to a service account key file in JSON format
|
1275
|
+
# * (`Hash`) A service account key as a Hash
|
1276
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1277
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
1278
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1279
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1280
|
+
# * (`nil`) indicating no credentials
|
1281
|
+
#
|
1282
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
1283
|
+
# external source for authentication to Google Cloud, you must validate it before
|
1284
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
1285
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
1286
|
+
# For more information, refer to [Validate credential configurations from external
|
1287
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
1288
|
+
# @return [::Object]
|
1289
|
+
# @!attribute [rw] scope
|
1290
|
+
# The OAuth scopes
|
1291
|
+
# @return [::Array<::String>]
|
1292
|
+
# @!attribute [rw] lib_name
|
1293
|
+
# The library name as recorded in instrumentation and logging
|
1294
|
+
# @return [::String]
|
1295
|
+
# @!attribute [rw] lib_version
|
1296
|
+
# The library version as recorded in instrumentation and logging
|
1297
|
+
# @return [::String]
|
1298
|
+
# @!attribute [rw] timeout
|
1299
|
+
# The call timeout in seconds.
|
1300
|
+
# @return [::Numeric]
|
1301
|
+
# @!attribute [rw] metadata
|
1302
|
+
# Additional headers to be sent with the call.
|
1303
|
+
# @return [::Hash{::Symbol=>::String}]
|
1304
|
+
# @!attribute [rw] retry_policy
|
1305
|
+
# The retry policy. The value is a hash with the following keys:
|
1306
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1307
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1308
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1309
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1310
|
+
# trigger a retry.
|
1311
|
+
# @return [::Hash]
|
1312
|
+
# @!attribute [rw] quota_project
|
1313
|
+
# A separate project against which to charge quota.
|
1314
|
+
# @return [::String]
|
1315
|
+
# @!attribute [rw] universe_domain
|
1316
|
+
# The universe domain within which to make requests. This determines the
|
1317
|
+
# default endpoint URL. The default value of nil uses the environment
|
1318
|
+
# universe (usually the default "googleapis.com" universe).
|
1319
|
+
# @return [::String,nil]
|
1320
|
+
# @!attribute [rw] logger
|
1321
|
+
# A custom logger to use for request/response debug logging, or the value
|
1322
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1323
|
+
# explicitly disable logging.
|
1324
|
+
# @return [::Logger,:default,nil]
|
1325
|
+
#
|
1326
|
+
class Configuration
|
1327
|
+
extend ::Gapic::Config
|
1328
|
+
|
1329
|
+
# @private
|
1330
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
1331
|
+
DEFAULT_ENDPOINT = "parametermanager.googleapis.com"
|
1332
|
+
|
1333
|
+
config_attr :endpoint, nil, ::String, nil
|
1334
|
+
config_attr :credentials, nil do |value|
|
1335
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1336
|
+
allowed.any? { |klass| klass === value }
|
1337
|
+
end
|
1338
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1339
|
+
config_attr :lib_name, nil, ::String, nil
|
1340
|
+
config_attr :lib_version, nil, ::String, nil
|
1341
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1342
|
+
config_attr :metadata, nil, ::Hash, nil
|
1343
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1344
|
+
config_attr :quota_project, nil, ::String, nil
|
1345
|
+
config_attr :universe_domain, nil, ::String, nil
|
1346
|
+
|
1347
|
+
# @private
|
1348
|
+
# Overrides for http bindings for the RPCs of this service
|
1349
|
+
# are only used when this service is used as mixin, and only
|
1350
|
+
# by the host service.
|
1351
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
1352
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
1353
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1354
|
+
|
1355
|
+
# @private
|
1356
|
+
def initialize parent_config = nil
|
1357
|
+
@parent_config = parent_config unless parent_config.nil?
|
1358
|
+
|
1359
|
+
yield self if block_given?
|
1360
|
+
end
|
1361
|
+
|
1362
|
+
##
|
1363
|
+
# Configurations for individual RPCs
|
1364
|
+
# @return [Rpcs]
|
1365
|
+
#
|
1366
|
+
def rpcs
|
1367
|
+
@rpcs ||= begin
|
1368
|
+
parent_rpcs = nil
|
1369
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1370
|
+
Rpcs.new parent_rpcs
|
1371
|
+
end
|
1372
|
+
end
|
1373
|
+
|
1374
|
+
##
|
1375
|
+
# Configuration RPC class for the ParameterManager API.
|
1376
|
+
#
|
1377
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1378
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1379
|
+
# the following configuration fields:
|
1380
|
+
#
|
1381
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1382
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
1383
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
1384
|
+
# include the following keys:
|
1385
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1386
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1387
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1388
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1389
|
+
# trigger a retry.
|
1390
|
+
#
|
1391
|
+
class Rpcs
|
1392
|
+
##
|
1393
|
+
# RPC-specific configuration for `list_parameters`
|
1394
|
+
# @return [::Gapic::Config::Method]
|
1395
|
+
#
|
1396
|
+
attr_reader :list_parameters
|
1397
|
+
##
|
1398
|
+
# RPC-specific configuration for `get_parameter`
|
1399
|
+
# @return [::Gapic::Config::Method]
|
1400
|
+
#
|
1401
|
+
attr_reader :get_parameter
|
1402
|
+
##
|
1403
|
+
# RPC-specific configuration for `create_parameter`
|
1404
|
+
# @return [::Gapic::Config::Method]
|
1405
|
+
#
|
1406
|
+
attr_reader :create_parameter
|
1407
|
+
##
|
1408
|
+
# RPC-specific configuration for `update_parameter`
|
1409
|
+
# @return [::Gapic::Config::Method]
|
1410
|
+
#
|
1411
|
+
attr_reader :update_parameter
|
1412
|
+
##
|
1413
|
+
# RPC-specific configuration for `delete_parameter`
|
1414
|
+
# @return [::Gapic::Config::Method]
|
1415
|
+
#
|
1416
|
+
attr_reader :delete_parameter
|
1417
|
+
##
|
1418
|
+
# RPC-specific configuration for `list_parameter_versions`
|
1419
|
+
# @return [::Gapic::Config::Method]
|
1420
|
+
#
|
1421
|
+
attr_reader :list_parameter_versions
|
1422
|
+
##
|
1423
|
+
# RPC-specific configuration for `get_parameter_version`
|
1424
|
+
# @return [::Gapic::Config::Method]
|
1425
|
+
#
|
1426
|
+
attr_reader :get_parameter_version
|
1427
|
+
##
|
1428
|
+
# RPC-specific configuration for `render_parameter_version`
|
1429
|
+
# @return [::Gapic::Config::Method]
|
1430
|
+
#
|
1431
|
+
attr_reader :render_parameter_version
|
1432
|
+
##
|
1433
|
+
# RPC-specific configuration for `create_parameter_version`
|
1434
|
+
# @return [::Gapic::Config::Method]
|
1435
|
+
#
|
1436
|
+
attr_reader :create_parameter_version
|
1437
|
+
##
|
1438
|
+
# RPC-specific configuration for `update_parameter_version`
|
1439
|
+
# @return [::Gapic::Config::Method]
|
1440
|
+
#
|
1441
|
+
attr_reader :update_parameter_version
|
1442
|
+
##
|
1443
|
+
# RPC-specific configuration for `delete_parameter_version`
|
1444
|
+
# @return [::Gapic::Config::Method]
|
1445
|
+
#
|
1446
|
+
attr_reader :delete_parameter_version
|
1447
|
+
|
1448
|
+
# @private
|
1449
|
+
def initialize parent_rpcs = nil
|
1450
|
+
list_parameters_config = parent_rpcs.list_parameters if parent_rpcs.respond_to? :list_parameters
|
1451
|
+
@list_parameters = ::Gapic::Config::Method.new list_parameters_config
|
1452
|
+
get_parameter_config = parent_rpcs.get_parameter if parent_rpcs.respond_to? :get_parameter
|
1453
|
+
@get_parameter = ::Gapic::Config::Method.new get_parameter_config
|
1454
|
+
create_parameter_config = parent_rpcs.create_parameter if parent_rpcs.respond_to? :create_parameter
|
1455
|
+
@create_parameter = ::Gapic::Config::Method.new create_parameter_config
|
1456
|
+
update_parameter_config = parent_rpcs.update_parameter if parent_rpcs.respond_to? :update_parameter
|
1457
|
+
@update_parameter = ::Gapic::Config::Method.new update_parameter_config
|
1458
|
+
delete_parameter_config = parent_rpcs.delete_parameter if parent_rpcs.respond_to? :delete_parameter
|
1459
|
+
@delete_parameter = ::Gapic::Config::Method.new delete_parameter_config
|
1460
|
+
list_parameter_versions_config = parent_rpcs.list_parameter_versions if parent_rpcs.respond_to? :list_parameter_versions
|
1461
|
+
@list_parameter_versions = ::Gapic::Config::Method.new list_parameter_versions_config
|
1462
|
+
get_parameter_version_config = parent_rpcs.get_parameter_version if parent_rpcs.respond_to? :get_parameter_version
|
1463
|
+
@get_parameter_version = ::Gapic::Config::Method.new get_parameter_version_config
|
1464
|
+
render_parameter_version_config = parent_rpcs.render_parameter_version if parent_rpcs.respond_to? :render_parameter_version
|
1465
|
+
@render_parameter_version = ::Gapic::Config::Method.new render_parameter_version_config
|
1466
|
+
create_parameter_version_config = parent_rpcs.create_parameter_version if parent_rpcs.respond_to? :create_parameter_version
|
1467
|
+
@create_parameter_version = ::Gapic::Config::Method.new create_parameter_version_config
|
1468
|
+
update_parameter_version_config = parent_rpcs.update_parameter_version if parent_rpcs.respond_to? :update_parameter_version
|
1469
|
+
@update_parameter_version = ::Gapic::Config::Method.new update_parameter_version_config
|
1470
|
+
delete_parameter_version_config = parent_rpcs.delete_parameter_version if parent_rpcs.respond_to? :delete_parameter_version
|
1471
|
+
@delete_parameter_version = ::Gapic::Config::Method.new delete_parameter_version_config
|
1472
|
+
|
1473
|
+
yield self if block_given?
|
1474
|
+
end
|
1475
|
+
end
|
1476
|
+
end
|
1477
|
+
end
|
1478
|
+
end
|
1479
|
+
end
|
1480
|
+
end
|
1481
|
+
end
|
1482
|
+
end
|
1483
|
+
end
|