google-cloud-secret_manager-v1beta1 0.2.3 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +30 -27
- data/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/client.rb +152 -99
- data/lib/google/cloud/secret_manager/v1beta1/version.rb +1 -1
- data/proto_docs/google/api/resource.rb +72 -72
- data/proto_docs/google/cloud/secrets/v1beta1/resources.rb +26 -26
- data/proto_docs/google/cloud/secrets/v1beta1/service.rb +40 -40
- data/proto_docs/google/iam/v1/iam_policy.rb +3 -3
- data/proto_docs/google/iam/v1/policy.rb +10 -10
- data/proto_docs/google/protobuf/empty.rb +3 -3
- data/proto_docs/google/protobuf/field_mask.rb +40 -40
- data/proto_docs/google/protobuf/timestamp.rb +3 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 217146c9e3a1e20f43eff3784d5b87bb16559743ed0c7d2f57aa734e5e3eebb4
|
4
|
+
data.tar.gz: cf8e88704cc1a08cc97456a177db4698000d2b3355390710acf279db9a85e261
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cec41d1c59723385e113d295ac379015c215add1ed528d3f79eeb7c52c037adf10cc764915f0e116ec13da8aa231576d045e3adb3be8ac56be40aac1b38c2cc
|
7
|
+
data.tar.gz: f2c86d3d592bab913504c5cda80cb32193a46e08b2250c7b39472bfb7c97dd2ef93630c2f5eb99b03dd77500b24c3dfcc1176efb5a9b621f1a326cf66bfd1c5d
|
data/AUTHENTICATION.md
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
# Authentication
|
2
2
|
|
3
|
-
In general, the google-cloud-secret_manager-v1beta1 library uses
|
4
|
-
Account](https://cloud.google.com/iam/docs/creating-managing-service-accounts)
|
5
|
-
credentials to connect to Google Cloud services. When running within
|
6
|
-
Cloud Platform environments](#google-cloud-platform-environments)
|
7
|
-
|
3
|
+
In general, the google-cloud-secret_manager-v1beta1 library uses
|
4
|
+
[Service Account](https://cloud.google.com/iam/docs/creating-managing-service-accounts)
|
5
|
+
credentials to connect to Google Cloud services. When running within
|
6
|
+
[Google Cloud Platform environments](#google-cloud-platform-environments) the
|
7
|
+
credentials will be discovered automatically. When running on other
|
8
8
|
environments, the Service Account credentials can be specified by providing the
|
9
|
-
path to the
|
10
|
-
keyfile](https://cloud.google.com/iam/docs/managing-service-account-keys)
|
11
|
-
the account (or the JSON itself) in
|
12
|
-
variables](#environment-variables). Additionally, Cloud SDK
|
13
|
-
be discovered automatically, but this is only recommended
|
9
|
+
path to the
|
10
|
+
[JSON keyfile](https://cloud.google.com/iam/docs/managing-service-account-keys)
|
11
|
+
for the account (or the JSON itself) in
|
12
|
+
[environment variables](#environment-variables). Additionally, Cloud SDK
|
13
|
+
credentials can also be discovered automatically, but this is only recommended
|
14
|
+
during development.
|
14
15
|
|
15
16
|
## Quickstart
|
16
17
|
|
@@ -46,23 +47,24 @@ without **Service Account Credentials** directly in code.
|
|
46
47
|
|
47
48
|
### Google Cloud Platform environments
|
48
49
|
|
49
|
-
When running on Google Cloud Platform (GCP), including Google Compute Engine
|
50
|
-
Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud
|
51
|
-
(GCF) and Cloud Run, **Credentials**
|
52
|
-
|
50
|
+
When running on Google Cloud Platform (GCP), including Google Compute Engine
|
51
|
+
(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud
|
52
|
+
Functions (GCF) and Cloud Run, **Credentials** are discovered automatically.
|
53
|
+
Code should be written as if already authenticated.
|
53
54
|
|
54
55
|
### Environment Variables
|
55
56
|
|
56
|
-
The **Credentials JSON** can be placed in environment
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
encouraged.
|
57
|
+
The **Credentials JSON** can be placed in environment variables instead of
|
58
|
+
declaring them directly in code. Each service has its own environment variable,
|
59
|
+
allowing for different service accounts to be used for different services. (See
|
60
|
+
the READMEs for the individual service gems for details.) The path to the
|
61
|
+
**Credentials JSON** file can be stored in the environment variable, or the
|
62
|
+
**Credentials JSON** itself can be stored for environments such as Docker
|
63
|
+
containers where writing files is difficult or not encouraged.
|
64
64
|
|
65
|
-
The environment variables that google-cloud-secret_manager-v1beta1
|
65
|
+
The environment variables that google-cloud-secret_manager-v1beta1
|
66
|
+
checks for credentials are configured on the service Credentials class (such as
|
67
|
+
{Google::Cloud::SecretManager::V1beta1::SecretManagerService::Credentials}):
|
66
68
|
|
67
69
|
1. `SECRET_MANAGER_CREDENTIALS` - Path to JSON file, or JSON contents
|
68
70
|
2. `SECRET_MANAGER_KEYFILE` - Path to JSON file, or JSON contents
|
@@ -80,7 +82,8 @@ client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new
|
|
80
82
|
|
81
83
|
### Configuration
|
82
84
|
|
83
|
-
The **Credentials JSON** can be configured instead of placing them in
|
85
|
+
The **Credentials JSON** can be configured instead of placing them in
|
86
|
+
environment variables. Either on an individual client initialization:
|
84
87
|
|
85
88
|
```ruby
|
86
89
|
require "google/cloud/secret_manager/v1beta1"
|
@@ -137,15 +140,15 @@ environments](#google-cloud-platform-environments), you need a Google
|
|
137
140
|
Developers service account.
|
138
141
|
|
139
142
|
1. Visit the [Google Developers Console][dev-console].
|
140
|
-
|
141
|
-
|
143
|
+
2. Create a new project or click on an existing project.
|
144
|
+
3. Activate the slide-out navigation tray and select **API Manager**. From
|
142
145
|
here, you will enable the APIs that your application requires.
|
143
146
|
|
144
147
|
![Enable the APIs that your application requires][enable-apis]
|
145
148
|
|
146
149
|
*Note: You may need to enable billing in order to use these services.*
|
147
150
|
|
148
|
-
|
151
|
+
4. Select **Credentials** from the side navigation.
|
149
152
|
|
150
153
|
You should see a screen like one of the following.
|
151
154
|
|
@@ -67,7 +67,45 @@ module Google
|
|
67
67
|
break parent_const.configure if parent_const&.respond_to? :configure
|
68
68
|
namespace.pop
|
69
69
|
end
|
70
|
-
Client::Configuration.new parent_config
|
70
|
+
default_config = Client::Configuration.new parent_config
|
71
|
+
|
72
|
+
default_config.rpcs.list_secrets.timeout = 60.0
|
73
|
+
|
74
|
+
default_config.rpcs.create_secret.timeout = 60.0
|
75
|
+
|
76
|
+
default_config.rpcs.add_secret_version.timeout = 60.0
|
77
|
+
|
78
|
+
default_config.rpcs.get_secret.timeout = 60.0
|
79
|
+
|
80
|
+
default_config.rpcs.update_secret.timeout = 60.0
|
81
|
+
|
82
|
+
default_config.rpcs.delete_secret.timeout = 60.0
|
83
|
+
|
84
|
+
default_config.rpcs.list_secret_versions.timeout = 60.0
|
85
|
+
|
86
|
+
default_config.rpcs.get_secret_version.timeout = 60.0
|
87
|
+
|
88
|
+
default_config.rpcs.access_secret_version.timeout = 60.0
|
89
|
+
default_config.rpcs.access_secret_version.retry_policy = {
|
90
|
+
initial_delay: 1.0,
|
91
|
+
max_delay: 60.0,
|
92
|
+
multiplier: 1.3,
|
93
|
+
retry_codes: ["UNAVAILABLE", "UNKNOWN"]
|
94
|
+
}
|
95
|
+
|
96
|
+
default_config.rpcs.disable_secret_version.timeout = 60.0
|
97
|
+
|
98
|
+
default_config.rpcs.enable_secret_version.timeout = 60.0
|
99
|
+
|
100
|
+
default_config.rpcs.destroy_secret_version.timeout = 60.0
|
101
|
+
|
102
|
+
default_config.rpcs.set_iam_policy.timeout = 60.0
|
103
|
+
|
104
|
+
default_config.rpcs.get_iam_policy.timeout = 60.0
|
105
|
+
|
106
|
+
default_config.rpcs.test_iam_permissions.timeout = 60.0
|
107
|
+
|
108
|
+
default_config
|
71
109
|
end
|
72
110
|
yield @configure if block_given?
|
73
111
|
@configure
|
@@ -132,7 +170,7 @@ module Google
|
|
132
170
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
133
171
|
credentials = Credentials.new credentials, scope: @config.scope
|
134
172
|
end
|
135
|
-
|
173
|
+
@quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
|
136
174
|
|
137
175
|
@secret_manager_service_stub = Gapic::ServiceStub.new(
|
138
176
|
Google::Cloud::SecretManager::V1beta1::SecretManagerService::Stub,
|
@@ -146,25 +184,25 @@ module Google
|
|
146
184
|
# Service calls
|
147
185
|
|
148
186
|
##
|
149
|
-
# Lists
|
187
|
+
# Lists {Google::Cloud::SecretManager::V1beta1::Secret Secrets}.
|
150
188
|
#
|
151
189
|
# @overload list_secrets(request, options = nil)
|
152
190
|
# @param request [Google::Cloud::SecretManager::V1beta1::ListSecretsRequest | Hash]
|
153
|
-
# Lists
|
191
|
+
# Lists {Google::Cloud::SecretManager::V1beta1::Secret Secrets}.
|
154
192
|
# @param options [Gapic::CallOptions, Hash]
|
155
193
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
156
194
|
#
|
157
195
|
# @overload list_secrets(parent: nil, page_size: nil, page_token: nil)
|
158
196
|
# @param parent [String]
|
159
197
|
# Required. The resource name of the project associated with the
|
160
|
-
#
|
198
|
+
# {Google::Cloud::SecretManager::V1beta1::Secret Secrets}, in the format `projects/*`.
|
161
199
|
# @param page_size [Integer]
|
162
200
|
# Optional. The maximum number of results to be returned in a single page. If
|
163
201
|
# set to 0, the server decides the number of results to return. If the
|
164
202
|
# number is greater than 25000, it is capped at 25000.
|
165
203
|
# @param page_token [String]
|
166
204
|
# Optional. Pagination token, returned earlier via
|
167
|
-
#
|
205
|
+
# {Google::Cloud::SecretManager::V1beta1::ListSecretsResponse#next_page_token ListSecretsResponse.next_page_token}.
|
168
206
|
#
|
169
207
|
#
|
170
208
|
# @yield [response, operation] Access the result along with the RPC operation
|
@@ -181,15 +219,16 @@ module Google
|
|
181
219
|
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::ListSecretsRequest
|
182
220
|
|
183
221
|
# Converts hash and nil to an options object
|
184
|
-
options = Gapic::CallOptions.new
|
222
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
185
223
|
|
186
224
|
# Customize the options with defaults
|
187
225
|
metadata = @config.rpcs.list_secrets.metadata.to_h
|
188
226
|
|
189
|
-
# Set x-goog-api-client
|
227
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
190
228
|
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
191
229
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
192
230
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
231
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
193
232
|
|
194
233
|
header_params = {
|
195
234
|
"parent" => request.parent
|
@@ -213,22 +252,22 @@ module Google
|
|
213
252
|
end
|
214
253
|
|
215
254
|
##
|
216
|
-
# Creates a new
|
255
|
+
# Creates a new {Google::Cloud::SecretManager::V1beta1::Secret Secret} containing no {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}.
|
217
256
|
#
|
218
257
|
# @overload create_secret(request, options = nil)
|
219
258
|
# @param request [Google::Cloud::SecretManager::V1beta1::CreateSecretRequest | Hash]
|
220
|
-
# Creates a new
|
259
|
+
# Creates a new {Google::Cloud::SecretManager::V1beta1::Secret Secret} containing no {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}.
|
221
260
|
# @param options [Gapic::CallOptions, Hash]
|
222
261
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
223
262
|
#
|
224
263
|
# @overload create_secret(parent: nil, secret_id: nil, secret: nil)
|
225
264
|
# @param parent [String]
|
226
265
|
# Required. The resource name of the project to associate with the
|
227
|
-
#
|
266
|
+
# {Google::Cloud::SecretManager::V1beta1::Secret Secret}, in the format `projects/*`.
|
228
267
|
# @param secret_id [String]
|
229
268
|
# Required. This must be unique within the project.
|
230
269
|
# @param secret [Google::Cloud::SecretManager::V1beta1::Secret | Hash]
|
231
|
-
# A
|
270
|
+
# A {Google::Cloud::SecretManager::V1beta1::Secret Secret} with initial field values.
|
232
271
|
#
|
233
272
|
#
|
234
273
|
# @yield [response, operation] Access the result along with the RPC operation
|
@@ -245,15 +284,16 @@ module Google
|
|
245
284
|
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::CreateSecretRequest
|
246
285
|
|
247
286
|
# Converts hash and nil to an options object
|
248
|
-
options = Gapic::CallOptions.new
|
287
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
249
288
|
|
250
289
|
# Customize the options with defaults
|
251
290
|
metadata = @config.rpcs.create_secret.metadata.to_h
|
252
291
|
|
253
|
-
# Set x-goog-api-client
|
292
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
254
293
|
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
255
294
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
256
295
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
296
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
257
297
|
|
258
298
|
header_params = {
|
259
299
|
"parent" => request.parent
|
@@ -276,22 +316,22 @@ module Google
|
|
276
316
|
end
|
277
317
|
|
278
318
|
##
|
279
|
-
# Creates a new
|
280
|
-
# it to an existing
|
319
|
+
# Creates a new {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} containing secret data and attaches
|
320
|
+
# it to an existing {Google::Cloud::SecretManager::V1beta1::Secret Secret}.
|
281
321
|
#
|
282
322
|
# @overload add_secret_version(request, options = nil)
|
283
323
|
# @param request [Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest | Hash]
|
284
|
-
# Creates a new
|
285
|
-
# it to an existing
|
324
|
+
# Creates a new {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} containing secret data and attaches
|
325
|
+
# it to an existing {Google::Cloud::SecretManager::V1beta1::Secret Secret}.
|
286
326
|
# @param options [Gapic::CallOptions, Hash]
|
287
327
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
288
328
|
#
|
289
329
|
# @overload add_secret_version(parent: nil, payload: nil)
|
290
330
|
# @param parent [String]
|
291
|
-
# Required. The resource name of the
|
292
|
-
#
|
331
|
+
# Required. The resource name of the {Google::Cloud::SecretManager::V1beta1::Secret Secret} to associate with the
|
332
|
+
# {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format `projects/*/secrets/*`.
|
293
333
|
# @param payload [Google::Cloud::SecretManager::V1beta1::SecretPayload | Hash]
|
294
|
-
# Required. The secret payload of the
|
334
|
+
# Required. The secret payload of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
|
295
335
|
#
|
296
336
|
#
|
297
337
|
# @yield [response, operation] Access the result along with the RPC operation
|
@@ -308,15 +348,16 @@ module Google
|
|
308
348
|
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest
|
309
349
|
|
310
350
|
# Converts hash and nil to an options object
|
311
|
-
options = Gapic::CallOptions.new
|
351
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
312
352
|
|
313
353
|
# Customize the options with defaults
|
314
354
|
metadata = @config.rpcs.add_secret_version.metadata.to_h
|
315
355
|
|
316
|
-
# Set x-goog-api-client
|
356
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
317
357
|
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
318
358
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
319
359
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
360
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
320
361
|
|
321
362
|
header_params = {
|
322
363
|
"parent" => request.parent
|
@@ -339,17 +380,17 @@ module Google
|
|
339
380
|
end
|
340
381
|
|
341
382
|
##
|
342
|
-
# Gets metadata for a given
|
383
|
+
# Gets metadata for a given {Google::Cloud::SecretManager::V1beta1::Secret Secret}.
|
343
384
|
#
|
344
385
|
# @overload get_secret(request, options = nil)
|
345
386
|
# @param request [Google::Cloud::SecretManager::V1beta1::GetSecretRequest | Hash]
|
346
|
-
# Gets metadata for a given
|
387
|
+
# Gets metadata for a given {Google::Cloud::SecretManager::V1beta1::Secret Secret}.
|
347
388
|
# @param options [Gapic::CallOptions, Hash]
|
348
389
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
349
390
|
#
|
350
391
|
# @overload get_secret(name: nil)
|
351
392
|
# @param name [String]
|
352
|
-
# Required. The resource name of the
|
393
|
+
# Required. The resource name of the {Google::Cloud::SecretManager::V1beta1::Secret Secret}, in the format `projects/*/secrets/*`.
|
353
394
|
#
|
354
395
|
#
|
355
396
|
# @yield [response, operation] Access the result along with the RPC operation
|
@@ -366,15 +407,16 @@ module Google
|
|
366
407
|
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::GetSecretRequest
|
367
408
|
|
368
409
|
# Converts hash and nil to an options object
|
369
|
-
options = Gapic::CallOptions.new
|
410
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
370
411
|
|
371
412
|
# Customize the options with defaults
|
372
413
|
metadata = @config.rpcs.get_secret.metadata.to_h
|
373
414
|
|
374
|
-
# Set x-goog-api-client
|
415
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
375
416
|
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
376
417
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
377
418
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
419
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
378
420
|
|
379
421
|
header_params = {
|
380
422
|
"name" => request.name
|
@@ -397,17 +439,17 @@ module Google
|
|
397
439
|
end
|
398
440
|
|
399
441
|
##
|
400
|
-
# Updates metadata of an existing
|
442
|
+
# Updates metadata of an existing {Google::Cloud::SecretManager::V1beta1::Secret Secret}.
|
401
443
|
#
|
402
444
|
# @overload update_secret(request, options = nil)
|
403
445
|
# @param request [Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest | Hash]
|
404
|
-
# Updates metadata of an existing
|
446
|
+
# Updates metadata of an existing {Google::Cloud::SecretManager::V1beta1::Secret Secret}.
|
405
447
|
# @param options [Gapic::CallOptions, Hash]
|
406
448
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
407
449
|
#
|
408
450
|
# @overload update_secret(secret: nil, update_mask: nil)
|
409
451
|
# @param secret [Google::Cloud::SecretManager::V1beta1::Secret | Hash]
|
410
|
-
# Required.
|
452
|
+
# Required. {Google::Cloud::SecretManager::V1beta1::Secret Secret} with updated field values.
|
411
453
|
# @param update_mask [Google::Protobuf::FieldMask | Hash]
|
412
454
|
# Required. Specifies the fields to be updated.
|
413
455
|
#
|
@@ -426,15 +468,16 @@ module Google
|
|
426
468
|
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest
|
427
469
|
|
428
470
|
# Converts hash and nil to an options object
|
429
|
-
options = Gapic::CallOptions.new
|
471
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
430
472
|
|
431
473
|
# Customize the options with defaults
|
432
474
|
metadata = @config.rpcs.update_secret.metadata.to_h
|
433
475
|
|
434
|
-
# Set x-goog-api-client
|
476
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
435
477
|
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
436
478
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
437
479
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
480
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
438
481
|
|
439
482
|
header_params = {
|
440
483
|
"secret.name" => request.secret.name
|
@@ -457,17 +500,17 @@ module Google
|
|
457
500
|
end
|
458
501
|
|
459
502
|
##
|
460
|
-
# Deletes a
|
503
|
+
# Deletes a {Google::Cloud::SecretManager::V1beta1::Secret Secret}.
|
461
504
|
#
|
462
505
|
# @overload delete_secret(request, options = nil)
|
463
506
|
# @param request [Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest | Hash]
|
464
|
-
# Deletes a
|
507
|
+
# Deletes a {Google::Cloud::SecretManager::V1beta1::Secret Secret}.
|
465
508
|
# @param options [Gapic::CallOptions, Hash]
|
466
509
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
467
510
|
#
|
468
511
|
# @overload delete_secret(name: nil)
|
469
512
|
# @param name [String]
|
470
|
-
# Required. The resource name of the
|
513
|
+
# Required. The resource name of the {Google::Cloud::SecretManager::V1beta1::Secret Secret} to delete in the format
|
471
514
|
# `projects/*/secrets/*`.
|
472
515
|
#
|
473
516
|
#
|
@@ -485,15 +528,16 @@ module Google
|
|
485
528
|
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest
|
486
529
|
|
487
530
|
# Converts hash and nil to an options object
|
488
|
-
options = Gapic::CallOptions.new
|
531
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
489
532
|
|
490
533
|
# Customize the options with defaults
|
491
534
|
metadata = @config.rpcs.delete_secret.metadata.to_h
|
492
535
|
|
493
|
-
# Set x-goog-api-client
|
536
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
494
537
|
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
495
538
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
496
539
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
540
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
497
541
|
|
498
542
|
header_params = {
|
499
543
|
"name" => request.name
|
@@ -516,20 +560,20 @@ module Google
|
|
516
560
|
end
|
517
561
|
|
518
562
|
##
|
519
|
-
# Lists
|
563
|
+
# Lists {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}. This call does not return secret
|
520
564
|
# data.
|
521
565
|
#
|
522
566
|
# @overload list_secret_versions(request, options = nil)
|
523
567
|
# @param request [Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest | Hash]
|
524
|
-
# Lists
|
568
|
+
# Lists {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}. This call does not return secret
|
525
569
|
# data.
|
526
570
|
# @param options [Gapic::CallOptions, Hash]
|
527
571
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
528
572
|
#
|
529
573
|
# @overload list_secret_versions(parent: nil, page_size: nil, page_token: nil)
|
530
574
|
# @param parent [String]
|
531
|
-
# Required. The resource name of the
|
532
|
-
#
|
575
|
+
# Required. The resource name of the {Google::Cloud::SecretManager::V1beta1::Secret Secret} associated with the
|
576
|
+
# {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} to list, in the format
|
533
577
|
# `projects/*/secrets/*`.
|
534
578
|
# @param page_size [Integer]
|
535
579
|
# Optional. The maximum number of results to be returned in a single page. If
|
@@ -554,15 +598,16 @@ module Google
|
|
554
598
|
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest
|
555
599
|
|
556
600
|
# Converts hash and nil to an options object
|
557
|
-
options = Gapic::CallOptions.new
|
601
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
558
602
|
|
559
603
|
# Customize the options with defaults
|
560
604
|
metadata = @config.rpcs.list_secret_versions.metadata.to_h
|
561
605
|
|
562
|
-
# Set x-goog-api-client
|
606
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
563
607
|
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
564
608
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
565
609
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
610
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
566
611
|
|
567
612
|
header_params = {
|
568
613
|
"parent" => request.parent
|
@@ -586,26 +631,26 @@ module Google
|
|
586
631
|
end
|
587
632
|
|
588
633
|
##
|
589
|
-
# Gets metadata for a
|
634
|
+
# Gets metadata for a {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
|
590
635
|
#
|
591
636
|
# `projects/*/secrets/*/versions/latest` is an alias to the `latest`
|
592
|
-
#
|
637
|
+
# {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
|
593
638
|
#
|
594
639
|
# @overload get_secret_version(request, options = nil)
|
595
640
|
# @param request [Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest | Hash]
|
596
|
-
# Gets metadata for a
|
641
|
+
# Gets metadata for a {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
|
597
642
|
#
|
598
643
|
# `projects/*/secrets/*/versions/latest` is an alias to the `latest`
|
599
|
-
#
|
644
|
+
# {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
|
600
645
|
# @param options [Gapic::CallOptions, Hash]
|
601
646
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
602
647
|
#
|
603
648
|
# @overload get_secret_version(name: nil)
|
604
649
|
# @param name [String]
|
605
|
-
# Required. The resource name of the
|
650
|
+
# Required. The resource name of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format
|
606
651
|
# `projects/*/secrets/*/versions/*`.
|
607
652
|
# `projects/*/secrets/*/versions/latest` is an alias to the `latest`
|
608
|
-
#
|
653
|
+
# {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
|
609
654
|
#
|
610
655
|
#
|
611
656
|
# @yield [response, operation] Access the result along with the RPC operation
|
@@ -622,15 +667,16 @@ module Google
|
|
622
667
|
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest
|
623
668
|
|
624
669
|
# Converts hash and nil to an options object
|
625
|
-
options = Gapic::CallOptions.new
|
670
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
626
671
|
|
627
672
|
# Customize the options with defaults
|
628
673
|
metadata = @config.rpcs.get_secret_version.metadata.to_h
|
629
674
|
|
630
|
-
# Set x-goog-api-client
|
675
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
631
676
|
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
632
677
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
633
678
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
679
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
634
680
|
|
635
681
|
header_params = {
|
636
682
|
"name" => request.name
|
@@ -653,23 +699,23 @@ module Google
|
|
653
699
|
end
|
654
700
|
|
655
701
|
##
|
656
|
-
# Accesses a
|
702
|
+
# Accesses a {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. This call returns the secret data.
|
657
703
|
#
|
658
704
|
# `projects/*/secrets/*/versions/latest` is an alias to the `latest`
|
659
|
-
#
|
705
|
+
# {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
|
660
706
|
#
|
661
707
|
# @overload access_secret_version(request, options = nil)
|
662
708
|
# @param request [Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest | Hash]
|
663
|
-
# Accesses a
|
709
|
+
# Accesses a {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. This call returns the secret data.
|
664
710
|
#
|
665
711
|
# `projects/*/secrets/*/versions/latest` is an alias to the `latest`
|
666
|
-
#
|
712
|
+
# {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
|
667
713
|
# @param options [Gapic::CallOptions, Hash]
|
668
714
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
669
715
|
#
|
670
716
|
# @overload access_secret_version(name: nil)
|
671
717
|
# @param name [String]
|
672
|
-
# Required. The resource name of the
|
718
|
+
# Required. The resource name of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format
|
673
719
|
# `projects/*/secrets/*/versions/*`.
|
674
720
|
#
|
675
721
|
#
|
@@ -687,15 +733,16 @@ module Google
|
|
687
733
|
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest
|
688
734
|
|
689
735
|
# Converts hash and nil to an options object
|
690
|
-
options = Gapic::CallOptions.new
|
736
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
691
737
|
|
692
738
|
# Customize the options with defaults
|
693
739
|
metadata = @config.rpcs.access_secret_version.metadata.to_h
|
694
740
|
|
695
|
-
# Set x-goog-api-client
|
741
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
696
742
|
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
697
743
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
698
744
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
745
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
699
746
|
|
700
747
|
header_params = {
|
701
748
|
"name" => request.name
|
@@ -718,23 +765,23 @@ module Google
|
|
718
765
|
end
|
719
766
|
|
720
767
|
##
|
721
|
-
# Disables a
|
768
|
+
# Disables a {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
|
722
769
|
#
|
723
|
-
# Sets the
|
724
|
-
#
|
770
|
+
# Sets the {Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to
|
771
|
+
# {Google::Cloud::SecretManager::V1beta1::SecretVersion::State::DISABLED DISABLED}.
|
725
772
|
#
|
726
773
|
# @overload disable_secret_version(request, options = nil)
|
727
774
|
# @param request [Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest | Hash]
|
728
|
-
# Disables a
|
775
|
+
# Disables a {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
|
729
776
|
#
|
730
|
-
# Sets the
|
731
|
-
#
|
777
|
+
# Sets the {Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to
|
778
|
+
# {Google::Cloud::SecretManager::V1beta1::SecretVersion::State::DISABLED DISABLED}.
|
732
779
|
# @param options [Gapic::CallOptions, Hash]
|
733
780
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
734
781
|
#
|
735
782
|
# @overload disable_secret_version(name: nil)
|
736
783
|
# @param name [String]
|
737
|
-
# Required. The resource name of the
|
784
|
+
# Required. The resource name of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to disable in the format
|
738
785
|
# `projects/*/secrets/*/versions/*`.
|
739
786
|
#
|
740
787
|
#
|
@@ -752,15 +799,16 @@ module Google
|
|
752
799
|
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest
|
753
800
|
|
754
801
|
# Converts hash and nil to an options object
|
755
|
-
options = Gapic::CallOptions.new
|
802
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
756
803
|
|
757
804
|
# Customize the options with defaults
|
758
805
|
metadata = @config.rpcs.disable_secret_version.metadata.to_h
|
759
806
|
|
760
|
-
# Set x-goog-api-client
|
807
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
761
808
|
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
762
809
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
763
810
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
811
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
764
812
|
|
765
813
|
header_params = {
|
766
814
|
"name" => request.name
|
@@ -783,23 +831,23 @@ module Google
|
|
783
831
|
end
|
784
832
|
|
785
833
|
##
|
786
|
-
# Enables a
|
834
|
+
# Enables a {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
|
787
835
|
#
|
788
|
-
# Sets the
|
789
|
-
#
|
836
|
+
# Sets the {Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to
|
837
|
+
# {Google::Cloud::SecretManager::V1beta1::SecretVersion::State::ENABLED ENABLED}.
|
790
838
|
#
|
791
839
|
# @overload enable_secret_version(request, options = nil)
|
792
840
|
# @param request [Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest | Hash]
|
793
|
-
# Enables a
|
841
|
+
# Enables a {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
|
794
842
|
#
|
795
|
-
# Sets the
|
796
|
-
#
|
843
|
+
# Sets the {Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to
|
844
|
+
# {Google::Cloud::SecretManager::V1beta1::SecretVersion::State::ENABLED ENABLED}.
|
797
845
|
# @param options [Gapic::CallOptions, Hash]
|
798
846
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
799
847
|
#
|
800
848
|
# @overload enable_secret_version(name: nil)
|
801
849
|
# @param name [String]
|
802
|
-
# Required. The resource name of the
|
850
|
+
# Required. The resource name of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to enable in the format
|
803
851
|
# `projects/*/secrets/*/versions/*`.
|
804
852
|
#
|
805
853
|
#
|
@@ -817,15 +865,16 @@ module Google
|
|
817
865
|
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest
|
818
866
|
|
819
867
|
# Converts hash and nil to an options object
|
820
|
-
options = Gapic::CallOptions.new
|
868
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
821
869
|
|
822
870
|
# Customize the options with defaults
|
823
871
|
metadata = @config.rpcs.enable_secret_version.metadata.to_h
|
824
872
|
|
825
|
-
# Set x-goog-api-client
|
873
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
826
874
|
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
827
875
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
828
876
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
877
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
829
878
|
|
830
879
|
header_params = {
|
831
880
|
"name" => request.name
|
@@ -848,25 +897,25 @@ module Google
|
|
848
897
|
end
|
849
898
|
|
850
899
|
##
|
851
|
-
# Destroys a
|
900
|
+
# Destroys a {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
|
852
901
|
#
|
853
|
-
# Sets the
|
854
|
-
#
|
902
|
+
# Sets the {Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to
|
903
|
+
# {Google::Cloud::SecretManager::V1beta1::SecretVersion::State::DESTROYED DESTROYED} and irrevocably destroys the
|
855
904
|
# secret data.
|
856
905
|
#
|
857
906
|
# @overload destroy_secret_version(request, options = nil)
|
858
907
|
# @param request [Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest | Hash]
|
859
|
-
# Destroys a
|
908
|
+
# Destroys a {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
|
860
909
|
#
|
861
|
-
# Sets the
|
862
|
-
#
|
910
|
+
# Sets the {Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to
|
911
|
+
# {Google::Cloud::SecretManager::V1beta1::SecretVersion::State::DESTROYED DESTROYED} and irrevocably destroys the
|
863
912
|
# secret data.
|
864
913
|
# @param options [Gapic::CallOptions, Hash]
|
865
914
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
866
915
|
#
|
867
916
|
# @overload destroy_secret_version(name: nil)
|
868
917
|
# @param name [String]
|
869
|
-
# Required. The resource name of the
|
918
|
+
# Required. The resource name of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to destroy in the format
|
870
919
|
# `projects/*/secrets/*/versions/*`.
|
871
920
|
#
|
872
921
|
#
|
@@ -884,15 +933,16 @@ module Google
|
|
884
933
|
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest
|
885
934
|
|
886
935
|
# Converts hash and nil to an options object
|
887
|
-
options = Gapic::CallOptions.new
|
936
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
888
937
|
|
889
938
|
# Customize the options with defaults
|
890
939
|
metadata = @config.rpcs.destroy_secret_version.metadata.to_h
|
891
940
|
|
892
|
-
# Set x-goog-api-client
|
941
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
893
942
|
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
894
943
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
895
944
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
945
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
896
946
|
|
897
947
|
header_params = {
|
898
948
|
"name" => request.name
|
@@ -918,16 +968,16 @@ module Google
|
|
918
968
|
# Sets the access control policy on the specified secret. Replaces any
|
919
969
|
# existing policy.
|
920
970
|
#
|
921
|
-
# Permissions on
|
922
|
-
# to the policy set on the associated
|
971
|
+
# Permissions on {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} are enforced according
|
972
|
+
# to the policy set on the associated {Google::Cloud::SecretManager::V1beta1::Secret Secret}.
|
923
973
|
#
|
924
974
|
# @overload set_iam_policy(request, options = nil)
|
925
975
|
# @param request [Google::Iam::V1::SetIamPolicyRequest | Hash]
|
926
976
|
# Sets the access control policy on the specified secret. Replaces any
|
927
977
|
# existing policy.
|
928
978
|
#
|
929
|
-
# Permissions on
|
930
|
-
# to the policy set on the associated
|
979
|
+
# Permissions on {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} are enforced according
|
980
|
+
# to the policy set on the associated {Google::Cloud::SecretManager::V1beta1::Secret Secret}.
|
931
981
|
# @param options [Gapic::CallOptions, Hash]
|
932
982
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
933
983
|
#
|
@@ -935,7 +985,7 @@ module Google
|
|
935
985
|
# @param resource [String]
|
936
986
|
# REQUIRED: The resource for which the policy is being specified.
|
937
987
|
# `resource` is usually specified as a path. For example, a Project
|
938
|
-
# resource is specified as `projects
|
988
|
+
# resource is specified as `projects/{project}`.
|
939
989
|
# @param policy [Google::Iam::V1::Policy | Hash]
|
940
990
|
# REQUIRED: The complete policy to be applied to the `resource`. The size of
|
941
991
|
# the policy is limited to a few 10s of KB. An empty policy is a
|
@@ -957,15 +1007,16 @@ module Google
|
|
957
1007
|
request = Gapic::Protobuf.coerce request, to: Google::Iam::V1::SetIamPolicyRequest
|
958
1008
|
|
959
1009
|
# Converts hash and nil to an options object
|
960
|
-
options = Gapic::CallOptions.new
|
1010
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
961
1011
|
|
962
1012
|
# Customize the options with defaults
|
963
1013
|
metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
964
1014
|
|
965
|
-
# Set x-goog-api-client
|
1015
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
966
1016
|
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
967
1017
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
968
1018
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
1019
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
969
1020
|
|
970
1021
|
header_params = {
|
971
1022
|
"resource" => request.resource
|
@@ -1002,7 +1053,7 @@ module Google
|
|
1002
1053
|
# @param resource [String]
|
1003
1054
|
# REQUIRED: The resource for which the policy is being requested.
|
1004
1055
|
# `resource` is usually specified as a path. For example, a Project
|
1005
|
-
# resource is specified as `projects
|
1056
|
+
# resource is specified as `projects/{project}`.
|
1006
1057
|
#
|
1007
1058
|
#
|
1008
1059
|
# @yield [response, operation] Access the result along with the RPC operation
|
@@ -1019,15 +1070,16 @@ module Google
|
|
1019
1070
|
request = Gapic::Protobuf.coerce request, to: Google::Iam::V1::GetIamPolicyRequest
|
1020
1071
|
|
1021
1072
|
# Converts hash and nil to an options object
|
1022
|
-
options = Gapic::CallOptions.new
|
1073
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1023
1074
|
|
1024
1075
|
# Customize the options with defaults
|
1025
1076
|
metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
1026
1077
|
|
1027
|
-
# Set x-goog-api-client
|
1078
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1028
1079
|
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1029
1080
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1030
1081
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
1082
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1031
1083
|
|
1032
1084
|
header_params = {
|
1033
1085
|
"resource" => request.resource
|
@@ -1074,7 +1126,7 @@ module Google
|
|
1074
1126
|
# @param resource [String]
|
1075
1127
|
# REQUIRED: The resource for which the policy detail is being requested.
|
1076
1128
|
# `resource` is usually specified as a path. For example, a Project
|
1077
|
-
# resource is specified as `projects
|
1129
|
+
# resource is specified as `projects/{project}`.
|
1078
1130
|
# @param permissions [Array<String>]
|
1079
1131
|
# The set of permissions to check for the `resource`. Permissions with
|
1080
1132
|
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
@@ -1096,15 +1148,16 @@ module Google
|
|
1096
1148
|
request = Gapic::Protobuf.coerce request, to: Google::Iam::V1::TestIamPermissionsRequest
|
1097
1149
|
|
1098
1150
|
# Converts hash and nil to an options object
|
1099
|
-
options = Gapic::CallOptions.new
|
1151
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1100
1152
|
|
1101
1153
|
# Customize the options with defaults
|
1102
1154
|
metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
1103
1155
|
|
1104
|
-
# Set x-goog-api-client
|
1156
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1105
1157
|
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1106
1158
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1107
1159
|
gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
|
1160
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1108
1161
|
|
1109
1162
|
header_params = {
|
1110
1163
|
"resource" => request.resource
|