google-apis-secretmanager_v1beta1 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.
@@ -0,0 +1,28 @@
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
+ module Google
16
+ module Apis
17
+ module SecretmanagerV1beta1
18
+ # Version of the google-apis-secretmanager_v1beta1 gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.1.1"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20201106"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,388 @@
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 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module SecretmanagerV1beta1
24
+
25
+ class AccessSecretVersionResponse
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class AddSecretVersionRequest
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class AuditConfig
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class AuditLogConfig
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class Automatic
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class Binding
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class DestroySecretVersionRequest
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class DisableSecretVersionRequest
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class Empty
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class EnableSecretVersionRequest
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class Expr
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class ListLocationsResponse
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class ListSecretVersionsResponse
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class ListSecretsResponse
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class Location
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+
112
+ include Google::Apis::Core::JsonObjectSupport
113
+ end
114
+
115
+ class Policy
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
121
+ class Replica
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+
124
+ include Google::Apis::Core::JsonObjectSupport
125
+ end
126
+
127
+ class Replication
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
133
+ class Secret
134
+ class Representation < Google::Apis::Core::JsonRepresentation; end
135
+
136
+ include Google::Apis::Core::JsonObjectSupport
137
+ end
138
+
139
+ class SecretPayload
140
+ class Representation < Google::Apis::Core::JsonRepresentation; end
141
+
142
+ include Google::Apis::Core::JsonObjectSupport
143
+ end
144
+
145
+ class SecretVersion
146
+ class Representation < Google::Apis::Core::JsonRepresentation; end
147
+
148
+ include Google::Apis::Core::JsonObjectSupport
149
+ end
150
+
151
+ class SetIamPolicyRequest
152
+ class Representation < Google::Apis::Core::JsonRepresentation; end
153
+
154
+ include Google::Apis::Core::JsonObjectSupport
155
+ end
156
+
157
+ class TestIamPermissionsRequest
158
+ class Representation < Google::Apis::Core::JsonRepresentation; end
159
+
160
+ include Google::Apis::Core::JsonObjectSupport
161
+ end
162
+
163
+ class TestIamPermissionsResponse
164
+ class Representation < Google::Apis::Core::JsonRepresentation; end
165
+
166
+ include Google::Apis::Core::JsonObjectSupport
167
+ end
168
+
169
+ class UserManaged
170
+ class Representation < Google::Apis::Core::JsonRepresentation; end
171
+
172
+ include Google::Apis::Core::JsonObjectSupport
173
+ end
174
+
175
+ class AccessSecretVersionResponse
176
+ # @private
177
+ class Representation < Google::Apis::Core::JsonRepresentation
178
+ property :name, as: 'name'
179
+ property :payload, as: 'payload', class: Google::Apis::SecretmanagerV1beta1::SecretPayload, decorator: Google::Apis::SecretmanagerV1beta1::SecretPayload::Representation
180
+
181
+ end
182
+ end
183
+
184
+ class AddSecretVersionRequest
185
+ # @private
186
+ class Representation < Google::Apis::Core::JsonRepresentation
187
+ property :payload, as: 'payload', class: Google::Apis::SecretmanagerV1beta1::SecretPayload, decorator: Google::Apis::SecretmanagerV1beta1::SecretPayload::Representation
188
+
189
+ end
190
+ end
191
+
192
+ class AuditConfig
193
+ # @private
194
+ class Representation < Google::Apis::Core::JsonRepresentation
195
+ collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::SecretmanagerV1beta1::AuditLogConfig, decorator: Google::Apis::SecretmanagerV1beta1::AuditLogConfig::Representation
196
+
197
+ property :service, as: 'service'
198
+ end
199
+ end
200
+
201
+ class AuditLogConfig
202
+ # @private
203
+ class Representation < Google::Apis::Core::JsonRepresentation
204
+ collection :exempted_members, as: 'exemptedMembers'
205
+ property :log_type, as: 'logType'
206
+ end
207
+ end
208
+
209
+ class Automatic
210
+ # @private
211
+ class Representation < Google::Apis::Core::JsonRepresentation
212
+ end
213
+ end
214
+
215
+ class Binding
216
+ # @private
217
+ class Representation < Google::Apis::Core::JsonRepresentation
218
+ property :condition, as: 'condition', class: Google::Apis::SecretmanagerV1beta1::Expr, decorator: Google::Apis::SecretmanagerV1beta1::Expr::Representation
219
+
220
+ collection :members, as: 'members'
221
+ property :role, as: 'role'
222
+ end
223
+ end
224
+
225
+ class DestroySecretVersionRequest
226
+ # @private
227
+ class Representation < Google::Apis::Core::JsonRepresentation
228
+ end
229
+ end
230
+
231
+ class DisableSecretVersionRequest
232
+ # @private
233
+ class Representation < Google::Apis::Core::JsonRepresentation
234
+ end
235
+ end
236
+
237
+ class Empty
238
+ # @private
239
+ class Representation < Google::Apis::Core::JsonRepresentation
240
+ end
241
+ end
242
+
243
+ class EnableSecretVersionRequest
244
+ # @private
245
+ class Representation < Google::Apis::Core::JsonRepresentation
246
+ end
247
+ end
248
+
249
+ class Expr
250
+ # @private
251
+ class Representation < Google::Apis::Core::JsonRepresentation
252
+ property :description, as: 'description'
253
+ property :expression, as: 'expression'
254
+ property :location, as: 'location'
255
+ property :title, as: 'title'
256
+ end
257
+ end
258
+
259
+ class ListLocationsResponse
260
+ # @private
261
+ class Representation < Google::Apis::Core::JsonRepresentation
262
+ collection :locations, as: 'locations', class: Google::Apis::SecretmanagerV1beta1::Location, decorator: Google::Apis::SecretmanagerV1beta1::Location::Representation
263
+
264
+ property :next_page_token, as: 'nextPageToken'
265
+ end
266
+ end
267
+
268
+ class ListSecretVersionsResponse
269
+ # @private
270
+ class Representation < Google::Apis::Core::JsonRepresentation
271
+ property :next_page_token, as: 'nextPageToken'
272
+ property :total_size, as: 'totalSize'
273
+ collection :versions, as: 'versions', class: Google::Apis::SecretmanagerV1beta1::SecretVersion, decorator: Google::Apis::SecretmanagerV1beta1::SecretVersion::Representation
274
+
275
+ end
276
+ end
277
+
278
+ class ListSecretsResponse
279
+ # @private
280
+ class Representation < Google::Apis::Core::JsonRepresentation
281
+ property :next_page_token, as: 'nextPageToken'
282
+ collection :secrets, as: 'secrets', class: Google::Apis::SecretmanagerV1beta1::Secret, decorator: Google::Apis::SecretmanagerV1beta1::Secret::Representation
283
+
284
+ property :total_size, as: 'totalSize'
285
+ end
286
+ end
287
+
288
+ class Location
289
+ # @private
290
+ class Representation < Google::Apis::Core::JsonRepresentation
291
+ property :display_name, as: 'displayName'
292
+ hash :labels, as: 'labels'
293
+ property :location_id, as: 'locationId'
294
+ hash :metadata, as: 'metadata'
295
+ property :name, as: 'name'
296
+ end
297
+ end
298
+
299
+ class Policy
300
+ # @private
301
+ class Representation < Google::Apis::Core::JsonRepresentation
302
+ collection :audit_configs, as: 'auditConfigs', class: Google::Apis::SecretmanagerV1beta1::AuditConfig, decorator: Google::Apis::SecretmanagerV1beta1::AuditConfig::Representation
303
+
304
+ collection :bindings, as: 'bindings', class: Google::Apis::SecretmanagerV1beta1::Binding, decorator: Google::Apis::SecretmanagerV1beta1::Binding::Representation
305
+
306
+ property :etag, :base64 => true, as: 'etag'
307
+ property :version, as: 'version'
308
+ end
309
+ end
310
+
311
+ class Replica
312
+ # @private
313
+ class Representation < Google::Apis::Core::JsonRepresentation
314
+ property :location, as: 'location'
315
+ end
316
+ end
317
+
318
+ class Replication
319
+ # @private
320
+ class Representation < Google::Apis::Core::JsonRepresentation
321
+ property :automatic, as: 'automatic', class: Google::Apis::SecretmanagerV1beta1::Automatic, decorator: Google::Apis::SecretmanagerV1beta1::Automatic::Representation
322
+
323
+ property :user_managed, as: 'userManaged', class: Google::Apis::SecretmanagerV1beta1::UserManaged, decorator: Google::Apis::SecretmanagerV1beta1::UserManaged::Representation
324
+
325
+ end
326
+ end
327
+
328
+ class Secret
329
+ # @private
330
+ class Representation < Google::Apis::Core::JsonRepresentation
331
+ property :create_time, as: 'createTime'
332
+ hash :labels, as: 'labels'
333
+ property :name, as: 'name'
334
+ property :replication, as: 'replication', class: Google::Apis::SecretmanagerV1beta1::Replication, decorator: Google::Apis::SecretmanagerV1beta1::Replication::Representation
335
+
336
+ end
337
+ end
338
+
339
+ class SecretPayload
340
+ # @private
341
+ class Representation < Google::Apis::Core::JsonRepresentation
342
+ property :data, :base64 => true, as: 'data'
343
+ end
344
+ end
345
+
346
+ class SecretVersion
347
+ # @private
348
+ class Representation < Google::Apis::Core::JsonRepresentation
349
+ property :create_time, as: 'createTime'
350
+ property :destroy_time, as: 'destroyTime'
351
+ property :name, as: 'name'
352
+ property :state, as: 'state'
353
+ end
354
+ end
355
+
356
+ class SetIamPolicyRequest
357
+ # @private
358
+ class Representation < Google::Apis::Core::JsonRepresentation
359
+ property :policy, as: 'policy', class: Google::Apis::SecretmanagerV1beta1::Policy, decorator: Google::Apis::SecretmanagerV1beta1::Policy::Representation
360
+
361
+ property :update_mask, as: 'updateMask'
362
+ end
363
+ end
364
+
365
+ class TestIamPermissionsRequest
366
+ # @private
367
+ class Representation < Google::Apis::Core::JsonRepresentation
368
+ collection :permissions, as: 'permissions'
369
+ end
370
+ end
371
+
372
+ class TestIamPermissionsResponse
373
+ # @private
374
+ class Representation < Google::Apis::Core::JsonRepresentation
375
+ collection :permissions, as: 'permissions'
376
+ end
377
+ end
378
+
379
+ class UserManaged
380
+ # @private
381
+ class Representation < Google::Apis::Core::JsonRepresentation
382
+ collection :replicas, as: 'replicas', class: Google::Apis::SecretmanagerV1beta1::Replica, decorator: Google::Apis::SecretmanagerV1beta1::Replica::Representation
383
+
384
+ end
385
+ end
386
+ end
387
+ end
388
+ end
@@ -0,0 +1,667 @@
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 SecretmanagerV1beta1
23
+ # Secret Manager API
24
+ #
25
+ # Stores sensitive data such as API keys, passwords, and certificates. Provides
26
+ # convenience while improving security.
27
+ #
28
+ # @example
29
+ # require 'google/apis/secretmanager_v1beta1'
30
+ #
31
+ # Secretmanager = Google::Apis::SecretmanagerV1beta1 # Alias the module
32
+ # service = Secretmanager::SecretManagerService.new
33
+ #
34
+ # @see https://cloud.google.com/secret-manager/
35
+ class SecretManagerService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://secretmanager.googleapis.com/', '',
48
+ client_name: 'google-apis-secretmanager_v1beta1',
49
+ client_version: Google::Apis::SecretmanagerV1beta1::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Gets information about a location.
54
+ # @param [String] name
55
+ # Resource name for the location.
56
+ # @param [String] fields
57
+ # Selector specifying which fields to include in a partial response.
58
+ # @param [String] quota_user
59
+ # Available to use for quota purposes for server-side applications. Can be any
60
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
61
+ # @param [Google::Apis::RequestOptions] options
62
+ # Request-specific options
63
+ #
64
+ # @yield [result, err] Result & error if block supplied
65
+ # @yieldparam result [Google::Apis::SecretmanagerV1beta1::Location] parsed result object
66
+ # @yieldparam err [StandardError] error object if request failed
67
+ #
68
+ # @return [Google::Apis::SecretmanagerV1beta1::Location]
69
+ #
70
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
71
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
72
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
73
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
74
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
75
+ command.response_representation = Google::Apis::SecretmanagerV1beta1::Location::Representation
76
+ command.response_class = Google::Apis::SecretmanagerV1beta1::Location
77
+ command.params['name'] = name unless name.nil?
78
+ command.query['fields'] = fields unless fields.nil?
79
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
80
+ execute_or_queue_command(command, &block)
81
+ end
82
+
83
+ # Lists information about the supported locations for this service.
84
+ # @param [String] name
85
+ # The resource that owns the locations collection, if applicable.
86
+ # @param [String] filter
87
+ # The standard list filter.
88
+ # @param [Fixnum] page_size
89
+ # The standard list page size.
90
+ # @param [String] page_token
91
+ # The standard list page token.
92
+ # @param [String] fields
93
+ # Selector specifying which fields to include in a partial response.
94
+ # @param [String] quota_user
95
+ # Available to use for quota purposes for server-side applications. Can be any
96
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
97
+ # @param [Google::Apis::RequestOptions] options
98
+ # Request-specific options
99
+ #
100
+ # @yield [result, err] Result & error if block supplied
101
+ # @yieldparam result [Google::Apis::SecretmanagerV1beta1::ListLocationsResponse] parsed result object
102
+ # @yieldparam err [StandardError] error object if request failed
103
+ #
104
+ # @return [Google::Apis::SecretmanagerV1beta1::ListLocationsResponse]
105
+ #
106
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
107
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
108
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
109
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
110
+ command = make_simple_command(:get, 'v1beta1/{+name}/locations', options)
111
+ command.response_representation = Google::Apis::SecretmanagerV1beta1::ListLocationsResponse::Representation
112
+ command.response_class = Google::Apis::SecretmanagerV1beta1::ListLocationsResponse
113
+ command.params['name'] = name unless name.nil?
114
+ command.query['filter'] = filter unless filter.nil?
115
+ command.query['pageSize'] = page_size unless page_size.nil?
116
+ command.query['pageToken'] = page_token unless page_token.nil?
117
+ command.query['fields'] = fields unless fields.nil?
118
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
119
+ execute_or_queue_command(command, &block)
120
+ end
121
+
122
+ # Creates a new SecretVersion containing secret data and attaches it to an
123
+ # existing Secret.
124
+ # @param [String] parent
125
+ # Required. The resource name of the Secret to associate with the SecretVersion
126
+ # in the format `projects/*/secrets/*`.
127
+ # @param [Google::Apis::SecretmanagerV1beta1::AddSecretVersionRequest] add_secret_version_request_object
128
+ # @param [String] fields
129
+ # Selector specifying which fields to include in a partial response.
130
+ # @param [String] quota_user
131
+ # Available to use for quota purposes for server-side applications. Can be any
132
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
133
+ # @param [Google::Apis::RequestOptions] options
134
+ # Request-specific options
135
+ #
136
+ # @yield [result, err] Result & error if block supplied
137
+ # @yieldparam result [Google::Apis::SecretmanagerV1beta1::SecretVersion] parsed result object
138
+ # @yieldparam err [StandardError] error object if request failed
139
+ #
140
+ # @return [Google::Apis::SecretmanagerV1beta1::SecretVersion]
141
+ #
142
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
143
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
144
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
145
+ def add_project_secret_version(parent, add_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
146
+ command = make_simple_command(:post, 'v1beta1/{+parent}:addVersion', options)
147
+ command.request_representation = Google::Apis::SecretmanagerV1beta1::AddSecretVersionRequest::Representation
148
+ command.request_object = add_secret_version_request_object
149
+ command.response_representation = Google::Apis::SecretmanagerV1beta1::SecretVersion::Representation
150
+ command.response_class = Google::Apis::SecretmanagerV1beta1::SecretVersion
151
+ command.params['parent'] = parent unless parent.nil?
152
+ command.query['fields'] = fields unless fields.nil?
153
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
154
+ execute_or_queue_command(command, &block)
155
+ end
156
+
157
+ # Creates a new Secret containing no SecretVersions.
158
+ # @param [String] parent
159
+ # Required. The resource name of the project to associate with the Secret, in
160
+ # the format `projects/*`.
161
+ # @param [Google::Apis::SecretmanagerV1beta1::Secret] secret_object
162
+ # @param [String] secret_id
163
+ # Required. This must be unique within the project. A secret ID is a string with
164
+ # a maximum length of 255 characters and can contain uppercase and lowercase
165
+ # letters, numerals, and the hyphen (`-`) and underscore (`_`) characters.
166
+ # @param [String] fields
167
+ # Selector specifying which fields to include in a partial response.
168
+ # @param [String] quota_user
169
+ # Available to use for quota purposes for server-side applications. Can be any
170
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
171
+ # @param [Google::Apis::RequestOptions] options
172
+ # Request-specific options
173
+ #
174
+ # @yield [result, err] Result & error if block supplied
175
+ # @yieldparam result [Google::Apis::SecretmanagerV1beta1::Secret] parsed result object
176
+ # @yieldparam err [StandardError] error object if request failed
177
+ #
178
+ # @return [Google::Apis::SecretmanagerV1beta1::Secret]
179
+ #
180
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
181
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
182
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
183
+ def create_project_secret(parent, secret_object = nil, secret_id: nil, fields: nil, quota_user: nil, options: nil, &block)
184
+ command = make_simple_command(:post, 'v1beta1/{+parent}/secrets', options)
185
+ command.request_representation = Google::Apis::SecretmanagerV1beta1::Secret::Representation
186
+ command.request_object = secret_object
187
+ command.response_representation = Google::Apis::SecretmanagerV1beta1::Secret::Representation
188
+ command.response_class = Google::Apis::SecretmanagerV1beta1::Secret
189
+ command.params['parent'] = parent unless parent.nil?
190
+ command.query['secretId'] = secret_id unless secret_id.nil?
191
+ command.query['fields'] = fields unless fields.nil?
192
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
193
+ execute_or_queue_command(command, &block)
194
+ end
195
+
196
+ # Deletes a Secret.
197
+ # @param [String] name
198
+ # Required. The resource name of the Secret to delete in the format `projects/*/
199
+ # secrets/*`.
200
+ # @param [String] fields
201
+ # Selector specifying which fields to include in a partial response.
202
+ # @param [String] quota_user
203
+ # Available to use for quota purposes for server-side applications. Can be any
204
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
205
+ # @param [Google::Apis::RequestOptions] options
206
+ # Request-specific options
207
+ #
208
+ # @yield [result, err] Result & error if block supplied
209
+ # @yieldparam result [Google::Apis::SecretmanagerV1beta1::Empty] parsed result object
210
+ # @yieldparam err [StandardError] error object if request failed
211
+ #
212
+ # @return [Google::Apis::SecretmanagerV1beta1::Empty]
213
+ #
214
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
215
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
216
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
217
+ def delete_project_secret(name, fields: nil, quota_user: nil, options: nil, &block)
218
+ command = make_simple_command(:delete, 'v1beta1/{+name}', options)
219
+ command.response_representation = Google::Apis::SecretmanagerV1beta1::Empty::Representation
220
+ command.response_class = Google::Apis::SecretmanagerV1beta1::Empty
221
+ command.params['name'] = name unless name.nil?
222
+ command.query['fields'] = fields unless fields.nil?
223
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
224
+ execute_or_queue_command(command, &block)
225
+ end
226
+
227
+ # Gets metadata for a given Secret.
228
+ # @param [String] name
229
+ # Required. The resource name of the Secret, in the format `projects/*/secrets/*`
230
+ # .
231
+ # @param [String] fields
232
+ # Selector specifying which fields to include in a partial response.
233
+ # @param [String] quota_user
234
+ # Available to use for quota purposes for server-side applications. Can be any
235
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
236
+ # @param [Google::Apis::RequestOptions] options
237
+ # Request-specific options
238
+ #
239
+ # @yield [result, err] Result & error if block supplied
240
+ # @yieldparam result [Google::Apis::SecretmanagerV1beta1::Secret] parsed result object
241
+ # @yieldparam err [StandardError] error object if request failed
242
+ #
243
+ # @return [Google::Apis::SecretmanagerV1beta1::Secret]
244
+ #
245
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
246
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
247
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
248
+ def get_project_secret(name, fields: nil, quota_user: nil, options: nil, &block)
249
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
250
+ command.response_representation = Google::Apis::SecretmanagerV1beta1::Secret::Representation
251
+ command.response_class = Google::Apis::SecretmanagerV1beta1::Secret
252
+ command.params['name'] = name unless name.nil?
253
+ command.query['fields'] = fields unless fields.nil?
254
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
255
+ execute_or_queue_command(command, &block)
256
+ end
257
+
258
+ # Gets the access control policy for a secret. Returns empty policy if the
259
+ # secret exists and does not have a policy set.
260
+ # @param [String] resource
261
+ # REQUIRED: The resource for which the policy is being requested. See the
262
+ # operation documentation for the appropriate value for this field.
263
+ # @param [Fixnum] options_requested_policy_version
264
+ # Optional. The policy format version to be returned. Valid values are 0, 1, and
265
+ # 3. Requests specifying an invalid value will be rejected. Requests for
266
+ # policies with any conditional bindings must specify version 3. Policies
267
+ # without any conditional bindings may specify any valid value or leave the
268
+ # field unset. To learn which resources support conditions in their IAM policies,
269
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
270
+ # resource-policies).
271
+ # @param [String] fields
272
+ # Selector specifying which fields to include in a partial response.
273
+ # @param [String] quota_user
274
+ # Available to use for quota purposes for server-side applications. Can be any
275
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
276
+ # @param [Google::Apis::RequestOptions] options
277
+ # Request-specific options
278
+ #
279
+ # @yield [result, err] Result & error if block supplied
280
+ # @yieldparam result [Google::Apis::SecretmanagerV1beta1::Policy] parsed result object
281
+ # @yieldparam err [StandardError] error object if request failed
282
+ #
283
+ # @return [Google::Apis::SecretmanagerV1beta1::Policy]
284
+ #
285
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
286
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
287
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
288
+ def get_project_secret_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
289
+ command = make_simple_command(:get, 'v1beta1/{+resource}:getIamPolicy', options)
290
+ command.response_representation = Google::Apis::SecretmanagerV1beta1::Policy::Representation
291
+ command.response_class = Google::Apis::SecretmanagerV1beta1::Policy
292
+ command.params['resource'] = resource unless resource.nil?
293
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
294
+ command.query['fields'] = fields unless fields.nil?
295
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
296
+ execute_or_queue_command(command, &block)
297
+ end
298
+
299
+ # Lists Secrets.
300
+ # @param [String] parent
301
+ # Required. The resource name of the project associated with the Secrets, in the
302
+ # format `projects/*`.
303
+ # @param [Fixnum] page_size
304
+ # Optional. The maximum number of results to be returned in a single page. If
305
+ # set to 0, the server decides the number of results to return. If the number is
306
+ # greater than 25000, it is capped at 25000.
307
+ # @param [String] page_token
308
+ # Optional. Pagination token, returned earlier via ListSecretsResponse.
309
+ # next_page_token.
310
+ # @param [String] fields
311
+ # Selector specifying which fields to include in a partial response.
312
+ # @param [String] quota_user
313
+ # Available to use for quota purposes for server-side applications. Can be any
314
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
315
+ # @param [Google::Apis::RequestOptions] options
316
+ # Request-specific options
317
+ #
318
+ # @yield [result, err] Result & error if block supplied
319
+ # @yieldparam result [Google::Apis::SecretmanagerV1beta1::ListSecretsResponse] parsed result object
320
+ # @yieldparam err [StandardError] error object if request failed
321
+ #
322
+ # @return [Google::Apis::SecretmanagerV1beta1::ListSecretsResponse]
323
+ #
324
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
325
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
326
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
327
+ def list_project_secrets(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
328
+ command = make_simple_command(:get, 'v1beta1/{+parent}/secrets', options)
329
+ command.response_representation = Google::Apis::SecretmanagerV1beta1::ListSecretsResponse::Representation
330
+ command.response_class = Google::Apis::SecretmanagerV1beta1::ListSecretsResponse
331
+ command.params['parent'] = parent unless parent.nil?
332
+ command.query['pageSize'] = page_size unless page_size.nil?
333
+ command.query['pageToken'] = page_token unless page_token.nil?
334
+ command.query['fields'] = fields unless fields.nil?
335
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
336
+ execute_or_queue_command(command, &block)
337
+ end
338
+
339
+ # Updates metadata of an existing Secret.
340
+ # @param [String] name
341
+ # Output only. The resource name of the Secret in the format `projects/*/secrets/
342
+ # *`.
343
+ # @param [Google::Apis::SecretmanagerV1beta1::Secret] secret_object
344
+ # @param [String] update_mask
345
+ # Required. Specifies the fields to be updated.
346
+ # @param [String] fields
347
+ # Selector specifying which fields to include in a partial response.
348
+ # @param [String] quota_user
349
+ # Available to use for quota purposes for server-side applications. Can be any
350
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
351
+ # @param [Google::Apis::RequestOptions] options
352
+ # Request-specific options
353
+ #
354
+ # @yield [result, err] Result & error if block supplied
355
+ # @yieldparam result [Google::Apis::SecretmanagerV1beta1::Secret] parsed result object
356
+ # @yieldparam err [StandardError] error object if request failed
357
+ #
358
+ # @return [Google::Apis::SecretmanagerV1beta1::Secret]
359
+ #
360
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
361
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
362
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
363
+ def patch_project_secret(name, secret_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
364
+ command = make_simple_command(:patch, 'v1beta1/{+name}', options)
365
+ command.request_representation = Google::Apis::SecretmanagerV1beta1::Secret::Representation
366
+ command.request_object = secret_object
367
+ command.response_representation = Google::Apis::SecretmanagerV1beta1::Secret::Representation
368
+ command.response_class = Google::Apis::SecretmanagerV1beta1::Secret
369
+ command.params['name'] = name unless name.nil?
370
+ command.query['updateMask'] = update_mask unless update_mask.nil?
371
+ command.query['fields'] = fields unless fields.nil?
372
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
373
+ execute_or_queue_command(command, &block)
374
+ end
375
+
376
+ # Sets the access control policy on the specified secret. Replaces any existing
377
+ # policy. Permissions on SecretVersions are enforced according to the policy set
378
+ # on the associated Secret.
379
+ # @param [String] resource
380
+ # REQUIRED: The resource for which the policy is being specified. See the
381
+ # operation documentation for the appropriate value for this field.
382
+ # @param [Google::Apis::SecretmanagerV1beta1::SetIamPolicyRequest] set_iam_policy_request_object
383
+ # @param [String] fields
384
+ # Selector specifying which fields to include in a partial response.
385
+ # @param [String] quota_user
386
+ # Available to use for quota purposes for server-side applications. Can be any
387
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
388
+ # @param [Google::Apis::RequestOptions] options
389
+ # Request-specific options
390
+ #
391
+ # @yield [result, err] Result & error if block supplied
392
+ # @yieldparam result [Google::Apis::SecretmanagerV1beta1::Policy] parsed result object
393
+ # @yieldparam err [StandardError] error object if request failed
394
+ #
395
+ # @return [Google::Apis::SecretmanagerV1beta1::Policy]
396
+ #
397
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
398
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
399
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
400
+ def set_secret_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
401
+ command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options)
402
+ command.request_representation = Google::Apis::SecretmanagerV1beta1::SetIamPolicyRequest::Representation
403
+ command.request_object = set_iam_policy_request_object
404
+ command.response_representation = Google::Apis::SecretmanagerV1beta1::Policy::Representation
405
+ command.response_class = Google::Apis::SecretmanagerV1beta1::Policy
406
+ command.params['resource'] = resource unless resource.nil?
407
+ command.query['fields'] = fields unless fields.nil?
408
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
409
+ execute_or_queue_command(command, &block)
410
+ end
411
+
412
+ # Returns permissions that a caller has for the specified secret. If the secret
413
+ # does not exist, this call returns an empty set of permissions, not a NOT_FOUND
414
+ # error. Note: This operation is designed to be used for building permission-
415
+ # aware UIs and command-line tools, not for authorization checking. This
416
+ # operation may "fail open" without warning.
417
+ # @param [String] resource
418
+ # REQUIRED: The resource for which the policy detail is being requested. See the
419
+ # operation documentation for the appropriate value for this field.
420
+ # @param [Google::Apis::SecretmanagerV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object
421
+ # @param [String] fields
422
+ # Selector specifying which fields to include in a partial response.
423
+ # @param [String] quota_user
424
+ # Available to use for quota purposes for server-side applications. Can be any
425
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
426
+ # @param [Google::Apis::RequestOptions] options
427
+ # Request-specific options
428
+ #
429
+ # @yield [result, err] Result & error if block supplied
430
+ # @yieldparam result [Google::Apis::SecretmanagerV1beta1::TestIamPermissionsResponse] parsed result object
431
+ # @yieldparam err [StandardError] error object if request failed
432
+ #
433
+ # @return [Google::Apis::SecretmanagerV1beta1::TestIamPermissionsResponse]
434
+ #
435
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
436
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
437
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
438
+ def test_secret_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
439
+ command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
440
+ command.request_representation = Google::Apis::SecretmanagerV1beta1::TestIamPermissionsRequest::Representation
441
+ command.request_object = test_iam_permissions_request_object
442
+ command.response_representation = Google::Apis::SecretmanagerV1beta1::TestIamPermissionsResponse::Representation
443
+ command.response_class = Google::Apis::SecretmanagerV1beta1::TestIamPermissionsResponse
444
+ command.params['resource'] = resource unless resource.nil?
445
+ command.query['fields'] = fields unless fields.nil?
446
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
447
+ execute_or_queue_command(command, &block)
448
+ end
449
+
450
+ # Accesses a SecretVersion. This call returns the secret data. `projects/*/
451
+ # secrets/*/versions/latest` is an alias to the `latest` SecretVersion.
452
+ # @param [String] name
453
+ # Required. The resource name of the SecretVersion in the format `projects/*/
454
+ # secrets/*/versions/*`.
455
+ # @param [String] fields
456
+ # Selector specifying which fields to include in a partial response.
457
+ # @param [String] quota_user
458
+ # Available to use for quota purposes for server-side applications. Can be any
459
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
460
+ # @param [Google::Apis::RequestOptions] options
461
+ # Request-specific options
462
+ #
463
+ # @yield [result, err] Result & error if block supplied
464
+ # @yieldparam result [Google::Apis::SecretmanagerV1beta1::AccessSecretVersionResponse] parsed result object
465
+ # @yieldparam err [StandardError] error object if request failed
466
+ #
467
+ # @return [Google::Apis::SecretmanagerV1beta1::AccessSecretVersionResponse]
468
+ #
469
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
470
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
471
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
472
+ def access_project_secret_version(name, fields: nil, quota_user: nil, options: nil, &block)
473
+ command = make_simple_command(:get, 'v1beta1/{+name}:access', options)
474
+ command.response_representation = Google::Apis::SecretmanagerV1beta1::AccessSecretVersionResponse::Representation
475
+ command.response_class = Google::Apis::SecretmanagerV1beta1::AccessSecretVersionResponse
476
+ command.params['name'] = name unless name.nil?
477
+ command.query['fields'] = fields unless fields.nil?
478
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
479
+ execute_or_queue_command(command, &block)
480
+ end
481
+
482
+ # Destroys a SecretVersion. Sets the state of the SecretVersion to DESTROYED and
483
+ # irrevocably destroys the secret data.
484
+ # @param [String] name
485
+ # Required. The resource name of the SecretVersion to destroy in the format `
486
+ # projects/*/secrets/*/versions/*`.
487
+ # @param [Google::Apis::SecretmanagerV1beta1::DestroySecretVersionRequest] destroy_secret_version_request_object
488
+ # @param [String] fields
489
+ # Selector specifying which fields to include in a partial response.
490
+ # @param [String] quota_user
491
+ # Available to use for quota purposes for server-side applications. Can be any
492
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
493
+ # @param [Google::Apis::RequestOptions] options
494
+ # Request-specific options
495
+ #
496
+ # @yield [result, err] Result & error if block supplied
497
+ # @yieldparam result [Google::Apis::SecretmanagerV1beta1::SecretVersion] parsed result object
498
+ # @yieldparam err [StandardError] error object if request failed
499
+ #
500
+ # @return [Google::Apis::SecretmanagerV1beta1::SecretVersion]
501
+ #
502
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
503
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
504
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
505
+ def destroy_secret_version(name, destroy_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
506
+ command = make_simple_command(:post, 'v1beta1/{+name}:destroy', options)
507
+ command.request_representation = Google::Apis::SecretmanagerV1beta1::DestroySecretVersionRequest::Representation
508
+ command.request_object = destroy_secret_version_request_object
509
+ command.response_representation = Google::Apis::SecretmanagerV1beta1::SecretVersion::Representation
510
+ command.response_class = Google::Apis::SecretmanagerV1beta1::SecretVersion
511
+ command.params['name'] = name unless name.nil?
512
+ command.query['fields'] = fields unless fields.nil?
513
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
514
+ execute_or_queue_command(command, &block)
515
+ end
516
+
517
+ # Disables a SecretVersion. Sets the state of the SecretVersion to DISABLED.
518
+ # @param [String] name
519
+ # Required. The resource name of the SecretVersion to disable in the format `
520
+ # projects/*/secrets/*/versions/*`.
521
+ # @param [Google::Apis::SecretmanagerV1beta1::DisableSecretVersionRequest] disable_secret_version_request_object
522
+ # @param [String] fields
523
+ # Selector specifying which fields to include in a partial response.
524
+ # @param [String] quota_user
525
+ # Available to use for quota purposes for server-side applications. Can be any
526
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
527
+ # @param [Google::Apis::RequestOptions] options
528
+ # Request-specific options
529
+ #
530
+ # @yield [result, err] Result & error if block supplied
531
+ # @yieldparam result [Google::Apis::SecretmanagerV1beta1::SecretVersion] parsed result object
532
+ # @yieldparam err [StandardError] error object if request failed
533
+ #
534
+ # @return [Google::Apis::SecretmanagerV1beta1::SecretVersion]
535
+ #
536
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
537
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
538
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
539
+ def disable_secret_version(name, disable_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
540
+ command = make_simple_command(:post, 'v1beta1/{+name}:disable', options)
541
+ command.request_representation = Google::Apis::SecretmanagerV1beta1::DisableSecretVersionRequest::Representation
542
+ command.request_object = disable_secret_version_request_object
543
+ command.response_representation = Google::Apis::SecretmanagerV1beta1::SecretVersion::Representation
544
+ command.response_class = Google::Apis::SecretmanagerV1beta1::SecretVersion
545
+ command.params['name'] = name unless name.nil?
546
+ command.query['fields'] = fields unless fields.nil?
547
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
548
+ execute_or_queue_command(command, &block)
549
+ end
550
+
551
+ # Enables a SecretVersion. Sets the state of the SecretVersion to ENABLED.
552
+ # @param [String] name
553
+ # Required. The resource name of the SecretVersion to enable in the format `
554
+ # projects/*/secrets/*/versions/*`.
555
+ # @param [Google::Apis::SecretmanagerV1beta1::EnableSecretVersionRequest] enable_secret_version_request_object
556
+ # @param [String] fields
557
+ # Selector specifying which fields to include in a partial response.
558
+ # @param [String] quota_user
559
+ # Available to use for quota purposes for server-side applications. Can be any
560
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
561
+ # @param [Google::Apis::RequestOptions] options
562
+ # Request-specific options
563
+ #
564
+ # @yield [result, err] Result & error if block supplied
565
+ # @yieldparam result [Google::Apis::SecretmanagerV1beta1::SecretVersion] parsed result object
566
+ # @yieldparam err [StandardError] error object if request failed
567
+ #
568
+ # @return [Google::Apis::SecretmanagerV1beta1::SecretVersion]
569
+ #
570
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
571
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
572
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
573
+ def enable_secret_version(name, enable_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
574
+ command = make_simple_command(:post, 'v1beta1/{+name}:enable', options)
575
+ command.request_representation = Google::Apis::SecretmanagerV1beta1::EnableSecretVersionRequest::Representation
576
+ command.request_object = enable_secret_version_request_object
577
+ command.response_representation = Google::Apis::SecretmanagerV1beta1::SecretVersion::Representation
578
+ command.response_class = Google::Apis::SecretmanagerV1beta1::SecretVersion
579
+ command.params['name'] = name unless name.nil?
580
+ command.query['fields'] = fields unless fields.nil?
581
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
582
+ execute_or_queue_command(command, &block)
583
+ end
584
+
585
+ # Gets metadata for a SecretVersion. `projects/*/secrets/*/versions/latest` is
586
+ # an alias to the `latest` SecretVersion.
587
+ # @param [String] name
588
+ # Required. The resource name of the SecretVersion in the format `projects/*/
589
+ # secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` is an alias to
590
+ # the `latest` SecretVersion.
591
+ # @param [String] fields
592
+ # Selector specifying which fields to include in a partial response.
593
+ # @param [String] quota_user
594
+ # Available to use for quota purposes for server-side applications. Can be any
595
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
596
+ # @param [Google::Apis::RequestOptions] options
597
+ # Request-specific options
598
+ #
599
+ # @yield [result, err] Result & error if block supplied
600
+ # @yieldparam result [Google::Apis::SecretmanagerV1beta1::SecretVersion] parsed result object
601
+ # @yieldparam err [StandardError] error object if request failed
602
+ #
603
+ # @return [Google::Apis::SecretmanagerV1beta1::SecretVersion]
604
+ #
605
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
606
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
607
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
608
+ def get_project_secret_version(name, fields: nil, quota_user: nil, options: nil, &block)
609
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
610
+ command.response_representation = Google::Apis::SecretmanagerV1beta1::SecretVersion::Representation
611
+ command.response_class = Google::Apis::SecretmanagerV1beta1::SecretVersion
612
+ command.params['name'] = name unless name.nil?
613
+ command.query['fields'] = fields unless fields.nil?
614
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
615
+ execute_or_queue_command(command, &block)
616
+ end
617
+
618
+ # Lists SecretVersions. This call does not return secret data.
619
+ # @param [String] parent
620
+ # Required. The resource name of the Secret associated with the SecretVersions
621
+ # to list, in the format `projects/*/secrets/*`.
622
+ # @param [Fixnum] page_size
623
+ # Optional. The maximum number of results to be returned in a single page. If
624
+ # set to 0, the server decides the number of results to return. If the number is
625
+ # greater than 25000, it is capped at 25000.
626
+ # @param [String] page_token
627
+ # Optional. Pagination token, returned earlier via ListSecretVersionsResponse.
628
+ # next_page_token][].
629
+ # @param [String] fields
630
+ # Selector specifying which fields to include in a partial response.
631
+ # @param [String] quota_user
632
+ # Available to use for quota purposes for server-side applications. Can be any
633
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
634
+ # @param [Google::Apis::RequestOptions] options
635
+ # Request-specific options
636
+ #
637
+ # @yield [result, err] Result & error if block supplied
638
+ # @yieldparam result [Google::Apis::SecretmanagerV1beta1::ListSecretVersionsResponse] parsed result object
639
+ # @yieldparam err [StandardError] error object if request failed
640
+ #
641
+ # @return [Google::Apis::SecretmanagerV1beta1::ListSecretVersionsResponse]
642
+ #
643
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
644
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
645
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
646
+ def list_project_secret_versions(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
647
+ command = make_simple_command(:get, 'v1beta1/{+parent}/versions', options)
648
+ command.response_representation = Google::Apis::SecretmanagerV1beta1::ListSecretVersionsResponse::Representation
649
+ command.response_class = Google::Apis::SecretmanagerV1beta1::ListSecretVersionsResponse
650
+ command.params['parent'] = parent unless parent.nil?
651
+ command.query['pageSize'] = page_size unless page_size.nil?
652
+ command.query['pageToken'] = page_token unless page_token.nil?
653
+ command.query['fields'] = fields unless fields.nil?
654
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
655
+ execute_or_queue_command(command, &block)
656
+ end
657
+
658
+ protected
659
+
660
+ def apply_command_defaults(command)
661
+ command.query['key'] = key unless key.nil?
662
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
663
+ end
664
+ end
665
+ end
666
+ end
667
+ end