google-apis-parametermanager_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 +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google/apis/parametermanager_v1/classes.rb +384 -0
- data/lib/google/apis/parametermanager_v1/gem_version.rb +28 -0
- data/lib/google/apis/parametermanager_v1/representations.rb +184 -0
- data/lib/google/apis/parametermanager_v1/service.rb +615 -0
- data/lib/google/apis/parametermanager_v1.rb +39 -0
- data/lib/google-apis-parametermanager_v1.rb +15 -0
- metadata +79 -0
@@ -0,0 +1,615 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module ParametermanagerV1
|
23
|
+
# Parameter Manager API
|
24
|
+
#
|
25
|
+
# Parameter Manager is a single source of truth to store, access and manage the
|
26
|
+
# lifecycle of your workload parameters. Parameter Manager aims to make
|
27
|
+
# management of sensitive application parameters effortless for customers
|
28
|
+
# without diminishing focus on security.
|
29
|
+
#
|
30
|
+
# @example
|
31
|
+
# require 'google/apis/parametermanager_v1'
|
32
|
+
#
|
33
|
+
# Parametermanager = Google::Apis::ParametermanagerV1 # Alias the module
|
34
|
+
# service = Parametermanager::ParameterManagerService.new
|
35
|
+
#
|
36
|
+
# @see https://cloud.google.com/secret-manager/parameter-manager/docs/overview
|
37
|
+
class ParameterManagerService < Google::Apis::Core::BaseService
|
38
|
+
DEFAULT_ENDPOINT_TEMPLATE = "https://parametermanager.$UNIVERSE_DOMAIN$/"
|
39
|
+
|
40
|
+
# @return [String]
|
41
|
+
# API key. Your API key identifies your project and provides you with API access,
|
42
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
43
|
+
attr_accessor :key
|
44
|
+
|
45
|
+
# @return [String]
|
46
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
47
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
48
|
+
attr_accessor :quota_user
|
49
|
+
|
50
|
+
def initialize
|
51
|
+
super(DEFAULT_ENDPOINT_TEMPLATE, '',
|
52
|
+
client_name: 'google-apis-parametermanager_v1',
|
53
|
+
client_version: Google::Apis::ParametermanagerV1::GEM_VERSION)
|
54
|
+
@batch_path = 'batch'
|
55
|
+
end
|
56
|
+
|
57
|
+
# Gets information about a location.
|
58
|
+
# @param [String] name
|
59
|
+
# Resource name for the location.
|
60
|
+
# @param [String] fields
|
61
|
+
# Selector specifying which fields to include in a partial response.
|
62
|
+
# @param [String] quota_user
|
63
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
64
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
65
|
+
# @param [Google::Apis::RequestOptions] options
|
66
|
+
# Request-specific options
|
67
|
+
#
|
68
|
+
# @yield [result, err] Result & error if block supplied
|
69
|
+
# @yieldparam result [Google::Apis::ParametermanagerV1::Location] parsed result object
|
70
|
+
# @yieldparam err [StandardError] error object if request failed
|
71
|
+
#
|
72
|
+
# @return [Google::Apis::ParametermanagerV1::Location]
|
73
|
+
#
|
74
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
75
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
76
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
77
|
+
def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
|
78
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
79
|
+
command.response_representation = Google::Apis::ParametermanagerV1::Location::Representation
|
80
|
+
command.response_class = Google::Apis::ParametermanagerV1::Location
|
81
|
+
command.params['name'] = name unless name.nil?
|
82
|
+
command.query['fields'] = fields unless fields.nil?
|
83
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
84
|
+
execute_or_queue_command(command, &block)
|
85
|
+
end
|
86
|
+
|
87
|
+
# Lists information about the supported locations for this service.
|
88
|
+
# @param [String] name
|
89
|
+
# The resource that owns the locations collection, if applicable.
|
90
|
+
# @param [Array<String>, String] extra_location_types
|
91
|
+
# Optional. A list of extra location types that should be used as conditions for
|
92
|
+
# controlling the visibility of the locations.
|
93
|
+
# @param [String] filter
|
94
|
+
# A filter to narrow down results to a preferred subset. The filtering language
|
95
|
+
# accepts strings like `"displayName=tokyo"`, and is documented in more detail
|
96
|
+
# in [AIP-160](https://google.aip.dev/160).
|
97
|
+
# @param [Fixnum] page_size
|
98
|
+
# The maximum number of results to return. If not set, the service selects a
|
99
|
+
# default.
|
100
|
+
# @param [String] page_token
|
101
|
+
# A page token received from the `next_page_token` field in the response. Send
|
102
|
+
# that page token to receive the subsequent page.
|
103
|
+
# @param [String] fields
|
104
|
+
# Selector specifying which fields to include in a partial response.
|
105
|
+
# @param [String] quota_user
|
106
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
107
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
108
|
+
# @param [Google::Apis::RequestOptions] options
|
109
|
+
# Request-specific options
|
110
|
+
#
|
111
|
+
# @yield [result, err] Result & error if block supplied
|
112
|
+
# @yieldparam result [Google::Apis::ParametermanagerV1::ListLocationsResponse] parsed result object
|
113
|
+
# @yieldparam err [StandardError] error object if request failed
|
114
|
+
#
|
115
|
+
# @return [Google::Apis::ParametermanagerV1::ListLocationsResponse]
|
116
|
+
#
|
117
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
118
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
119
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
120
|
+
def list_project_locations(name, extra_location_types: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
121
|
+
command = make_simple_command(:get, 'v1/{+name}/locations', options)
|
122
|
+
command.response_representation = Google::Apis::ParametermanagerV1::ListLocationsResponse::Representation
|
123
|
+
command.response_class = Google::Apis::ParametermanagerV1::ListLocationsResponse
|
124
|
+
command.params['name'] = name unless name.nil?
|
125
|
+
command.query['extraLocationTypes'] = extra_location_types unless extra_location_types.nil?
|
126
|
+
command.query['filter'] = filter unless filter.nil?
|
127
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
128
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
129
|
+
command.query['fields'] = fields unless fields.nil?
|
130
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
131
|
+
execute_or_queue_command(command, &block)
|
132
|
+
end
|
133
|
+
|
134
|
+
# Creates a new Parameter in a given project and location.
|
135
|
+
# @param [String] parent
|
136
|
+
# Required. Value for parent in the format `projects/*/locations/*`.
|
137
|
+
# @param [Google::Apis::ParametermanagerV1::Parameter] parameter_object
|
138
|
+
# @param [String] parameter_id
|
139
|
+
# Required. Id of the Parameter resource
|
140
|
+
# @param [String] request_id
|
141
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
142
|
+
# request ID so that if you must retry your request, the server will know to
|
143
|
+
# ignore the request if it has already been completed. The server will guarantee
|
144
|
+
# that for at least 60 minutes since the first request. For example, consider a
|
145
|
+
# situation where you make an initial request and the request times out. If you
|
146
|
+
# make the request again with the same request ID, the server can check if
|
147
|
+
# original operation with the same request ID was received, and if so, will
|
148
|
+
# ignore the second request. This prevents clients from accidentally creating
|
149
|
+
# duplicate commitments. The request ID must be a valid UUID with the exception
|
150
|
+
# that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
151
|
+
# @param [String] fields
|
152
|
+
# Selector specifying which fields to include in a partial response.
|
153
|
+
# @param [String] quota_user
|
154
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
155
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
156
|
+
# @param [Google::Apis::RequestOptions] options
|
157
|
+
# Request-specific options
|
158
|
+
#
|
159
|
+
# @yield [result, err] Result & error if block supplied
|
160
|
+
# @yieldparam result [Google::Apis::ParametermanagerV1::Parameter] parsed result object
|
161
|
+
# @yieldparam err [StandardError] error object if request failed
|
162
|
+
#
|
163
|
+
# @return [Google::Apis::ParametermanagerV1::Parameter]
|
164
|
+
#
|
165
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
166
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
167
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
168
|
+
def create_project_location_parameter(parent, parameter_object = nil, parameter_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
169
|
+
command = make_simple_command(:post, 'v1/{+parent}/parameters', options)
|
170
|
+
command.request_representation = Google::Apis::ParametermanagerV1::Parameter::Representation
|
171
|
+
command.request_object = parameter_object
|
172
|
+
command.response_representation = Google::Apis::ParametermanagerV1::Parameter::Representation
|
173
|
+
command.response_class = Google::Apis::ParametermanagerV1::Parameter
|
174
|
+
command.params['parent'] = parent unless parent.nil?
|
175
|
+
command.query['parameterId'] = parameter_id unless parameter_id.nil?
|
176
|
+
command.query['requestId'] = request_id unless request_id.nil?
|
177
|
+
command.query['fields'] = fields unless fields.nil?
|
178
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
179
|
+
execute_or_queue_command(command, &block)
|
180
|
+
end
|
181
|
+
|
182
|
+
# Deletes a single Parameter.
|
183
|
+
# @param [String] name
|
184
|
+
# Required. Name of the resource in the format `projects/*/locations/*/
|
185
|
+
# parameters/*`.
|
186
|
+
# @param [String] request_id
|
187
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
188
|
+
# request ID so that if you must retry your request, the server will know to
|
189
|
+
# ignore the request if it has already been completed. The server will guarantee
|
190
|
+
# that for at least 60 minutes after the first request. For example, consider a
|
191
|
+
# situation where you make an initial request and the request times out. If you
|
192
|
+
# make the request again with the same request ID, the server can check if
|
193
|
+
# original operation with the same request ID was received, and if so, will
|
194
|
+
# ignore the second request. This prevents clients from accidentally creating
|
195
|
+
# duplicate commitments. The request ID must be a valid UUID with the exception
|
196
|
+
# that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
197
|
+
# @param [String] fields
|
198
|
+
# Selector specifying which fields to include in a partial response.
|
199
|
+
# @param [String] quota_user
|
200
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
201
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
202
|
+
# @param [Google::Apis::RequestOptions] options
|
203
|
+
# Request-specific options
|
204
|
+
#
|
205
|
+
# @yield [result, err] Result & error if block supplied
|
206
|
+
# @yieldparam result [Google::Apis::ParametermanagerV1::Empty] parsed result object
|
207
|
+
# @yieldparam err [StandardError] error object if request failed
|
208
|
+
#
|
209
|
+
# @return [Google::Apis::ParametermanagerV1::Empty]
|
210
|
+
#
|
211
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
212
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
213
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
214
|
+
def delete_project_location_parameter(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
215
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
216
|
+
command.response_representation = Google::Apis::ParametermanagerV1::Empty::Representation
|
217
|
+
command.response_class = Google::Apis::ParametermanagerV1::Empty
|
218
|
+
command.params['name'] = name unless name.nil?
|
219
|
+
command.query['requestId'] = request_id unless request_id.nil?
|
220
|
+
command.query['fields'] = fields unless fields.nil?
|
221
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
222
|
+
execute_or_queue_command(command, &block)
|
223
|
+
end
|
224
|
+
|
225
|
+
# Gets details of a single Parameter.
|
226
|
+
# @param [String] name
|
227
|
+
# Required. Name of the resource in the format `projects/*/locations/*/
|
228
|
+
# parameters/*`.
|
229
|
+
# @param [String] fields
|
230
|
+
# Selector specifying which fields to include in a partial response.
|
231
|
+
# @param [String] quota_user
|
232
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
233
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
234
|
+
# @param [Google::Apis::RequestOptions] options
|
235
|
+
# Request-specific options
|
236
|
+
#
|
237
|
+
# @yield [result, err] Result & error if block supplied
|
238
|
+
# @yieldparam result [Google::Apis::ParametermanagerV1::Parameter] parsed result object
|
239
|
+
# @yieldparam err [StandardError] error object if request failed
|
240
|
+
#
|
241
|
+
# @return [Google::Apis::ParametermanagerV1::Parameter]
|
242
|
+
#
|
243
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
244
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
245
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
246
|
+
def get_project_location_parameter(name, fields: nil, quota_user: nil, options: nil, &block)
|
247
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
248
|
+
command.response_representation = Google::Apis::ParametermanagerV1::Parameter::Representation
|
249
|
+
command.response_class = Google::Apis::ParametermanagerV1::Parameter
|
250
|
+
command.params['name'] = name unless name.nil?
|
251
|
+
command.query['fields'] = fields unless fields.nil?
|
252
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
253
|
+
execute_or_queue_command(command, &block)
|
254
|
+
end
|
255
|
+
|
256
|
+
# Lists Parameters in a given project and location.
|
257
|
+
# @param [String] parent
|
258
|
+
# Required. Parent value for ListParametersRequest in the format `projects/*/
|
259
|
+
# locations/*`.
|
260
|
+
# @param [String] filter
|
261
|
+
# Optional. Filtering results
|
262
|
+
# @param [String] order_by
|
263
|
+
# Optional. Hint for how to order the results
|
264
|
+
# @param [Fixnum] page_size
|
265
|
+
# Optional. Requested page size. Server may return fewer items than requested.
|
266
|
+
# If unspecified, server will pick an appropriate default.
|
267
|
+
# @param [String] page_token
|
268
|
+
# Optional. A token identifying a page of results the server should return.
|
269
|
+
# @param [String] fields
|
270
|
+
# Selector specifying which fields to include in a partial response.
|
271
|
+
# @param [String] quota_user
|
272
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
273
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
274
|
+
# @param [Google::Apis::RequestOptions] options
|
275
|
+
# Request-specific options
|
276
|
+
#
|
277
|
+
# @yield [result, err] Result & error if block supplied
|
278
|
+
# @yieldparam result [Google::Apis::ParametermanagerV1::ListParametersResponse] parsed result object
|
279
|
+
# @yieldparam err [StandardError] error object if request failed
|
280
|
+
#
|
281
|
+
# @return [Google::Apis::ParametermanagerV1::ListParametersResponse]
|
282
|
+
#
|
283
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
284
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
285
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
286
|
+
def list_project_location_parameters(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
287
|
+
command = make_simple_command(:get, 'v1/{+parent}/parameters', options)
|
288
|
+
command.response_representation = Google::Apis::ParametermanagerV1::ListParametersResponse::Representation
|
289
|
+
command.response_class = Google::Apis::ParametermanagerV1::ListParametersResponse
|
290
|
+
command.params['parent'] = parent unless parent.nil?
|
291
|
+
command.query['filter'] = filter unless filter.nil?
|
292
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
293
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
294
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
295
|
+
command.query['fields'] = fields unless fields.nil?
|
296
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
297
|
+
execute_or_queue_command(command, &block)
|
298
|
+
end
|
299
|
+
|
300
|
+
# Updates a single Parameter.
|
301
|
+
# @param [String] name
|
302
|
+
# Identifier. [Output only] The resource name of the Parameter in the format `
|
303
|
+
# projects/*/locations/*/parameters/*`.
|
304
|
+
# @param [Google::Apis::ParametermanagerV1::Parameter] parameter_object
|
305
|
+
# @param [String] request_id
|
306
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
307
|
+
# request ID so that if you must retry your request, the server will know to
|
308
|
+
# ignore the request if it has already been completed. The server will guarantee
|
309
|
+
# that for at least 60 minutes since the first request. For example, consider a
|
310
|
+
# situation where you make an initial request and the request times out. If you
|
311
|
+
# make the request again with the same request ID, the server can check if
|
312
|
+
# original operation with the same request ID was received, and if so, will
|
313
|
+
# ignore the second request. This prevents clients from accidentally creating
|
314
|
+
# duplicate commitments. The request ID must be a valid UUID with the exception
|
315
|
+
# that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
316
|
+
# @param [String] update_mask
|
317
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
318
|
+
# Parameter resource by the update. The fields specified in the update_mask are
|
319
|
+
# relative to the resource, not the full request. A mutable field will be
|
320
|
+
# overwritten if it is in the mask. If the user does not provide a mask then all
|
321
|
+
# mutable fields present in the request will be overwritten.
|
322
|
+
# @param [String] fields
|
323
|
+
# Selector specifying which fields to include in a partial response.
|
324
|
+
# @param [String] quota_user
|
325
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
326
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
327
|
+
# @param [Google::Apis::RequestOptions] options
|
328
|
+
# Request-specific options
|
329
|
+
#
|
330
|
+
# @yield [result, err] Result & error if block supplied
|
331
|
+
# @yieldparam result [Google::Apis::ParametermanagerV1::Parameter] parsed result object
|
332
|
+
# @yieldparam err [StandardError] error object if request failed
|
333
|
+
#
|
334
|
+
# @return [Google::Apis::ParametermanagerV1::Parameter]
|
335
|
+
#
|
336
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
337
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
338
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
339
|
+
def patch_project_location_parameter(name, parameter_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
340
|
+
command = make_simple_command(:patch, 'v1/{+name}', options)
|
341
|
+
command.request_representation = Google::Apis::ParametermanagerV1::Parameter::Representation
|
342
|
+
command.request_object = parameter_object
|
343
|
+
command.response_representation = Google::Apis::ParametermanagerV1::Parameter::Representation
|
344
|
+
command.response_class = Google::Apis::ParametermanagerV1::Parameter
|
345
|
+
command.params['name'] = name unless name.nil?
|
346
|
+
command.query['requestId'] = request_id unless request_id.nil?
|
347
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
348
|
+
command.query['fields'] = fields unless fields.nil?
|
349
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
350
|
+
execute_or_queue_command(command, &block)
|
351
|
+
end
|
352
|
+
|
353
|
+
# Creates a new ParameterVersion in a given project, location, and parameter.
|
354
|
+
# @param [String] parent
|
355
|
+
# Required. Value for parent in the format `projects/*/locations/*/parameters/*`.
|
356
|
+
# @param [Google::Apis::ParametermanagerV1::ParameterVersion] parameter_version_object
|
357
|
+
# @param [String] parameter_version_id
|
358
|
+
# Required. Id of the ParameterVersion resource
|
359
|
+
# @param [String] request_id
|
360
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
361
|
+
# request ID so that if you must retry your request, the server will know to
|
362
|
+
# ignore the request if it has already been completed. The server will guarantee
|
363
|
+
# that for at least 60 minutes since the first request. For example, consider a
|
364
|
+
# situation where you make an initial request and the request times out. If you
|
365
|
+
# make the request again with the same request ID, the server can check if
|
366
|
+
# original operation with the same request ID was received, and if so, will
|
367
|
+
# ignore the second request. This prevents clients from accidentally creating
|
368
|
+
# duplicate commitments. The request ID must be a valid UUID with the exception
|
369
|
+
# that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
370
|
+
# @param [String] fields
|
371
|
+
# Selector specifying which fields to include in a partial response.
|
372
|
+
# @param [String] quota_user
|
373
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
374
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
375
|
+
# @param [Google::Apis::RequestOptions] options
|
376
|
+
# Request-specific options
|
377
|
+
#
|
378
|
+
# @yield [result, err] Result & error if block supplied
|
379
|
+
# @yieldparam result [Google::Apis::ParametermanagerV1::ParameterVersion] parsed result object
|
380
|
+
# @yieldparam err [StandardError] error object if request failed
|
381
|
+
#
|
382
|
+
# @return [Google::Apis::ParametermanagerV1::ParameterVersion]
|
383
|
+
#
|
384
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
385
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
386
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
387
|
+
def create_project_location_parameter_version(parent, parameter_version_object = nil, parameter_version_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
388
|
+
command = make_simple_command(:post, 'v1/{+parent}/versions', options)
|
389
|
+
command.request_representation = Google::Apis::ParametermanagerV1::ParameterVersion::Representation
|
390
|
+
command.request_object = parameter_version_object
|
391
|
+
command.response_representation = Google::Apis::ParametermanagerV1::ParameterVersion::Representation
|
392
|
+
command.response_class = Google::Apis::ParametermanagerV1::ParameterVersion
|
393
|
+
command.params['parent'] = parent unless parent.nil?
|
394
|
+
command.query['parameterVersionId'] = parameter_version_id unless parameter_version_id.nil?
|
395
|
+
command.query['requestId'] = request_id unless request_id.nil?
|
396
|
+
command.query['fields'] = fields unless fields.nil?
|
397
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
398
|
+
execute_or_queue_command(command, &block)
|
399
|
+
end
|
400
|
+
|
401
|
+
# Deletes a single ParameterVersion.
|
402
|
+
# @param [String] name
|
403
|
+
# Required. Name of the resource in the format `projects/*/locations/*/
|
404
|
+
# parameters/*/versions/*`.
|
405
|
+
# @param [String] request_id
|
406
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
407
|
+
# request ID so that if you must retry your request, the server will know to
|
408
|
+
# ignore the request if it has already been completed. The server will guarantee
|
409
|
+
# that for at least 60 minutes after the first request. For example, consider a
|
410
|
+
# situation where you make an initial request and the request times out. If you
|
411
|
+
# make the request again with the same request ID, the server can check if
|
412
|
+
# original operation with the same request ID was received, and if so, will
|
413
|
+
# ignore the second request. This prevents clients from accidentally creating
|
414
|
+
# duplicate commitments. The request ID must be a valid UUID with the exception
|
415
|
+
# that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
416
|
+
# @param [String] fields
|
417
|
+
# Selector specifying which fields to include in a partial response.
|
418
|
+
# @param [String] quota_user
|
419
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
420
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
421
|
+
# @param [Google::Apis::RequestOptions] options
|
422
|
+
# Request-specific options
|
423
|
+
#
|
424
|
+
# @yield [result, err] Result & error if block supplied
|
425
|
+
# @yieldparam result [Google::Apis::ParametermanagerV1::Empty] parsed result object
|
426
|
+
# @yieldparam err [StandardError] error object if request failed
|
427
|
+
#
|
428
|
+
# @return [Google::Apis::ParametermanagerV1::Empty]
|
429
|
+
#
|
430
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
431
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
432
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
433
|
+
def delete_project_location_parameter_version(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
434
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
435
|
+
command.response_representation = Google::Apis::ParametermanagerV1::Empty::Representation
|
436
|
+
command.response_class = Google::Apis::ParametermanagerV1::Empty
|
437
|
+
command.params['name'] = name unless name.nil?
|
438
|
+
command.query['requestId'] = request_id unless request_id.nil?
|
439
|
+
command.query['fields'] = fields unless fields.nil?
|
440
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
441
|
+
execute_or_queue_command(command, &block)
|
442
|
+
end
|
443
|
+
|
444
|
+
# Gets details of a single ParameterVersion.
|
445
|
+
# @param [String] name
|
446
|
+
# Required. Name of the resource in the format `projects/*/locations/*/
|
447
|
+
# parameters/*/versions/*`.
|
448
|
+
# @param [String] view
|
449
|
+
# Optional. View of the ParameterVersion. In the default FULL view, all metadata
|
450
|
+
# & payload associated with the ParameterVersion will be returned.
|
451
|
+
# @param [String] fields
|
452
|
+
# Selector specifying which fields to include in a partial response.
|
453
|
+
# @param [String] quota_user
|
454
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
455
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
456
|
+
# @param [Google::Apis::RequestOptions] options
|
457
|
+
# Request-specific options
|
458
|
+
#
|
459
|
+
# @yield [result, err] Result & error if block supplied
|
460
|
+
# @yieldparam result [Google::Apis::ParametermanagerV1::ParameterVersion] parsed result object
|
461
|
+
# @yieldparam err [StandardError] error object if request failed
|
462
|
+
#
|
463
|
+
# @return [Google::Apis::ParametermanagerV1::ParameterVersion]
|
464
|
+
#
|
465
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
466
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
467
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
468
|
+
def get_project_location_parameter_version(name, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
469
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
470
|
+
command.response_representation = Google::Apis::ParametermanagerV1::ParameterVersion::Representation
|
471
|
+
command.response_class = Google::Apis::ParametermanagerV1::ParameterVersion
|
472
|
+
command.params['name'] = name unless name.nil?
|
473
|
+
command.query['view'] = view unless view.nil?
|
474
|
+
command.query['fields'] = fields unless fields.nil?
|
475
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
476
|
+
execute_or_queue_command(command, &block)
|
477
|
+
end
|
478
|
+
|
479
|
+
# Lists ParameterVersions in a given project, location, and parameter.
|
480
|
+
# @param [String] parent
|
481
|
+
# Required. Parent value for ListParameterVersionsRequest in the format `
|
482
|
+
# projects/*/locations/*/parameters/*`.
|
483
|
+
# @param [String] filter
|
484
|
+
# Optional. Filtering results
|
485
|
+
# @param [String] order_by
|
486
|
+
# Optional. Hint for how to order the results
|
487
|
+
# @param [Fixnum] page_size
|
488
|
+
# Optional. Requested page size. Server may return fewer items than requested.
|
489
|
+
# If unspecified, server will pick an appropriate default.
|
490
|
+
# @param [String] page_token
|
491
|
+
# Optional. A token identifying a page of results the server should return.
|
492
|
+
# @param [String] fields
|
493
|
+
# Selector specifying which fields to include in a partial response.
|
494
|
+
# @param [String] quota_user
|
495
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
496
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
497
|
+
# @param [Google::Apis::RequestOptions] options
|
498
|
+
# Request-specific options
|
499
|
+
#
|
500
|
+
# @yield [result, err] Result & error if block supplied
|
501
|
+
# @yieldparam result [Google::Apis::ParametermanagerV1::ListParameterVersionsResponse] parsed result object
|
502
|
+
# @yieldparam err [StandardError] error object if request failed
|
503
|
+
#
|
504
|
+
# @return [Google::Apis::ParametermanagerV1::ListParameterVersionsResponse]
|
505
|
+
#
|
506
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
507
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
508
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
509
|
+
def list_project_location_parameter_versions(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
510
|
+
command = make_simple_command(:get, 'v1/{+parent}/versions', options)
|
511
|
+
command.response_representation = Google::Apis::ParametermanagerV1::ListParameterVersionsResponse::Representation
|
512
|
+
command.response_class = Google::Apis::ParametermanagerV1::ListParameterVersionsResponse
|
513
|
+
command.params['parent'] = parent unless parent.nil?
|
514
|
+
command.query['filter'] = filter unless filter.nil?
|
515
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
516
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
517
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
518
|
+
command.query['fields'] = fields unless fields.nil?
|
519
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
520
|
+
execute_or_queue_command(command, &block)
|
521
|
+
end
|
522
|
+
|
523
|
+
# Updates a single ParameterVersion.
|
524
|
+
# @param [String] name
|
525
|
+
# Identifier. [Output only] The resource name of the ParameterVersion in the
|
526
|
+
# format `projects/*/locations/*/parameters/*/versions/*`.
|
527
|
+
# @param [Google::Apis::ParametermanagerV1::ParameterVersion] parameter_version_object
|
528
|
+
# @param [String] request_id
|
529
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
530
|
+
# request ID so that if you must retry your request, the server will know to
|
531
|
+
# ignore the request if it has already been completed. The server will guarantee
|
532
|
+
# that for at least 60 minutes since the first request. For example, consider a
|
533
|
+
# situation where you make an initial request and the request times out. If you
|
534
|
+
# make the request again with the same request ID, the server can check if
|
535
|
+
# original operation with the same request ID was received, and if so, will
|
536
|
+
# ignore the second request. This prevents clients from accidentally creating
|
537
|
+
# duplicate commitments. The request ID must be a valid UUID with the exception
|
538
|
+
# that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
539
|
+
# @param [String] update_mask
|
540
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
541
|
+
# ParameterVersion resource by the update. The fields specified in the
|
542
|
+
# update_mask are relative to the resource, not the full request. A mutable
|
543
|
+
# field will be overwritten if it is in the mask. If the user does not provide a
|
544
|
+
# mask then all mutable fields present in the request will be overwritten.
|
545
|
+
# @param [String] fields
|
546
|
+
# Selector specifying which fields to include in a partial response.
|
547
|
+
# @param [String] quota_user
|
548
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
549
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
550
|
+
# @param [Google::Apis::RequestOptions] options
|
551
|
+
# Request-specific options
|
552
|
+
#
|
553
|
+
# @yield [result, err] Result & error if block supplied
|
554
|
+
# @yieldparam result [Google::Apis::ParametermanagerV1::ParameterVersion] parsed result object
|
555
|
+
# @yieldparam err [StandardError] error object if request failed
|
556
|
+
#
|
557
|
+
# @return [Google::Apis::ParametermanagerV1::ParameterVersion]
|
558
|
+
#
|
559
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
560
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
561
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
562
|
+
def patch_project_location_parameter_version(name, parameter_version_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
563
|
+
command = make_simple_command(:patch, 'v1/{+name}', options)
|
564
|
+
command.request_representation = Google::Apis::ParametermanagerV1::ParameterVersion::Representation
|
565
|
+
command.request_object = parameter_version_object
|
566
|
+
command.response_representation = Google::Apis::ParametermanagerV1::ParameterVersion::Representation
|
567
|
+
command.response_class = Google::Apis::ParametermanagerV1::ParameterVersion
|
568
|
+
command.params['name'] = name unless name.nil?
|
569
|
+
command.query['requestId'] = request_id unless request_id.nil?
|
570
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
571
|
+
command.query['fields'] = fields unless fields.nil?
|
572
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
573
|
+
execute_or_queue_command(command, &block)
|
574
|
+
end
|
575
|
+
|
576
|
+
# Gets rendered version of a ParameterVersion.
|
577
|
+
# @param [String] name
|
578
|
+
# Required. Name of the resource
|
579
|
+
# @param [String] fields
|
580
|
+
# Selector specifying which fields to include in a partial response.
|
581
|
+
# @param [String] quota_user
|
582
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
583
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
584
|
+
# @param [Google::Apis::RequestOptions] options
|
585
|
+
# Request-specific options
|
586
|
+
#
|
587
|
+
# @yield [result, err] Result & error if block supplied
|
588
|
+
# @yieldparam result [Google::Apis::ParametermanagerV1::RenderParameterVersionResponse] parsed result object
|
589
|
+
# @yieldparam err [StandardError] error object if request failed
|
590
|
+
#
|
591
|
+
# @return [Google::Apis::ParametermanagerV1::RenderParameterVersionResponse]
|
592
|
+
#
|
593
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
594
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
595
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
596
|
+
def render_project_location_parameter_version(name, fields: nil, quota_user: nil, options: nil, &block)
|
597
|
+
command = make_simple_command(:get, 'v1/{+name}:render', options)
|
598
|
+
command.response_representation = Google::Apis::ParametermanagerV1::RenderParameterVersionResponse::Representation
|
599
|
+
command.response_class = Google::Apis::ParametermanagerV1::RenderParameterVersionResponse
|
600
|
+
command.params['name'] = name unless name.nil?
|
601
|
+
command.query['fields'] = fields unless fields.nil?
|
602
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
603
|
+
execute_or_queue_command(command, &block)
|
604
|
+
end
|
605
|
+
|
606
|
+
protected
|
607
|
+
|
608
|
+
def apply_command_defaults(command)
|
609
|
+
command.query['key'] = key unless key.nil?
|
610
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
611
|
+
end
|
612
|
+
end
|
613
|
+
end
|
614
|
+
end
|
615
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/parametermanager_v1/service.rb'
|
16
|
+
require 'google/apis/parametermanager_v1/classes.rb'
|
17
|
+
require 'google/apis/parametermanager_v1/representations.rb'
|
18
|
+
require 'google/apis/parametermanager_v1/gem_version.rb'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
# Parameter Manager API
|
23
|
+
#
|
24
|
+
# Parameter Manager is a single source of truth to store, access and manage the
|
25
|
+
# lifecycle of your workload parameters. Parameter Manager aims to make
|
26
|
+
# management of sensitive application parameters effortless for customers
|
27
|
+
# without diminishing focus on security.
|
28
|
+
#
|
29
|
+
# @see https://cloud.google.com/secret-manager/parameter-manager/docs/overview
|
30
|
+
module ParametermanagerV1
|
31
|
+
# Version of the Parameter Manager API this client connects to.
|
32
|
+
# This is NOT the gem version.
|
33
|
+
VERSION = 'V1'
|
34
|
+
|
35
|
+
# See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
36
|
+
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|