google-cloud-secret_manager-v1 0.20.0 → 1.0.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.
@@ -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
@@ -36,6 +37,9 @@ module Google
36
37
  # * {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}
37
38
  #
38
39
  class Client
40
+ # @private
41
+ API_VERSION = ""
42
+
39
43
  # @private
40
44
  DEFAULT_ENDPOINT_TEMPLATE = "secretmanager.$UNIVERSE_DOMAIN$"
41
45
 
@@ -195,8 +199,22 @@ module Google
195
199
  interceptors: @config.interceptors,
196
200
  channel_pool_config: @config.channel_pool
197
201
  )
202
+
203
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
204
+ config.credentials = credentials
205
+ config.quota_project = @quota_project_id
206
+ config.endpoint = @secret_manager_service_stub.endpoint
207
+ config.universe_domain = @secret_manager_service_stub.universe_domain
208
+ end
198
209
  end
199
210
 
211
+ ##
212
+ # Get the associated client for mix-in of the Locations.
213
+ #
214
+ # @return [Google::Cloud::Location::Locations::Client]
215
+ #
216
+ attr_reader :location_client
217
+
200
218
  # Service calls
201
219
 
202
220
  ##
@@ -219,7 +237,8 @@ module Google
219
237
  #
220
238
  # @param parent [::String]
221
239
  # Required. The resource name of the project associated with the
222
- # {::Google::Cloud::SecretManager::V1::Secret Secrets}, in the format `projects/*`.
240
+ # {::Google::Cloud::SecretManager::V1::Secret Secrets}, in the format `projects/*`
241
+ # or `projects/*/locations/*`
223
242
  # @param page_size [::Integer]
224
243
  # Optional. The maximum number of results to be returned in a single page. If
225
244
  # set to 0, the server decides the number of results to return. If the
@@ -272,10 +291,11 @@ module Google
272
291
  # Customize the options with defaults
273
292
  metadata = @config.rpcs.list_secrets.metadata.to_h
274
293
 
275
- # Set x-goog-api-client and x-goog-user-project headers
294
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
276
295
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
277
296
  lib_name: @config.lib_name, lib_version: @config.lib_version,
278
297
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
298
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
279
299
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
280
300
 
281
301
  header_params = {}
@@ -304,7 +324,8 @@ module Google
304
324
  end
305
325
 
306
326
  ##
307
- # Creates a new {::Google::Cloud::SecretManager::V1::Secret Secret} containing no {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions}.
327
+ # Creates a new {::Google::Cloud::SecretManager::V1::Secret Secret} containing no
328
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions}.
308
329
  #
309
330
  # @overload create_secret(request, options = nil)
310
331
  # Pass arguments to `create_secret` via a request object, either of type
@@ -323,7 +344,8 @@ module Google
323
344
  #
324
345
  # @param parent [::String]
325
346
  # Required. The resource name of the project to associate with the
326
- # {::Google::Cloud::SecretManager::V1::Secret Secret}, in the format `projects/*`.
347
+ # {::Google::Cloud::SecretManager::V1::Secret Secret}, in the format `projects/*`
348
+ # or `projects/*/locations/*`.
327
349
  # @param secret_id [::String]
328
350
  # Required. This must be unique within the project.
329
351
  #
@@ -331,7 +353,8 @@ module Google
331
353
  # contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and
332
354
  # underscore (`_`) characters.
333
355
  # @param secret [::Google::Cloud::SecretManager::V1::Secret, ::Hash]
334
- # Required. A {::Google::Cloud::SecretManager::V1::Secret Secret} with initial field values.
356
+ # Required. A {::Google::Cloud::SecretManager::V1::Secret Secret} with initial
357
+ # field values.
335
358
  #
336
359
  # @yield [response, operation] Access the result along with the RPC operation
337
360
  # @yieldparam response [::Google::Cloud::SecretManager::V1::Secret]
@@ -367,10 +390,11 @@ module Google
367
390
  # Customize the options with defaults
368
391
  metadata = @config.rpcs.create_secret.metadata.to_h
