aws-sdk-secretsmanager 1.35.0 → 1.40.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 79b8f0685d4404c29327c2a11d96719affc904ddd4c0fc8725c4c6dd122acca7
4
- data.tar.gz: fe4b18770fbbbc1570135a210e28d173183348c0170a58f43931fc7399a22bd3
3
+ metadata.gz: 61ef4c50b000fe9d14348c4d5fd862da00afa0d5f34b7ff0c446c042e7c72bff
4
+ data.tar.gz: 0ecaa3135f14b021f022c78b49b00e0564027420becab1f5e15833f220234db1
5
5
  SHA512:
6
- metadata.gz: 54c4069c28a162fc645b9b7e58cb7abce0d856ec5d05c058744e453e3cf23986440390f06eb94e115bf7a98aaca90446636e376217d74b5a339ab1ed58573bab
7
- data.tar.gz: 62b4bc7893fa6f820aa789920693fb83ec589529e9b21c283252d92f2ac3b03b61709916791e9b78315a47f11e6fa8bb25b4678ed8d3c722c129ead7f03318c0
6
+ metadata.gz: f85dc1d338e74aaed0e878188b1ac85748ca2435734e765bfd678f06c1f87a420aece7b1b47f8c4daf57822df2ecf29ab807b6d84e3c7b4b5fbbfd9eb907251a
7
+ data.tar.gz: 1028a196ae320a94a84ef4c9db1d14c9fd0ac65533bb4f5961595da8439a593e68742640c82802bb0d27fc6b5136ec2aff8f1f4ad4cac62ac66b1d430a050302
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # WARNING ABOUT GENERATED CODE
2
4
  #
3
5
  # This file is generated. See the contributing guide for more information:
@@ -45,6 +47,6 @@ require_relative 'aws-sdk-secretsmanager/customizations'
45
47
  # @service
46
48
  module Aws::SecretsManager
47
49
 
48
- GEM_VERSION = '1.35.0'
50
+ GEM_VERSION = '1.40.0'
49
51
 
50
52
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # WARNING ABOUT GENERATED CODE
2
4
  #
3
5
  # This file is generated. See the contributing guide for more information:
@@ -24,6 +26,7 @@ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
24
26
  require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
25
27
  require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
26
28
  require 'aws-sdk-core/plugins/transfer_encoding.rb'
29
+ require 'aws-sdk-core/plugins/http_checksum.rb'
27
30
  require 'aws-sdk-core/plugins/signature_v4.rb'
28
31
  require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
29
32
 
@@ -69,6 +72,7 @@ module Aws::SecretsManager
69
72
  add_plugin(Aws::Plugins::ClientMetricsPlugin)
70
73
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
71
74
  add_plugin(Aws::Plugins::TransferEncoding)
75
+ add_plugin(Aws::Plugins::HttpChecksum)
72
76
  add_plugin(Aws::Plugins::SignatureV4)
73
77
  add_plugin(Aws::Plugins::Protocols::JsonRpc)
74
78
 
@@ -161,7 +165,7 @@ module Aws::SecretsManager
161
165
  # @option options [String] :endpoint
162
166
  # The client endpoint is normally constructed from the `:region`
163
167
  # option. You should only configure an `:endpoint` when connecting
164
- # to test endpoints. This should be a valid HTTP(S) URI.
168
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
165
169
  #
166
170
  # @option options [Integer] :endpoint_cache_max_entries (1000)
167
171
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -176,7 +180,7 @@ module Aws::SecretsManager
176
180
  # requests fetching endpoints information. Defaults to 60 sec.
177
181
  #
178
182
  # @option options [Boolean] :endpoint_discovery (false)
179
- # When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
183
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
180
184
  #
181
185
  # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
182
186
  # The log formatter.
@@ -319,20 +323,20 @@ module Aws::SecretsManager
319
323
  # @!group API Operations
320
324
 
321
325
  # Disables automatic scheduled rotation and cancels the rotation of a
322
- # secret if one is currently in progress.
326
+ # secret if currently in progress.
323
327
  #
324
328
  # To re-enable scheduled rotation, call RotateSecret with
325
329
  # `AutomaticallyRotateAfterDays` set to a value greater than 0. This
326
- # will immediately rotate your secret and then enable the automatic
330
+ # immediately rotates your secret and then enables the automatic
327
331
  # schedule.
328
332
  #
329
- # <note markdown="1"> If you cancel a rotation that is in progress, it can leave the
330
- # `VersionStage` labels in an unexpected state. Depending on what step
331
- # of the rotation was in progress, you might need to remove the staging
332
- # label `AWSPENDING` from the partially created version, specified by
333
- # the `VersionId` response value. You should also evaluate the partially
333
+ # <note markdown="1"> If you cancel a rotation while in progress, it can leave the
334
+ # `VersionStage` labels in an unexpected state. Depending on the step of
335
+ # the rotation in progress, you might need to remove the staging label
336
+ # `AWSPENDING` from the partially created version, specified by the
337
+ # `VersionId` response value. You should also evaluate the partially
334
338
  # rotated new version to see if it should be deleted, which you can do
335
- # by removing all staging labels from the new version's `VersionStage`
339
+ # by removing all staging labels from the new version `VersionStage`
336
340
  # field.
337
341
  #
338
342
  # </note>
@@ -340,12 +344,12 @@ module Aws::SecretsManager
340
344
  # To successfully start a rotation, the staging label `AWSPENDING` must
341
345
  # be in one of the following states:
342
346
  #
343
- # * Not be attached to any version at all
347
+ # * Not attached to any version at all
344
348
  #
345
349
  # * Attached to the same version as the staging label `AWSCURRENT`
346
350
  #
347
- # If the staging label `AWSPENDING` is attached to a different version
348
- # than the version with `AWSCURRENT` then the attempt to rotate fails.
351
+ # If the staging label `AWSPENDING` attached to a different version than
352
+ # the version with `AWSCURRENT` then the attempt to rotate fails.
349
353
  #
350
354
  # **Minimum permissions**
351
355
  #
@@ -369,9 +373,9 @@ module Aws::SecretsManager
369
373
  # ListSecretVersionIds.
370
374
  #
371
375
  # @option params [required, String] :secret_id
372
- # Specifies the secret for which you want to cancel a rotation request.
373
- # You can specify either the Amazon Resource Name (ARN) or the friendly
374
- # name of the secret.
376
+ # Specifies the secret to cancel a rotation request. You can specify
377
+ # either the Amazon Resource Name (ARN) or the friendly name of the
378
+ # secret.
375
379
  #
376
380
  # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
377
381
  # complete ARN. You can specify a partial ARN too—for example, if you
@@ -384,7 +388,13 @@ module Aws::SecretsManager
384
388
  # then those characters cause Secrets Manager to assume that you’re
385
389
  # specifying a complete ARN. This confusion can cause unexpected
386
390
  # results. To avoid this situation, we recommend that you don’t create
