google-cloud-secret_manager-v1 0.20.0 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/secret_manager/v1/bindings_override.rb +102 -0
- data/lib/google/cloud/secret_manager/v1/rest.rb +1 -0
- data/lib/google/cloud/secret_manager/v1/secret_manager_service/client.rb +106 -53
- data/lib/google/cloud/secret_manager/v1/secret_manager_service/paths.rb +83 -16
- data/lib/google/cloud/secret_manager/v1/secret_manager_service/rest/client.rb +116 -55
- data/lib/google/cloud/secret_manager/v1/secret_manager_service/rest/service_stub.rb +113 -0
- data/lib/google/cloud/secret_manager/v1/secret_manager_service/rest.rb +1 -0
- data/lib/google/cloud/secret_manager/v1/version.rb +1 -1
- data/lib/google/cloud/secretmanager/v1/resources_pb.rb +1 -1
- data/lib/google/cloud/secretmanager/v1/service_pb.rb +1 -1
- data/lib/google/cloud/secretmanager/v1/service_services_pb.rb +25 -15
- data/proto_docs/google/api/client.rb +4 -0
- data/proto_docs/google/cloud/secretmanager/v1/resources.rb +38 -4
- data/proto_docs/google/cloud/secretmanager/v1/service.rb +117 -63
- metadata +23 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e14f00d79c963132ac6c5a1dd4db9a530e05ea53fd2a9ca5d3f5171d6739c6ce
|
4
|
+
data.tar.gz: 71a804211365c56c0366456f641e3810e5f264a743b5dde6006e1a9199e44234
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4a8dd5a0696f24010e3c477d8f811641ae3a5aa2ac583b5e6b98b8d72875123ae3d1ccae813d28387ee4b43e3c6504c03d95326fb0095681ad82bb05140da1c
|
7
|
+
data.tar.gz: 99b362203624e012e3f1dde0f911fef36b6f539596fd93bbd1bf011fbddf64c6901a9439f7226ca121f026de014c14112c98825e2e377b90d994c1e5718adfc0
|
@@ -0,0 +1,102 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "gapic/config"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module SecretManager
|
24
|
+
##
|
25
|
+
# @example Loading just the REST part of this package, including all its services, and instantiating a REST client
|
26
|
+
#
|
27
|
+
# require "google/cloud/secret_manager/v1/rest"
|
28
|
+
# client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Rest::Client.new
|
29
|
+
#
|
30
|
+
module V1
|
31
|
+
##
|
32
|
+
# @private
|
33
|
+
# Initialize the mixin bindings configuration
|
34
|
+
#
|
35
|
+
def self.configure
|
36
|
+
@configure ||= begin
|
37
|
+
namespace = ["Google", "Cloud", "SecretManager"]
|
38
|
+
parent_config = while namespace.any?
|
39
|
+
parent_name = namespace.join "::"
|
40
|
+
parent_const = const_get parent_name
|
41
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
42
|
+
namespace.pop
|
43
|
+
end
|
44
|
+
|
45
|
+
default_config = Configuration.new parent_config
|
46
|
+
default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [
|
47
|
+
Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
|
48
|
+
uri_method: :get,
|
49
|
+
uri_template: "/v1/{name}",
|
50
|
+
matches: [
|
51
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
52
|
+
],
|
53
|
+
body: nil
|
54
|
+
)
|
55
|
+
]
|
56
|
+
default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [
|
57
|
+
|
58
|
+
Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
|
59
|
+
uri_method: :get,
|
60
|
+
uri_template: "/v1/{name}/locations",
|
61
|
+
matches: [
|
62
|
+
["name", %r{^projects/[^/]+/?$}, false]
|
63
|
+
],
|
64
|
+
body: nil
|
65
|
+
)
|
66
|
+
]
|
67
|
+
default_config
|
68
|
+
end
|
69
|
+
yield @configure if block_given?
|
70
|
+
@configure
|
71
|
+
end
|
72
|
+
|
73
|
+
##
|
74
|
+
# @private
|
75
|
+
# Configuration class for the google.cloud.secretmanager.v1 package.
|
76
|
+
#
|
77
|
+
# This class contains common configuration for all services
|
78
|
+
# of the google.cloud.secretmanager.v1 package.
|
79
|
+
#
|
80
|
+
# This configuration is for internal use of the client library classes,
|
81
|
+
# and it is not intended that the end-users will read or change it.
|
82
|
+
#
|
83
|
+
class Configuration
|
84
|
+
extend ::Gapic::Config
|
85
|
+
|
86
|
+
# @private
|
87
|
+
# Overrides for http bindings for the RPC of the mixins for this package.
|
88
|
+
# Services in this package should use these when creating clients for the mixin services.
|
89
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
90
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
91
|
+
|
92
|
+
# @private
|
93
|
+
def initialize parent_config = nil
|
94
|
+
@parent_config = parent_config unless parent_config.nil?
|
95
|
+
|
96
|
+
yield self if block_given?
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
@@ -17,6 +17,7 @@
|
|
17
17
|
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
18
|
|
19
19
|
require "google/cloud/secret_manager/v1/secret_manager_service/rest"
|
20
|
+
require "google/cloud/secret_manager/v1/bindings_override"
|
20
21
|
require "google/cloud/secret_manager/v1/version"
|
21
22
|
|
22
23
|
module Google
|
@@ -18,6 +18,7 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/secretmanager/v1/service_pb"
|
21
|
+
require "google/cloud/location"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -195,8 +196,22 @@ module Google
|
|
195
196
|
interceptors: @config.interceptors,
|
196
197
|
channel_pool_config: @config.channel_pool
|
197
198
|
)
|
199
|
+
|
200
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
201
|
+
config.credentials = credentials
|
202
|
+
config.quota_project = @quota_project_id
|
203
|
+
config.endpoint = @secret_manager_service_stub.endpoint
|
204
|
+
config.universe_domain = @secret_manager_service_stub.universe_domain
|
205
|
+
end
|
198
206
|
end
|
199
207
|
|
208
|
+
##
|
209
|
+
# Get the associated client for mix-in of the Locations.
|
210
|
+
#
|
211
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
212
|
+
#
|
213
|
+
attr_reader :location_client
|
214
|
+
|
200
215
|
# Service calls
|
201
216
|
|
202
217
|
##
|
@@ -219,7 +234,8 @@ module Google
|
|
219
234
|
#
|
220
235
|
# @param parent [::String]
|
221
236
|
# Required. The resource name of the project associated with the
|
222
|
-
# {::Google::Cloud::SecretManager::V1::Secret Secrets}, in the format `projects
|
237
|
+
# {::Google::Cloud::SecretManager::V1::Secret Secrets}, in the format `projects/*`
|
238
|
+
# or `projects/*/locations/*`
|
223
239
|
# @param page_size [::Integer]
|
224
240
|
# Optional. The maximum number of results to be returned in a single page. If
|
225
241
|
# set to 0, the server decides the number of results to return. If the
|
@@ -304,7 +320,8 @@ module Google
|
|
304
320
|
end
|
305
321
|
|
306
322
|
##
|
307
|
-
# Creates a new {::Google::Cloud::SecretManager::V1::Secret Secret} containing no
|
323
|
+
# Creates a new {::Google::Cloud::SecretManager::V1::Secret Secret} containing no
|
324
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions}.
|
308
325
|
#
|
309
326
|
# @overload create_secret(request, options = nil)
|
310
327
|
# Pass arguments to `create_secret` via a request object, either of type
|
@@ -323,7 +340,8 @@ module Google
|
|
323
340
|
#
|
324
341
|
# @param parent [::String]
|
325
342
|
# Required. The resource name of the project to associate with the
|
326
|
-
# {::Google::Cloud::SecretManager::V1::Secret Secret}, in the format `projects
|
343
|
+
# {::Google::Cloud::SecretManager::V1::Secret Secret}, in the format `projects/*`
|
344
|
+
# or `projects/*/locations/*`.
|
327
345
|
# @param secret_id [::String]
|
328
346
|
# Required. This must be unique within the project.
|
329
347
|
#
|
@@ -331,7 +349,8 @@ module Google
|
|
331
349
|
# contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and
|
332
350
|
# underscore (`_`) characters.
|
333
351
|
# @param secret [::Google::Cloud::SecretManager::V1::Secret, ::Hash]
|
334
|
-
# Required. A {::Google::Cloud::SecretManager::V1::Secret Secret} with initial
|
352
|
+
# Required. A {::Google::Cloud::SecretManager::V1::Secret Secret} with initial
|
353
|
+
# field values.
|
335
354
|
#
|
336
355
|
# @yield [response, operation] Access the result along with the RPC operation
|
337
356
|
# @yieldparam response [::Google::Cloud::SecretManager::V1::Secret]
|
@@ -398,8 +417,9 @@ module Google
|
|
398
417
|
end
|
399
418
|
|
400
419
|
##
|
401
|
-
# Creates a new {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}
|
402
|
-
# it to an existing
|
420
|
+
# Creates a new {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}
|
421
|
+
# containing secret data and attaches it to an existing
|
422
|
+
# {::Google::Cloud::SecretManager::V1::Secret Secret}.
|
403
423
|
#
|
404
424
|
# @overload add_secret_version(request, options = nil)
|
405
425
|
# Pass arguments to `add_secret_version` via a request object, either of type
|
@@ -417,10 +437,13 @@ module Google
|
|
417
437
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
418
438
|
#
|
419
439
|
# @param parent [::String]
|
420
|
-
# Required. The resource name of the
|
421
|
-
# {::Google::Cloud::SecretManager::V1::
|
440
|
+
# Required. The resource name of the
|
441
|
+
# {::Google::Cloud::SecretManager::V1::Secret Secret} to associate with the
|
442
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} in the format
|
443
|
+
# `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.
|
422
444
|
# @param payload [::Google::Cloud::SecretManager::V1::SecretPayload, ::Hash]
|
423
|
-
# Required. The secret payload of the
|
445
|
+
# Required. The secret payload of the
|
446
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
424
447
|
#
|
425
448
|
# @yield [response, operation] Access the result along with the RPC operation
|
426
449
|
# @yieldparam response [::Google::Cloud::SecretManager::V1::SecretVersion]
|
@@ -505,7 +528,9 @@ module Google
|
|
505
528
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
506
529
|
#
|
507
530
|
# @param name [::String]
|
508
|
-
# Required. The resource name of the
|
531
|
+
# Required. The resource name of the
|
532
|
+
# {::Google::Cloud::SecretManager::V1::Secret Secret}, in the format
|
533
|
+
# `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.
|
509
534
|
#
|
510
535
|
# @yield [response, operation] Access the result along with the RPC operation
|
511
536
|
# @yieldparam response [::Google::Cloud::SecretManager::V1::Secret]
|
@@ -572,7 +597,8 @@ module Google
|
|
572
597
|
end
|
573
598
|
|
574
599
|
##
|
575
|
-
# Updates metadata of an existing
|
600
|
+
# Updates metadata of an existing
|
601
|
+
# {::Google::Cloud::SecretManager::V1::Secret Secret}.
|
576
602
|
#
|
577
603
|
# @overload update_secret(request, options = nil)
|
578
604
|
# Pass arguments to `update_secret` via a request object, either of type
|
@@ -590,7 +616,8 @@ module Google
|
|
590
616
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
591
617
|
#
|
592
618
|
# @param secret [::Google::Cloud::SecretManager::V1::Secret, ::Hash]
|
593
|
-
# Required. {::Google::Cloud::SecretManager::V1::Secret Secret} with updated field
|
619
|
+
# Required. {::Google::Cloud::SecretManager::V1::Secret Secret} with updated field
|
620
|
+
# values.
|
594
621
|
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
595
622
|
# Required. Specifies the fields to be updated.
|
596
623
|
#
|
@@ -677,12 +704,13 @@ module Google
|
|
677
704
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
678
705
|
#
|
679
706
|
# @param name [::String]
|
680
|
-
# Required. The resource name of the
|
707
|
+
# Required. The resource name of the
|
708
|
+
# {::Google::Cloud::SecretManager::V1::Secret Secret} to delete in the format
|
681
709
|
# `projects/*/secrets/*`.
|
682
710
|
# @param etag [::String]
|
683
|
-
# Optional. Etag of the {::Google::Cloud::SecretManager::V1::Secret Secret}. The
|
684
|
-
# the etag of the currently stored secret
|
685
|
-
# the request succeeds.
|
711
|
+
# Optional. Etag of the {::Google::Cloud::SecretManager::V1::Secret Secret}. The
|
712
|
+
# request succeeds if it matches the etag of the currently stored secret
|
713
|
+
# object. If the etag is omitted, the request succeeds.
|
686
714
|
#
|
687
715
|
# @yield [response, operation] Access the result along with the RPC operation
|
688
716
|
# @yieldparam response [::Google::Protobuf::Empty]
|
@@ -749,8 +777,8 @@ module Google
|
|
749
777
|
end
|
750
778
|
|
751
779
|
##
|
752
|
-
# Lists {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions}. This
|
753
|
-
# data.
|
780
|
+
# Lists {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions}. This
|
781
|
+
# call does not return secret data.
|
754
782
|
#
|
755
783
|
# @overload list_secret_versions(request, options = nil)
|
756
784
|
# Pass arguments to `list_secret_versions` via a request object, either of type
|
@@ -768,9 +796,10 @@ module Google
|
|
768
796
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
769
797
|
#
|
770
798
|
# @param parent [::String]
|
771
|
-
# Required. The resource name of the
|
772
|
-
# {::Google::Cloud::SecretManager::V1::
|
773
|
-
#
|
799
|
+
# Required. The resource name of the
|
800
|
+
# {::Google::Cloud::SecretManager::V1::Secret Secret} associated with the
|
801
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions} to list, in
|
802
|
+
# the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.
|
774
803
|
# @param page_size [::Integer]
|
775
804
|
# Optional. The maximum number of results to be returned in a single page. If
|
776
805
|
# set to 0, the server decides the number of results to return. If the
|
@@ -855,7 +884,8 @@ module Google
|
|
855
884
|
end
|
856
885
|
|
857
886
|
##
|
858
|
-
# Gets metadata for a
|
887
|
+
# Gets metadata for a
|
888
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
859
889
|
#
|
860
890
|
# `projects/*/secrets/*/versions/latest` is an alias to the most recently
|
861
891
|
# created {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
@@ -876,11 +906,15 @@ module Google
|
|
876
906
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
877
907
|
#
|
878
908
|
# @param name [::String]
|
879
|
-
# Required. The resource name of the
|
880
|
-
#
|
909
|
+
# Required. The resource name of the
|
910
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} in the format
|
911
|
+
# `projects/*/secrets/*/versions/*` or
|
912
|
+
# `projects/*/locations/*/secrets/*/versions/*`.
|
881
913
|
#
|
882
|
-
# `projects/*/secrets/*/versions/latest`
|
883
|
-
#
|
914
|
+
# `projects/*/secrets/*/versions/latest` or
|
915
|
+
# `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most
|
916
|
+
# recently created
|
917
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
884
918
|
#
|
885
919
|
# @yield [response, operation] Access the result along with the RPC operation
|
886
920
|
# @yieldparam response [::Google::Cloud::SecretManager::V1::SecretVersion]
|
@@ -947,7 +981,8 @@ module Google
|
|
947
981
|
end
|
948
982
|
|
949
983
|
##
|
950
|
-
# Accesses a {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
984
|
+
# Accesses a {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
985
|
+
# This call returns the secret data.
|
951
986
|
#
|
952
987
|
# `projects/*/secrets/*/versions/latest` is an alias to the most recently
|
953
988
|
# created {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
@@ -968,11 +1003,15 @@ module Google
|
|
968
1003
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
969
1004
|
#
|
970
1005
|
# @param name [::String]
|
971
|
-
# Required. The resource name of the
|
972
|
-
#
|
1006
|
+
# Required. The resource name of the
|
1007
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} in the format
|
1008
|
+
# `projects/*/secrets/*/versions/*` or
|
1009
|
+
# `projects/*/locations/*/secrets/*/versions/*`.
|
973
1010
|
#
|
974
|
-
# `projects/*/secrets/*/versions/latest`
|
975
|
-
#
|
1011
|
+
# `projects/*/secrets/*/versions/latest` or
|
1012
|
+
# `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most
|
1013
|
+
# recently created
|
1014
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
976
1015
|
#
|
977
1016
|
# @yield [response, operation] Access the result along with the RPC operation
|
978
1017
|
# @yieldparam response [::Google::Cloud::SecretManager::V1::AccessSecretVersionResponse]
|
@@ -1041,7 +1080,8 @@ module Google
|
|
1041
1080
|
##
|
1042
1081
|
# Disables a {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
1043
1082
|
#
|
1044
|
-
# Sets the {::Google::Cloud::SecretManager::V1::SecretVersion#state state} of the
|
1083
|
+
# Sets the {::Google::Cloud::SecretManager::V1::SecretVersion#state state} of the
|
1084
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
|
1045
1085
|
# {::Google::Cloud::SecretManager::V1::SecretVersion::State::DISABLED DISABLED}.
|
1046
1086
|
#
|
1047
1087
|
# @overload disable_secret_version(request, options = nil)
|
@@ -1060,12 +1100,15 @@ module Google
|
|
1060
1100
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1061
1101
|
#
|
1062
1102
|
# @param name [::String]
|
1063
|
-
# Required. The resource name of the
|
1064
|
-
#
|
1103
|
+
# Required. The resource name of the
|
1104
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to disable in
|
1105
|
+
# the format `projects/*/secrets/*/versions/*` or
|
1106
|
+
# `projects/*/locations/*/secrets/*/versions/*`.
|
1065
1107
|
# @param etag [::String]
|
1066
|
-
# Optional. Etag of the
|
1067
|
-
#
|
1068
|
-
#
|
1108
|
+
# Optional. Etag of the
|
1109
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}. The request
|
1110
|
+
# succeeds if it matches the etag of the currently stored secret version
|
1111
|
+
# object. If the etag is omitted, the request succeeds.
|
1069
1112
|
#
|
1070
1113
|
# @yield [response, operation] Access the result along with the RPC operation
|
1071
1114
|
# @yieldparam response [::Google::Cloud::SecretManager::V1::SecretVersion]
|
@@ -1134,7 +1177,8 @@ module Google
|
|
1134
1177
|
##
|
1135
1178
|
# Enables a {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
1136
1179
|
#
|
1137
|
-
# Sets the {::Google::Cloud::SecretManager::V1::SecretVersion#state state} of the
|
1180
|
+
# Sets the {::Google::Cloud::SecretManager::V1::SecretVersion#state state} of the
|
1181
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
|
1138
1182
|
# {::Google::Cloud::SecretManager::V1::SecretVersion::State::ENABLED ENABLED}.
|
1139
1183
|
#
|
1140
1184
|
# @overload enable_secret_version(request, options = nil)
|
@@ -1153,12 +1197,15 @@ module Google
|
|
1153
1197
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1154
1198
|
#
|
1155
1199
|
# @param name [::String]
|
1156
|
-
# Required. The resource name of the
|
1157
|
-
#
|
1200
|
+
# Required. The resource name of the
|
1201
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to enable in
|
1202
|
+
# the format `projects/*/secrets/*/versions/*` or
|
1203
|
+
# `projects/*/locations/*/secrets/*/versions/*`.
|
1158
1204
|
# @param etag [::String]
|
1159
|
-
# Optional. Etag of the
|
1160
|
-
#
|
1161
|
-
#
|
1205
|
+
# Optional. Etag of the
|
1206
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}. The request
|
1207
|
+
# succeeds if it matches the etag of the currently stored secret version
|
1208
|
+
# object. If the etag is omitted, the request succeeds.
|
1162
1209
|
#
|
1163
1210
|
# @yield [response, operation] Access the result along with the RPC operation
|
1164
1211
|
# @yieldparam response [::Google::Cloud::SecretManager::V1::SecretVersion]
|
@@ -1227,9 +1274,10 @@ module Google
|
|
1227
1274
|
##
|
1228
1275
|
# Destroys a {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
1229
1276
|
#
|
1230
|
-
# Sets the {::Google::Cloud::SecretManager::V1::SecretVersion#state state} of the
|
1231
|
-
# {::Google::Cloud::SecretManager::V1::SecretVersion
|
1232
|
-
#
|
1277
|
+
# Sets the {::Google::Cloud::SecretManager::V1::SecretVersion#state state} of the
|
1278
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
|
1279
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion::State::DESTROYED DESTROYED}
|
1280
|
+
# and irrevocably destroys the secret data.
|
1233
1281
|
#
|
1234
1282
|
# @overload destroy_secret_version(request, options = nil)
|
1235
1283
|
# Pass arguments to `destroy_secret_version` via a request object, either of type
|
@@ -1247,12 +1295,15 @@ module Google
|
|
1247
1295
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1248
1296
|
#
|
1249
1297
|
# @param name [::String]
|
1250
|
-
# Required. The resource name of the
|
1251
|
-
#
|
1298
|
+
# Required. The resource name of the
|
1299
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to destroy in
|
1300
|
+
# the format `projects/*/secrets/*/versions/*` or
|
1301
|
+
# `projects/*/locations/*/secrets/*/versions/*`.
|
1252
1302
|
# @param etag [::String]
|
1253
|
-
# Optional. Etag of the
|
1254
|
-
#
|
1255
|
-
#
|
1303
|
+
# Optional. Etag of the
|
1304
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}. The request
|
1305
|
+
# succeeds if it matches the etag of the currently stored secret version
|
1306
|
+
# object. If the etag is omitted, the request succeeds.
|
1256
1307
|
#
|
1257
1308
|
# @yield [response, operation] Access the result along with the RPC operation
|
1258
1309
|
# @yieldparam response [::Google::Cloud::SecretManager::V1::SecretVersion]
|
@@ -1322,8 +1373,10 @@ module Google
|
|
1322
1373
|
# Sets the access control policy on the specified secret. Replaces any
|
1323
1374
|
# existing policy.
|
1324
1375
|
#
|
1325
|
-
# Permissions on
|
1326
|
-
#
|
1376
|
+
# Permissions on
|
1377
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions} are enforced
|
1378
|
+
# according to the policy set on the associated
|
1379
|
+
# {::Google::Cloud::SecretManager::V1::Secret Secret}.
|
1327
1380
|
#
|
1328
1381
|
# @overload set_iam_policy(request, options = nil)
|
1329
1382
|
# Pass arguments to `set_iam_policy` via a request object, either of type
|
@@ -24,6 +24,23 @@ module Google
|
|
24
24
|
module SecretManagerService
|
25
25
|
# Path helper methods for the SecretManagerService API.
|
26
26
|
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified Location resource string.
|
29
|
+
#
|
30
|
+
# The resource will be in the following format:
|
31
|
+
#
|
32
|
+
# `projects/{project}/locations/{location}`
|
33
|
+
#
|
34
|
+
# @param project [String]
|
35
|
+
# @param location [String]
|
36
|
+
#
|
37
|
+
# @return [::String]
|
38
|
+
def location_path project:, location:
|
39
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
40
|
+
|
41
|
+
"projects/#{project}/locations/#{location}"
|
42
|
+
end
|
43
|
+
|
27
44
|
##
|
28
45
|
# Create a fully-qualified Project resource string.
|
29
46
|
#
|
@@ -41,37 +58,87 @@ module Google
|
|
41
58
|
##
|
42
59
|
# Create a fully-qualified Secret resource string.
|
43
60
|
#
|
44
|
-
#
|
61
|
+
# @overload secret_path(project:, secret:)
|
62
|
+
# The resource will be in the following format:
|
45
63
|
#
|
46
|
-
#
|
64
|
+
# `projects/{project}/secrets/{secret}`
|
47
65
|
#
|
48
|
-
#
|
49
|
-
#
|
66
|
+
# @param project [String]
|
67
|
+
# @param secret [String]
|
68
|
+
#
|
69
|
+
# @overload secret_path(project:, location:, secret:)
|
70
|
+
# The resource will be in the following format:
|
71
|
+
#
|
72
|
+
# `projects/{project}/locations/{location}/secrets/{secret}`
|
73
|
+
#
|
74
|
+
# @param project [String]
|
75
|
+
# @param location [String]
|
76
|
+
# @param secret [String]
|
50
77
|
#
|
51
78
|
# @return [::String]
|
52
|
-
def secret_path
|
53
|
-
|
79
|
+
def secret_path **args
|
80
|
+
resources = {
|
81
|
+
"project:secret" => (proc do |project:, secret:|
|
82
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
54
83
|
|
55
|
-
|
84
|
+
"projects/#{project}/secrets/#{secret}"
|
85
|
+
end),
|
86
|
+
"location:project:secret" => (proc do |project:, location:, secret:|
|
87
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
88
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
89
|
+
|
90
|
+
"projects/#{project}/locations/#{location}/secrets/#{secret}"
|
91
|
+
end)
|
92
|
+
}
|
93
|
+
|
94
|
+
resource = resources[args.keys.sort.join(":")]
|
95
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
96
|
+
resource.call(**args)
|
56
97
|
end
|
57
98
|
|
58
99
|
##
|
59
100
|
# Create a fully-qualified SecretVersion resource string.
|
60
101
|
#
|
61
|
-
#
|
102
|
+
# @overload secret_version_path(project:, secret:, secret_version:)
|
103
|
+
# The resource will be in the following format:
|
62
104
|
#
|
63
|
-
#
|
105
|
+
# `projects/{project}/secrets/{secret}/versions/{secret_version}`
|
64
106
|
#
|
65
|
-
#
|
66
|
-
#
|
67
|
-
#
|
107
|
+
# @param project [String]
|
108
|
+
# @param secret [String]
|
109
|
+
# @param secret_version [String]
|
110
|
+
#
|
111
|
+
# @overload secret_version_path(project:, location:, secret:, secret_version:)
|
112
|
+
# The resource will be in the following format:
|
113
|
+
#
|
114
|
+
# `projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}`
|
115
|
+
#
|
116
|
+
# @param project [String]
|
117
|
+
# @param location [String]
|
118
|
+
# @param secret [String]
|
119
|
+
# @param secret_version [String]
|
68
120
|
#
|
69
121
|
# @return [::String]
|
70
|
-
def secret_version_path
|
71
|
-
|
72
|
-
|
122
|
+
def secret_version_path **args
|
123
|
+
resources = {
|
124
|
+
"project:secret:secret_version" => (proc do |project:, secret:, secret_version:|
|
125
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
126
|
+
raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/"
|
127
|
+
|
128
|
+
"projects/#{project}/secrets/#{secret}/versions/#{secret_version}"
|
129
|
+
end),
|
130
|
+
"location:project:secret:secret_version" => (proc do |project:, location:, secret:, secret_version:|
|
131
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
132
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
133
|
+
raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/"
|
134
|
+
|
135
|
+
"projects/#{project}/locations/#{location}/secrets/#{secret}/versions/#{secret_version}"
|
136
|
+
end)
|
137
|
+
}
|
73
138
|
|
74
|
-
"
|
139
|
+
resource = resources[args.keys.sort.join(":")]
|
140
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
141
|
+
resource.call(**args)
|
75
142
|
end
|
76
143
|
|
77
144
|
##
|