369
392
 
370
- # Set x-goog-api-client and x-goog-user-project headers
393
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
371
394
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
372
395
  lib_name: @config.lib_name, lib_version: @config.lib_version,
373
396
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
397
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
374
398
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
375
399
 
376
400
  header_params = {}
@@ -398,8 +422,9 @@ module Google
398
422
  end
399
423
 
400
424
  ##
401
- # Creates a new {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} containing secret data and attaches
402
- # it to an existing {::Google::Cloud::SecretManager::V1::Secret Secret}.
425
+ # Creates a new {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}
426
+ # containing secret data and attaches it to an existing
427
+ # {::Google::Cloud::SecretManager::V1::Secret Secret}.
403
428
  #
404
429
  # @overload add_secret_version(request, options = nil)
405
430
  # Pass arguments to `add_secret_version` via a request object, either of type
@@ -417,10 +442,13 @@ module Google
417
442
  # the default parameter values, pass an empty Hash as a request object (see above).
418
443
  #
419
444
  # @param parent [::String]
420
- # Required. The resource name of the {::Google::Cloud::SecretManager::V1::Secret Secret} to associate with the
421
- # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} in the format `projects/*/secrets/*`.
445
+ # Required. The resource name of the
446
+ # {::Google::Cloud::SecretManager::V1::Secret Secret} to associate with the
447
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} in the format
448
+ # `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.
422
449
  # @param payload [::Google::Cloud::SecretManager::V1::SecretPayload, ::Hash]
423
- # Required. The secret payload of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
450
+ # Required. The secret payload of the
451
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
424
452
  #
425
453
  # @yield [response, operation] Access the result along with the RPC operation
426
454
  # @yieldparam response [::Google::Cloud::SecretManager::V1::SecretVersion]
@@ -456,10 +484,11 @@ module Google
456
484
  # Customize the options with defaults
457
485
  metadata = @config.rpcs.add_secret_version.metadata.to_h
458
486
 
459
- # Set x-goog-api-client and x-goog-user-project headers
487
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
460
488
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
461
489
  lib_name: @config.lib_name, lib_version: @config.lib_version,
462
490
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
491
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
463
492
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
464
493
 
465
494
  header_params = {}
@@ -505,7 +534,9 @@ module Google
505
534
  # the default parameter values, pass an empty Hash as a request object (see above).
506
535
  #
507
536
  # @param name [::String]
508
- # Required. The resource name of the {::Google::Cloud::SecretManager::V1::Secret Secret}, in the format `projects/*/secrets/*`.
537
+ # Required. The resource name of the
538
+ # {::Google::Cloud::SecretManager::V1::Secret Secret}, in the format
539
+ # `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.
509
540
  #
510
541
  # @yield [response, operation] Access the result along with the RPC operation
511
542
  # @yieldparam response [::Google::Cloud::SecretManager::V1::Secret]
@@ -541,10 +572,11 @@ module Google
541
572
  # Customize the options with defaults
542
573
  metadata = @config.rpcs.get_secret.metadata.to_h
543
574
 
544
- # Set x-goog-api-client and x-goog-user-project headers
575
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
545
576
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
546
577
  lib_name: @config.lib_name, lib_version: @config.lib_version,
547
578
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
579
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
548
580
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
549
581
 
550
582
  header_params = {}
@@ -572,7 +604,8 @@ module Google
572
604
  end
573
605
 
574
606
  ##
575
- # Updates metadata of an existing {::Google::Cloud::SecretManager::V1::Secret Secret}.
607
+ # Updates metadata of an existing
608
+ # {::Google::Cloud::SecretManager::V1::Secret Secret}.
576
609
  #
577
610
  # @overload update_secret(request, options = nil)
578
611
  # Pass arguments to `update_secret` via a request object, either of type
@@ -590,7 +623,8 @@ module Google
590
623
  # the default parameter values, pass an empty Hash as a request object (see above).
591
624
  #
592
625
  # @param secret [::Google::Cloud::SecretManager::V1::Secret, ::Hash]
