aws-sdk-secretsmanager 1.36.0 → 1.41.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: 89dc81a4d48b5e1bb8a41414db6aafb4e565ad950d51ab257b73e24dedcb8493
4
- data.tar.gz: 0b0e04fff3e2343bd7046809efcff96f17bae2dfc4eb307bf766a76457b7033d
3
+ metadata.gz: 49a9df70bca437d8d4c359afd6adca86e7c3b32ae4d4c03896f0e829d4bfd7ad
4
+ data.tar.gz: 47834c3354b531844f1ca4116cb0daac6b48527a5e28229aa04da3bceb06fa1c
5
5
  SHA512:
6
- metadata.gz: 3d7f401317a50c0a8b442ea38ef7896fc1418844d906ad49b48e91616e3918f18db165a0ec5bbeafff1659d0400b490f4ac458db63ac6904ae900c9e3817aece
7
- data.tar.gz: 9fa672d95620e8f7ea140b78f879a398bc495d9a01322ccf6093a77615073904abf071212a24e174d0cde32c1b2b9c77a9a8b35146bce52002ee7052616c881a
6
+ metadata.gz: 4975ecc76204074581310cb95abf9f00f4f767c95bc258af1dab8b78ab5b95b3bc07fbe8e94ad6d1240ea7c2fc23ac361166dc506a075c1c8dd8aa32f1177287
7
+ data.tar.gz: 7998ad7a9171982145b0319f036fd478660da373c2d5afd9c655c45a9c635b9889e4583b7d8cbb3207369e43067219188ed683d9bfa4beadcc9769e6dd0e76cc
@@ -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:
@@ -42,9 +44,9 @@ require_relative 'aws-sdk-secretsmanager/customizations'
42
44
  #
43
45
  # See {Errors} for more information.
44
46
  #
45
- # @service
47
+ # @!group service
46
48
  module Aws::SecretsManager
47
49
 
48
- GEM_VERSION = '1.36.0'
50
+ GEM_VERSION = '1.41.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
 
@@ -81,13 +85,28 @@ module Aws::SecretsManager
81
85
  # * `Aws::Credentials` - Used for configuring static, non-refreshing
82
86
  # credentials.
83
87
  #
88
+ # * `Aws::SharedCredentials` - Used for loading static credentials from a
89
+ # shared file, such as `~/.aws/config`.
90
+ #
91
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
92
+ #
93
+ # * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
94
+ # assume a role after providing credentials via the web.
95
+ #
96
+ # * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
97
+ # access token generated from `aws login`.
98
+ #
99
+ # * `Aws::ProcessCredentials` - Used for loading credentials from a
100
+ # process that outputs to stdout.
101
+ #
84
102
  # * `Aws::InstanceProfileCredentials` - Used for loading credentials
85
103
  # from an EC2 IMDS on an EC2 instance.
86
104
  #
87
- # * `Aws::SharedCredentials` - Used for loading credentials from a
88
- # shared file, such as `~/.aws/config`.
105
+ # * `Aws::ECSCredentials` - Used for loading credentials from
106
+ # instances running in ECS.
89
107
  #
90
- # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
108
+ # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
109
+ # from the Cognito Identity service.
91
110
  #
92
111
  # When `:credentials` are not configured directly, the following
93
112
  # locations will be searched for credentials:
@@ -97,10 +116,10 @@ module Aws::SecretsManager
97
116
  # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
98
117
  # * `~/.aws/credentials`
99
118
  # * `~/.aws/config`
100
- # * EC2 IMDS instance profile - When used by default, the timeouts are
101
- # very aggressive. Construct and pass an instance of
102
- # `Aws::InstanceProfileCredentails` to enable retries and extended
103
- # timeouts.
119
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts
120
+ # are very aggressive. Construct and pass an instance of
121
+ # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
122
+ # enable retries and extended timeouts.
104
123
  #
105
124
  # @option options [required, String] :region
106
125
  # The AWS region to connect to. The configured `:region` is
@@ -161,7 +180,7 @@ module Aws::SecretsManager
161
180
  # @option options [String] :endpoint
162
181
  # The client endpoint is normally constructed from the `:region`
163
182
  # option. You should only configure an `:endpoint` when connecting
164
- # to test endpoints. This should be a valid HTTP(S) URI.
183
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
165
184
  #
166
185
  # @option options [Integer] :endpoint_cache_max_entries (1000)
167
186
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -319,20 +338,20 @@ module Aws::SecretsManager
319
338
  # @!group API Operations
320
339
 
321
340
  # Disables automatic scheduled rotation and cancels the rotation of a
322
- # secret if one is currently in progress.
341
+ # secret if currently in progress.
323
342
  #
324
343
  # To re-enable scheduled rotation, call RotateSecret with
325
344
  # `AutomaticallyRotateAfterDays` set to a value greater than 0. This
326
- # will immediately rotate your secret and then enable the automatic
345
+ # immediately rotates your secret and then enables the automatic
327
346
  # schedule.
328
347
  #
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
348
+ # <note markdown="1"> If you cancel a rotation while in progress, it can leave the
349
+ # `VersionStage` labels in an unexpected state. Depending on the step of
350
+ # the rotation in progress, you might need to remove the staging label
351
+ # `AWSPENDING` from the partially created version, specified by the
352
+ # `VersionId` response value. You should also evaluate the partially
334
353
  # 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`
354
+ # by removing all staging labels from the new version `VersionStage`
336
355
  # field.
337
356
  #
338
357
  # </note>
@@ -340,12 +359,12 @@ module Aws::SecretsManager
340
359
  # To successfully start a rotation, the staging label `AWSPENDING` must
341
360
  # be in one of the following states:
342
361
  #
343
- # * Not be attached to any version at all
362
+ # * Not attached to any version at all
344
363
  #
345
364
  # * Attached to the same version as the staging label `AWSCURRENT`
346
365
  #