387
- # secret names that end with a hyphen followed by six characters.
391
+ # secret names ending with a hyphen followed by six characters.
392
+ #
393
+ # If you specify an incomplete ARN without the random suffix, and
394
+ # instead provide the 'friendly name', you *must* not include the
395
+ # random suffix. If you do include the random suffix added by Secrets
396
+ # Manager, you receive either a *ResourceNotFoundException* or an
397
+ # *AccessDeniedException* error, depending on your permissions.
388
398
  #
389
399
  # </note>
390
400
  #
@@ -443,7 +453,7 @@ module Aws::SecretsManager
443
453
  # version is in the rotation cycle. The `SecretVersionsToStages` field
444
454
  # of the secret contains the mapping of staging labels to the active
445
455
  # versions of the secret. Versions without a staging label are
446
- # considered deprecated and are not included in the list.
456
+ # considered deprecated and not included in the list.
447
457
  #
448
458
  # You provide the secret data to be encrypted by putting text in either
449
459
  # the `SecretString` parameter or binary data in the `SecretBinary`
@@ -452,29 +462,29 @@ module Aws::SecretsManager
452
462
  # version and automatically attaches the staging label `AWSCURRENT` to
453
463
  # the new version.
454
464
  #
455
- # <note markdown="1"> * If you call an operation that needs to encrypt or decrypt the
456
- # `SecretString` or `SecretBinary` for a secret in the same account as
457
- # the calling user and that secret doesn't specify a AWS KMS
458
- # encryption key, Secrets Manager uses the account's default AWS
459
- # managed customer master key (CMK) with the alias
460
- # `aws/secretsmanager`. If this key doesn't already exist in your
461
- # account then Secrets Manager creates it for you automatically. All
462
- # users and roles in the same AWS account automatically have access to
463
- # use the default CMK. Note that if an Secrets Manager API call
464
- # results in AWS having to create the account's AWS-managed CMK, it
465
- # can result in a one-time significant delay in returning the result.
466
- #
467
- # * If the secret is in a different AWS account from the credentials
468
- # calling an API that requires encryption or decryption of the secret
469
- # value then you must create and use a custom AWS KMS CMK because you
470
- # can't access the default CMK for the account using credentials from
471
- # a different AWS account. Store the ARN of the CMK in the secret when
472
- # you create the secret or when you update it by including it in the
473
- # `KMSKeyId`. If you call an API that must encrypt or decrypt
474
- # `SecretString` or `SecretBinary` using credentials from a different
475
- # account then the AWS KMS key policy must grant cross-account access
476
- # to that other account's user or role for both the
477
- # kms:GenerateDataKey and kms:Decrypt operations.
465
+ # <note markdown="1"> * If you call an operation to encrypt or decrypt the `SecretString` or
466
+ # `SecretBinary` for a secret in the same account as the calling user
467
+ # and that secret doesn't specify a AWS KMS encryption key, Secrets
468
+ # Manager uses the account's default AWS managed customer master key
469
+ # (CMK) with the alias `aws/secretsmanager`. If this key doesn't
470
+ # already exist in your account then Secrets Manager creates it for
471
+ # you automatically. All users and roles in the same AWS account
472
+ # automatically have access to use the default CMK. Note that if an
473
+ # Secrets Manager API call results in AWS creating the account's
474
+ # AWS-managed CMK, it can result in a one-time significant delay in
475
+ # returning the result.
476
+ #
477
+ # * If the secret resides in a different AWS account from the
478
+ # credentials calling an API that requires encryption or decryption of
479
+ # the secret value then you must create and use a custom AWS KMS CMK
480
+ # because you can't access the default CMK for the account using
481
+ # credentials from a different AWS account. Store the ARN of the CMK
482
+ # in the secret when you create the secret or when you update it by
483
+ # including it in the `KMSKeyId`. If you call an API that must encrypt
484
+ # or decrypt `SecretString` or `SecretBinary` using credentials from a
485
+ # different account then the AWS KMS key policy must grant
486
+ # cross-account access to that other account's user or role for both
487
+ # the kms:GenerateDataKey and kms:Decrypt operations.
478
488
  #
479
489
  # </note>
480
490
  #
@@ -488,11 +498,11 @@ module Aws::SecretsManager
488
498
  #
489
499
  # * kms:GenerateDataKey - needed only if you use a customer-managed AWS
490
500
  # KMS key to encrypt the secret. You do not need this permission to
491
- # use the account's default AWS managed CMK for Secrets Manager.
501
+ # use the account default AWS managed CMK for Secrets Manager.
492
502
  #
493
503
  # * kms:Decrypt - needed only if you use a customer-managed AWS KMS key
494
504
  # to encrypt the secret. You do not need this permission to use the
495
- # account's default AWS managed CMK for Secrets Manager.
505
+ # account default AWS managed CMK for Secrets Manager.
496
506
  #
497
507
  # * secretsmanager:TagResource - needed only if you include the `Tags`
498
508
  # parameter.
@@ -522,11 +532,10 @@ module Aws::SecretsManager
522
532
  # The secret name must be ASCII letters, digits, or the following
523
533
  # characters : /\_+=.@-
524
534
  #
525
- # <note markdown="1"> Don't end your secret name with a hyphen followed by six characters.
535
+ # <note markdown="1"> Do not end your secret name with a hyphen followed by six characters.
526
536
  # If you do so, you risk confusion and unexpected results when searching
527
- # for a secret by partial ARN. This is because Secrets Manager
528
- # automatically adds a hyphen and six random characters at the end of
529
- # the ARN.
537
+ # for a secret by partial ARN. Secrets Manager automatically adds a
538
+ # hyphen and six random characters at the end of the ARN.
530
539
  #
531
540
  # </note>
532
541
  #
@@ -541,7 +550,7 @@ module Aws::SecretsManager
541
550
  # the request. If you don't use the SDK and instead generate a raw HTTP
542
551
  # request to the Secrets Manager service endpoint, then you must
543
552
  # generate a `ClientRequestToken` yourself for the new version and
544
- # include that value in the request.
553
+ # include the value in the request.
545
554
  #
546
555
  # </note>
547
556
  #
@@ -554,10 +563,9 @@ module Aws::SecretsManager
554
563
  # * If the `ClientRequestToken` value isn't already associated with a
555
564
  # version of the secret then a new version of the secret is created.
556
565
  #
557
- # * If a version with this value already exists and that version's
566
+ # * If a version with this value already exists and the version
558
567
  # `SecretString` and `SecretBinary` values are the same as those in
559
- # the request, then the request is ignored (the operation is
560
- # idempotent).
568
+ # the request, then the request is ignored.
561
569
  #
562
570
  # * If a version with this value already exists and that version's
563
571
  # `SecretString` and `SecretBinary` values are different from those in
@@ -593,9 +601,9 @@ module Aws::SecretsManager
593
601
  # time it needs to encrypt a version's `SecretString` or `SecretBinary`
594
602
  # fields.
595
603
  #
