google-cloud-secret_manager-v1 0.10.1 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/secret_manager/v1/secret_manager_service/client.rb +402 -103
- data/lib/google/cloud/secret_manager/v1/version.rb +1 -1
- data/lib/google/cloud/secretmanager/v1/resources_pb.rb +2 -2
- data/lib/google/cloud/secretmanager/v1/service_pb.rb +4 -2
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/cloud/secretmanager/v1/service.rb +14 -0
- data/proto_docs/google/type/expr.rb +35 -12
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2685e82086688b8d65db8c15d6e7d12b9dc32c6f8dbaa083a6f67bf12ca8fe7c
|
4
|
+
data.tar.gz: 887672bed1f240653d2aa3058955dd1192b9640501fe4444c822e48da12a9503
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc832bbe3d3527d229d6f2701f1c6a84b82df6653fcf7b4496b217af2374449403dbb2b3e47edc339e58e4788be7bd8285cc8474c184c4fa0db07661771a077d
|
7
|
+
data.tar.gz: efc4f8ff06bcdcb84304059f405c3be42406bc8e552e17ca879fa5f913a3f3a2a2678bba3f61bf33ef07e93013bcdcbea3406e12467c87a6ca77efc88e7d357d
|
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-secret_manager-v1
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::SecretManager::V1::SecretManagerService::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `SECRET_MANAGER_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `SECRET_MANAGER_KEYFILE` - Path to JSON file, or JSON contents
|
71
|
+
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
72
|
+
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
73
|
+
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
74
74
|
|
75
75
|
```ruby
|
76
76
|
require "google/cloud/secret_manager/v1"
|
@@ -82,8 +82,8 @@ client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
|
82
82
|
|
83
83
|
### Configuration
|
84
84
|
|
85
|
-
The **Credentials JSON** can be configured instead of
|
86
|
-
environment
|
85
|
+
The path to the **Credentials JSON** file can be configured instead of storing
|
86
|
+
it in an environment variable. Either on an individual client initialization:
|
87
87
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/secret_manager/v1"
|
@@ -93,7 +93,7 @@ client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new do
|
|
93
93
|
end
|
94
94
|
```
|
95
95
|
|
96
|
-
Or
|
96
|
+
Or globally for all clients:
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/secret_manager/v1"
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
|
|
33
33
|
require "google/cloud/secret_manager/v1"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Cloud::SecretManager::V1::ListSecretsRequest.new # (request fields as keyword arguments...)
|
37
37
|
response = client.list_secrets request
|
38
38
|
```
|
39
39
|
|
@@ -47,13 +47,12 @@ module Google
|
|
47
47
|
# See {::Google::Cloud::SecretManager::V1::SecretManagerService::Client::Configuration}
|
48
48
|
# for a description of the configuration fields.
|
49
49
|
#
|
50
|
-
#
|
50
|
+
# @example
|
51
51
|
#
|
52
|
-
#
|
53
|
-
#
|
54
|
-
#
|
55
|
-
#
|
56
|
-
# end
|
52
|
+
# # Modify the configuration for all SecretManagerService clients
|
53
|
+
# ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.configure do |config|
|
54
|
+
# config.timeout = 10.0
|
55
|
+
# end
|
57
56
|
#
|
58
57
|
# @yield [config] Configure the Client client.
|
59
58
|
# @yieldparam config [Client::Configuration]
|
@@ -89,10 +88,7 @@ module Google
|
|
89
88
|
|
90
89
|
default_config.rpcs.access_secret_version.timeout = 60.0
|
91
90
|
default_config.rpcs.access_secret_version.retry_policy = {
|
92
|
-
initial_delay:
|
93
|
-
max_delay: 60.0,
|
94
|
-
multiplier: 1.3,
|
95
|
-
retry_codes: [14, 2]
|
91
|
+
initial_delay: 2.0, max_delay: 60.0, multiplier: 2.0, retry_codes: [14, 8]
|
96
92
|
}
|
97
93
|
|
98
94
|
default_config.rpcs.disable_secret_version.timeout = 60.0
|
@@ -136,19 +132,15 @@ module Google
|
|
136
132
|
##
|
137
133
|
# Create a new SecretManagerService client object.
|
138
134
|
#
|
139
|
-
#
|
140
|
-
#
|
141
|
-
# To create a new SecretManagerService client with the default
|
142
|
-
# configuration:
|
135
|
+
# @example
|
143
136
|
#
|
144
|
-
#
|
137
|
+
# # Create a client using the default configuration
|
138
|
+
# client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
145
139
|
#
|
146
|
-
#
|
147
|
-
#
|
148
|
-
#
|
149
|
-
#
|
150
|
-
# config.timeout = 10.0
|
151
|
-
# end
|
140
|
+
# # Create a client using a custom configuration
|
141
|
+
# client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new do |config|
|
142
|
+
# config.timeout = 10.0
|
143
|
+
# end
|
152
144
|
#
|
153
145
|
# @yield [config] Configure the SecretManagerService client.
|
154
146
|
# @yieldparam config [Client::Configuration]
|
@@ -168,14 +160,13 @@ module Google
|
|
168
160
|
|
169
161
|
# Create credentials
|
170
162
|
credentials = @config.credentials
|
171
|
-
# Use self-signed JWT if the
|
163
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
172
164
|
# but only if the default endpoint does not have a region prefix.
|
173
|
-
enable_self_signed_jwt = @config.
|
174
|
-
@config.endpoint == Client.configure.endpoint &&
|
165
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
175
166
|
!@config.endpoint.split(".").first.include?("-")
|
176
167
|
credentials ||= Credentials.default scope: @config.scope,
|
177
168
|
enable_self_signed_jwt: enable_self_signed_jwt
|
178
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
169
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
179
170
|
credentials = Credentials.new credentials, scope: @config.scope
|
180
171
|
end
|
181
172
|
@quota_project_id = @config.quota_project
|
@@ -205,7 +196,7 @@ module Google
|
|
205
196
|
# @param options [::Gapic::CallOptions, ::Hash]
|
206
197
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
207
198
|
#
|
208
|
-
# @overload list_secrets(parent: nil, page_size: nil, page_token: nil)
|
199
|
+
# @overload list_secrets(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
209
200
|
# Pass arguments to `list_secrets` via keyword arguments. Note that at
|
210
201
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
211
202
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -220,6 +211,12 @@ module Google
|
|
220
211
|
# @param page_token [::String]
|
221
212
|
# Optional. Pagination token, returned earlier via
|
222
213
|
# {::Google::Cloud::SecretManager::V1::ListSecretsResponse#next_page_token ListSecretsResponse.next_page_token}.
|
214
|
+
# @param filter [::String]
|
215
|
+
# Optional. Filter string, adhering to the rules in
|
216
|
+
# [List-operation
|
217
|
+
# filtering](https://cloud.google.com/secret-manager/docs/filtering). List
|
218
|
+
# only secrets matching the filter. If filter is empty, all secrets are
|
219
|
+
# listed.
|
223
220
|
#
|
224
221
|
# @yield [response, operation] Access the result along with the RPC operation
|
225
222
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1::Secret>]
|
@@ -229,6 +226,27 @@ module Google
|
|
229
226
|
#
|
230
227
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
231
228
|
#
|
229
|
+
# @example Basic example
|
230
|
+
# require "google/cloud/secret_manager/v1"
|
231
|
+
#
|
232
|
+
# # Create a client object. The client can be reused for multiple calls.
|
233
|
+
# client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
234
|
+
#
|
235
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
236
|
+
# request = Google::Cloud::SecretManager::V1::ListSecretsRequest.new
|
237
|
+
#
|
238
|
+
# # Call the list_secrets method.
|
239
|
+
# result = client.list_secrets request
|
240
|
+
#
|
241
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
242
|
+
# # iterate over all elements by calling #each, and the enumerable
|
243
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
244
|
+
# # methods are also available for managing paging directly.
|
245
|
+
# result.each do |response|
|
246
|
+
# # Each element is of type ::Google::Cloud::SecretManager::V1::Secret.
|
247
|
+
# p response
|
248
|
+
# end
|
249
|
+
#
|
232
250
|
def list_secrets request, options = nil
|
233
251
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
234
252
|
|
@@ -246,16 +264,20 @@ module Google
|
|
246
264
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
247
265
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
248
266
|
|
249
|
-
header_params = {
|
250
|
-
|
251
|
-
|
267
|
+
header_params = {}
|
268
|
+
if request.parent
|
269
|
+
header_params["parent"] = request.parent
|
270
|
+
end
|
271
|
+
|
252
272
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
253
273
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
254
274
|
|
255
275
|
options.apply_defaults timeout: @config.rpcs.list_secrets.timeout,
|
256
276
|
metadata: metadata,
|
257
277
|
retry_policy: @config.rpcs.list_secrets.retry_policy
|
258
|
-
|
278
|
+
|
279
|
+
options.apply_defaults timeout: @config.timeout,
|
280
|
+
metadata: @config.metadata,
|
259
281
|
retry_policy: @config.retry_policy
|
260
282
|
|
261
283
|
@secret_manager_service_stub.call_rpc :list_secrets, request, options: options do |response, operation|
|
@@ -305,6 +327,21 @@ module Google
|
|
305
327
|
#
|
306
328
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
307
329
|
#
|
330
|
+
# @example Basic example
|
331
|
+
# require "google/cloud/secret_manager/v1"
|
332
|
+
#
|
333
|
+
# # Create a client object. The client can be reused for multiple calls.
|
334
|
+
# client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
335
|
+
#
|
336
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
337
|
+
# request = Google::Cloud::SecretManager::V1::CreateSecretRequest.new
|
338
|
+
#
|
339
|
+
# # Call the create_secret method.
|
340
|
+
# result = client.create_secret request
|
341
|
+
#
|
342
|
+
# # The returned object is of type Google::Cloud::SecretManager::V1::Secret.
|
343
|
+
# p result
|
344
|
+
#
|
308
345
|
def create_secret request, options = nil
|
309
346
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
310
347
|
|
@@ -322,16 +359,20 @@ module Google
|
|
322
359
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
323
360
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
324
361
|
|
325
|
-
header_params = {
|
326
|
-
|
327
|
-
|
362
|
+
header_params = {}
|
363
|
+
if request.parent
|
364
|
+
header_params["parent"] = request.parent
|
365
|
+
end
|
366
|
+
|
328
367
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
329
368
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
330
369
|
|
331
370
|
options.apply_defaults timeout: @config.rpcs.create_secret.timeout,
|
332
371
|
metadata: metadata,
|
333
372
|
retry_policy: @config.rpcs.create_secret.retry_policy
|
334
|
-
|
373
|
+
|
374
|
+
options.apply_defaults timeout: @config.timeout,
|
375
|
+
metadata: @config.metadata,
|
335
376
|
retry_policy: @config.retry_policy
|
336
377
|
|
337
378
|
@secret_manager_service_stub.call_rpc :create_secret, request, options: options do |response, operation|
|
@@ -375,6 +416,21 @@ module Google
|
|
375
416
|
#
|
376
417
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
377
418
|
#
|
419
|
+
# @example Basic example
|
420
|
+
# require "google/cloud/secret_manager/v1"
|
421
|
+
#
|
422
|
+
# # Create a client object. The client can be reused for multiple calls.
|
423
|
+
# client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
424
|
+
#
|
425
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
426
|
+
# request = Google::Cloud::SecretManager::V1::AddSecretVersionRequest.new
|
427
|
+
#
|
428
|
+
# # Call the add_secret_version method.
|
429
|
+
# result = client.add_secret_version request
|
430
|
+
#
|
431
|
+
# # The returned object is of type Google::Cloud::SecretManager::V1::SecretVersion.
|
432
|
+
# p result
|
433
|
+
#
|
378
434
|
def add_secret_version request, options = nil
|
379
435
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
380
436
|
|
@@ -392,16 +448,20 @@ module Google
|
|
392
448
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
393
449
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
394
450
|
|
395
|
-
header_params = {
|
396
|
-
|
397
|
-
|
451
|
+
header_params = {}
|
452
|
+
if request.parent
|
453
|
+
header_params["parent"] = request.parent
|
454
|
+
end
|
455
|
+
|
398
456
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
399
457
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
400
458
|
|
401
459
|
options.apply_defaults timeout: @config.rpcs.add_secret_version.timeout,
|
402
460
|
metadata: metadata,
|
403
461
|
retry_policy: @config.rpcs.add_secret_version.retry_policy
|
404
|
-
|
462
|
+
|
463
|
+
options.apply_defaults timeout: @config.timeout,
|
464
|
+
metadata: @config.metadata,
|
405
465
|
retry_policy: @config.retry_policy
|
406
466
|
|
407
467
|
@secret_manager_service_stub.call_rpc :add_secret_version, request, options: options do |response, operation|
|
@@ -441,6 +501,21 @@ module Google
|
|
441
501
|
#
|
442
502
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
443
503
|
#
|
504
|
+
# @example Basic example
|
505
|
+
# require "google/cloud/secret_manager/v1"
|
506
|
+
#
|
507
|
+
# # Create a client object. The client can be reused for multiple calls.
|
508
|
+
# client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
509
|
+
#
|
510
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
511
|
+
# request = Google::Cloud::SecretManager::V1::GetSecretRequest.new
|
512
|
+
#
|
513
|
+
# # Call the get_secret method.
|
514
|
+
# result = client.get_secret request
|
515
|
+
#
|
516
|
+
# # The returned object is of type Google::Cloud::SecretManager::V1::Secret.
|
517
|
+
# p result
|
518
|
+
#
|
444
519
|
def get_secret request, options = nil
|
445
520
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
446
521
|
|
@@ -458,16 +533,20 @@ module Google
|
|
458
533
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
459
534
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
460
535
|
|
461
|
-
header_params = {
|
462
|
-
|
463
|
-
|
536
|
+
header_params = {}
|
537
|
+
if request.name
|
538
|
+
header_params["name"] = request.name
|
539
|
+
end
|
540
|
+
|
464
541
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
465
542
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
466
543
|
|
467
544
|
options.apply_defaults timeout: @config.rpcs.get_secret.timeout,
|
468
545
|
metadata: metadata,
|
469
546
|
retry_policy: @config.rpcs.get_secret.retry_policy
|
470
|
-
|
547
|
+
|
548
|
+
options.apply_defaults timeout: @config.timeout,
|
549
|
+
metadata: @config.metadata,
|
471
550
|
retry_policy: @config.retry_policy
|
472
551
|
|
473
552
|
@secret_manager_service_stub.call_rpc :get_secret, request, options: options do |response, operation|
|
@@ -509,6 +588,21 @@ module Google
|
|
509
588
|
#
|
510
589
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
511
590
|
#
|
591
|
+
# @example Basic example
|
592
|
+
# require "google/cloud/secret_manager/v1"
|
593
|
+
#
|
594
|
+
# # Create a client object. The client can be reused for multiple calls.
|
595
|
+
# client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
596
|
+
#
|
597
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
598
|
+
# request = Google::Cloud::SecretManager::V1::UpdateSecretRequest.new
|
599
|
+
#
|
600
|
+
# # Call the update_secret method.
|
601
|
+
# result = client.update_secret request
|
602
|
+
#
|
603
|
+
# # The returned object is of type Google::Cloud::SecretManager::V1::Secret.
|
604
|
+
# p result
|
605
|
+
#
|
512
606
|
def update_secret request, options = nil
|
513
607
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
514
608
|
|
@@ -526,16 +620,20 @@ module Google
|
|
526
620
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
527
621
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
528
622
|
|
529
|
-
header_params = {
|
530
|
-
|
531
|
-
|
623
|
+
header_params = {}
|
624
|
+
if request.secret&.name
|
625
|
+
header_params["secret.name"] = request.secret.name
|
626
|
+
end
|
627
|
+
|
532
628
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
533
629
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
534
630
|
|
535
631
|
options.apply_defaults timeout: @config.rpcs.update_secret.timeout,
|
536
632
|
metadata: metadata,
|
537
633
|
retry_policy: @config.rpcs.update_secret.retry_policy
|
538
|
-
|
634
|
+
|
635
|
+
options.apply_defaults timeout: @config.timeout,
|
636
|
+
metadata: @config.metadata,
|
539
637
|
retry_policy: @config.retry_policy
|
540
638
|
|
541
639
|
@secret_manager_service_stub.call_rpc :update_secret, request, options: options do |response, operation|
|
@@ -580,6 +678,21 @@ module Google
|
|
580
678
|
#
|
581
679
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
582
680
|
#
|
681
|
+
# @example Basic example
|
682
|
+
# require "google/cloud/secret_manager/v1"
|
683
|
+
#
|
684
|
+
# # Create a client object. The client can be reused for multiple calls.
|
685
|
+
# client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
686
|
+
#
|
687
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
688
|
+
# request = Google::Cloud::SecretManager::V1::DeleteSecretRequest.new
|
689
|
+
#
|
690
|
+
# # Call the delete_secret method.
|
691
|
+
# result = client.delete_secret request
|
692
|
+
#
|
693
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
694
|
+
# p result
|
695
|
+
#
|
583
696
|
def delete_secret request, options = nil
|
584
697
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
585
698
|
|
@@ -597,16 +710,20 @@ module Google
|
|
597
710
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
598
711
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
599
712
|
|
600
|
-
header_params = {
|
601
|
-
|
602
|
-
|
713
|
+
header_params = {}
|
714
|
+
if request.name
|
715
|
+
header_params["name"] = request.name
|
716
|
+
end
|
717
|
+
|
603
718
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
604
719
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
605
720
|
|
606
721
|
options.apply_defaults timeout: @config.rpcs.delete_secret.timeout,
|
607
722
|
metadata: metadata,
|
608
723
|
retry_policy: @config.rpcs.delete_secret.retry_policy
|
609
|
-
|
724
|
+
|
725
|
+
options.apply_defaults timeout: @config.timeout,
|
726
|
+
metadata: @config.metadata,
|
610
727
|
retry_policy: @config.retry_policy
|
611
728
|
|
612
729
|
@secret_manager_service_stub.call_rpc :delete_secret, request, options: options do |response, operation|
|
@@ -631,7 +748,7 @@ module Google
|
|
631
748
|
# @param options [::Gapic::CallOptions, ::Hash]
|
632
749
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
633
750
|
#
|
634
|
-
# @overload list_secret_versions(parent: nil, page_size: nil, page_token: nil)
|
751
|
+
# @overload list_secret_versions(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
635
752
|
# Pass arguments to `list_secret_versions` via keyword arguments. Note that at
|
636
753
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
637
754
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -647,6 +764,12 @@ module Google
|
|
647
764
|
# @param page_token [::String]
|
648
765
|
# Optional. Pagination token, returned earlier via
|
649
766
|
# ListSecretVersionsResponse.next_page_token][].
|
767
|
+
# @param filter [::String]
|
768
|
+
# Optional. Filter string, adhering to the rules in
|
769
|
+
# [List-operation
|
770
|
+
# filtering](https://cloud.google.com/secret-manager/docs/filtering). List
|
771
|
+
# only secret versions matching the filter. If filter is empty, all secret
|
772
|
+
# versions are listed.
|
650
773
|
#
|
651
774
|
# @yield [response, operation] Access the result along with the RPC operation
|
652
775
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1::SecretVersion>]
|
@@ -656,6 +779,27 @@ module Google
|
|
656
779
|
#
|
657
780
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
658
781
|
#
|
782
|
+
# @example Basic example
|
783
|
+
# require "google/cloud/secret_manager/v1"
|
784
|
+
#
|
785
|
+
# # Create a client object. The client can be reused for multiple calls.
|
786
|
+
# client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
787
|
+
#
|
788
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
789
|
+
# request = Google::Cloud::SecretManager::V1::ListSecretVersionsRequest.new
|
790
|
+
#
|
791
|
+
# # Call the list_secret_versions method.
|
792
|
+
# result = client.list_secret_versions request
|
793
|
+
#
|
794
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
795
|
+
# # iterate over all elements by calling #each, and the enumerable
|
796
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
797
|
+
# # methods are also available for managing paging directly.
|
798
|
+
# result.each do |response|
|
799
|
+
# # Each element is of type ::Google::Cloud::SecretManager::V1::SecretVersion.
|
800
|
+
# p response
|
801
|
+
# end
|
802
|
+
#
|
659
803
|
def list_secret_versions request, options = nil
|
660
804
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
661
805
|
|
@@ -673,16 +817,20 @@ module Google
|
|
673
817
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
674
818
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
675
819
|
|
676
|
-
header_params = {
|
677
|
-
|
678
|
-
|
820
|
+
header_params = {}
|
821
|
+
if request.parent
|
822
|
+
header_params["parent"] = request.parent
|
823
|
+
end
|
824
|
+
|
679
825
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
680
826
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
681
827
|
|
682
828
|
options.apply_defaults timeout: @config.rpcs.list_secret_versions.timeout,
|
683
829
|
metadata: metadata,
|
684
830
|
retry_policy: @config.rpcs.list_secret_versions.retry_policy
|
685
|
-
|
831
|
+
|
832
|
+
options.apply_defaults timeout: @config.timeout,
|
833
|
+
metadata: @config.metadata,
|
686
834
|
retry_policy: @config.retry_policy
|
687
835
|
|
688
836
|
@secret_manager_service_stub.call_rpc :list_secret_versions, request, options: options do |response, operation|
|
@@ -730,6 +878,21 @@ module Google
|
|
730
878
|
#
|
731
879
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
732
880
|
#
|
881
|
+
# @example Basic example
|
882
|
+
# require "google/cloud/secret_manager/v1"
|
883
|
+
#
|
884
|
+
# # Create a client object. The client can be reused for multiple calls.
|
885
|
+
# client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
886
|
+
#
|
887
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
888
|
+
# request = Google::Cloud::SecretManager::V1::GetSecretVersionRequest.new
|
889
|
+
#
|
890
|
+
# # Call the get_secret_version method.
|
891
|
+
# result = client.get_secret_version request
|
892
|
+
#
|
893
|
+
# # The returned object is of type Google::Cloud::SecretManager::V1::SecretVersion.
|
894
|
+
# p result
|
895
|
+
#
|
733
896
|
def get_secret_version request, options = nil
|
734
897
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
735
898
|
|
@@ -747,16 +910,20 @@ module Google
|
|
747
910
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
748
911
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
749
912
|
|
750
|
-
header_params = {
|
751
|
-
|
752
|
-
|
913
|
+
header_params = {}
|
914
|
+
if request.name
|
915
|
+
header_params["name"] = request.name
|
916
|
+
end
|
917
|
+
|
753
918
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
754
919
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
755
920
|
|
756
921
|
options.apply_defaults timeout: @config.rpcs.get_secret_version.timeout,
|
757
922
|
metadata: metadata,
|
758
923
|
retry_policy: @config.rpcs.get_secret_version.retry_policy
|
759
|
-
|
924
|
+
|
925
|
+
options.apply_defaults timeout: @config.timeout,
|
926
|
+
metadata: @config.metadata,
|
760
927
|
retry_policy: @config.retry_policy
|
761
928
|
|
762
929
|
@secret_manager_service_stub.call_rpc :get_secret_version, request, options: options do |response, operation|
|
@@ -803,6 +970,21 @@ module Google
|
|
803
970
|
#
|
804
971
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
805
972
|
#
|
973
|
+
# @example Basic example
|
974
|
+
# require "google/cloud/secret_manager/v1"
|
975
|
+
#
|
976
|
+
# # Create a client object. The client can be reused for multiple calls.
|
977
|
+
# client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
978
|
+
#
|
979
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
980
|
+
# request = Google::Cloud::SecretManager::V1::AccessSecretVersionRequest.new
|
981
|
+
#
|
982
|
+
# # Call the access_secret_version method.
|
983
|
+
# result = client.access_secret_version request
|
984
|
+
#
|
985
|
+
# # The returned object is of type Google::Cloud::SecretManager::V1::AccessSecretVersionResponse.
|
986
|
+
# p result
|
987
|
+
#
|
806
988
|
def access_secret_version request, options = nil
|
807
989
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
808
990
|
|
@@ -820,16 +1002,20 @@ module Google
|
|
820
1002
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
821
1003
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
822
1004
|
|
823
|
-
header_params = {
|
824
|
-
|
825
|
-
|
1005
|
+
header_params = {}
|
1006
|
+
if request.name
|
1007
|
+
header_params["name"] = request.name
|
1008
|
+
end
|
1009
|
+
|
826
1010
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
827
1011
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
828
1012
|
|
829
1013
|
options.apply_defaults timeout: @config.rpcs.access_secret_version.timeout,
|
830
1014
|
metadata: metadata,
|
831
1015
|
retry_policy: @config.rpcs.access_secret_version.retry_policy
|
832
|
-
|
1016
|
+
|
1017
|
+
options.apply_defaults timeout: @config.timeout,
|
1018
|
+
metadata: @config.metadata,
|
833
1019
|
retry_policy: @config.retry_policy
|
834
1020
|
|
835
1021
|
@secret_manager_service_stub.call_rpc :access_secret_version, request, options: options do |response, operation|
|
@@ -877,6 +1063,21 @@ module Google
|
|
877
1063
|
#
|
878
1064
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
879
1065
|
#
|
1066
|
+
# @example Basic example
|
1067
|
+
# require "google/cloud/secret_manager/v1"
|
1068
|
+
#
|
1069
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1070
|
+
# client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
1071
|
+
#
|
1072
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1073
|
+
# request = Google::Cloud::SecretManager::V1::DisableSecretVersionRequest.new
|
1074
|
+
#
|
1075
|
+
# # Call the disable_secret_version method.
|
1076
|
+
# result = client.disable_secret_version request
|
1077
|
+
#
|
1078
|
+
# # The returned object is of type Google::Cloud::SecretManager::V1::SecretVersion.
|
1079
|
+
# p result
|
1080
|
+
#
|
880
1081
|
def disable_secret_version request, options = nil
|
881
1082
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
882
1083
|
|
@@ -894,16 +1095,20 @@ module Google
|
|
894
1095
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
895
1096
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
896
1097
|
|
897
|
-
header_params = {
|
898
|
-
|
899
|
-
|
1098
|
+
header_params = {}
|
1099
|
+
if request.name
|
1100
|
+
header_params["name"] = request.name
|
1101
|
+
end
|
1102
|
+
|
900
1103
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
901
1104
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
902
1105
|
|
903
1106
|
options.apply_defaults timeout: @config.rpcs.disable_secret_version.timeout,
|
904
1107
|
metadata: metadata,
|
905
1108
|
retry_policy: @config.rpcs.disable_secret_version.retry_policy
|
906
|
-
|
1109
|
+
|
1110
|
+
options.apply_defaults timeout: @config.timeout,
|
1111
|
+
metadata: @config.metadata,
|
907
1112
|
retry_policy: @config.retry_policy
|
908
1113
|
|
909
1114
|
@secret_manager_service_stub.call_rpc :disable_secret_version, request, options: options do |response, operation|
|
@@ -951,6 +1156,21 @@ module Google
|
|
951
1156
|
#
|
952
1157
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
953
1158
|
#
|
1159
|
+
# @example Basic example
|
1160
|
+
# require "google/cloud/secret_manager/v1"
|
1161
|
+
#
|
1162
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1163
|
+
# client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
1164
|
+
#
|
1165
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1166
|
+
# request = Google::Cloud::SecretManager::V1::EnableSecretVersionRequest.new
|
1167
|
+
#
|
1168
|
+
# # Call the enable_secret_version method.
|
1169
|
+
# result = client.enable_secret_version request
|
1170
|
+
#
|
1171
|
+
# # The returned object is of type Google::Cloud::SecretManager::V1::SecretVersion.
|
1172
|
+
# p result
|
1173
|
+
#
|
954
1174
|
def enable_secret_version request, options = nil
|
955
1175
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
956
1176
|
|
@@ -968,16 +1188,20 @@ module Google
|
|
968
1188
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
969
1189
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
970
1190
|
|
971
|
-
header_params = {
|
972
|
-
|
973
|
-
|
1191
|
+
header_params = {}
|
1192
|
+
if request.name
|
1193
|
+
header_params["name"] = request.name
|
1194
|
+
end
|
1195
|
+
|
974
1196
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
975
1197
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
976
1198
|
|
977
1199
|
options.apply_defaults timeout: @config.rpcs.enable_secret_version.timeout,
|
978
1200
|
metadata: metadata,
|
979
1201
|
retry_policy: @config.rpcs.enable_secret_version.retry_policy
|
980
|
-
|
1202
|
+
|
1203
|
+
options.apply_defaults timeout: @config.timeout,
|
1204
|
+
metadata: @config.metadata,
|
981
1205
|
retry_policy: @config.retry_policy
|
982
1206
|
|
983
1207
|
@secret_manager_service_stub.call_rpc :enable_secret_version, request, options: options do |response, operation|
|
@@ -1026,6 +1250,21 @@ module Google
|
|
1026
1250
|
#
|
1027
1251
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1028
1252
|
#
|
1253
|
+
# @example Basic example
|
1254
|
+
# require "google/cloud/secret_manager/v1"
|
1255
|
+
#
|
1256
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1257
|
+
# client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
1258
|
+
#
|
1259
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1260
|
+
# request = Google::Cloud::SecretManager::V1::DestroySecretVersionRequest.new
|
1261
|
+
#
|
1262
|
+
# # Call the destroy_secret_version method.
|
1263
|
+
# result = client.destroy_secret_version request
|
1264
|
+
#
|
1265
|
+
# # The returned object is of type Google::Cloud::SecretManager::V1::SecretVersion.
|
1266
|
+
# p result
|
1267
|
+
#
|
1029
1268
|
def destroy_secret_version request, options = nil
|
1030
1269
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1031
1270
|
|
@@ -1043,16 +1282,20 @@ module Google
|
|
1043
1282
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
1044
1283
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1045
1284
|
|
1046
|
-
header_params = {
|
1047
|
-
|
1048
|
-
|
1285
|
+
header_params = {}
|
1286
|
+
if request.name
|
1287
|
+
header_params["name"] = request.name
|
1288
|
+
end
|
1289
|
+
|
1049
1290
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1050
1291
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1051
1292
|
|
1052
1293
|
options.apply_defaults timeout: @config.rpcs.destroy_secret_version.timeout,
|
1053
1294
|
metadata: metadata,
|
1054
1295
|
retry_policy: @config.rpcs.destroy_secret_version.retry_policy
|
1055
|
-
|
1296
|
+
|
1297
|
+
options.apply_defaults timeout: @config.timeout,
|
1298
|
+
metadata: @config.metadata,
|
1056
1299
|
retry_policy: @config.retry_policy
|
1057
1300
|
|
1058
1301
|
@secret_manager_service_stub.call_rpc :destroy_secret_version, request, options: options do |response, operation|
|
@@ -1102,6 +1345,21 @@ module Google
|
|
1102
1345
|
#
|
1103
1346
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1104
1347
|
#
|
1348
|
+
# @example Basic example
|
1349
|
+
# require "google/cloud/secret_manager/v1"
|
1350
|
+
#
|
1351
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1352
|
+
# client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
1353
|
+
#
|
1354
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1355
|
+
# request = Google::Iam::V1::SetIamPolicyRequest.new
|
1356
|
+
#
|
1357
|
+
# # Call the set_iam_policy method.
|
1358
|
+
# result = client.set_iam_policy request
|
1359
|
+
#
|
1360
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
1361
|
+
# p result
|
1362
|
+
#
|
1105
1363
|
def set_iam_policy request, options = nil
|
1106
1364
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1107
1365
|
|
@@ -1119,16 +1377,20 @@ module Google
|
|
1119
1377
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
1120
1378
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1121
1379
|
|
1122
|
-
header_params = {
|
1123
|
-
|
1124
|
-
|
1380
|
+
header_params = {}
|
1381
|
+
if request.resource
|
1382
|
+
header_params["resource"] = request.resource
|
1383
|
+
end
|
1384
|
+
|
1125
1385
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1126
1386
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1127
1387
|
|
1128
1388
|
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
1129
1389
|
metadata: metadata,
|
1130
1390
|
retry_policy: @config.rpcs.set_iam_policy.retry_policy
|
1131
|
-
|
1391
|
+
|
1392
|
+
options.apply_defaults timeout: @config.timeout,
|
1393
|
+
metadata: @config.metadata,
|
1132
1394
|
retry_policy: @config.retry_policy
|
1133
1395
|
|
1134
1396
|
@secret_manager_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
|
@@ -1173,6 +1435,21 @@ module Google
|
|
1173
1435
|
#
|
1174
1436
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1175
1437
|
#
|
1438
|
+
# @example Basic example
|
1439
|
+
# require "google/cloud/secret_manager/v1"
|
1440
|
+
#
|
1441
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1442
|
+
# client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
1443
|
+
#
|
1444
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1445
|
+
# request = Google::Iam::V1::GetIamPolicyRequest.new
|
1446
|
+
#
|
1447
|
+
# # Call the get_iam_policy method.
|
1448
|
+
# result = client.get_iam_policy request
|
1449
|
+
#
|
1450
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
1451
|
+
# p result
|
1452
|
+
#
|
1176
1453
|
def get_iam_policy request, options = nil
|
1177
1454
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1178
1455
|
|
@@ -1190,16 +1467,20 @@ module Google
|
|
1190
1467
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
1191
1468
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1192
1469
|
|
1193
|
-
header_params = {
|
1194
|
-
|
1195
|
-
|
1470
|
+
header_params = {}
|
1471
|
+
if request.resource
|
1472
|
+
header_params["resource"] = request.resource
|
1473
|
+
end
|
1474
|
+
|
1196
1475
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1197
1476
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1198
1477
|
|
1199
1478
|
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
1200
1479
|
metadata: metadata,
|
1201
1480
|
retry_policy: @config.rpcs.get_iam_policy.retry_policy
|
1202
|
-
|
1481
|
+
|
1482
|
+
options.apply_defaults timeout: @config.timeout,
|
1483
|
+
metadata: @config.metadata,
|
1203
1484
|
retry_policy: @config.retry_policy
|
1204
1485
|
|
1205
1486
|
@secret_manager_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
|
@@ -1251,6 +1532,21 @@ module Google
|
|
1251
1532
|
#
|
1252
1533
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1253
1534
|
#
|
1535
|
+
# @example Basic example
|
1536
|
+
# require "google/cloud/secret_manager/v1"
|
1537
|
+
#
|
1538
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1539
|
+
# client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
1540
|
+
#
|
1541
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1542
|
+
# request = Google::Iam::V1::TestIamPermissionsRequest.new
|
1543
|
+
#
|
1544
|
+
# # Call the test_iam_permissions method.
|
1545
|
+
# result = client.test_iam_permissions request
|
1546
|
+
#
|
1547
|
+
# # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
|
1548
|
+
# p result
|
1549
|
+
#
|
1254
1550
|
def test_iam_permissions request, options = nil
|
1255
1551
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1256
1552
|
|
@@ -1268,16 +1564,20 @@ module Google
|
|
1268
1564
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
1269
1565
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1270
1566
|
|
1271
|
-
header_params = {
|
1272
|
-
|
1273
|
-
|
1567
|
+
header_params = {}
|
1568
|
+
if request.resource
|
1569
|
+
header_params["resource"] = request.resource
|
1570
|
+
end
|
1571
|
+
|
1274
1572
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1275
1573
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1276
1574
|
|
1277
1575
|
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
1278
1576
|
metadata: metadata,
|
1279
1577
|
retry_policy: @config.rpcs.test_iam_permissions.retry_policy
|
1280
|
-
|
1578
|
+
|
1579
|
+
options.apply_defaults timeout: @config.timeout,
|
1580
|
+
metadata: @config.metadata,
|
1281
1581
|
retry_policy: @config.retry_policy
|
1282
1582
|
|
1283
1583
|
@secret_manager_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
|
@@ -1301,22 +1601,21 @@ module Google
|
|
1301
1601
|
# Configuration can be applied globally to all clients, or to a single client
|
1302
1602
|
# on construction.
|
1303
1603
|
#
|
1304
|
-
#
|
1305
|
-
#
|
1306
|
-
#
|
1307
|
-
# to 20 seconds,
|
1308
|
-
#
|
1309
|
-
#
|
1310
|
-
#
|
1311
|
-
#
|
1312
|
-
#
|
1313
|
-
#
|
1314
|
-
#
|
1315
|
-
#
|
1316
|
-
#
|
1317
|
-
#
|
1318
|
-
#
|
1319
|
-
# end
|
1604
|
+
# @example
|
1605
|
+
#
|
1606
|
+
# # Modify the global config, setting the timeout for
|
1607
|
+
# # list_secrets to 20 seconds,
|
1608
|
+
# # and all remaining timeouts to 10 seconds.
|
1609
|
+
# ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.configure do |config|
|
1610
|
+
# config.timeout = 10.0
|
1611
|
+
# config.rpcs.list_secrets.timeout = 20.0
|
1612
|
+
# end
|
1613
|
+
#
|
1614
|
+
# # Apply the above configuration only to a new client.
|
1615
|
+
# client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new do |config|
|
1616
|
+
# config.timeout = 10.0
|
1617
|
+
# config.rpcs.list_secrets.timeout = 20.0
|
1618
|
+
# end
|
1320
1619
|
#
|
1321
1620
|
# @!attribute [rw] endpoint
|
1322
1621
|
# The hostname or hostname:port of the service endpoint.
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/secretmanager/v1/resources.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/field_behavior_pb'
|
7
5
|
require 'google/api/resource_pb'
|
8
6
|
require 'google/protobuf/duration_pb'
|
9
7
|
require 'google/protobuf/timestamp_pb'
|
10
8
|
require 'google/api/annotations_pb'
|
9
|
+
require 'google/protobuf'
|
10
|
+
|
11
11
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
12
12
|
add_file("google/cloud/secretmanager/v1/resources.proto", :syntax => :proto3) do
|
13
13
|
add_message "google.cloud.secretmanager.v1.Secret" do
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/secretmanager/v1/service.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
@@ -12,12 +10,15 @@ require 'google/iam/v1/iam_policy_pb'
|
|
12
10
|
require 'google/iam/v1/policy_pb'
|
13
11
|
require 'google/protobuf/empty_pb'
|
14
12
|
require 'google/protobuf/field_mask_pb'
|
13
|
+
require 'google/protobuf'
|
14
|
+
|
15
15
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
16
16
|
add_file("google/cloud/secretmanager/v1/service.proto", :syntax => :proto3) do
|
17
17
|
add_message "google.cloud.secretmanager.v1.ListSecretsRequest" do
|
18
18
|
optional :parent, :string, 1
|
19
19
|
optional :page_size, :int32, 2
|
20
20
|
optional :page_token, :string, 3
|
21
|
+
optional :filter, :string, 4
|
21
22
|
end
|
22
23
|
add_message "google.cloud.secretmanager.v1.ListSecretsResponse" do
|
23
24
|
repeated :secrets, :message, 1, "google.cloud.secretmanager.v1.Secret"
|
@@ -40,6 +41,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
40
41
|
optional :parent, :string, 1
|
41
42
|
optional :page_size, :int32, 2
|
42
43
|
optional :page_token, :string, 3
|
44
|
+
optional :filter, :string, 4
|
43
45
|
end
|
44
46
|
add_message "google.cloud.secretmanager.v1.ListSecretVersionsResponse" do
|
45
47
|
repeated :versions, :message, 1, "google.cloud.secretmanager.v1.SecretVersion"
|
@@ -57,9 +57,15 @@ module Google
|
|
57
57
|
|
58
58
|
# Denotes that a (repeated) field is an unordered list.
|
59
59
|
# This indicates that the service may provide the elements of the list
|
60
|
-
# in any arbitrary
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
61
61
|
# provided. Additionally, the list's order may or may not be stable.
|
62
62
|
UNORDERED_LIST = 6
|
63
|
+
|
64
|
+
# Denotes that this field returns a non-empty default value if not set.
|
65
|
+
# This indicates that if the user provides the empty value in a request,
|
66
|
+
# a non-empty value will be returned. The user will not be aware of what
|
67
|
+
# non-empty value to expect.
|
68
|
+
NON_EMPTY_DEFAULT = 7
|
63
69
|
end
|
64
70
|
end
|
65
71
|
end
|
@@ -35,6 +35,13 @@ module Google
|
|
35
35
|
# @return [::String]
|
36
36
|
# Optional. Pagination token, returned earlier via
|
37
37
|
# {::Google::Cloud::SecretManager::V1::ListSecretsResponse#next_page_token ListSecretsResponse.next_page_token}.
|
38
|
+
# @!attribute [rw] filter
|
39
|
+
# @return [::String]
|
40
|
+
# Optional. Filter string, adhering to the rules in
|
41
|
+
# [List-operation
|
42
|
+
# filtering](https://cloud.google.com/secret-manager/docs/filtering). List
|
43
|
+
# only secrets matching the filter. If filter is empty, all secrets are
|
44
|
+
# listed.
|
38
45
|
class ListSecretsRequest
|
39
46
|
include ::Google::Protobuf::MessageExts
|
40
47
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -114,6 +121,13 @@ module Google
|
|
114
121
|
# @return [::String]
|
115
122
|
# Optional. Pagination token, returned earlier via
|
116
123
|
# ListSecretVersionsResponse.next_page_token][].
|
124
|
+
# @!attribute [rw] filter
|
125
|
+
# @return [::String]
|
126
|
+
# Optional. Filter string, adhering to the rules in
|
127
|
+
# [List-operation
|
128
|
+
# filtering](https://cloud.google.com/secret-manager/docs/filtering). List
|
129
|
+
# only secret versions matching the filter. If filter is empty, all secret
|
130
|
+
# versions are listed.
|
117
131
|
class ListSecretVersionsRequest
|
118
132
|
include ::Google::Protobuf::MessageExts
|
119
133
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -19,30 +19,53 @@
|
|
19
19
|
|
20
20
|
module Google
|
21
21
|
module Type
|
22
|
-
# Represents
|
22
|
+
# Represents a textual expression in the Common Expression Language (CEL)
|
23
|
+
# syntax. CEL is a C-like expression language. The syntax and semantics of CEL
|
24
|
+
# are documented at https://github.com/google/cel-spec.
|
23
25
|
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
26
|
+
# Example (Comparison):
|
27
|
+
#
|
28
|
+
# title: "Summary size limit"
|
29
|
+
# description: "Determines if a summary is less than 100 chars"
|
30
|
+
# expression: "document.summary.size() < 100"
|
31
|
+
#
|
32
|
+
# Example (Equality):
|
33
|
+
#
|
34
|
+
# title: "Requestor is owner"
|
35
|
+
# description: "Determines if requestor is the document owner"
|
36
|
+
# expression: "document.owner == request.auth.claims.email"
|
37
|
+
#
|
38
|
+
# Example (Logic):
|
39
|
+
#
|
40
|
+
# title: "Public documents"
|
41
|
+
# description: "Determine whether the document should be publicly visible"
|
42
|
+
# expression: "document.type != 'private' && document.type != 'internal'"
|
43
|
+
#
|
44
|
+
# Example (Data Manipulation):
|
45
|
+
#
|
46
|
+
# title: "Notification string"
|
47
|
+
# description: "Create a notification string with a timestamp."
|
48
|
+
# expression: "'New message received at ' + string(document.create_time)"
|
49
|
+
#
|
50
|
+
# The exact variables and functions that may be referenced within an expression
|
51
|
+
# are determined by the service that evaluates it. See the service
|
52
|
+
# documentation for additional information.
|
27
53
|
# @!attribute [rw] expression
|
28
54
|
# @return [::String]
|
29
|
-
# Textual representation of an expression in
|
30
|
-
#
|
31
|
-
#
|
32
|
-
# The application context of the containing message determines which
|
33
|
-
# well-known feature set of CEL is supported.
|
55
|
+
# Textual representation of an expression in Common Expression Language
|
56
|
+
# syntax.
|
34
57
|
# @!attribute [rw] title
|
35
58
|
# @return [::String]
|
36
|
-
#
|
59
|
+
# Optional. Title for the expression, i.e. a short string describing
|
37
60
|
# its purpose. This can be used e.g. in UIs which allow to enter the
|
38
61
|
# expression.
|
39
62
|
# @!attribute [rw] description
|
40
63
|
# @return [::String]
|
41
|
-
#
|
64
|
+
# Optional. Description of the expression. This is a longer text which
|
42
65
|
# describes the expression, e.g. when hovered over it in a UI.
|
43
66
|
# @!attribute [rw] location
|
44
67
|
# @return [::String]
|
45
|
-
#
|
68
|
+
# Optional. String indicating the location of the expression for error
|
46
69
|
# reporting, e.g. a file name and a position in the file.
|
47
70
|
class Expr
|
48
71
|
include ::Google::Protobuf::MessageExts
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-secret_manager-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|