347
- # If the staging label `AWSPENDING` is attached to a different version
348
- # than the version with `AWSCURRENT` then the attempt to rotate fails.
366
+ # If the staging label `AWSPENDING` attached to a different version than
367
+ # the version with `AWSCURRENT` then the attempt to rotate fails.
349
368
  #
350
369
  # **Minimum permissions**
351
370
  #
@@ -369,9 +388,9 @@ module Aws::SecretsManager
369
388
  # ListSecretVersionIds.
370
389
  #
371
390
  # @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.
391
+ # Specifies the secret to cancel a rotation request. You can specify
392
+ # either the Amazon Resource Name (ARN) or the friendly name of the
393
+ # secret.
375
394
  #
376
395
  # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
377
396
  # complete ARN. You can specify a partial ARN too—for example, if you
@@ -384,7 +403,13 @@ module Aws::SecretsManager
384
403
  # then those characters cause Secrets Manager to assume that you’re
385
404
  # specifying a complete ARN. This confusion can cause unexpected
386
405
  # results. To avoid this situation, we recommend that you don’t create
387
- # secret names that end with a hyphen followed by six characters.
406
+ # secret names ending with a hyphen followed by six characters.
407
+ #
408
+ # If you specify an incomplete ARN without the random suffix, and
409
+ # instead provide the 'friendly name', you *must* not include the
410
+ # random suffix. If you do include the random suffix added by Secrets
411
+ # Manager, you receive either a *ResourceNotFoundException* or an
412
+ # *AccessDeniedException* error, depending on your permissions.
388
413
  #
389
414
  # </note>
390
415
  #
@@ -443,7 +468,7 @@ module Aws::SecretsManager
443
468
  # version is in the rotation cycle. The `SecretVersionsToStages` field
444
469
  # of the secret contains the mapping of staging labels to the active
445
470
  # versions of the secret. Versions without a staging label are
446
- # considered deprecated and are not included in the list.
471
+ # considered deprecated and not included in the list.
447
472
  #
448
473
  # You provide the secret data to be encrypted by putting text in either
449
474
  # the `SecretString` parameter or binary data in the `SecretBinary`
@@ -452,29 +477,29 @@ module Aws::SecretsManager
452
477
  # version and automatically attaches the staging label `AWSCURRENT` to
453
478
  # the new version.
454
479
  #
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.
480
+ # <note markdown="1"> * If you call an operation to encrypt or decrypt the `SecretString` or
481
+ # `SecretBinary` for a secret in the same account as the calling user
482
+ # and that secret doesn't specify a AWS KMS encryption key, Secrets
483
+ # Manager uses the account's default AWS managed customer master key
484
+ # (CMK) with the alias `aws/secretsmanager`. If this key doesn't
485
+ # already exist in your account then Secrets Manager creates it for
486
+ # you automatically. All users and roles in the same AWS account
487
+ # automatically have access to use the default CMK. Note that if an
488
+ # Secrets Manager API call results in AWS creating the account's
489
+ # AWS-managed CMK, it can result in a one-time significant delay in
490
+ # returning the result.
491
+ #
492
+ # * If the secret resides in a different AWS account from the
493
+ # credentials calling an API that requires encryption or decryption of
494
+ # the secret value then you must create and use a custom AWS KMS CMK
495
+ # because you can't access the default CMK for the account using
496
+ # credentials from a different AWS account. Store the ARN of the CMK
497
+ # in the secret when you create the secret or when you update it by
498
+ # including it in the `KMSKeyId`. If you call an API that must encrypt
499
+ # or decrypt `SecretString` or `SecretBinary` using credentials from a
500
+ # different account then the AWS KMS key policy must grant
501
+ # cross-account access to that other account's user or role for both
502
+ # the kms:GenerateDataKey and kms:Decrypt operations.
478
503
  #
479
504
  # </note>
480
505
  #
@@ -488,11 +513,11 @@ module Aws::SecretsManager
488
513
  #
489
514
  # * kms:GenerateDataKey - needed only if you use a customer-managed AWS
490
515
  # 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.
516
+ # use the account default AWS managed CMK for Secrets Manager.
492
517
  #
493
518
  # * kms:Decrypt - needed only if you use a customer-managed AWS KMS key
494
519
  # to encrypt the secret. You do not need this permission to use the
495
- # account's default AWS managed CMK for Secrets Manager.
520
+ # account default AWS managed CMK for Secrets Manager.
496
521
  #
497
522
  # * secretsmanager:TagResource - needed only if you include the `Tags`
498
523
  # parameter.
@@ -522,11 +547,10 @@ module Aws::SecretsManager
522
547
  # The secret name must be ASCII letters, digits, or the following
523
548
  # characters : /\_+=.@-
524
549
  #
525
- # <note markdown="1"> Don't end your secret name with a hyphen followed by six characters.
550
+ # <note markdown="1"> Do not end your secret name with a hyphen followed by six characters.
526
551
  # 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.
552
+ # for a secret by partial ARN. Secrets Manager automatically adds a
553
+ # hyphen and six random characters at the end of the ARN.
530
554
  #
531
555
  # </note>
532
556
  #
@@ -541,7 +565,7 @@ module Aws::SecretsManager
541
565
  # the request. If you don't use the SDK and instead generate a raw HTTP
542
566
  # request to the Secrets Manager service endpoint, then you must
543
567
  # generate a `ClientRequestToken` yourself for the new version and
544
- # include that value in the request.
568
+ # include the value in the request.
545
569
  #
546
570
  # </note>
547
571
  #
@@ -554,10 +578,9 @@ module Aws::SecretsManager
554
578
  # * If the `ClientRequestToken` value isn't already associated with a
555
579
  # version of the secret then a new version of the secret is created.
556
580
  #
557
- # * If a version with this value already exists and that version's
581
+ # * If a version with this value already exists and the version
558
582
  # `SecretString` and `SecretBinary` values are the same as those in
559
- # the request, then the request is ignored (the operation is
560
- # idempotent).
583
+ # the request, then the request is ignored.
561
584
  #
562
585
  # * If a version with this value already exists and that version's
563
586
  # `SecretString` and `SecretBinary` values are different from those in