593
- # Required. {::Google::Cloud::SecretManager::V1::Secret Secret} with updated field values.
626
+ # Required. {::Google::Cloud::SecretManager::V1::Secret Secret} with updated field
627
+ # values.
594
628
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
595
629
  # Required. Specifies the fields to be updated.
596
630
  #
@@ -628,10 +662,11 @@ module Google
628
662
  # Customize the options with defaults
629
663
  metadata = @config.rpcs.update_secret.metadata.to_h
630
664
 
631
- # Set x-goog-api-client and x-goog-user-project headers
665
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
632
666
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
633
667
  lib_name: @config.lib_name, lib_version: @config.lib_version,
634
668
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
669
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
635
670
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
636
671
 
637
672
  header_params = {}
@@ -677,12 +712,13 @@ module Google
677
712
  # the default parameter values, pass an empty Hash as a request object (see above).
678
713
  #
679
714
  # @param name [::String]
680
- # Required. The resource name of the {::Google::Cloud::SecretManager::V1::Secret Secret} to delete in the format
715
+ # Required. The resource name of the
716
+ # {::Google::Cloud::SecretManager::V1::Secret Secret} to delete in the format
681
717
  # `projects/*/secrets/*`.
682
718
  # @param etag [::String]
683
- # Optional. Etag of the {::Google::Cloud::SecretManager::V1::Secret Secret}. The request succeeds if it matches
684
- # the etag of the currently stored secret object. If the etag is omitted,
685
- # the request succeeds.
719
+ # Optional. Etag of the {::Google::Cloud::SecretManager::V1::Secret Secret}. The
720
+ # request succeeds if it matches the etag of the currently stored secret
721
+ # object. If the etag is omitted, the request succeeds.
686
722
  #
687
723
  # @yield [response, operation] Access the result along with the RPC operation
688
724
  # @yieldparam response [::Google::Protobuf::Empty]
@@ -718,10 +754,11 @@ module Google
718
754
  # Customize the options with defaults
719
755
  metadata = @config.rpcs.delete_secret.metadata.to_h
720
756
 
721
- # Set x-goog-api-client and x-goog-user-project headers
757
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
722
758
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
723
759
  lib_name: @config.lib_name, lib_version: @config.lib_version,
724
760
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
761
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
725
762
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
726
763
 
727
764
  header_params = {}
@@ -749,8 +786,8 @@ module Google
749
786
  end
750
787
 
751
788
  ##
752
- # Lists {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions}. This call does not return secret
753
- # data.
789
+ # Lists {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions}. This
790
+ # call does not return secret data.
754
791
  #
755
792
  # @overload list_secret_versions(request, options = nil)
756
793
  # Pass arguments to `list_secret_versions` via a request object, either of type
@@ -768,9 +805,10 @@ module Google
768
805
  # the default parameter values, pass an empty Hash as a request object (see above).
769
806
  #
770
807
  # @param parent [::String]
771
- # Required. The resource name of the {::Google::Cloud::SecretManager::V1::Secret Secret} associated with the
772
- # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions} to list, in the format
773
- # `projects/*/secrets/*`.
808
+ # Required. The resource name of the
809
+ # {::Google::Cloud::SecretManager::V1::Secret Secret} associated with the
810
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions} to list, in
811
+ # the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.
774
812
  # @param page_size [::Integer]
775
813
  # Optional. The maximum number of results to be returned in a single page. If
776
814
  # set to 0, the server decides the number of results to return. If the
@@ -823,10 +861,11 @@ module Google
823
861
  # Customize the options with defaults
824
862
  metadata = @config.rpcs.list_secret_versions.metadata.to_h
825
863
 
826
- # Set x-goog-api-client and x-goog-user-project headers
864
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
827
865
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
828
866
  lib_name: @config.lib_name, lib_version: @config.lib_version,
829
867
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
868
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
830
869
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
831
870
 
832
871
  header_params = {}
@@ -855,7 +894,8 @@ module Google
855
894
  end