596
- # You can use the account's default CMK to encrypt and decrypt only if
597
- # you call this operation using credentials from the same account that
598
- # owns the secret. If the secret is in a different account, then you
604
+ # You can use the account default CMK to encrypt and decrypt only if you
605
+ # call this operation using credentials from the same account that owns
606
+ # the secret. If the secret resides in a different account, then you
599
607
  # must create a custom CMK and specify the ARN in this field.
600
608
  #
601
609
  # @option params [String, IO] :secret_binary
@@ -630,7 +638,7 @@ module Aws::SecretsManager
630
638
  # environments, see [Using JSON for Parameters][1] in the *AWS CLI User
631
639
  # Guide*. For example:
632
640
  #
633
- # `[\{"username":"bob"\},\{"password":"abc123xyz456"\}]`
641
+ # `\{"username":"bob","password":"abc123xyz456"\}`
634
642
  #
635
643
  # If your command-line tool or SDK requires quotation marks around the
636
644
  # parameter, you should use single quotes to avoid confusion with the
@@ -676,16 +684,16 @@ module Aws::SecretsManager
676
684
  #
677
685
  # * Tag keys and values are case sensitive.
678
686
  #
679
- # * Do not use the `aws:` prefix in your tag names or values because it
680
- # is reserved for AWS use. You can't edit or delete tag names or
687
+ # * Do not use the `aws:` prefix in your tag names or values because AWS
688
+ # reserves it for AWS use. You can't edit or delete tag names or
681
689
  # values with this prefix. Tags with this prefix do not count against
682
690
  # your tags per secret limit.
683
691
  #
684
- # * If your tagging schema will be used across multiple services and
685
- # resources, remember that other services might have restrictions on
686
- # allowed characters. Generally allowed characters are: letters,
687
- # spaces, and numbers representable in UTF-8, plus the following
688
- # special characters: + - = . \_ : / @.
692
+ # * If you use your tagging schema across multiple services and
693
+ # resources, remember other services might have restrictions on
694
+ # allowed characters. Generally allowed characters: letters, spaces,
695
+ # and numbers representable in UTF-8, plus the following special
696
+ # characters: + - = . \_ : / @.
689
697
  #
690
698
  #
691
699
  #
@@ -749,8 +757,7 @@ module Aws::SecretsManager
749
757
  req.send_request(options)
750
758
  end
751
759
 
752
- # Deletes the resource-based permission policy that's attached to the
753
- # secret.
760
+ # Deletes the resource-based permission policy attached to the secret.
754
761
  #
755
762
  # **Minimum permissions**
756
763
  #
@@ -785,7 +792,13 @@ module Aws::SecretsManager
785
792
  # then those characters cause Secrets Manager to assume that you’re
786
793
  # specifying a complete ARN. This confusion can cause unexpected
787
794
  # results. To avoid this situation, we recommend that you don’t create
788
- # secret names that end with a hyphen followed by six characters.
795
+ # secret names ending with a hyphen followed by six characters.
796
+ #
797
+ # If you specify an incomplete ARN without the random suffix, and
798
+ # instead provide the 'friendly name', you *must* not include the
799
+ # random suffix. If you do include the random suffix added by Secrets
800
+ # Manager, you receive either a *ResourceNotFoundException* or an
801
+ # *AccessDeniedException* error, depending on your permissions.
789
802
  #
790
803
  # </note>
791
804
  #
@@ -888,7 +901,13 @@ module Aws::SecretsManager
888
901
  # then those characters cause Secrets Manager to assume that you’re
889
902
  # specifying a complete ARN. This confusion can cause unexpected
890
903
  # results. To avoid this situation, we recommend that you don’t create
891
- # secret names that end with a hyphen followed by six characters.
904
+ # secret names ending with a hyphen followed by six characters.
905
+ #
906
+ # If you specify an incomplete ARN without the random suffix, and
907
+ # instead provide the 'friendly name', you *must* not include the
908
+ # random suffix. If you do include the random suffix added by Secrets
909
+ # Manager, you receive either a *ResourceNotFoundException* or an
910
+ # *AccessDeniedException* error, depending on your permissions.
892
911
  #
893
912
  # </note>
894
913
  #
@@ -966,8 +985,8 @@ module Aws::SecretsManager
966
985
  end
967
986
 
968
987
  # Retrieves the details of a secret. It does not include the encrypted
969
- # fields. Only those fields that are populated with a value are returned
970
- # in the response.
988
+ # fields. Secrets Manager only returns fields populated with a value in
989
+ # the response.
971
990
  #
972
991
  # **Minimum permissions**
973
992
  #
@@ -1004,7 +1023,13 @@ module Aws::SecretsManager
1004
1023
  # then those characters cause Secrets Manager to assume that you’re
1005
1024
  # specifying a complete ARN. This confusion can cause unexpected
1006
1025
  # results. To avoid this situation, we recommend that you don’t create
1007
- # secret names that end with a hyphen followed by six characters.
1026
+ # secret names ending with a hyphen followed by six characters.
1027
+ #
1028
+ # If you specify an incomplete ARN without the random suffix, and
1029
+ # instead provide the 'friendly name', you *must* not include the
1030
+ # random suffix. If you do include the random suffix added by Secrets
1031
+ # Manager, you receive either a *ResourceNotFoundException* or an
1032
+ # *AccessDeniedException* error, depending on your permissions.
1008
1033
  #
1009
1034
  # </note>
1010
1035
  #
@@ -1024,6 +1049,7 @@ module Aws::SecretsManager
1024
1049
  # * {Types::DescribeSecretResponse#tags #tags} => Array&lt;Types::Tag&gt;
1025
1050
  # * {Types::DescribeSecretResponse#version_ids_to_stages #version_ids_to_stages} => Hash&lt;String,Array&lt;String&gt;&gt;
1026
1051
  # * {Types::DescribeSecretResponse#owning_service #owning_service} => String
1052
+ # * {Types::DescribeSecretResponse#created_date #created_date} => Time
1027
1053
  #
1028
1054
  #
1029
1055
  # @example Example: To retrieve the details of a secret
@@ -1094,6 +1120,7 @@ module Aws::SecretsManager
1094
1120
  # resp.version_ids_to_stages["SecretVersionIdType"] #=> Array
1095
1121
  # resp.version_ids_to_stages["SecretVersionIdType"][0] #=> String
1096
1122
  # resp.owning_service #=> String
1123
+ # resp.created_date #=> Time
1097
1124
  #
1098
1125
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DescribeSecret AWS API Documentation
1099
1126
  #
@@ -1212,11 +1239,10 @@ module Aws::SecretsManager
1212
1239
  req.send_request(options)
1213
1240
  end
1214
1241
 