@@ -593,12 +616,12 @@ module Aws::SecretsManager
593
616
  # time it needs to encrypt a version's `SecretString` or `SecretBinary`
594
617
  # fields.
595
618
  #
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
619
+ # You can use the account default CMK to encrypt and decrypt only if you
620
+ # call this operation using credentials from the same account that owns
621
+ # the secret. If the secret resides in a different account, then you
599
622
  # must create a custom CMK and specify the ARN in this field.
600
623
  #
601
- # @option params [String, IO] :secret_binary
624
+ # @option params [String, StringIO, File] :secret_binary
602
625
  # (Optional) Specifies binary data that you want to encrypt and store in
603
626
  # the new version of the secret. To use this parameter in the
604
627
  # command-line tools, we recommend that you store your binary data in a
@@ -630,7 +653,7 @@ module Aws::SecretsManager
630
653
  # environments, see [Using JSON for Parameters][1] in the *AWS CLI User
631
654
  # Guide*. For example:
632
655
  #
633
- # `[\{"username":"bob"\},\{"password":"abc123xyz456"\}]`
656
+ # `\{"username":"bob","password":"abc123xyz456"\}`
634
657
  #
635
658
  # If your command-line tool or SDK requires quotation marks around the
636
659
  # parameter, you should use single quotes to avoid confusion with the
@@ -676,16 +699,16 @@ module Aws::SecretsManager
676
699
  #
677
700
  # * Tag keys and values are case sensitive.
678
701
  #
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
702
+ # * Do not use the `aws:` prefix in your tag names or values because AWS
703
+ # reserves it for AWS use. You can't edit or delete tag names or
681
704
  # values with this prefix. Tags with this prefix do not count against
682
705
  # your tags per secret limit.
683
706
  #
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: + - = . \_ : / @.
707
+ # * If you use your tagging schema across multiple services and
708
+ # resources, remember other services might have restrictions on
709
+ # allowed characters. Generally allowed characters: letters, spaces,
710
+ # and numbers representable in UTF-8, plus the following special
711
+ # characters: + - = . \_ : / @.
689
712
  #
690
713
  #
691
714
  #
@@ -749,8 +772,7 @@ module Aws::SecretsManager
749
772
  req.send_request(options)
750
773
  end
751
774
 
752
- # Deletes the resource-based permission policy that's attached to the
753
- # secret.
775
+ # Deletes the resource-based permission policy attached to the secret.
754
776
  #
755
777
  # **Minimum permissions**
756
778
  #
@@ -785,7 +807,13 @@ module Aws::SecretsManager
785
807
  # then those characters cause Secrets Manager to assume that you’re
786
808
  # specifying a complete ARN. This confusion can cause unexpected
787
809
  # results. To avoid this situation, we recommend that you don’t create
788
- # secret names that end with a hyphen followed by six characters.
810
+ # secret names ending with a hyphen followed by six characters.
811
+ #
812
+ # If you specify an incomplete ARN without the random suffix, and
813
+ # instead provide the 'friendly name', you *must* not include the
814
+ # random suffix. If you do include the random suffix added by Secrets
815
+ # Manager, you receive either a *ResourceNotFoundException* or an
816
+ # *AccessDeniedException* error, depending on your permissions.
789
817
  #
790
818
  # </note>
791
819
  #
@@ -888,7 +916,13 @@ module Aws::SecretsManager
888
916
  # then those characters cause Secrets Manager to assume that you’re
889
917
  # specifying a complete ARN. This confusion can cause unexpected
890
918
  # results. To avoid this situation, we recommend that you don’t create
891
- # secret names that end with a hyphen followed by six characters.
919
+ # secret names ending with a hyphen followed by six characters.
920
+ #
921
+ # If you specify an incomplete ARN without the random suffix, and
922
+ # instead provide the 'friendly name', you *must* not include the
923
+ # random suffix. If you do include the random suffix added by Secrets
924
+ # Manager, you receive either a *ResourceNotFoundException* or an
925
+ # *AccessDeniedException* error, depending on your permissions.
892
926
  #
893
927
  # </note>
894
928
  #
@@ -966,8 +1000,8 @@ module Aws::SecretsManager
966
1000
  end
967
1001
 
968
1002
  # 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.
1003
+ # fields. Secrets Manager only returns fields populated with a value in
1004
+ # the response.
971
1005
  #
972
1006
  # **Minimum permissions**
973
1007
  #
@@ -1004,7 +1038,13 @@ module Aws::SecretsManager
1004
1038
  # then those characters cause Secrets Manager to assume that you’re
1005
1039
  # specifying a complete ARN. This confusion can cause unexpected
1006
1040
  # results. To avoid this situation, we recommend that you don’t create
1007
- # secret names that end with a hyphen followed by six characters.
1041
+ # secret names ending with a hyphen followed by six characters.
1042
+ #
1043
+ # If you specify an incomplete ARN without the random suffix, and
1044
+ # instead provide the 'friendly name', you *must* not include the
1045
+ # random suffix. If you do include the random suffix added by Secrets
1046
+ # Manager, you receive either a *ResourceNotFoundException* or an
1047
+ # *AccessDeniedException* error, depending on your permissions.
1008
1048
  #
1009
1049
  # </note>
1010
1050
  #
@@ -1024,6 +1064,7 @@ module Aws::SecretsManager
1024
1064
  # * {Types::DescribeSecretResponse#tags #tags} => Array&lt;Types::Tag&gt;
1025
1065
  # * {Types::DescribeSecretResponse#version_ids_to_stages #version_ids_to_stages} => Hash&lt;String,Array&lt;String&gt;&gt;
1026
1066
  # * {Types::DescribeSecretResponse#owning_service #owning_service} => String
1067
+ # * {Types::DescribeSecretResponse#created_date #created_date} => Time
1027
1068
  #
1028
1069
  #
1029
1070
  # @example Example: To retrieve the details of a secret
@@ -1094,6 +1135,7 @@ module Aws::SecretsManager
1094
1135
  # resp.version_ids_to_stages["SecretVersionIdType"] #=> Array