856
895
 
857
896
  ##
858
- # Gets metadata for a {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
897
+ # Gets metadata for a
898
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
859
899
  #
860
900
  # `projects/*/secrets/*/versions/latest` is an alias to the most recently
861
901
  # created {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
@@ -876,11 +916,15 @@ module Google
876
916
  # the default parameter values, pass an empty Hash as a request object (see above).
877
917
  #
878
918
  # @param name [::String]
879
- # Required. The resource name of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} in the format
880
- # `projects/*/secrets/*/versions/*`.
919
+ # Required. The resource name of the
920
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} in the format
921
+ # `projects/*/secrets/*/versions/*` or
922
+ # `projects/*/locations/*/secrets/*/versions/*`.
881
923
  #
882
- # `projects/*/secrets/*/versions/latest` is an alias to the most recently
883
- # created {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
924
+ # `projects/*/secrets/*/versions/latest` or
925
+ # `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most
926
+ # recently created
927
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
884
928
  #
885
929
  # @yield [response, operation] Access the result along with the RPC operation
886
930
  # @yieldparam response [::Google::Cloud::SecretManager::V1::SecretVersion]
@@ -916,10 +960,11 @@ module Google
916
960
  # Customize the options with defaults
917
961
  metadata = @config.rpcs.get_secret_version.metadata.to_h
918
962
 
919
- # Set x-goog-api-client and x-goog-user-project headers
963
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
920
964
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
921
965
  lib_name: @config.lib_name, lib_version: @config.lib_version,
922
966
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
967
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
923
968
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
924
969
 
925
970
  header_params = {}
@@ -947,7 +992,8 @@ module Google
947
992
  end
948
993
 
949
994
  ##
950
- # Accesses a {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}. This call returns the secret data.
995
+ # Accesses a {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
996
+ # This call returns the secret data.
951
997
  #
952
998
  # `projects/*/secrets/*/versions/latest` is an alias to the most recently
953
999
  # created {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
@@ -968,11 +1014,15 @@ module Google
968
1014
  # the default parameter values, pass an empty Hash as a request object (see above).
969
1015
  #
970
1016
  # @param name [::String]
971
- # Required. The resource name of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} in the format
972
- # `projects/*/secrets/*/versions/*`.
1017
+ # Required. The resource name of the
1018
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} in the format
1019
+ # `projects/*/secrets/*/versions/*` or
1020
+ # `projects/*/locations/*/secrets/*/versions/*`.
973
1021
  #
974
- # `projects/*/secrets/*/versions/latest` is an alias to the most recently
975
- # created {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
1022
+ # `projects/*/secrets/*/versions/latest` or
1023
+ # `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most
1024
+ # recently created
1025
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
976
1026
  #
977
1027
  # @yield [response, operation] Access the result along with the RPC operation
978
1028
  # @yieldparam response [::Google::Cloud::SecretManager::V1::AccessSecretVersionResponse]
@@ -1008,10 +1058,11 @@ module Google
1008
1058
  # Customize the options with defaults
1009
1059
  metadata = @config.rpcs.access_secret_version.metadata.to_h
1010
1060
 
1011
- # Set x-goog-api-client and x-goog-user-project headers
1061
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1012
1062
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1013
1063
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1014
1064
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
1065
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1015
1066
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1016
1067
 
1017
1068
  header_params = {}
@@ -1041,7 +1092,8 @@ module Google
1041
1092
  ##
1042
1093
  # Disables a {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
1043
1094
  #
1044
- # Sets the {::Google::Cloud::SecretManager::V1::SecretVersion#state state} of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
1095
+ # Sets the {::Google::Cloud::SecretManager::V1::SecretVersion#state state} of the
1096
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
1045
1097
  # {::Google::Cloud::SecretManager::V1::SecretVersion::State::DISABLED DISABLED}.
1046
1098
  #
1047
1099
  # @overload disable_secret_version(request, options = nil)
@@ -1060,12 +1112,15 @@ module Google
1060
1112
  # the default parameter values, pass an empty Hash as a request object (see above).