1215
- # Retrieves the JSON text of the resource-based policy document that's
1216
- # attached to the specified secret. The JSON request string input and
1217
- # response output are shown formatted with white space and line breaks
1218
- # for better readability. Submit your input as a single line JSON
1219
- # string.
1242
+ # Retrieves the JSON text of the resource-based policy document attached
1243
+ # to the specified secret. The JSON request string input and response
1244
+ # output displays formatted code with white space and line breaks for
1245
+ # better readability. Submit your input as a single line JSON string.
1220
1246
  #
1221
1247
  # **Minimum permissions**
1222
1248
  #
@@ -1230,8 +1256,8 @@ module Aws::SecretsManager
1230
1256
  #
1231
1257
  # * To attach a resource policy to a secret, use PutResourcePolicy.
1232
1258
  #
1233
- # * To delete the resource-based policy that's attached to a secret,
1234
- # use DeleteResourcePolicy.
1259
+ # * To delete the resource-based policy attached to a secret, use
1260
+ # DeleteResourcePolicy.
1235
1261
  #
1236
1262
  # * To list all of the currently available secrets, use ListSecrets.
1237
1263
  #
@@ -1251,7 +1277,13 @@ module Aws::SecretsManager
1251
1277
  # then those characters cause Secrets Manager to assume that you’re
1252
1278
  # specifying a complete ARN. This confusion can cause unexpected
1253
1279
  # results. To avoid this situation, we recommend that you don’t create
1254
- # secret names that end with a hyphen followed by six characters.
1280
+ # secret names ending with a hyphen followed by six characters.
1281
+ #
1282
+ # If you specify an incomplete ARN without the random suffix, and
1283
+ # instead provide the 'friendly name', you *must* not include the
1284
+ # random suffix. If you do include the random suffix added by Secrets
1285
+ # Manager, you receive either a *ResourceNotFoundException* or an
1286
+ # *AccessDeniedException* error, depending on your permissions.
1255
1287
  #
1256
1288
  # </note>
1257
1289
  #
@@ -1336,7 +1368,13 @@ module Aws::SecretsManager
1336
1368
  # then those characters cause Secrets Manager to assume that you’re
1337
1369
  # specifying a complete ARN. This confusion can cause unexpected
1338
1370
  # results. To avoid this situation, we recommend that you don’t create
1339
- # secret names that end with a hyphen followed by six characters.
1371
+ # secret names ending with a hyphen followed by six characters.
1372
+ #
1373
+ # If you specify an incomplete ARN without the random suffix, and
1374
+ # instead provide the 'friendly name', you *must* not include the
1375
+ # random suffix. If you do include the random suffix added by Secrets
1376
+ # Manager, you receive either a *ResourceNotFoundException* or an
1377
+ # *AccessDeniedException* error, depending on your permissions.
1340
1378
  #
1341
1379
  # </note>
1342
1380
  #
@@ -1433,8 +1471,8 @@ module Aws::SecretsManager
1433
1471
  #
1434
1472
  # <note markdown="1"> Always check the `NextToken` response parameter when calling any of
1435
1473
  # the `List*` operations. These operations can occasionally return an
1436
- # empty or shorter than expected list of results even when there are
1437
- # more results available. When this happens, the `NextToken` response
1474
+ # empty or shorter than expected list of results even when there more
1475
+ # results become available. When this happens, the `NextToken` response
1438
1476
  # parameter contains a value to pass to the next call to the same API to
1439
1477
  # request the next part of the list.
1440
1478
  #
@@ -1470,28 +1508,34 @@ module Aws::SecretsManager
1470
1508
  # then those characters cause Secrets Manager to assume that you’re
1471
1509
  # specifying a complete ARN. This confusion can cause unexpected
1472
1510
  # results. To avoid this situation, we recommend that you don’t create
1473
- # secret names that end with a hyphen followed by six characters.
1511
+ # secret names ending with a hyphen followed by six characters.
1512
+ #
1513
+ # If you specify an incomplete ARN without the random suffix, and
1514
+ # instead provide the 'friendly name', you *must* not include the
1515
+ # random suffix. If you do include the random suffix added by Secrets
1516
+ # Manager, you receive either a *ResourceNotFoundException* or an
1517
+ # *AccessDeniedException* error, depending on your permissions.
1474
1518
  #
1475
1519
  # </note>
1476
1520
  #
1477
1521
  # @option params [Integer] :max_results
1478
- # (Optional) Limits the number of results that you want to include in
1479
- # the response. If you don't include this parameter, it defaults to a
1480
- # value that's specific to the operation. If additional items exist
1481
- # beyond the maximum you specify, the `NextToken` response element is
1482
- # present and has a value (isn't null). Include that value as the
1483
- # `NextToken` request parameter in the next call to the operation to get
1484
- # the next part of the results. Note that Secrets Manager might return
1485
- # fewer results than the maximum even when there are more results
1486
- # available. You should check `NextToken` after every operation to
1487
- # ensure that you receive all of the results.
1522
+ # (Optional) Limits the number of results you want to include in the
1523
+ # response. If you don't include this parameter, it defaults to a value
1524
+ # that's specific to the operation. If additional items exist beyond
1525
+ # the maximum you specify, the `NextToken` response element is present
1526
+ # and has a value (isn't null). Include that value as the `NextToken`
1527
+ # request parameter in the next call to the operation to get the next
1528
+ # part of the results. Note that Secrets Manager might return fewer
1529
+ # results than the maximum even when there are more results available.
1530
+ # You should check `NextToken` after every operation to ensure that you
1531
+ # receive all of the results.
1488
1532
  #
1489
1533
  # @option params [String] :next_token
1490
1534
  # (Optional) Use this parameter in a request if you receive a
1491
- # `NextToken` response in a previous request that indicates that
1492
- # there's more output available. In a subsequent call, set it to the
1493
- # value of the previous call's `NextToken` response to indicate where
1494
- # the output should continue from.
1535
+ # `NextToken` response in a previous request indicating there's more
1536
+ # output available. In a subsequent call, set it to the value of the
1537
+ # previous call `NextToken` response to indicate where the output should
1538
+ # continue from.
1495
1539
  #
1496
1540
  # @option params [Boolean] :include_deprecated
1497
1541
  # (Optional) Specifies that you want the results to include versions
@@ -1583,8 +1627,8 @@ module Aws::SecretsManager
1583
1627
  #
1584
1628
  # <note markdown="1"> Always check the `NextToken` response parameter when calling any of
1585
1629
  # the `List*` operations. These operations can occasionally return an
1586
- # empty or shorter than expected list of results even when there are
1587
- # more results available. When this happens, the `NextToken` response
1630
+ # empty or shorter than expected list of results even when there more
1631
+ # results become available. When this happens, the `NextToken` response
1588
1632
  # parameter contains a value to pass to the next call to the same API to
1589
1633
  # request the next part of the list.
1590
1634
  #
@@ -1605,23 +1649,29 @@ module Aws::SecretsManager
1605
1649
  # ^
1606
1650
  #
1607
1651
  # @option params [Integer] :max_results