1095
1136
  # resp.version_ids_to_stages["SecretVersionIdType"][0] #=> String
1096
1137
  # resp.owning_service #=> String
1138
+ # resp.created_date #=> Time
1097
1139
  #
1098
1140
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DescribeSecret AWS API Documentation
1099
1141
  #
@@ -1212,11 +1254,10 @@ module Aws::SecretsManager
1212
1254
  req.send_request(options)
1213
1255
  end
1214
1256
 
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.
1257
+ # Retrieves the JSON text of the resource-based policy document attached
1258
+ # to the specified secret. The JSON request string input and response
1259
+ # output displays formatted code with white space and line breaks for
1260
+ # better readability. Submit your input as a single line JSON string.
1220
1261
  #
1221
1262
  # **Minimum permissions**
1222
1263
  #
@@ -1230,8 +1271,8 @@ module Aws::SecretsManager
1230
1271
  #
1231
1272
  # * To attach a resource policy to a secret, use PutResourcePolicy.
1232
1273
  #
1233
- # * To delete the resource-based policy that's attached to a secret,
1234
- # use DeleteResourcePolicy.
1274
+ # * To delete the resource-based policy attached to a secret, use
1275
+ # DeleteResourcePolicy.
1235
1276
  #
1236
1277
  # * To list all of the currently available secrets, use ListSecrets.
1237
1278
  #
@@ -1251,7 +1292,13 @@ module Aws::SecretsManager
1251
1292
  # then those characters cause Secrets Manager to assume that you’re
1252
1293
  # specifying a complete ARN. This confusion can cause unexpected
1253
1294
  # results. To avoid this situation, we recommend that you don’t create
1254
- # secret names that end with a hyphen followed by six characters.
1295
+ # secret names ending with a hyphen followed by six characters.
1296
+ #
1297
+ # If you specify an incomplete ARN without the random suffix, and
1298
+ # instead provide the 'friendly name', you *must* not include the
1299
+ # random suffix. If you do include the random suffix added by Secrets
1300
+ # Manager, you receive either a *ResourceNotFoundException* or an
1301
+ # *AccessDeniedException* error, depending on your permissions.
1255
1302
  #
1256
1303
  # </note>
1257
1304
  #
@@ -1336,7 +1383,13 @@ module Aws::SecretsManager
1336
1383
  # then those characters cause Secrets Manager to assume that you’re
1337
1384
  # specifying a complete ARN. This confusion can cause unexpected
1338
1385
  # results. To avoid this situation, we recommend that you don’t create
1339
- # secret names that end with a hyphen followed by six characters.
1386
+ # secret names ending with a hyphen followed by six characters.
1387
+ #
1388
+ # If you specify an incomplete ARN without the random suffix, and
1389
+ # instead provide the 'friendly name', you *must* not include the
1390
+ # random suffix. If you do include the random suffix added by Secrets
1391
+ # Manager, you receive either a *ResourceNotFoundException* or an
1392
+ # *AccessDeniedException* error, depending on your permissions.
1340
1393
  #
1341
1394
  # </note>
1342
1395
  #
@@ -1433,8 +1486,8 @@ module Aws::SecretsManager
1433
1486
  #
1434
1487
  # <note markdown="1"> Always check the `NextToken` response parameter when calling any of
1435
1488
  # 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
1489
+ # empty or shorter than expected list of results even when there more
1490
+ # results become available. When this happens, the `NextToken` response
1438
1491
  # parameter contains a value to pass to the next call to the same API to
1439
1492
  # request the next part of the list.
1440
1493
  #
@@ -1470,28 +1523,34 @@ module Aws::SecretsManager
1470
1523
  # then those characters cause Secrets Manager to assume that you’re
1471
1524
  # specifying a complete ARN. This confusion can cause unexpected
1472
1525
  # results. To avoid this situation, we recommend that you don’t create
1473
- # secret names that end with a hyphen followed by six characters.
1526
+ # secret names ending with a hyphen followed by six characters.
1527
+ #
1528
+ # If you specify an incomplete ARN without the random suffix, and
1529
+ # instead provide the 'friendly name', you *must* not include the
1530
+ # random suffix. If you do include the random suffix added by Secrets
1531
+ # Manager, you receive either a *ResourceNotFoundException* or an
1532
+ # *AccessDeniedException* error, depending on your permissions.
1474
1533
  #
1475
1534
  # </note>
1476
1535
  #
1477
1536
  # @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.
1537
+ # (Optional) Limits the number of results you want to include in the
1538
+ # response. If you don't include this parameter, it defaults to a value
1539
+ # that's specific to the operation. If additional items exist beyond
1540
+ # the maximum you specify, the `NextToken` response element is present
1541
+ # and has a value (isn't null). Include that value as the `NextToken`
1542
+ # request parameter in the next call to the operation to get the next
1543
+ # part of the results. Note that Secrets Manager might return fewer
1544
+ # results than the maximum even when there are more results available.
1545
+ # You should check `NextToken` after every operation to ensure that you
1546
+ # receive all of the results.
1488
1547
  #
1489
1548
  # @option params [String] :next_token
1490
1549
  # (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.
1550
+ # `NextToken` response in a previous request indicating there's more
1551
+ # output available. In a subsequent call, set it to the value of the
1552
+ # previous call `NextToken` response to indicate where the output should
1553
+ # continue from.
1495
1554
  #
1496
1555
  # @option params [Boolean] :include_deprecated
1497
1556
  # (Optional) Specifies that you want the results to include versions
@@ -1583,8 +1642,8 @@ module Aws::SecretsManager
1583
1642
  #
1584
1643
  # <note markdown="1"> Always check the `NextToken` response parameter when calling any of
1585
1644
  # 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
1645
+ # empty or shorter than expected list of results even when there more
1646
+ # results become available. When this happens, the `NextToken` response
1588
1647
  # parameter contains a value to pass to the next call to the same API to
1589
1648
  # request the next part of the list.
1590
1649
  #