1061
1113
  #
1062
1114
  # @param name [::String]
1063
- # Required. The resource name of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to disable in the format
1064
- # `projects/*/secrets/*/versions/*`.
1115
+ # Required. The resource name of the
1116
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to disable in
1117
+ # the format `projects/*/secrets/*/versions/*` or
1118
+ # `projects/*/locations/*/secrets/*/versions/*`.
1065
1119
  # @param etag [::String]
1066
- # Optional. Etag of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}. The request succeeds if it matches
1067
- # the etag of the currently stored secret version object. If the etag is
1068
- # omitted, the request succeeds.
1120
+ # Optional. Etag of the
1121
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}. The request
1122
+ # succeeds if it matches the etag of the currently stored secret version
1123
+ # object. If the etag is omitted, the request succeeds.
1069
1124
  #
1070
1125
  # @yield [response, operation] Access the result along with the RPC operation
1071
1126
  # @yieldparam response [::Google::Cloud::SecretManager::V1::SecretVersion]
@@ -1101,10 +1156,11 @@ module Google
1101
1156
  # Customize the options with defaults
1102
1157
  metadata = @config.rpcs.disable_secret_version.metadata.to_h
1103
1158
 
1104
- # Set x-goog-api-client and x-goog-user-project headers
1159
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1105
1160
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1106
1161
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1107
1162
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
1163
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1108
1164
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1109
1165
 
1110
1166
  header_params = {}
@@ -1134,7 +1190,8 @@ module Google
1134
1190
  ##
1135
1191
  # Enables a {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
1136
1192
  #
1137
- # Sets the {::Google::Cloud::SecretManager::V1::SecretVersion#state state} of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
1193
+ # Sets the {::Google::Cloud::SecretManager::V1::SecretVersion#state state} of the
1194
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
1138
1195
  # {::Google::Cloud::SecretManager::V1::SecretVersion::State::ENABLED ENABLED}.
1139
1196
  #
1140
1197
  # @overload enable_secret_version(request, options = nil)
@@ -1153,12 +1210,15 @@ module Google
1153
1210
  # the default parameter values, pass an empty Hash as a request object (see above).
1154
1211
  #
1155
1212
  # @param name [::String]
1156
- # Required. The resource name of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to enable in the format
1157
- # `projects/*/secrets/*/versions/*`.
1213
+ # Required. The resource name of the
1214
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to enable in
1215
+ # the format `projects/*/secrets/*/versions/*` or
1216
+ # `projects/*/locations/*/secrets/*/versions/*`.
1158
1217
  # @param etag [::String]
1159
- # Optional. Etag of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}. The request succeeds if it matches
1160
- # the etag of the currently stored secret version object. If the etag is
1161
- # omitted, the request succeeds.
1218
+ # Optional. Etag of the
1219
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}. The request
1220
+ # succeeds if it matches the etag of the currently stored secret version
1221
+ # object. If the etag is omitted, the request succeeds.
1162
1222
  #
1163
1223
  # @yield [response, operation] Access the result along with the RPC operation
1164
1224
  # @yieldparam response [::Google::Cloud::SecretManager::V1::SecretVersion]
@@ -1194,10 +1254,11 @@ module Google
1194
1254
  # Customize the options with defaults
1195
1255
  metadata = @config.rpcs.enable_secret_version.metadata.to_h
1196
1256
 
1197
- # Set x-goog-api-client and x-goog-user-project headers
1257
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1198
1258
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1199
1259
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1200
1260
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
1261
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1201
1262
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1202
1263
 
1203
1264
  header_params = {}
@@ -1227,9 +1288,10 @@ module Google
1227
1288
  ##
1228
1289
  # Destroys a {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
1229
1290
  #