1608
- # (Optional) Limits the number of results that you want to include in
1609
- # the response. If you don't include this parameter, it defaults to a
1610
- # value that's specific to the operation. If additional items exist
1611
- # beyond the maximum you specify, the `NextToken` response element is
1612
- # present and has a value (isn't null). Include that value as the
1613
- # `NextToken` request parameter in the next call to the operation to get
1614
- # the next part of the results. Note that Secrets Manager might return
1615
- # fewer results than the maximum even when there are more results
1616
- # available. You should check `NextToken` after every operation to
1617
- # ensure that you receive all of the results.
1652
+ # (Optional) Limits the number of results you want to include in the
1653
+ # response. If you don't include this parameter, it defaults to a value
1654
+ # that's specific to the operation. If additional items exist beyond
1655
+ # the maximum you specify, the `NextToken` response element is present
1656
+ # and has a value (isn't null). Include that value as the `NextToken`
1657
+ # request parameter in the next call to the operation to get the next
1658
+ # part of the results. Note that Secrets Manager might return fewer
1659
+ # results than the maximum even when there are more results available.
1660
+ # You should check `NextToken` after every operation to ensure that you
1661
+ # receive all of the results.
1618
1662
  #
1619
1663
  # @option params [String] :next_token
1620
1664
  # (Optional) Use this parameter in a request if you receive a
1621
- # `NextToken` response in a previous request that indicates that
1622
- # there's more output available. In a subsequent call, set it to the
1623
- # value of the previous call's `NextToken` response to indicate where
1624
- # the output should continue from.
1665
+ # `NextToken` response in a previous request indicating there's more
1666
+ # output available. In a subsequent call, set it to the value of the
1667
+ # previous call `NextToken` response to indicate where the output should
1668
+ # continue from.
1669
+ #
1670
+ # @option params [Array<Types::Filter>] :filters
1671
+ # Lists the secret request filters.
1672
+ #
1673
+ # @option params [String] :sort_order
1674
+ # Lists secrets in the requested order.
1625
1675
  #
1626
1676
  # @return [Types::ListSecretsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1627
1677
  #
@@ -1671,6 +1721,13 @@ module Aws::SecretsManager
1671
1721
  # resp = client.list_secrets({
1672
1722
  # max_results: 1,
1673
1723
  # next_token: "NextTokenType",
1724
+ # filters: [
1725
+ # {
1726
+ # key: "description", # accepts description, name, tag-key, tag-value, all
1727
+ # values: ["FilterValueStringType"],
1728
+ # },
1729
+ # ],
1730
+ # sort_order: "asc", # accepts asc, desc
1674
1731
  # })
1675
1732
  #
1676
1733
  # @example Response structure
@@ -1694,6 +1751,7 @@ module Aws::SecretsManager
1694
1751
  # resp.secret_list[0].secret_versions_to_stages["SecretVersionIdType"] #=> Array
1695
1752
  # resp.secret_list[0].secret_versions_to_stages["SecretVersionIdType"][0] #=> String
1696
1753
  # resp.secret_list[0].owning_service #=> String
1754
+ # resp.secret_list[0].created_date #=> Time
1697
1755
  # resp.next_token #=> String
1698
1756
  #
1699
1757
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecrets AWS API Documentation
@@ -1727,7 +1785,7 @@ module Aws::SecretsManager
1727
1785
  #
1728
1786
  # **Related operations**
1729
1787
  #
1730
- # * To retrieve the resource policy that's attached to a secret, use
1788
+ # * To retrieve the resource policy attached to a secret, use
1731
1789
  # GetResourcePolicy.
1732
1790
  #
1733
1791
  # * To delete the resource-based policy that's attached to a secret,
@@ -1755,7 +1813,13 @@ module Aws::SecretsManager
1755
1813
  # then those characters cause Secrets Manager to assume that you’re
1756
1814
  # specifying a complete ARN. This confusion can cause unexpected
1757
1815
  # results. To avoid this situation, we recommend that you don’t create
1758
- # secret names that end with a hyphen followed by six characters.
1816
+ # secret names ending with a hyphen followed by six characters.
1817
+ #
1818
+ # If you specify an incomplete ARN without the random suffix, and
1819
+ # instead provide the 'friendly name', you *must* not include the
1820
+ # random suffix. If you do include the random suffix added by Secrets
1821
+ # Manager, you receive either a *ResourceNotFoundException* or an
1822
+ # *AccessDeniedException* error, depending on your permissions.
1759
1823
  #
1760
1824
  # </note>
1761
1825
  #
@@ -1771,6 +1835,10 @@ module Aws::SecretsManager
1771
1835
  #
1772
1836
  # [1]: http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json
1773
1837
  #
1838
+ # @option params [Boolean] :block_public_policy
1839
+ # Makes an optional API call to Zelkova to validate the Resource Policy
1840
+ # to prevent broad access to your secret.
1841
+ #
1774
1842
  # @return [Types::PutResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1775
1843
  #
1776
1844
  # * {Types::PutResourcePolicyResponse#arn #arn} => String
@@ -1797,6 +1865,7 @@ module Aws::SecretsManager
1797
1865
  # resp = client.put_resource_policy({
1798
1866
  # secret_id: "SecretIdType", # required
1799
1867
  # resource_policy: "NonEmptyResourcePolicyType", # required
1868
+ # block_public_policy: false,
1800
1869
  # })
1801
1870
  #
1802
1871
  # @example Response structure
@@ -1846,29 +1915,29 @@ module Aws::SecretsManager
1846
1915
  # operation fails because you cannot modify an existing version; you
1847
1916
  # can only create new ones.
1848
1917
  #