@@ -1605,23 +1664,29 @@ module Aws::SecretsManager
1605
1664
  # ^
1606
1665
  #
1607
1666
  # @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.
1667
+ # (Optional) Limits the number of results you want to include in the
1668
+ # response. If you don't include this parameter, it defaults to a value
1669
+ # that's specific to the operation. If additional items exist beyond
1670
+ # the maximum you specify, the `NextToken` response element is present
1671
+ # and has a value (isn't null). Include that value as the `NextToken`
1672
+ # request parameter in the next call to the operation to get the next
1673
+ # part of the results. Note that Secrets Manager might return fewer
1674
+ # results than the maximum even when there are more results available.
1675
+ # You should check `NextToken` after every operation to ensure that you
1676
+ # receive all of the results.
1618
1677
  #
1619
1678
  # @option params [String] :next_token
1620
1679
  # (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.
1680
+ # `NextToken` response in a previous request indicating there's more
1681
+ # output available. In a subsequent call, set it to the value of the
1682
+ # previous call `NextToken` response to indicate where the output should
1683
+ # continue from.
1684
+ #
1685
+ # @option params [Array<Types::Filter>] :filters
1686
+ # Lists the secret request filters.
1687
+ #
1688
+ # @option params [String] :sort_order
1689
+ # Lists secrets in the requested order.
1625
1690
  #
1626
1691
  # @return [Types::ListSecretsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1627
1692
  #
@@ -1671,6 +1736,13 @@ module Aws::SecretsManager
1671
1736
  # resp = client.list_secrets({
1672
1737
  # max_results: 1,
1673
1738
  # next_token: "NextTokenType",
1739
+ # filters: [
1740
+ # {
1741
+ # key: "description", # accepts description, name, tag-key, tag-value, all
1742
+ # values: ["FilterValueStringType"],
1743
+ # },
1744
+ # ],
1745
+ # sort_order: "asc", # accepts asc, desc
1674
1746
  # })
1675
1747
  #
1676
1748
  # @example Response structure
@@ -1694,6 +1766,7 @@ module Aws::SecretsManager
1694
1766
  # resp.secret_list[0].secret_versions_to_stages["SecretVersionIdType"] #=> Array
1695
1767
  # resp.secret_list[0].secret_versions_to_stages["SecretVersionIdType"][0] #=> String
1696
1768
  # resp.secret_list[0].owning_service #=> String
1769
+ # resp.secret_list[0].created_date #=> Time
1697
1770
  # resp.next_token #=> String
1698
1771
  #
1699
1772
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecrets AWS API Documentation
@@ -1727,7 +1800,7 @@ module Aws::SecretsManager
1727
1800
  #
1728
1801
  # **Related operations**
1729
1802
  #
1730
- # * To retrieve the resource policy that's attached to a secret, use
1803
+ # * To retrieve the resource policy attached to a secret, use
1731
1804
  # GetResourcePolicy.
1732
1805
  #
1733
1806
  # * To delete the resource-based policy that's attached to a secret,
@@ -1755,7 +1828,13 @@ module Aws::SecretsManager
1755
1828
  # then those characters cause Secrets Manager to assume that you’re
1756
1829
  # specifying a complete ARN. This confusion can cause unexpected
1757
1830
  # results. To avoid this situation, we recommend that you don’t create
1758
- # secret names that end with a hyphen followed by six characters.
1831
+ # secret names ending with a hyphen followed by six characters.
1832
+ #
1833
+ # If you specify an incomplete ARN without the random suffix, and
1834
+ # instead provide the 'friendly name', you *must* not include the
1835
+ # random suffix. If you do include the random suffix added by Secrets
1836
+ # Manager, you receive either a *ResourceNotFoundException* or an
1837
+ # *AccessDeniedException* error, depending on your permissions.
1759
1838
  #
1760
1839
  # </note>
1761
1840
  #
@@ -1771,6 +1850,10 @@ module Aws::SecretsManager
1771
1850
  #
1772
1851
  # [1]: http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json
1773
1852
  #
1853
+ # @option params [Boolean] :block_public_policy
1854
+ # Makes an optional API call to Zelkova to validate the Resource Policy
1855
+ # to prevent broad access to your secret.
1856
+ #
1774
1857
  # @return [Types::PutResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1775
1858
  #
1776
1859
  # * {Types::PutResourcePolicyResponse#arn #arn} => String
@@ -1797,6 +1880,7 @@ module Aws::SecretsManager
1797
1880
  # resp = client.put_resource_policy({
1798
1881
  # secret_id: "SecretIdType", # required
1799
1882
  # resource_policy: "NonEmptyResourcePolicyType", # required
1883
+ # block_public_policy: false,
1800
1884
  # })
1801
1885
  #
1802
1886
  # @example Response structure
@@ -1846,29 +1930,29 @@ module Aws::SecretsManager
1846
1930
  # operation fails because you cannot modify an existing version; you
1847
1931
  # can only create new ones.
1848
1932
  #
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.
1933
+ # <note markdown="1"> * If you call an operation to encrypt or decrypt the `SecretString` or
1934
+ # `SecretBinary` for a secret in the same account as the calling user
1935
+ # and that secret doesn't specify a AWS KMS encryption key, Secrets
1936
+ # Manager uses the account's default AWS managed customer master key
1937
+ # (CMK) with the alias `aws/secretsmanager`. If this key doesn't
1938
+ # already exist in your account then Secrets Manager creates it for
1939
+ # you automatically. All users and roles in the same AWS account
1940
+ # automatically have access to use the default CMK. Note that if an
1941
+ # Secrets Manager API call results in AWS creating the account's
1942
+ # AWS-managed CMK, it can result in a one-time significant delay in
1943
+ # returning the result.
1944
+ #
1945
+ # * If the secret resides in a different AWS account from the
1946
+ # credentials calling an API that requires encryption or decryption of
1947
+ # the secret value then you must create and use a custom AWS KMS CMK
1948
+ # because you can't access the default CMK for the account using
1949
+ # credentials from a different AWS account. Store the ARN of the CMK
1950
+ # in the secret when you create the secret or when you update it by
1951
+ # including it in the `KMSKeyId`. If you call an API that must encrypt
1952
+ # or decrypt `SecretString` or `SecretBinary` using credentials from a
1953
+ # different account then the AWS KMS key policy must grant
1954
+ # cross-account access to that other account's user or role for both
1955
+ # the kms:GenerateDataKey and kms:Decrypt operations.
1872
1956
  #