1230
- # Sets the {::Google::Cloud::SecretManager::V1::SecretVersion#state state} of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
1231
- # {::Google::Cloud::SecretManager::V1::SecretVersion::State::DESTROYED DESTROYED} and irrevocably destroys the
1232
- # secret data.
1291
+ # Sets the {::Google::Cloud::SecretManager::V1::SecretVersion#state state} of the
1292
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
1293
+ # {::Google::Cloud::SecretManager::V1::SecretVersion::State::DESTROYED DESTROYED}
1294
+ # and irrevocably destroys the secret data.
1233
1295
  #
1234
1296
  # @overload destroy_secret_version(request, options = nil)
1235
1297
  # Pass arguments to `destroy_secret_version` via a request object, either of type
@@ -1247,12 +1309,15 @@ module Google
1247
1309
  # the default parameter values, pass an empty Hash as a request object (see above).
1248
1310
  #
1249
1311
  # @param name [::String]
1250
- # Required. The resource name of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to destroy in the format
1251
- # `projects/*/secrets/*/versions/*`.
1312
+ # Required. The resource name of the
1313
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to destroy in
1314
+ # the format `projects/*/secrets/*/versions/*` or
1315
+ # `projects/*/locations/*/secrets/*/versions/*`.
1252
1316
  # @param etag [::String]
1253
- # Optional. Etag of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}. The request succeeds if it matches
1254
- # the etag of the currently stored secret version object. If the etag is
1255
- # omitted, the request succeeds.
1317
+ # Optional. Etag of the
1318
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}. The request
1319
+ # succeeds if it matches the etag of the currently stored secret version
1320
+ # object. If the etag is omitted, the request succeeds.
1256
1321
  #
1257
1322
  # @yield [response, operation] Access the result along with the RPC operation
1258
1323
  # @yieldparam response [::Google::Cloud::SecretManager::V1::SecretVersion]
@@ -1288,10 +1353,11 @@ module Google
1288
1353
  # Customize the options with defaults
1289
1354
  metadata = @config.rpcs.destroy_secret_version.metadata.to_h
1290
1355
 
1291
- # Set x-goog-api-client and x-goog-user-project headers
1356
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1292
1357
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1293
1358
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1294
1359
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
1360
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1295
1361
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1296
1362
 
1297
1363
  header_params = {}
@@ -1322,8 +1388,10 @@ module Google
1322
1388
  # Sets the access control policy on the specified secret. Replaces any
1323
1389
  # existing policy.
1324
1390
  #
1325
- # Permissions on {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions} are enforced according
1326
- # to the policy set on the associated {::Google::Cloud::SecretManager::V1::Secret Secret}.
1391
+ # Permissions on
1392
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions} are enforced
1393
+ # according to the policy set on the associated
1394
+ # {::Google::Cloud::SecretManager::V1::Secret Secret}.
1327
1395
  #
1328
1396
  # @overload set_iam_policy(request, options = nil)
1329
1397
  # Pass arguments to `set_iam_policy` via a request object, either of type
@@ -1389,10 +1457,11 @@ module Google
1389
1457
  # Customize the options with defaults
1390
1458
  metadata = @config.rpcs.set_iam_policy.metadata.to_h
1391
1459
 
1392
- # Set x-goog-api-client and x-goog-user-project headers
1460
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1393
1461
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1394
1462
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1395
1463
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
1464
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1396
1465
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1397
1466
 
1398
1467
  header_params = {}
@@ -1479,10 +1548,11 @@ module Google
1479
1548
  # Customize the options with defaults
1480
1549
  metadata = @config.rpcs.get_iam_policy.metadata.to_h
1481
1550
 
1482
- # Set x-goog-api-client and x-goog-user-project headers
1551
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1483
1552
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1484
1553
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1485
1554
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
1555
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1486
1556
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1487
1557
 
1488
1558
  header_params = {}
@@ -1576,10 +1646,11 @@ module Google
1576
1646
  # Customize the options with defaults
1577
1647
  metadata = @config.rpcs.test_iam_permissions.metadata.to_h
1578
1648
 
1579
- # Set x-goog-api-client and x-goog-user-project headers
1649
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1580
1650
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1581
1651
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1582
1652
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
1653
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1583
1654
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1584
1655
 
1585
1656
  header_params = {}