1849
- # <note markdown="1"> * If you call an operation that needs to encrypt or decrypt the
1850
- # `SecretString` or `SecretBinary` for a secret in the same account as
1851
- # the calling user and that secret doesn't specify a AWS KMS
1852
- # encryption key, Secrets Manager uses the account's default AWS
1853
- # managed customer master key (CMK) with the alias
1854
- # `aws/secretsmanager`. If this key doesn't already exist in your
1855
- # account then Secrets Manager creates it for you automatically. All
1856
- # users and roles in the same AWS account automatically have access to
1857
- # use the default CMK. Note that if an Secrets Manager API call
1858
- # results in AWS having to create the account's AWS-managed CMK, it
1859
- # can result in a one-time significant delay in returning the result.
1860
- #
1861
- # * If the secret is in a different AWS account from the credentials
1862
- # calling an API that requires encryption or decryption of the secret
1863
- # value then you must create and use a custom AWS KMS CMK because you
1864
- # can't access the default CMK for the account using credentials from
1865
- # a different AWS account. Store the ARN of the CMK in the secret when
1866
- # you create the secret or when you update it by including it in the
1867
- # `KMSKeyId`. If you call an API that must encrypt or decrypt
1868
- # `SecretString` or `SecretBinary` using credentials from a different
1869
- # account then the AWS KMS key policy must grant cross-account access
1870
- # to that other account's user or role for both the
1871
- # kms:GenerateDataKey and kms:Decrypt operations.
1918
+ # <note markdown="1"> * If you call an operation to encrypt or decrypt the `SecretString` or
1919
+ # `SecretBinary` for a secret in the same account as the calling user
1920
+ # and that secret doesn't specify a AWS KMS encryption key, Secrets
1921
+ # Manager uses the account's default AWS managed customer master key
1922
+ # (CMK) with the alias `aws/secretsmanager`. If this key doesn't
1923
+ # already exist in your account then Secrets Manager creates it for
1924
+ # you automatically. All users and roles in the same AWS account
1925
+ # automatically have access to use the default CMK. Note that if an
1926
+ # Secrets Manager API call results in AWS creating the account's
1927
+ # AWS-managed CMK, it can result in a one-time significant delay in
1928
+ # returning the result.
1929
+ #
1930
+ # * If the secret resides in a different AWS account from the
1931
+ # credentials calling an API that requires encryption or decryption of
1932
+ # the secret value then you must create and use a custom AWS KMS CMK
1933
+ # because you can't access the default CMK for the account using
1934
+ # credentials from a different AWS account. Store the ARN of the CMK
1935
+ # in the secret when you create the secret or when you update it by
1936
+ # including it in the `KMSKeyId`. If you call an API that must encrypt
1937
+ # or decrypt `SecretString` or `SecretBinary` using credentials from a
1938
+ # different account then the AWS KMS key policy must grant
1939
+ # cross-account access to that other account's user or role for both
1940
+ # the kms:GenerateDataKey and kms:Decrypt operations.
1872
1941
  #
1873
1942
  # </note>
1874
1943
  #
@@ -1909,7 +1978,13 @@ module Aws::SecretsManager
1909
1978
  # then those characters cause Secrets Manager to assume that you’re
1910
1979
  # specifying a complete ARN. This confusion can cause unexpected
1911
1980
  # results. To avoid this situation, we recommend that you don’t create
1912
- # secret names that end with a hyphen followed by six characters.
1981
+ # secret names ending with a hyphen followed by six characters.
1982
+ #
1983
+ # If you specify an incomplete ARN without the random suffix, and
1984
+ # instead provide the 'friendly name', you *must* not include the
1985
+ # random suffix. If you do include the random suffix added by Secrets
1986
+ # Manager, you receive either a *ResourceNotFoundException* or an
1987
+ # *AccessDeniedException* error, depending on your permissions.
1913
1988
  #
1914
1989
  # </note>
1915
1990
  #
@@ -1940,7 +2015,7 @@ module Aws::SecretsManager
1940
2015
  # `SecretString` or `SecretBinary` values are the same as those in the
1941
2016
  # request then the request is ignored (the operation is idempotent).
1942
2017
  #
1943
- # * If a version with this value already exists and that version's
2018
+ # * If a version with this value already exists and the version of the
1944
2019
  # `SecretString` and `SecretBinary` values are different from those in
1945
2020
  # the request then the request fails because you cannot modify an
1946
2021
  # existing secret version. You can only create new versions to store
@@ -2102,7 +2177,13 @@ module Aws::SecretsManager
2102
2177
  # then those characters cause Secrets Manager to assume that you’re
2103
2178
  # specifying a complete ARN. This confusion can cause unexpected
2104
2179
  # results. To avoid this situation, we recommend that you don’t create
2105
- # secret names that end with a hyphen followed by six characters.
2180
+ # secret names ending with a hyphen followed by six characters.
2181
+ #
2182
+ # If you specify an incomplete ARN without the random suffix, and
2183
+ # instead provide the 'friendly name', you *must* not include the
2184
+ # random suffix. If you do include the random suffix added by Secrets
2185
+ # Manager, you receive either a *ResourceNotFoundException* or an
2186
+ # *AccessDeniedException* error, depending on your permissions.
2106
2187
  #
2107
2188
  # </note>
2108
2189
  #
@@ -2165,8 +2246,8 @@ module Aws::SecretsManager
2165
2246
  # for your protected service, see [Rotating Secrets in AWS Secrets
2166
2247
  # Manager][1] in the *AWS Secrets Manager User Guide*.
2167
2248
  #
2168
- # Secrets Manager schedules the next rotation when the previous one is
2169
- # complete. Secrets Manager schedules the date by adding the rotation
2249
+ # Secrets Manager schedules the next rotation when the previous one
2250
+ # completes. Secrets Manager schedules the date by adding the rotation
2170
2251
  # interval (number of days) to the actual date of the last rotation. The
2171
2252
  # service chooses the hour within that 24-hour date window randomly. The
2172
2253
  # minute is also chosen somewhat randomly, but weighted towards the top
@@ -2182,9 +2263,9 @@ module Aws::SecretsManager
2182
2263
  # * The `AWSPENDING` staging label is not attached to any version of the
2183
2264
  # secret.
2184
2265
  #
2185
- # If instead the `AWSPENDING` staging label is present but is not
2186
- # attached to the same version as `AWSCURRENT` then any later invocation
2187
- # of `RotateSecret` assumes that a previous rotation request is still in
2266
+ # If the `AWSPENDING` staging label is present but not attached to the
2267
+ # same version as `AWSCURRENT` then any later invocation of
2268
+ # `RotateSecret` assumes that a previous rotation request is still in
2188
2269
  # progress and returns an error.
2189
2270
  #
2190
2271
  # **Minimum permissions**
@@ -2226,7 +2307,13 @@ module Aws::SecretsManager
2226
2307
  # then those characters cause Secrets Manager to assume that you’re
2227
2308
  # specifying a complete ARN. This confusion can cause unexpected
2228
2309
  # results. To avoid this situation, we recommend that you don’t create
2229
- # secret names that end with a hyphen followed by six characters.
2310
+ # secret names ending with a hyphen followed by six characters.
2311
+ #
2312
+ # If you specify an incomplete ARN without the random suffix, and
2313
+ # instead provide the 'friendly name', you *must* not include the
2314
+ # random suffix. If you do include the random suffix added by Secrets
2315
+ # Manager, you receive either a *ResourceNotFoundException* or an
2316
+ # *AccessDeniedException* error, depending on your permissions.
2230
2317
  #
2231
2318
  # </note>
2232
2319
  #
@@ -2242,8 +2329,8 @@ module Aws::SecretsManager
2242
2329
  # generate a `ClientRequestToken` yourself for new versions and include
2243
2330
  # that value in the request.
2244
2331
  #
2245
- # You only need to specify your own value if you are implementing your
2246
- # own retry logic and want to ensure that a given secret is not created
2332
+ # You only need to specify your own value if you implement your own
2333
+ # retry logic and want to ensure that a given secret is not created
2247
2334
  # twice. We recommend that you generate a [UUID-type][1] value to ensure
2248
2335
  # uniqueness within the specified secret.
2249
2336
  #
@@ -2314,16 +2401,16 @@ module Aws::SecretsManager
2314
2401
  #
2315
2402
  # * Tag keys and values are case sensitive.