1873
1957
  # </note>
1874
1958
  #
@@ -1909,7 +1993,13 @@ module Aws::SecretsManager
1909
1993
  # then those characters cause Secrets Manager to assume that you’re
1910
1994
  # specifying a complete ARN. This confusion can cause unexpected
1911
1995
  # results. To avoid this situation, we recommend that you don’t create
1912
- # secret names that end with a hyphen followed by six characters.
1996
+ # secret names ending with a hyphen followed by six characters.
1997
+ #
1998
+ # If you specify an incomplete ARN without the random suffix, and
1999
+ # instead provide the 'friendly name', you *must* not include the
2000
+ # random suffix. If you do include the random suffix added by Secrets
2001
+ # Manager, you receive either a *ResourceNotFoundException* or an
2002
+ # *AccessDeniedException* error, depending on your permissions.
1913
2003
  #
1914
2004
  # </note>
1915
2005
  #
@@ -1940,7 +2030,7 @@ module Aws::SecretsManager
1940
2030
  # `SecretString` or `SecretBinary` values are the same as those in the
1941
2031
  # request then the request is ignored (the operation is idempotent).
1942
2032
  #
1943
- # * If a version with this value already exists and that version's
2033
+ # * If a version with this value already exists and the version of the
1944
2034
  # `SecretString` and `SecretBinary` values are different from those in
1945
2035
  # the request then the request fails because you cannot modify an
1946
2036
  # existing secret version. You can only create new versions to store
@@ -1955,7 +2045,7 @@ module Aws::SecretsManager
1955
2045
  #
1956
2046
  # [1]: https://wikipedia.org/wiki/Universally_unique_identifier
1957
2047
  #
1958
- # @option params [String, IO] :secret_binary
2048
+ # @option params [String, StringIO, File] :secret_binary
1959
2049
  # (Optional) Specifies binary data that you want to encrypt and store in
1960
2050
  # the new version of the secret. To use this parameter in the
1961
2051
  # command-line tools, we recommend that you store your binary data in a
@@ -2102,7 +2192,13 @@ module Aws::SecretsManager
2102
2192
  # then those characters cause Secrets Manager to assume that you’re
2103
2193
  # specifying a complete ARN. This confusion can cause unexpected
2104
2194
  # results. To avoid this situation, we recommend that you don’t create
2105
- # secret names that end with a hyphen followed by six characters.
2195
+ # secret names ending with a hyphen followed by six characters.
2196
+ #
2197
+ # If you specify an incomplete ARN without the random suffix, and
2198
+ # instead provide the 'friendly name', you *must* not include the
2199
+ # random suffix. If you do include the random suffix added by Secrets
2200
+ # Manager, you receive either a *ResourceNotFoundException* or an
2201
+ # *AccessDeniedException* error, depending on your permissions.
2106
2202
  #
2107
2203
  # </note>
2108
2204
  #
@@ -2165,8 +2261,8 @@ module Aws::SecretsManager
2165
2261
  # for your protected service, see [Rotating Secrets in AWS Secrets
2166
2262
  # Manager][1] in the *AWS Secrets Manager User Guide*.
2167
2263
  #
2168
- # Secrets Manager schedules the next rotation when the previous one is
2169
- # complete. Secrets Manager schedules the date by adding the rotation
2264
+ # Secrets Manager schedules the next rotation when the previous one
2265
+ # completes. Secrets Manager schedules the date by adding the rotation
2170
2266
  # interval (number of days) to the actual date of the last rotation. The
2171
2267
  # service chooses the hour within that 24-hour date window randomly. The
2172
2268
  # minute is also chosen somewhat randomly, but weighted towards the top
@@ -2182,9 +2278,9 @@ module Aws::SecretsManager
2182
2278
  # * The `AWSPENDING` staging label is not attached to any version of the
2183
2279
  # secret.
2184
2280
  #
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
2281
+ # If the `AWSPENDING` staging label is present but not attached to the
2282
+ # same version as `AWSCURRENT` then any later invocation of
2283
+ # `RotateSecret` assumes that a previous rotation request is still in
2188
2284
  # progress and returns an error.
2189
2285
  #
2190
2286
  # **Minimum permissions**
@@ -2226,7 +2322,13 @@ module Aws::SecretsManager
2226
2322
  # then those characters cause Secrets Manager to assume that you’re
2227
2323
  # specifying a complete ARN. This confusion can cause unexpected
2228
2324
  # results. To avoid this situation, we recommend that you don’t create
2229
- # secret names that end with a hyphen followed by six characters.
2325
+ # secret names ending with a hyphen followed by six characters.
2326
+ #
2327
+ # If you specify an incomplete ARN without the random suffix, and
2328
+ # instead provide the 'friendly name', you *must* not include the
2329
+ # random suffix. If you do include the random suffix added by Secrets
2330
+ # Manager, you receive either a *ResourceNotFoundException* or an
2331
+ # *AccessDeniedException* error, depending on your permissions.
2230
2332
  #
2231
2333
  # </note>
2232
2334
  #
@@ -2242,8 +2344,8 @@ module Aws::SecretsManager
2242
2344
  # generate a `ClientRequestToken` yourself for new versions and include
2243
2345
  # that value in the request.
2244
2346
  #
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
2347
+ # You only need to specify your own value if you implement your own
2348
+ # retry logic and want to ensure that a given secret is not created
2247
2349
  # twice. We recommend that you generate a [UUID-type][1] value to ensure
2248
2350
  # uniqueness within the specified secret.
2249
2351
  #
@@ -2314,16 +2416,16 @@ module Aws::SecretsManager
2314
2416
  #
