google-cloud-secret_manager-v1beta1 0.16.0 → 0.17.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c8fd3620add37cea2fd9df86984a15d2a7a4cf864a3173615dc0d9acda89d495
4
- data.tar.gz: afa6a4c3bc9ee0f939a7c514fa7e48060673d8f62f2def1abf49c526e6f4f6bf
3
+ metadata.gz: d1348f6666aad6bb95e73c417737b6da67e8fffbc6b781daaa3d2edcae9db3ef
4
+ data.tar.gz: '058c383d59fce1c4680590b8d75c7df44b5245b6af025e2e742b892caadb9136'
5
5
  SHA512:
6
- metadata.gz: e3f8b725ed5c524f4d2a912ac3b87f65dfbfa85c502e0ce8ac7f551e5970891062457b0de69e34123c13df5b6a0bef69b755d736cfe5df1e577d4913aba1a726
7
- data.tar.gz: 4c79b50f1c02a1b016a9324886559d0fc11bde5f6e1c531ed425229c48ea5a32a4c650e07b5b77dcda6fcd3f66bc03865f73143aa9a7b9a2f761c6ed0836b99c
6
+ metadata.gz: 39d0b88e9d8a125aad301a51c6546956f93700b3987090a76d5c7864a8558b58909697599b0c4161fcf859abbf620bf44ce620733c0108f7de28391e478e1891
7
+ data.tar.gz: 470d9e350f920e222d7375d51eb53581379043ae3998a9454203a377dbfeb253ca788f150cb63bf7d2f032b5b6957dc142edb5728ce0e1a86eb5bc760c4cfd61
data/README.md CHANGED
@@ -86,7 +86,7 @@ To browse ready to use code samples check [Google Cloud Samples](https://cloud.g
86
86
 
87
87
  ## Supported Ruby Versions
88
88
 
89
- This library is supported on Ruby 2.7+.
89
+ This library is supported on Ruby 3.0+.
90
90
 
91
91
  Google provides official support for Ruby versions that are actively supported
92
92
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -0,0 +1,102 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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/v1beta1/rest"
28
+ # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new
29
+ #
30
+ module V1beta1
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: "/v1beta1/{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: "/v1beta1/{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.secrets.v1beta1 package.
76
+ #
77
+ # This class contains common configuration for all services
78
+ # of the google.cloud.secrets.v1beta1 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/v1beta1/secret_manager_service/rest"
20
+ require "google/cloud/secret_manager/v1beta1/bindings_override"
20
21
  require "google/cloud/secret_manager/v1beta1/version"
21
22
 
22
23
  module Google
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/secrets/v1beta1/service_pb"
21
+ require "google/cloud/location"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -209,8 +210,23 @@ module Google
209
210
  entry.set "defaultTimeout", @config.timeout if @config.timeout
210
211
  entry.set "quotaProject", @quota_project_id if @quota_project_id
211
212
  end
213
+
214
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
215
+ config.credentials = credentials
216
+ config.quota_project = @quota_project_id
217
+ config.endpoint = @secret_manager_service_stub.endpoint
218
+ config.universe_domain = @secret_manager_service_stub.universe_domain
219
+ config.logger = @secret_manager_service_stub.logger if config.respond_to? :logger=
220
+ end
212
221
  end
213
222
 
223
+ ##
224
+ # Get the associated client for mix-in of the Locations.
225
+ #
226
+ # @return [Google::Cloud::Location::Locations::Client]
227
+ #
228
+ attr_reader :location_client
229
+
214
230
  ##
215
231
  # The logger used for request/response debug logging.
216
232
  #
@@ -322,7 +338,8 @@ module Google
322
338
  end
323
339
 
324
340
  ##
325
- # Creates a new {::Google::Cloud::SecretManager::V1beta1::Secret Secret} containing no {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}.
341
+ # Creates a new {::Google::Cloud::SecretManager::V1beta1::Secret Secret} containing no
342
+ # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}.
326
343
  #
327
344
  # @overload create_secret(request, options = nil)
328
345
  # Pass arguments to `create_secret` via a request object, either of type
@@ -349,7 +366,8 @@ module Google
349
366
  # contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and
350
367
  # underscore (`_`) characters.
351
368
  # @param secret [::Google::Cloud::SecretManager::V1beta1::Secret, ::Hash]
352
- # Required. A {::Google::Cloud::SecretManager::V1beta1::Secret Secret} with initial field values.
369
+ # Required. A {::Google::Cloud::SecretManager::V1beta1::Secret Secret} with initial
370
+ # field values.
353
371
  #
354
372
  # @yield [response, operation] Access the result along with the RPC operation
355
373
  # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::Secret]
@@ -416,8 +434,9 @@ module Google
416
434
  end
417
435
 
418
436
  ##
419
- # Creates a new {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} containing secret data and attaches
420
- # it to an existing {::Google::Cloud::SecretManager::V1beta1::Secret Secret}.
437
+ # Creates a new {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}
438
+ # containing secret data and attaches it to an existing
439
+ # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}.
421
440
  #
422
441
  # @overload add_secret_version(request, options = nil)
423
442
  # Pass arguments to `add_secret_version` via a request object, either of type
@@ -435,10 +454,13 @@ module Google
435
454
  # the default parameter values, pass an empty Hash as a request object (see above).
436
455
  #
437
456
  # @param parent [::String]
438
- # Required. The resource name of the {::Google::Cloud::SecretManager::V1beta1::Secret Secret} to associate with the
439
- # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format `projects/*/secrets/*`.
457
+ # Required. The resource name of the
458
+ # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} to associate with the
459
+ # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format
460
+ # `projects/*/secrets/*`.
440
461
  # @param payload [::Google::Cloud::SecretManager::V1beta1::SecretPayload, ::Hash]
441
- # Required. The secret payload of the {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
462
+ # Required. The secret payload of the
463
+ # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
442
464
  #
443
465
  # @yield [response, operation] Access the result along with the RPC operation
444
466
  # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::SecretVersion]
@@ -523,7 +545,9 @@ module Google
523
545
  # the default parameter values, pass an empty Hash as a request object (see above).
524
546
  #
525
547
  # @param name [::String]
526
- # Required. The resource name of the {::Google::Cloud::SecretManager::V1beta1::Secret Secret}, in the format `projects/*/secrets/*`.
548
+ # Required. The resource name of the
549
+ # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}, in the format
550
+ # `projects/*/secrets/*`.
527
551
  #
528
552
  # @yield [response, operation] Access the result along with the RPC operation
529
553
  # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::Secret]
@@ -590,7 +614,8 @@ module Google
590
614
  end
591
615
 
592
616
  ##
593
- # Updates metadata of an existing {::Google::Cloud::SecretManager::V1beta1::Secret Secret}.
617
+ # Updates metadata of an existing
618
+ # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}.
594
619
  #
595
620
  # @overload update_secret(request, options = nil)
596
621
  # Pass arguments to `update_secret` via a request object, either of type
@@ -608,7 +633,8 @@ module Google
608
633
  # the default parameter values, pass an empty Hash as a request object (see above).
609
634
  #
610
635
  # @param secret [::Google::Cloud::SecretManager::V1beta1::Secret, ::Hash]
611
- # Required. {::Google::Cloud::SecretManager::V1beta1::Secret Secret} with updated field values.
636
+ # Required. {::Google::Cloud::SecretManager::V1beta1::Secret Secret} with updated field
637
+ # values.
612
638
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
613
639
  # Required. Specifies the fields to be updated.
614
640
  #
@@ -695,7 +721,8 @@ module Google
695
721
  # the default parameter values, pass an empty Hash as a request object (see above).
696
722
  #
697
723
  # @param name [::String]
698
- # Required. The resource name of the {::Google::Cloud::SecretManager::V1beta1::Secret Secret} to delete in the format
724
+ # Required. The resource name of the
725
+ # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} to delete in the format
699
726
  # `projects/*/secrets/*`.
700
727
  #
701
728
  # @yield [response, operation] Access the result along with the RPC operation
@@ -763,8 +790,8 @@ module Google
763
790
  end
764
791
 
765
792
  ##
766
- # Lists {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}. This call does not return secret
767
- # data.
793
+ # Lists {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}. This
794
+ # call does not return secret data.
768
795
  #
769
796
  # @overload list_secret_versions(request, options = nil)
770
797
  # Pass arguments to `list_secret_versions` via a request object, either of type
@@ -782,9 +809,10 @@ module Google
782
809
  # the default parameter values, pass an empty Hash as a request object (see above).
783
810
  #
784
811
  # @param parent [::String]
785
- # Required. The resource name of the {::Google::Cloud::SecretManager::V1beta1::Secret Secret} associated with the
786
- # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} to list, in the format
787
- # `projects/*/secrets/*`.
812
+ # Required. The resource name of the
813
+ # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} associated with the
814
+ # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} to list, in
815
+ # the format `projects/*/secrets/*`.
788
816
  # @param page_size [::Integer]
789
817
  # Optional. The maximum number of results to be returned in a single page. If
790
818
  # set to 0, the server decides the number of results to return. If the
@@ -864,7 +892,8 @@ module Google
864
892
  end
865
893
 
866
894
  ##
867
- # Gets metadata for a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
895
+ # Gets metadata for a
896
+ # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
868
897
  #
869
898
  # `projects/*/secrets/*/versions/latest` is an alias to the `latest`
870
899
  # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
@@ -885,7 +914,8 @@ module Google
885
914
  # the default parameter values, pass an empty Hash as a request object (see above).
886
915
  #
887
916
  # @param name [::String]
888
- # Required. The resource name of the {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format
917
+ # Required. The resource name of the
918
+ # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format
889
919
  # `projects/*/secrets/*/versions/*`.
890
920
  # `projects/*/secrets/*/versions/latest` is an alias to the `latest`
891
921
  # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
@@ -955,7 +985,8 @@ module Google
955
985
  end
956
986
 
957
987
  ##
958
- # Accesses a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. This call returns the secret data.
988
+ # Accesses a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
989
+ # This call returns the secret data.
959
990
  #
960
991
  # `projects/*/secrets/*/versions/latest` is an alias to the `latest`
961
992
  # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
@@ -976,7 +1007,8 @@ module Google
976
1007
  # the default parameter values, pass an empty Hash as a request object (see above).
977
1008
  #
978
1009
  # @param name [::String]
979
- # Required. The resource name of the {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format
1010
+ # Required. The resource name of the
1011
+ # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format
980
1012
  # `projects/*/secrets/*/versions/*`.
981
1013
  #
982
1014
  # @yield [response, operation] Access the result along with the RPC operation
@@ -1046,7 +1078,8 @@ module Google
1046
1078
  ##
1047
1079
  # Disables a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
1048
1080
  #
1049
- # Sets the {::Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to
1081
+ # Sets the {::Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the
1082
+ # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to
1050
1083
  # {::Google::Cloud::SecretManager::V1beta1::SecretVersion::State::DISABLED DISABLED}.
1051
1084
  #
1052
1085
  # @overload disable_secret_version(request, options = nil)
@@ -1065,8 +1098,9 @@ module Google
1065
1098
  # the default parameter values, pass an empty Hash as a request object (see above).
1066
1099
  #
1067
1100
  # @param name [::String]
1068
- # Required. The resource name of the {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to disable in the format
1069
- # `projects/*/secrets/*/versions/*`.
1101
+ # Required. The resource name of the
1102
+ # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to disable in
1103
+ # the format `projects/*/secrets/*/versions/*`.
1070
1104
  #
1071
1105
  # @yield [response, operation] Access the result along with the RPC operation
1072
1106
  # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::SecretVersion]
@@ -1135,7 +1169,8 @@ module Google
1135
1169
  ##
1136
1170
  # Enables a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
1137
1171
  #
1138
- # Sets the {::Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to
1172
+ # Sets the {::Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the
1173
+ # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to
1139
1174
  # {::Google::Cloud::SecretManager::V1beta1::SecretVersion::State::ENABLED ENABLED}.
1140
1175
  #
1141
1176
  # @overload enable_secret_version(request, options = nil)
@@ -1154,8 +1189,9 @@ module Google
1154
1189
  # the default parameter values, pass an empty Hash as a request object (see above).
1155
1190
  #
1156
1191
  # @param name [::String]
1157
- # Required. The resource name of the {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to enable in the format
1158
- # `projects/*/secrets/*/versions/*`.
1192
+ # Required. The resource name of the
1193
+ # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to enable in
1194
+ # the format `projects/*/secrets/*/versions/*`.
1159
1195
  #
1160
1196
  # @yield [response, operation] Access the result along with the RPC operation
1161
1197
  # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::SecretVersion]
@@ -1224,9 +1260,10 @@ module Google
1224
1260
  ##
1225
1261
  # Destroys a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
1226
1262
  #
1227
- # Sets the {::Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to
1228
- # {::Google::Cloud::SecretManager::V1beta1::SecretVersion::State::DESTROYED DESTROYED} and irrevocably destroys the
1229
- # secret data.
1263
+ # Sets the {::Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the
1264
+ # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to
1265
+ # {::Google::Cloud::SecretManager::V1beta1::SecretVersion::State::DESTROYED DESTROYED} and
1266
+ # irrevocably destroys the secret data.
1230
1267
  #
1231
1268
  # @overload destroy_secret_version(request, options = nil)
1232
1269
  # Pass arguments to `destroy_secret_version` via a request object, either of type
@@ -1244,8 +1281,9 @@ module Google
1244
1281
  # the default parameter values, pass an empty Hash as a request object (see above).
1245
1282
  #
1246
1283
  # @param name [::String]
1247
- # Required. The resource name of the {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to destroy in the format
1248
- # `projects/*/secrets/*/versions/*`.
1284
+ # Required. The resource name of the
1285
+ # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to destroy in
1286
+ # the format `projects/*/secrets/*/versions/*`.
1249
1287
  #
1250
1288
  # @yield [response, operation] Access the result along with the RPC operation
1251
1289
  # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::SecretVersion]
@@ -1315,8 +1353,9 @@ module Google
1315
1353
  # Sets the access control policy on the specified secret. Replaces any
1316
1354
  # existing policy.
1317
1355
  #
1318
- # Permissions on {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} are enforced according
1319
- # to the policy set on the associated {::Google::Cloud::SecretManager::V1beta1::Secret Secret}.
1356
+ # Permissions on {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}
1357
+ # are enforced according to the policy set on the associated
1358
+ # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}.
1320
1359
  #
1321
1360
  # @overload set_iam_policy(request, options = nil)
1322
1361
  # Pass arguments to `set_iam_policy` via a request object, either of type
@@ -1643,6 +1682,13 @@ module Google
1643
1682
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1644
1683
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1645
1684
  # * (`nil`) indicating no credentials
1685
+ #
1686
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1687
+ # external source for authentication to Google Cloud, you must validate it before
1688
+ # providing it to a Google API client library. Providing an unvalidated credential
1689
+ # configuration to Google APIs can compromise the security of your systems and data.
1690
+ # For more information, refer to [Validate credential configurations from external
1691
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1646
1692
  # @return [::Object]
1647
1693
  # @!attribute [rw] scope
1648
1694
  # The OAuth scopes