google-cloud-secret_manager-v1 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +1 -1
- data/lib/google/cloud/secret_manager/v1/secret_manager_service/client.rb +386 -96
- data/lib/google/cloud/secret_manager/v1/version.rb +1 -1
- data/lib/google/cloud/secretmanager/v1/resources_pb.rb +5 -3
- data/lib/google/cloud/secretmanager/v1/service_pb.rb +2 -2
- data/lib/google/cloud/secretmanager/v1/service_services_pb.rb +1 -1
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/secretmanager/v1/resources.rb +17 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37b0cf686a32d4f82d396c40a69d3664919f0240faa9c6475bd196dfb19ed395
|
4
|
+
data.tar.gz: 58c3fa3d03ce616fcf2c1a5921fdcc09dac5fd88a7930e4fb8e7ff2d8c99220e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6af54a656d01b9d7e347c6a336324fd766524360f48c821bfb2d8e7ad543f8db71436599a676b00eefe74dd09153639b091add30570913bbdddb6bf1d35d0b08
|
7
|
+
data.tar.gz: 401c6971e1716b439130964ae640812a77a8533d47d88e504ae13487cb48da3157462e1f5e4d789be9538e47bab939be2ae57b93225bcb6a8de48bcc271f8caf
|
data/.yardopts
CHANGED
data/AUTHENTICATION.md
CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
121
121
|
*should* only be used during development.
|
122
122
|
|
123
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
124
|
-
[dev-console]: https://console.cloud.google.com/project
|
125
|
-
|
126
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
127
|
-
|
128
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
129
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
130
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
131
|
-
|
132
123
|
## Creating a Service Account
|
133
124
|
|
134
125
|
Google Cloud requires **Service Account Credentials** to
|
@@ -139,31 +130,22 @@ If you are not running this client within
|
|
139
130
|
[Google Cloud Platform environments](#google-cloud-platform-environments), you
|
140
131
|
need a Google Developers service account.
|
141
132
|
|
142
|
-
1. Visit the [Google
|
133
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
143
134
|
2. Create a new project or click on an existing project.
|
144
|
-
3. Activate the
|
135
|
+
3. Activate the menu in the upper left and select **APIs & Services**. From
|
145
136
|
here, you will enable the APIs that your application requires.
|
146
137
|
|
147
|
-
![Enable the APIs that your application requires][enable-apis]
|
148
|
-
|
149
138
|
*Note: You may need to enable billing in order to use these services.*
|
150
139
|
|
151
140
|
4. Select **Credentials** from the side navigation.
|
152
141
|
|
153
|
-
|
154
|
-
|
155
|
-
![Create a new service account][create-new-service-account]
|
156
|
-
|
157
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
158
|
-
|
159
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
160
|
-
guided through downloading a new JSON key file.
|
142
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
143
|
+
"Service account" to be guided through downloading a new JSON key file.
|
161
144
|
|
162
145
|
If you want to re-use an existing service account, you can easily generate a
|
163
|
-
new key file. Just select the account you wish to re-use,
|
164
|
-
|
165
|
-
|
166
|
-
![Re-use an existing service account][reuse-service-account]
|
146
|
+
new key file. Just select the account you wish to re-use, click the pencil
|
147
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
148
|
+
and then select **Add Key**.
|
167
149
|
|
168
150
|
The key file you download will be used by this library to authenticate API
|
169
151
|
requests and should be stored in a secure location.
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::SecretManager::V1::ListSecretsRequest.new # (request
|
|
37
37
|
response = client.list_secrets request
|
38
38
|
```
|
39
39
|
|
40
|
-
View the [Client Library Documentation](https://
|
40
|
+
View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest)
|
41
41
|
for class and method documentation.
|
42
42
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/secret-manager)
|
@@ -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]
|
@@ -133,19 +132,15 @@ module Google
|
|
133
132
|
##
|
134
133
|
# Create a new SecretManagerService client object.
|
135
134
|
#
|
136
|
-
#
|
137
|
-
#
|
138
|
-
# To create a new SecretManagerService client with the default
|
139
|
-
# configuration:
|
135
|
+
# @example
|
140
136
|
#
|
141
|
-
#
|
137
|
+
# # Create a client using the default configuration
|
138
|
+
# client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
142
139
|
#
|
143
|
-
#
|
144
|
-
#
|
145
|
-
#
|
146
|
-
#
|
147
|
-
# config.timeout = 10.0
|
148
|
-
# 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
|
149
144
|
#
|
150
145
|
# @yield [config] Configure the SecretManagerService client.
|
151
146
|
# @yieldparam config [Client::Configuration]
|
@@ -165,10 +160,9 @@ module Google
|
|
165
160
|
|
166
161
|
# Create credentials
|
167
162
|
credentials = @config.credentials
|
168
|
-
# Use self-signed JWT if the
|
163
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
169
164
|
# but only if the default endpoint does not have a region prefix.
|
170
|
-
enable_self_signed_jwt = @config.
|
171
|
-
@config.endpoint == Client.configure.endpoint &&
|
165
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
172
166
|
!@config.endpoint.split(".").first.include?("-")
|
173
167
|
credentials ||= Credentials.default scope: @config.scope,
|
174
168
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -232,6 +226,27 @@ module Google
|
|
232
226
|
#
|
233
227
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
234
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
|
+
#
|
235
250
|
def list_secrets request, options = nil
|
236
251
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
237
252
|
|
@@ -249,16 +264,20 @@ module Google
|
|
249
264
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
250
265
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
251
266
|
|
252
|
-
header_params = {
|
253
|
-
|
254
|
-
|
267
|
+
header_params = {}
|
268
|
+
if request.parent
|
269
|
+
header_params["parent"] = request.parent
|
270
|
+
end
|
271
|
+
|
255
272
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
256
273
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
257
274
|
|
258
275
|
options.apply_defaults timeout: @config.rpcs.list_secrets.timeout,
|
259
276
|
metadata: metadata,
|
260
277
|
retry_policy: @config.rpcs.list_secrets.retry_policy
|
261
|
-
|
278
|
+
|
279
|
+
options.apply_defaults timeout: @config.timeout,
|
280
|
+
metadata: @config.metadata,
|
262
281
|
retry_policy: @config.retry_policy
|
263
282
|
|
264
283
|
@secret_manager_service_stub.call_rpc :list_secrets, request, options: options do |response, operation|
|
@@ -308,6 +327,21 @@ module Google
|
|
308
327
|
#
|
309
328
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
310
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
|
+
#
|
311
345
|
def create_secret request, options = nil
|
312
346
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
313
347
|
|
@@ -325,16 +359,20 @@ module Google
|
|
325
359
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
326
360
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
327
361
|
|
328
|
-
header_params = {
|
329
|
-
|
330
|
-
|
362
|
+
header_params = {}
|
363
|
+
if request.parent
|
364
|
+
header_params["parent"] = request.parent
|
365
|
+
end
|
366
|
+
|
331
367
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
332
368
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
333
369
|
|
334
370
|
options.apply_defaults timeout: @config.rpcs.create_secret.timeout,
|
335
371
|
metadata: metadata,
|
336
372
|
retry_policy: @config.rpcs.create_secret.retry_policy
|
337
|
-
|
373
|
+
|
374
|
+
options.apply_defaults timeout: @config.timeout,
|
375
|
+
metadata: @config.metadata,
|
338
376
|
retry_policy: @config.retry_policy
|
339
377
|
|
340
378
|
@secret_manager_service_stub.call_rpc :create_secret, request, options: options do |response, operation|
|
@@ -378,6 +416,21 @@ module Google
|
|
378
416
|
#
|
379
417
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
380
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
|
+
#
|
381
434
|
def add_secret_version request, options = nil
|
382
435
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
383
436
|
|
@@ -395,16 +448,20 @@ module Google
|
|
395
448
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
396
449
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
397
450
|
|
398
|
-
header_params = {
|
399
|
-
|
400
|
-
|
451
|
+
header_params = {}
|
452
|
+
if request.parent
|
453
|
+
header_params["parent"] = request.parent
|
454
|
+
end
|
455
|
+
|
401
456
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
402
457
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
403
458
|
|
404
459
|
options.apply_defaults timeout: @config.rpcs.add_secret_version.timeout,
|
405
460
|
metadata: metadata,
|
406
461
|
retry_policy: @config.rpcs.add_secret_version.retry_policy
|
407
|
-
|
462
|
+
|
463
|
+
options.apply_defaults timeout: @config.timeout,
|
464
|
+
metadata: @config.metadata,
|
408
465
|
retry_policy: @config.retry_policy
|
409
466
|
|
410
467
|
@secret_manager_service_stub.call_rpc :add_secret_version, request, options: options do |response, operation|
|
@@ -444,6 +501,21 @@ module Google
|
|
444
501
|
#
|
445
502
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
446
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
|
+
#
|
447
519
|
def get_secret request, options = nil
|
448
520
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
449
521
|
|
@@ -461,16 +533,20 @@ module Google
|
|
461
533
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
462
534
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
463
535
|
|
464
|
-
header_params = {
|
465
|
-
|
466
|
-
|
536
|
+
header_params = {}
|
537
|
+
if request.name
|
538
|
+
header_params["name"] = request.name
|
539
|
+
end
|
540
|
+
|
467
541
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
468
542
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
469
543
|
|
470
544
|
options.apply_defaults timeout: @config.rpcs.get_secret.timeout,
|
471
545
|
metadata: metadata,
|
472
546
|
retry_policy: @config.rpcs.get_secret.retry_policy
|
473
|
-
|
547
|
+
|
548
|
+
options.apply_defaults timeout: @config.timeout,
|
549
|
+
metadata: @config.metadata,
|
474
550
|
retry_policy: @config.retry_policy
|
475
551
|
|
476
552
|
@secret_manager_service_stub.call_rpc :get_secret, request, options: options do |response, operation|
|
@@ -512,6 +588,21 @@ module Google
|
|
512
588
|
#
|
513
589
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
514
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
|
+
#
|
515
606
|
def update_secret request, options = nil
|
516
607
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
517
608
|
|
@@ -529,16 +620,20 @@ module Google
|
|
529
620
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
530
621
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
531
622
|
|
532
|
-
header_params = {
|
533
|
-
|
534
|
-
|
623
|
+
header_params = {}
|
624
|
+
if request.secret&.name
|
625
|
+
header_params["secret.name"] = request.secret.name
|
626
|
+
end
|
627
|
+
|
535
628
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
536
629
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
537
630
|
|
538
631
|
options.apply_defaults timeout: @config.rpcs.update_secret.timeout,
|
539
632
|
metadata: metadata,
|
540
633
|
retry_policy: @config.rpcs.update_secret.retry_policy
|
541
|
-
|
634
|
+
|
635
|
+
options.apply_defaults timeout: @config.timeout,
|
636
|
+
metadata: @config.metadata,
|
542
637
|
retry_policy: @config.retry_policy
|
543
638
|
|
544
639
|
@secret_manager_service_stub.call_rpc :update_secret, request, options: options do |response, operation|
|
@@ -583,6 +678,21 @@ module Google
|
|
583
678
|
#
|
584
679
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
585
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
|
+
#
|
586
696
|
def delete_secret request, options = nil
|
587
697
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
588
698
|
|
@@ -600,16 +710,20 @@ module Google
|
|
600
710
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
601
711
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
602
712
|
|
603
|
-
header_params = {
|
604
|
-
|
605
|
-
|
713
|
+
header_params = {}
|
714
|
+
if request.name
|
715
|
+
header_params["name"] = request.name
|
716
|
+
end
|
717
|
+
|
606
718
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
607
719
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
608
720
|
|
609
721
|
options.apply_defaults timeout: @config.rpcs.delete_secret.timeout,
|
610
722
|
metadata: metadata,
|
611
723
|
retry_policy: @config.rpcs.delete_secret.retry_policy
|
612
|
-
|
724
|
+
|
725
|
+
options.apply_defaults timeout: @config.timeout,
|
726
|
+
metadata: @config.metadata,
|
613
727
|
retry_policy: @config.retry_policy
|
614
728
|
|
615
729
|
@secret_manager_service_stub.call_rpc :delete_secret, request, options: options do |response, operation|
|
@@ -665,6 +779,27 @@ module Google
|
|
665
779
|
#
|
666
780
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
667
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
|
+
#
|
668
803
|
def list_secret_versions request, options = nil
|
669
804
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
670
805
|
|
@@ -682,16 +817,20 @@ module Google
|
|
682
817
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
683
818
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
684
819
|
|
685
|
-
header_params = {
|
686
|
-
|
687
|
-
|
820
|
+
header_params = {}
|
821
|
+
if request.parent
|
822
|
+
header_params["parent"] = request.parent
|
823
|
+
end
|
824
|
+
|
688
825
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
689
826
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
690
827
|
|
691
828
|
options.apply_defaults timeout: @config.rpcs.list_secret_versions.timeout,
|
692
829
|
metadata: metadata,
|
693
830
|
retry_policy: @config.rpcs.list_secret_versions.retry_policy
|
694
|
-
|
831
|
+
|
832
|
+
options.apply_defaults timeout: @config.timeout,
|
833
|
+
metadata: @config.metadata,
|
695
834
|
retry_policy: @config.retry_policy
|
696
835
|
|
697
836
|
@secret_manager_service_stub.call_rpc :list_secret_versions, request, options: options do |response, operation|
|
@@ -739,6 +878,21 @@ module Google
|
|
739
878
|
#
|
740
879
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
741
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
|
+
#
|
742
896
|
def get_secret_version request, options = nil
|
743
897
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
744
898
|
|
@@ -756,16 +910,20 @@ module Google
|
|
756
910
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
757
911
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
758
912
|
|
759
|
-
header_params = {
|
760
|
-
|
761
|
-
|
913
|
+
header_params = {}
|
914
|
+
if request.name
|
915
|
+
header_params["name"] = request.name
|
916
|
+
end
|
917
|
+
|
762
918
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
763
919
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
764
920
|
|
765
921
|
options.apply_defaults timeout: @config.rpcs.get_secret_version.timeout,
|
766
922
|
metadata: metadata,
|
767
923
|
retry_policy: @config.rpcs.get_secret_version.retry_policy
|
768
|
-
|
924
|
+
|
925
|
+
options.apply_defaults timeout: @config.timeout,
|
926
|
+
metadata: @config.metadata,
|
769
927
|
retry_policy: @config.retry_policy
|
770
928
|
|
771
929
|
@secret_manager_service_stub.call_rpc :get_secret_version, request, options: options do |response, operation|
|
@@ -812,6 +970,21 @@ module Google
|
|
812
970
|
#
|
813
971
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
814
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
|
+
#
|
815
988
|
def access_secret_version request, options = nil
|
816
989
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
817
990
|
|
@@ -829,16 +1002,20 @@ module Google
|
|
829
1002
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
830
1003
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
831
1004
|
|
832
|
-
header_params = {
|
833
|
-
|
834
|
-
|
1005
|
+
header_params = {}
|
1006
|
+
if request.name
|
1007
|
+
header_params["name"] = request.name
|
1008
|
+
end
|
1009
|
+
|
835
1010
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
836
1011
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
837
1012
|
|
838
1013
|
options.apply_defaults timeout: @config.rpcs.access_secret_version.timeout,
|
839
1014
|
metadata: metadata,
|
840
1015
|
retry_policy: @config.rpcs.access_secret_version.retry_policy
|
841
|
-
|
1016
|
+
|
1017
|
+
options.apply_defaults timeout: @config.timeout,
|
1018
|
+
metadata: @config.metadata,
|
842
1019
|
retry_policy: @config.retry_policy
|
843
1020
|
|
844
1021
|
@secret_manager_service_stub.call_rpc :access_secret_version, request, options: options do |response, operation|
|
@@ -886,6 +1063,21 @@ module Google
|
|
886
1063
|
#
|
887
1064
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
888
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
|
+
#
|
889
1081
|
def disable_secret_version request, options = nil
|
890
1082
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
891
1083
|
|
@@ -903,16 +1095,20 @@ module Google
|
|
903
1095
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
904
1096
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
905
1097
|
|
906
|
-
header_params = {
|
907
|
-
|
908
|
-
|
1098
|
+
header_params = {}
|
1099
|
+
if request.name
|
1100
|
+
header_params["name"] = request.name
|
1101
|
+
end
|
1102
|
+
|
909
1103
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
910
1104
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
911
1105
|
|
912
1106
|
options.apply_defaults timeout: @config.rpcs.disable_secret_version.timeout,
|
913
1107
|
metadata: metadata,
|
914
1108
|
retry_policy: @config.rpcs.disable_secret_version.retry_policy
|
915
|
-
|
1109
|
+
|
1110
|
+
options.apply_defaults timeout: @config.timeout,
|
1111
|
+
metadata: @config.metadata,
|
916
1112
|
retry_policy: @config.retry_policy
|
917
1113
|
|
918
1114
|
@secret_manager_service_stub.call_rpc :disable_secret_version, request, options: options do |response, operation|
|
@@ -960,6 +1156,21 @@ module Google
|
|
960
1156
|
#
|
961
1157
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
962
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
|
+
#
|
963
1174
|
def enable_secret_version request, options = nil
|
964
1175
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
965
1176
|
|
@@ -977,16 +1188,20 @@ module Google
|
|
977
1188
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
978
1189
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
979
1190
|
|
980
|
-
header_params = {
|
981
|
-
|
982
|
-
|
1191
|
+
header_params = {}
|
1192
|
+
if request.name
|
1193
|
+
header_params["name"] = request.name
|
1194
|
+
end
|
1195
|
+
|
983
1196
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
984
1197
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
985
1198
|
|
986
1199
|
options.apply_defaults timeout: @config.rpcs.enable_secret_version.timeout,
|
987
1200
|
metadata: metadata,
|
988
1201
|
retry_policy: @config.rpcs.enable_secret_version.retry_policy
|
989
|
-
|
1202
|
+
|
1203
|
+
options.apply_defaults timeout: @config.timeout,
|
1204
|
+
metadata: @config.metadata,
|
990
1205
|
retry_policy: @config.retry_policy
|
991
1206
|
|
992
1207
|
@secret_manager_service_stub.call_rpc :enable_secret_version, request, options: options do |response, operation|
|
@@ -1035,6 +1250,21 @@ module Google
|
|
1035
1250
|
#
|
1036
1251
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1037
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
|
+
#
|
1038
1268
|
def destroy_secret_version request, options = nil
|
1039
1269
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1040
1270
|
|
@@ -1052,16 +1282,20 @@ module Google
|
|
1052
1282
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
1053
1283
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1054
1284
|
|
1055
|
-
header_params = {
|
1056
|
-
|
1057
|
-
|
1285
|
+
header_params = {}
|
1286
|
+
if request.name
|
1287
|
+
header_params["name"] = request.name
|
1288
|
+
end
|
1289
|
+
|
1058
1290
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1059
1291
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1060
1292
|
|
1061
1293
|
options.apply_defaults timeout: @config.rpcs.destroy_secret_version.timeout,
|
1062
1294
|
metadata: metadata,
|
1063
1295
|
retry_policy: @config.rpcs.destroy_secret_version.retry_policy
|
1064
|
-
|
1296
|
+
|
1297
|
+
options.apply_defaults timeout: @config.timeout,
|
1298
|
+
metadata: @config.metadata,
|
1065
1299
|
retry_policy: @config.retry_policy
|
1066
1300
|
|
1067
1301
|
@secret_manager_service_stub.call_rpc :destroy_secret_version, request, options: options do |response, operation|
|
@@ -1111,6 +1345,21 @@ module Google
|
|
1111
1345
|
#
|
1112
1346
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1113
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
|
+
#
|
1114
1363
|
def set_iam_policy request, options = nil
|
1115
1364
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1116
1365
|
|
@@ -1128,16 +1377,20 @@ module Google
|
|
1128
1377
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
1129
1378
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1130
1379
|
|
1131
|
-
header_params = {
|
1132
|
-
|
1133
|
-
|
1380
|
+
header_params = {}
|
1381
|
+
if request.resource
|
1382
|
+
header_params["resource"] = request.resource
|
1383
|
+
end
|
1384
|
+
|
1134
1385
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1135
1386
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1136
1387
|
|
1137
1388
|
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
1138
1389
|
metadata: metadata,
|
1139
1390
|
retry_policy: @config.rpcs.set_iam_policy.retry_policy
|
1140
|
-
|
1391
|
+
|
1392
|
+
options.apply_defaults timeout: @config.timeout,
|
1393
|
+
metadata: @config.metadata,
|
1141
1394
|
retry_policy: @config.retry_policy
|
1142
1395
|
|
1143
1396
|
@secret_manager_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
|
@@ -1182,6 +1435,21 @@ module Google
|
|
1182
1435
|
#
|
1183
1436
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1184
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
|
+
#
|
1185
1453
|
def get_iam_policy request, options = nil
|
1186
1454
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1187
1455
|
|
@@ -1199,16 +1467,20 @@ module Google
|
|
1199
1467
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
1200
1468
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1201
1469
|
|
1202
|
-
header_params = {
|
1203
|
-
|
1204
|
-
|
1470
|
+
header_params = {}
|
1471
|
+
if request.resource
|
1472
|
+
header_params["resource"] = request.resource
|
1473
|
+
end
|
1474
|
+
|
1205
1475
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1206
1476
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1207
1477
|
|
1208
1478
|
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
1209
1479
|
metadata: metadata,
|
1210
1480
|
retry_policy: @config.rpcs.get_iam_policy.retry_policy
|
1211
|
-
|
1481
|
+
|
1482
|
+
options.apply_defaults timeout: @config.timeout,
|
1483
|
+
metadata: @config.metadata,
|
1212
1484
|
retry_policy: @config.retry_policy
|
1213
1485
|
|
1214
1486
|
@secret_manager_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
|
@@ -1260,6 +1532,21 @@ module Google
|
|
1260
1532
|
#
|
1261
1533
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1262
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
|
+
#
|
1263
1550
|
def test_iam_permissions request, options = nil
|
1264
1551
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1265
1552
|
|
@@ -1277,16 +1564,20 @@ module Google
|
|
1277
1564
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
1278
1565
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1279
1566
|
|
1280
|
-
header_params = {
|
1281
|
-
|
1282
|
-
|
1567
|
+
header_params = {}
|
1568
|
+
if request.resource
|
1569
|
+
header_params["resource"] = request.resource
|
1570
|
+
end
|
1571
|
+
|
1283
1572
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1284
1573
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1285
1574
|
|
1286
1575
|
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
1287
1576
|
metadata: metadata,
|
1288
1577
|
retry_policy: @config.rpcs.test_iam_permissions.retry_policy
|
1289
|
-
|
1578
|
+
|
1579
|
+
options.apply_defaults timeout: @config.timeout,
|
1580
|
+
metadata: @config.metadata,
|
1290
1581
|
retry_policy: @config.retry_policy
|
1291
1582
|
|
1292
1583
|
@secret_manager_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
|
@@ -1310,22 +1601,21 @@ module Google
|
|
1310
1601
|
# Configuration can be applied globally to all clients, or to a single client
|
1311
1602
|
# on construction.
|
1312
1603
|
#
|
1313
|
-
#
|
1314
|
-
#
|
1315
|
-
#
|
1316
|
-
# to 20 seconds,
|
1317
|
-
#
|
1318
|
-
#
|
1319
|
-
#
|
1320
|
-
#
|
1321
|
-
#
|
1322
|
-
#
|
1323
|
-
#
|
1324
|
-
#
|
1325
|
-
#
|
1326
|
-
#
|
1327
|
-
#
|
1328
|
-
# 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
|
1329
1619
|
#
|
1330
1620
|
# @!attribute [rw] endpoint
|
1331
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/
|
5
|
-
|
4
|
+
require 'google/api/annotations_pb'
|
6
5
|
require 'google/api/field_behavior_pb'
|
7
6
|
require 'google/api/resource_pb'
|
8
7
|
require 'google/protobuf/duration_pb'
|
9
8
|
require 'google/protobuf/timestamp_pb'
|
10
|
-
require 'google/
|
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
|
@@ -30,6 +30,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
30
30
|
optional :state, :enum, 4, "google.cloud.secretmanager.v1.SecretVersion.State"
|
31
31
|
optional :replication_status, :message, 5, "google.cloud.secretmanager.v1.ReplicationStatus"
|
32
32
|
optional :etag, :string, 6
|
33
|
+
optional :client_specified_payload_checksum, :bool, 7
|
33
34
|
end
|
34
35
|
add_enum "google.cloud.secretmanager.v1.SecretVersion.State" do
|
35
36
|
value :STATE_UNSPECIFIED, 0
|
@@ -84,6 +85,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
84
85
|
end
|
85
86
|
add_message "google.cloud.secretmanager.v1.SecretPayload" do
|
86
87
|
optional :data, :bytes, 1
|
88
|
+
proto3_optional :data_crc32c, :int64, 2
|
87
89
|
end
|
88
90
|
end
|
89
91
|
end
|
@@ -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,6 +10,8 @@ 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
|
@@ -33,11 +33,7 @@ module Google
|
|
33
33
|
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
34
|
# option (google.api.resource) = {
|
35
35
|
# type: "pubsub.googleapis.com/Topic"
|
36
|
-
#
|
37
|
-
# pattern: "projects/{project}/topics/{topic}"
|
38
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
39
|
-
# parent_name_extractor: "projects/{project}"
|
40
|
-
# }
|
36
|
+
# pattern: "projects/{project}/topics/{topic}"
|
41
37
|
# };
|
42
38
|
# }
|
43
39
|
#
|
@@ -45,10 +41,7 @@ module Google
|
|
45
41
|
#
|
46
42
|
# resources:
|
47
43
|
# - type: "pubsub.googleapis.com/Topic"
|
48
|
-
#
|
49
|
-
# - pattern: "projects/{project}/topics/{topic}"
|
50
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
-
# parent_name_extractor: "projects/{project}"
|
44
|
+
# pattern: "projects/{project}/topics/{topic}"
|
52
45
|
#
|
53
46
|
# Sometimes, resources have multiple patterns, typically because they can
|
54
47
|
# live under multiple parents.
|
@@ -58,26 +51,10 @@ module Google
|
|
58
51
|
# message LogEntry {
|
59
52
|
# option (google.api.resource) = {
|
60
53
|
# type: "logging.googleapis.com/LogEntry"
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
# }
|
66
|
-
# name_descriptor: {
|
67
|
-
# pattern: "folders/{folder}/logs/{log}"
|
68
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
69
|
-
# parent_name_extractor: "folders/{folder}"
|
70
|
-
# }
|
71
|
-
# name_descriptor: {
|
72
|
-
# pattern: "organizations/{organization}/logs/{log}"
|
73
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
74
|
-
# parent_name_extractor: "organizations/{organization}"
|
75
|
-
# }
|
76
|
-
# name_descriptor: {
|
77
|
-
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
78
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
79
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
80
|
-
# }
|
54
|
+
# pattern: "projects/{project}/logs/{log}"
|
55
|
+
# pattern: "folders/{folder}/logs/{log}"
|
56
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
57
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
81
58
|
# };
|
82
59
|
# }
|
83
60
|
#
|
@@ -85,48 +62,10 @@ module Google
|
|
85
62
|
#
|
86
63
|
# resources:
|
87
64
|
# - type: 'logging.googleapis.com/LogEntry'
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
#
|
92
|
-
# - pattern: "folders/{folder}/logs/{log}"
|
93
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
94
|
-
# parent_name_extractor: "folders/{folder}"
|
95
|
-
# - pattern: "organizations/{organization}/logs/{log}"
|
96
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
97
|
-
# parent_name_extractor: "organizations/{organization}"
|
98
|
-
# - pattern: "billingAccounts/{billing_account}/logs/{log}"
|
99
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
100
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
101
|
-
#
|
102
|
-
# For flexible resources, the resource name doesn't contain parent names, but
|
103
|
-
# the resource itself has parents for policy evaluation.
|
104
|
-
#
|
105
|
-
# Example:
|
106
|
-
#
|
107
|
-
# message Shelf {
|
108
|
-
# option (google.api.resource) = {
|
109
|
-
# type: "library.googleapis.com/Shelf"
|
110
|
-
# name_descriptor: {
|
111
|
-
# pattern: "shelves/{shelf}"
|
112
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
113
|
-
# }
|
114
|
-
# name_descriptor: {
|
115
|
-
# pattern: "shelves/{shelf}"
|
116
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
117
|
-
# }
|
118
|
-
# };
|
119
|
-
# }
|
120
|
-
#
|
121
|
-
# The ResourceDescriptor Yaml config will look like:
|
122
|
-
#
|
123
|
-
# resources:
|
124
|
-
# - type: 'library.googleapis.com/Shelf'
|
125
|
-
# name_descriptor:
|
126
|
-
# - pattern: "shelves/{shelf}"
|
127
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
128
|
-
# - pattern: "shelves/{shelf}"
|
129
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
65
|
+
# pattern: "projects/{project}/logs/{log}"
|
66
|
+
# pattern: "folders/{folder}/logs/{log}"
|
67
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
68
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
130
69
|
# @!attribute [rw] type
|
131
70
|
# @return [::String]
|
132
71
|
# The resource type. It must be in the format of
|
@@ -107,6 +107,11 @@ module Google
|
|
107
107
|
# @!attribute [r] etag
|
108
108
|
# @return [::String]
|
109
109
|
# Output only. Etag of the currently stored {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
110
|
+
# @!attribute [r] client_specified_payload_checksum
|
111
|
+
# @return [::Boolean]
|
112
|
+
# Output only. True if payload checksum specified in {::Google::Cloud::SecretManager::V1::SecretPayload SecretPayload} object has been
|
113
|
+
# received by {::Google::Cloud::SecretManager::V1::SecretManagerService::Client SecretManagerService} on
|
114
|
+
# {::Google::Cloud::SecretManager::V1::SecretManagerService::Client#add_secret_version SecretManagerService.AddSecretVersion}.
|
110
115
|
class SecretVersion
|
111
116
|
include ::Google::Protobuf::MessageExts
|
112
117
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -319,6 +324,18 @@ module Google
|
|
319
324
|
# @!attribute [rw] data
|
320
325
|
# @return [::String]
|
321
326
|
# The secret data. Must be no larger than 64KiB.
|
327
|
+
# @!attribute [rw] data_crc32c
|
328
|
+
# @return [::Integer]
|
329
|
+
# Optional. If specified, {::Google::Cloud::SecretManager::V1::SecretManagerService::Client SecretManagerService} will verify the integrity of the
|
330
|
+
# received {::Google::Cloud::SecretManager::V1::SecretPayload#data data} on {::Google::Cloud::SecretManager::V1::SecretManagerService::Client#add_secret_version SecretManagerService.AddSecretVersion} calls using
|
331
|
+
# the crc32c checksum and store it to include in future
|
332
|
+
# {::Google::Cloud::SecretManager::V1::SecretManagerService::Client#access_secret_version SecretManagerService.AccessSecretVersion} responses. If a checksum is
|
333
|
+
# not provided in the {::Google::Cloud::SecretManager::V1::SecretManagerService::Client#add_secret_version SecretManagerService.AddSecretVersion} request, the
|
334
|
+
# {::Google::Cloud::SecretManager::V1::SecretManagerService::Client SecretManagerService} will generate and store one for you.
|
335
|
+
#
|
336
|
+
# The CRC32C value is encoded as a Int64 for compatibility, and can be
|
337
|
+
# safely downconverted to uint32 in languages that support this type.
|
338
|
+
# https://cloud.google.com/apis/design/design_patterns#integer_types
|
322
339
|
class SecretPayload
|
323
340
|
include ::Google::Protobuf::MessageExts
|
324
341
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
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.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-09 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
|
@@ -233,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
233
233
|
- !ruby/object:Gem::Version
|
234
234
|
version: '0'
|
235
235
|
requirements: []
|
236
|
-
rubygems_version: 3.
|
236
|
+
rubygems_version: 3.3.5
|
237
237
|
signing_key:
|
238
238
|
specification_version: 4
|
239
239
|
summary: API Client library for the Secret Manager V1 API
|