2315
2417
  # * Tag keys and values are case sensitive.
2316
2418
  #
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
2419
+ # * Do not use the `aws:` prefix in your tag names or values because AWS
2420
+ # reserves it for AWS use. You can't edit or delete tag names or
2319
2421
  # values with this prefix. Tags with this prefix do not count against
2320
2422
  # your tags per secret limit.
2321
2423
  #
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: + - = . \_ : / @.
2424
+ # * If you use your tagging schema across multiple services and
2425
+ # resources, remember other services might have restrictions on
2426
+ # allowed characters. Generally allowed characters: letters, spaces,
2427
+ # and numbers representable in UTF-8, plus the following special
2428
+ # characters: + - = . \_ : / @.
2327
2429
  #
2328
2430
  # If you use tags as part of your security strategy, then adding or
2329
2431
  # removing a tag can change permissions. If successfully completing this
@@ -2361,7 +2463,13 @@ module Aws::SecretsManager
2361
2463
  # then those characters cause Secrets Manager to assume that you’re
2362
2464
  # specifying a complete ARN. This confusion can cause unexpected
2363
2465
  # results. To avoid this situation, we recommend that you don’t create
2364
- # secret names that end with a hyphen followed by six characters.
2466
+ # secret names ending with a hyphen followed by six characters.
2467
+ #
2468
+ # If you specify an incomplete ARN without the random suffix, and
2469
+ # instead provide the 'friendly name', you *must* not include the
2470
+ # random suffix. If you do include the random suffix added by Secrets
2471
+ # Manager, you receive either a *ResourceNotFoundException* or an
2472
+ # *AccessDeniedException* error, depending on your permissions.
2365
2473
  #
2366
2474
  # </note>
2367
2475
  #
@@ -2463,7 +2571,13 @@ module Aws::SecretsManager
2463
2571
  # then those characters cause Secrets Manager to assume that you’re
2464
2572
  # specifying a complete ARN. This confusion can cause unexpected
2465
2573
  # results. To avoid this situation, we recommend that you don’t create
2466
- # secret names that end with a hyphen followed by six characters.
2574
+ # secret names ending with a hyphen followed by six characters.
2575
+ #
2576
+ # If you specify an incomplete ARN without the random suffix, and
2577
+ # instead provide the 'friendly name', you *must* not include the
2578
+ # random suffix. If you do include the random suffix added by Secrets
2579
+ # Manager, you receive either a *ResourceNotFoundException* or an
2580
+ # *AccessDeniedException* error, depending on your permissions.
2467
2581
  #
2468
2582
  # </note>
2469
2583
  #
@@ -2535,29 +2649,29 @@ module Aws::SecretsManager
2535
2649
  # secret version, Secrets Manager automatically attaches the staging
2536
2650
  # label `AWSCURRENT` to the new version.
2537
2651
  #
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.
2652
+ # <note markdown="1"> * If you call an operation to encrypt or decrypt the `SecretString` or
2653
+ # `SecretBinary` for a secret in the same account as the calling user
2654
+ # and that secret doesn't specify a AWS KMS encryption key, Secrets
2655
+ # Manager uses the account's default AWS managed customer master key
2656
+ # (CMK) with the alias `aws/secretsmanager`. If this key doesn't
2657
+ # already exist in your account then Secrets Manager creates it for
2658
+ # you automatically. All users and roles in the same AWS account
2659
+ # automatically have access to use the default CMK. Note that if an
2660
+ # Secrets Manager API call results in AWS creating the account's
2661
+ # AWS-managed CMK, it can result in a one-time significant delay in
2662
+ # returning the result.
2663
+ #
2664
+ # * If the secret resides in a different AWS account from the
2665
+ # credentials calling an API that requires encryption or decryption of
2666
+ # the secret value then you must create and use a custom AWS KMS CMK
2667
+ # because you can't access the default CMK for the account using
2668
+ # credentials from a different AWS account. Store the ARN of the CMK
2669
+ # in the secret when you create the secret or when you update it by
2670
+ # including it in the `KMSKeyId`. If you call an API that must encrypt
2671
+ # or decrypt `SecretString` or `SecretBinary` using credentials from a
2672
+ # different account then the AWS KMS key policy must grant
2673
+ # cross-account access to that other account's user or role for both
2674
+ # the kms:GenerateDataKey and kms:Decrypt operations.
2561
2675
  #
2562
2676
  # </note>
2563
2677
  #
@@ -2602,7 +2716,13 @@ module Aws::SecretsManager
2602
2716
  # then those characters cause Secrets Manager to assume that you’re
2603
2717
  # specifying a complete ARN. This confusion can cause unexpected
2604
2718
  # results. To avoid this situation, we recommend that you don’t create
2605
- # secret names that end with a hyphen followed by six characters.
2719
+ # secret names ending with a hyphen followed by six characters.
2720
+ #
2721
+ # If you specify an incomplete ARN without the random suffix, and
2722
+ # instead provide the 'friendly name', you *must* not include the
2723
+ # random suffix. If you do include the random suffix added by Secrets
2724
+ # Manager, you receive either a *ResourceNotFoundException* or an
2725
+ # *AccessDeniedException* error, depending on your permissions.
2606
2726
  #
2607
2727
  # </note>
2608
2728
  #
@@ -2666,7 +2786,7 @@ module Aws::SecretsManager
2666
2786
  # field. The user making the call must have permissions to both the
2667
2787
  # secret and the CMK in their respective accounts.
2668
2788
  #
2669
- # @option params [String, IO] :secret_binary
2789
+ # @option params [String, StringIO, File] :secret_binary
2670
2790
  # (Optional) Specifies updated binary data that you want to encrypt and
2671
2791
  # store in the new version of the secret. To use this parameter in the
2672
2792
  # command-line tools, we recommend that you store your binary data in a
@@ -2839,9 +2959,9 @@ module Aws::SecretsManager
2839
2959
  # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/terms-concepts.html#term_staging-label
2840
2960
  #
2841
2961
  # @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.