2316
2403
  #
2317
- # * Do not use the `aws:` prefix in your tag names or values because it
2318
- # is reserved for AWS use. You can't edit or delete tag names or
2404
+ # * Do not use the `aws:` prefix in your tag names or values because AWS
2405
+ # reserves it for AWS use. You can't edit or delete tag names or
2319
2406
  # values with this prefix. Tags with this prefix do not count against
2320
2407
  # your tags per secret limit.
2321
2408
  #
2322
- # * If your tagging schema will be used across multiple services and
2323
- # resources, remember that other services might have restrictions on
2324
- # allowed characters. Generally allowed characters are: letters,
2325
- # spaces, and numbers representable in UTF-8, plus the following
2326
- # special characters: + - = . \_ : / @.
2409
+ # * If you use your tagging schema across multiple services and
2410
+ # resources, remember other services might have restrictions on
2411
+ # allowed characters. Generally allowed characters: letters, spaces,
2412
+ # and numbers representable in UTF-8, plus the following special
2413
+ # characters: + - = . \_ : / @.
2327
2414
  #
2328
2415
  # If you use tags as part of your security strategy, then adding or
2329
2416
  # removing a tag can change permissions. If successfully completing this
@@ -2361,7 +2448,13 @@ module Aws::SecretsManager
2361
2448
  # then those characters cause Secrets Manager to assume that you’re
2362
2449
  # specifying a complete ARN. This confusion can cause unexpected
2363
2450
  # results. To avoid this situation, we recommend that you don’t create
2364
- # secret names that end with a hyphen followed by six characters.
2451
+ # secret names ending with a hyphen followed by six characters.
2452
+ #
2453
+ # If you specify an incomplete ARN without the random suffix, and
2454
+ # instead provide the 'friendly name', you *must* not include the
2455
+ # random suffix. If you do include the random suffix added by Secrets
2456
+ # Manager, you receive either a *ResourceNotFoundException* or an
2457
+ # *AccessDeniedException* error, depending on your permissions.
2365
2458
  #
2366
2459
  # </note>
2367
2460
  #
@@ -2463,7 +2556,13 @@ module Aws::SecretsManager
2463
2556
  # then those characters cause Secrets Manager to assume that you’re
2464
2557
  # specifying a complete ARN. This confusion can cause unexpected
2465
2558
  # results. To avoid this situation, we recommend that you don’t create
2466
- # secret names that end with a hyphen followed by six characters.
2559
+ # secret names ending with a hyphen followed by six characters.
2560
+ #
2561
+ # If you specify an incomplete ARN without the random suffix, and
2562
+ # instead provide the 'friendly name', you *must* not include the
2563
+ # random suffix. If you do include the random suffix added by Secrets
2564
+ # Manager, you receive either a *ResourceNotFoundException* or an
2565
+ # *AccessDeniedException* error, depending on your permissions.
2467
2566
  #
2468
2567
  # </note>
2469
2568
  #
@@ -2535,29 +2634,29 @@ module Aws::SecretsManager
2535
2634
  # secret version, Secrets Manager automatically attaches the staging
2536
2635
  # label `AWSCURRENT` to the new version.
2537
2636
  #
2538
- # <note markdown="1"> * If you call an operation that needs to encrypt or decrypt the
2539
- # `SecretString` or `SecretBinary` for a secret in the same account as
2540
- # the calling user and that secret doesn't specify a AWS KMS
2541
- # encryption key, Secrets Manager uses the account's default AWS
2542
- # managed customer master key (CMK) with the alias
2543
- # `aws/secretsmanager`. If this key doesn't already exist in your
2544
- # account then Secrets Manager creates it for you automatically. All
2545
- # users and roles in the same AWS account automatically have access to
2546
- # use the default CMK. Note that if an Secrets Manager API call
2547
- # results in AWS having to create the account's AWS-managed CMK, it
2548
- # can result in a one-time significant delay in returning the result.
2549
- #
2550
- # * If the secret is in a different AWS account from the credentials
2551
- # calling an API that requires encryption or decryption of the secret
2552
- # value then you must create and use a custom AWS KMS CMK because you
2553
- # can't access the default CMK for the account using credentials from
2554
- # a different AWS account. Store the ARN of the CMK in the secret when
2555
- # you create the secret or when you update it by including it in the
2556
- # `KMSKeyId`. If you call an API that must encrypt or decrypt
2557
- # `SecretString` or `SecretBinary` using credentials from a different
2558
- # account then the AWS KMS key policy must grant cross-account access
2559
- # to that other account's user or role for both the
2560
- # kms:GenerateDataKey and kms:Decrypt operations.
2637
+ # <note markdown="1"> * If you call an operation to encrypt or decrypt the `SecretString` or
2638
+ # `SecretBinary` for a secret in the same account as the calling user
2639
+ # and that secret doesn't specify a AWS KMS encryption key, Secrets
2640
+ # Manager uses the account's default AWS managed customer master key
2641
+ # (CMK) with the alias `aws/secretsmanager`. If this key doesn't
2642
+ # already exist in your account then Secrets Manager creates it for
2643
+ # you automatically. All users and roles in the same AWS account
2644
+ # automatically have access to use the default CMK. Note that if an
2645
+ # Secrets Manager API call results in AWS creating the account's
2646
+ # AWS-managed CMK, it can result in a one-time significant delay in
2647
+ # returning the result.
2648
+ #
2649
+ # * If the secret resides in a different AWS account from the
2650
+ # credentials calling an API that requires encryption or decryption of
2651
+ # the secret value then you must create and use a custom AWS KMS CMK
2652
+ # because you can't access the default CMK for the account using
2653
+ # credentials from a different AWS account. Store the ARN of the CMK
2654
+ # in the secret when you create the secret or when you update it by
2655
+ # including it in the `KMSKeyId`. If you call an API that must encrypt
2656
+ # or decrypt `SecretString` or `SecretBinary` using credentials from a
2657
+ # different account then the AWS KMS key policy must grant
2658
+ # cross-account access to that other account's user or role for both
2659
+ # the kms:GenerateDataKey and kms:Decrypt operations.
2561
2660
  #
2562
2661
  # </note>
2563
2662
  #
@@ -2602,7 +2701,13 @@ module Aws::SecretsManager
2602
2701
  # then those characters cause Secrets Manager to assume that you’re
2603
2702
  # specifying a complete ARN. This confusion can cause unexpected
2604
2703
  # results. To avoid this situation, we recommend that you don’t create
2605
- # secret names that end with a hyphen followed by six characters.
2704
+ # secret names ending with a hyphen followed by six characters.
2705
+ #
2706
+ # If you specify an incomplete ARN without the random suffix, and
2707
+ # instead provide the 'friendly name', you *must* not include the
2708
+ # random suffix. If you do include the random suffix added by Secrets
2709
+ # Manager, you receive either a *ResourceNotFoundException* or an
2710
+ # *AccessDeniedException* error, depending on your permissions.
2606
2711
  #