2962
+ # Specifies the secret with the version with the list of staging labels
2963
+ # you want to modify. You can specify either the Amazon Resource Name
2964
+ # (ARN) or the friendly name of the secret.
2845
2965
  #
2846
2966
  # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
2847
2967
  # complete ARN. You can specify a partial ARN too—for example, if you
@@ -2854,7 +2974,13 @@ module Aws::SecretsManager
2854
2974
  # then those characters cause Secrets Manager to assume that you’re
2855
2975
  # specifying a complete ARN. This confusion can cause unexpected
2856
2976
  # results. To avoid this situation, we recommend that you don’t create
2857
- # secret names that end with a hyphen followed by six characters.
2977
+ # secret names ending with a hyphen followed by six characters.
2978
+ #
2979
+ # If you specify an incomplete ARN without the random suffix, and
2980
+ # instead provide the 'friendly name', you *must* not include the
2981
+ # random suffix. If you do include the random suffix added by Secrets
2982
+ # Manager, you receive either a *ResourceNotFoundException* or an
2983
+ # *AccessDeniedException* error, depending on your permissions.
2858
2984
  #
2859
2985
  # </note>
2860
2986
  #
@@ -2872,7 +2998,7 @@ module Aws::SecretsManager
2872
2998
  #
2873
2999
  # @option params [String] :move_to_version_id
2874
3000
  # (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
3001
+ # label. If you want to remove a label from a version, then do not
2876
3002
  # specify this parameter.
2877
3003
  #
2878
3004
  # If the staging label is already attached to a different version of the
@@ -2962,6 +3088,86 @@ module Aws::SecretsManager
2962
3088
  req.send_request(options)
2963
3089
  end
2964
3090
 
3091
+ # Validates the JSON text of the resource-based policy document attached
3092
+ # to the specified secret. The JSON request string input and response
3093
+ # output displays formatted code with white space and line breaks for
3094
+ # better readability. Submit your input as a single line JSON string. A
3095
+ # resource-based policy is optional.
3096
+ #
3097
+ # @option params [String] :secret_id
3098
+ # The identifier for the secret that you want to validate a resource
3099
+ # policy. You can specify either the Amazon Resource Name (ARN) or the
3100
+ # friendly name of the secret.
3101
+ #
3102
+ # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
3103
+ # complete ARN. You can specify a partial ARN too—for example, if you
3104
+ # don’t include the final hyphen and six random characters that Secrets
3105
+ # Manager adds at the end of the ARN when you created the secret. A
3106
+ # partial ARN match can work as long as it uniquely matches only one
3107
+ # secret. However, if your secret has a name that ends in a hyphen
3108
+ # followed by six characters (before Secrets Manager adds the hyphen and
3109
+ # six characters to the ARN) and you try to use that as a partial ARN,
3110
+ # then those characters cause Secrets Manager to assume that you’re
3111
+ # specifying a complete ARN. This confusion can cause unexpected
3112
+ # results. To avoid this situation, we recommend that you don’t create
3113
+ # secret names ending with a hyphen followed by six characters.
3114
+ #
3115
+ # If you specify an incomplete ARN without the random suffix, and
3116
+ # instead provide the 'friendly name', you *must* not include the
3117
+ # random suffix. If you do include the random suffix added by Secrets
3118
+ # Manager, you receive either a *ResourceNotFoundException* or an
3119
+ # *AccessDeniedException* error, depending on your permissions.
3120
+ #
3121
+ # </note>
3122
+ #
3123
+ # @option params [required, String] :resource_policy
3124
+ # Identifies the Resource Policy attached to the secret.
3125
+ #
3126
+ # @return [Types::ValidateResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3127
+ #
3128
+ # * {Types::ValidateResourcePolicyResponse#policy_validation_passed #policy_validation_passed} => Boolean
3129
+ # * {Types::ValidateResourcePolicyResponse#validation_errors #validation_errors} => Array&lt;Types::ValidationErrorsEntry&gt;
3130
+ #
3131
+ #
3132
+ # @example Example: To validate a resource-based policy to a secret
3133
+ #
3134
+ # # The following example shows how to validate a resource-based policy to a secret.
3135
+ #
3136
+ # resp = client.validate_resource_policy({
3137
+ # 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}",
3138
+ # secret_id: "MyTestDatabaseSecret",
3139
+ # })
3140
+ #
3141
+ # resp.to_h outputs the following:
3142
+ # {
3143
+ # policy_validation_passed: true,
3144
+ # validation_errors: [
3145
+ # ],
3146
+ # }
3147
+ #
3148
+ # @example Request syntax with placeholder values
3149
+ #
3150
+ # resp = client.validate_resource_policy({
3151
+ # secret_id: "SecretIdType",
3152
+ # resource_policy: "NonEmptyResourcePolicyType", # required
3153
+ # })
3154
+ #
3155
+ # @example Response structure
3156
+ #
3157
+ # resp.policy_validation_passed #=> Boolean
3158
+ # resp.validation_errors #=> Array
3159
+ # resp.validation_errors[0].check_name #=> String
3160
+ # resp.validation_errors[0].error_message #=> String
3161
+ #
3162
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ValidateResourcePolicy AWS API Documentation
3163
+ #
3164
+ # @overload validate_resource_policy(params = {})
3165
+ # @param [Hash] params ({})
3166
+ def validate_resource_policy(params = {}, options = {})
3167
+ req = build_request(:validate_resource_policy, params)
3168
+ req.send_request(options)
3169
+ end
3170
+
2965
3171
  # @!endgroup
2966
3172
 
2967
3173
  # @param params ({})
@@ -2975,7 +3181,7 @@ module Aws::SecretsManager
2975
3181
  params: params,
2976
3182
  config: config)
2977
3183
  context[:gem_name] = 'aws-sdk-secretsmanager'
2978
- context[:gem_version] = '1.36.0'
3184
+ context[:gem_version] = '1.41.0'
2979
3185
  Seahorse::Client::Request.new(handlers, context)
2980
3186
  end
2981
3187