2607
2712
  # </note>
2608
2713
  #
@@ -2839,9 +2944,9 @@ module Aws::SecretsManager
2839
2944
  # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/terms-concepts.html#term_staging-label
2840
2945
  #
2841
2946
  # @option params [required, String] :secret_id
2842
- # Specifies the secret with the version whose list of staging labels you
2843
- # want to modify. You can specify either the Amazon Resource Name (ARN)
2844
- # or the friendly name of the secret.
2947
+ # Specifies the secret with the version with the list of staging labels
2948
+ # you want to modify. You can specify either the Amazon Resource Name
2949
+ # (ARN) or the friendly name of the secret.
2845
2950
  #
2846
2951
  # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
2847
2952
  # complete ARN. You can specify a partial ARN too—for example, if you
@@ -2854,7 +2959,13 @@ module Aws::SecretsManager
2854
2959
  # then those characters cause Secrets Manager to assume that you’re
2855
2960
  # specifying a complete ARN. This confusion can cause unexpected
2856
2961
  # results. To avoid this situation, we recommend that you don’t create
2857
- # secret names that end with a hyphen followed by six characters.
2962
+ # secret names ending with a hyphen followed by six characters.
2963
+ #
2964
+ # If you specify an incomplete ARN without the random suffix, and
2965
+ # instead provide the 'friendly name', you *must* not include the
2966
+ # random suffix. If you do include the random suffix added by Secrets
2967
+ # Manager, you receive either a *ResourceNotFoundException* or an
2968
+ # *AccessDeniedException* error, depending on your permissions.
2858
2969
  #
2859
2970
  # </note>
2860
2971
  #
@@ -2872,7 +2983,7 @@ module Aws::SecretsManager
2872
2983
  #
2873
2984
  # @option params [String] :move_to_version_id
2874
2985
  # (Optional) The secret version ID that you want to add the staging
2875
- # label to. If you want to remove a label from a version, then do not
2986
+ # label. If you want to remove a label from a version, then do not
2876
2987
  # specify this parameter.
2877
2988
  #
2878
2989
  # If the staging label is already attached to a different version of the
@@ -2962,6 +3073,86 @@ module Aws::SecretsManager
2962
3073
  req.send_request(options)
2963
3074
  end
2964
3075
 
3076
+ # Validates the JSON text of the resource-based policy document attached
3077
+ # to the specified secret. The JSON request string input and response
3078
+ # output displays formatted code with white space and line breaks for
3079
+ # better readability. Submit your input as a single line JSON string. A
3080
+ # resource-based policy is optional.
3081
+ #
3082
+ # @option params [String] :secret_id
3083
+ # The identifier for the secret that you want to validate a resource
3084
+ # policy. You can specify either the Amazon Resource Name (ARN) or the
3085
+ # friendly name of the secret.
3086
+ #
3087
+ # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
3088
+ # complete ARN. You can specify a partial ARN too—for example, if you
3089
+ # don’t include the final hyphen and six random characters that Secrets
3090
+ # Manager adds at the end of the ARN when you created the secret. A
3091
+ # partial ARN match can work as long as it uniquely matches only one
3092
+ # secret. However, if your secret has a name that ends in a hyphen
3093
+ # followed by six characters (before Secrets Manager adds the hyphen and
3094
+ # six characters to the ARN) and you try to use that as a partial ARN,
3095
+ # then those characters cause Secrets Manager to assume that you’re
3096
+ # specifying a complete ARN. This confusion can cause unexpected
3097
+ # results. To avoid this situation, we recommend that you don’t create
3098
+ # secret names ending with a hyphen followed by six characters.
3099
+ #
3100
+ # If you specify an incomplete ARN without the random suffix, and
3101
+ # instead provide the 'friendly name', you *must* not include the
3102
+ # random suffix. If you do include the random suffix added by Secrets
3103
+ # Manager, you receive either a *ResourceNotFoundException* or an
3104
+ # *AccessDeniedException* error, depending on your permissions.
3105
+ #
3106
+ # </note>
3107
+ #
3108
+ # @option params [required, String] :resource_policy
3109
+ # Identifies the Resource Policy attached to the secret.
3110
+ #
3111
+ # @return [Types::ValidateResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3112
+ #
3113
+ # * {Types::ValidateResourcePolicyResponse#policy_validation_passed #policy_validation_passed} => Boolean
3114
+ # * {Types::ValidateResourcePolicyResponse#validation_errors #validation_errors} => Array&lt;Types::ValidationErrorsEntry&gt;
3115
+ #
3116
+ #
3117
+ # @example Example: To validate a resource-based policy to a secret
3118
+ #
3119
+ # # The following example shows how to validate a resource-based policy to a secret.
3120
+ #
3121
+ # resp = client.validate_resource_policy({
3122
+ # resource_policy: "{\n\"Version\":\"2012-10-17\",\n\"Statement\":[{\n\"Effect\":\"Allow\",\n\"Principal\":{\n\"AWS\":\"arn:aws:iam::123456789012:root\"\n},\n\"Action\":\"secretsmanager:GetSecretValue\",\n\"Resource\":\"*\"\n}]\n}",
3123
+ # secret_id: "MyTestDatabaseSecret",
3124
+ # })
3125
+ #
3126
+ # resp.to_h outputs the following:
3127
+ # {
3128
+ # policy_validation_passed: true,
3129
+ # validation_errors: [
3130
+ # ],
3131
+ # }
3132
+ #
3133
+ # @example Request syntax with placeholder values
3134
+ #
3135
+ # resp = client.validate_resource_policy({
3136
+ # secret_id: "SecretIdType",
3137
+ # resource_policy: "NonEmptyResourcePolicyType", # required
3138
+ # })
3139
+ #
3140
+ # @example Response structure
3141
+ #
3142
+ # resp.policy_validation_passed #=> Boolean
3143
+ # resp.validation_errors #=> Array
3144
+ # resp.validation_errors[0].check_name #=> String
3145
+ # resp.validation_errors[0].error_message #=> String
3146
+ #
3147
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ValidateResourcePolicy AWS API Documentation
3148
+ #
3149
+ # @overload validate_resource_policy(params = {})
3150
+ # @param [Hash] params ({})
3151
+ def validate_resource_policy(params = {}, options = {})
3152
+ req = build_request(:validate_resource_policy, params)
3153
+ req.send_request(options)
3154
+ end
3155
+
2965
3156
  # @!endgroup
2966
3157
 
2967
3158
  # @param params ({})
@@ -2975,7 +3166,7 @@ module Aws::SecretsManager
2975
3166
  params: params,
2976
3167
  config: config)
2977
3168
  context[:gem_name] = 'aws-sdk-secretsmanager'
2978
- context[:gem_version] = '1.35.0'
3169
+ context[:gem_version] = '1.40.0'
2979
3170
  Seahorse::Client::Request.new(handlers, context)
2980
3171
  end
2981
3172