aws-sdk-secretsmanager 1.52.0 → 1.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,6 +27,7 @@ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
27
27
  require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
28
28
  require 'aws-sdk-core/plugins/transfer_encoding.rb'
29
29
  require 'aws-sdk-core/plugins/http_checksum.rb'
30
+ require 'aws-sdk-core/plugins/defaults_mode.rb'
30
31
  require 'aws-sdk-core/plugins/signature_v4.rb'
31
32
  require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
32
33
 
@@ -73,6 +74,7 @@ module Aws::SecretsManager
73
74
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
74
75
  add_plugin(Aws::Plugins::TransferEncoding)
75
76
  add_plugin(Aws::Plugins::HttpChecksum)
77
+ add_plugin(Aws::Plugins::DefaultsMode)
76
78
  add_plugin(Aws::Plugins::SignatureV4)
77
79
  add_plugin(Aws::Plugins::Protocols::JsonRpc)
78
80
 
@@ -119,7 +121,9 @@ module Aws::SecretsManager
119
121
  # * EC2/ECS IMDS instance profile - When used by default, the timeouts
120
122
  # are very aggressive. Construct and pass an instance of
121
123
  # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
122
- # enable retries and extended timeouts.
124
+ # enable retries and extended timeouts. Instance profile credential
125
+ # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
126
+ # to true.
123
127
  #
124
128
  # @option options [required, String] :region
125
129
  # The AWS region to connect to. The configured `:region` is
@@ -173,6 +177,10 @@ module Aws::SecretsManager
173
177
  # Used only in `standard` and adaptive retry modes. Specifies whether to apply
174
178
  # a clock skew correction and retry requests with skewed client clocks.
175
179
  #
180
+ # @option options [String] :defaults_mode ("legacy")
181
+ # See {Aws::DefaultsModeConfiguration} for a list of the
182
+ # accepted modes and the configuration defaults that are included.
183
+ #
176
184
  # @option options [Boolean] :disable_host_prefix_injection (false)
177
185
  # Set to true to disable SDK automatically adding host prefix
178
186
  # to default service endpoint when available.
@@ -305,7 +313,7 @@ module Aws::SecretsManager
305
313
  # seconds to wait when opening a HTTP session before raising a
306
314
  # `Timeout::Error`.
307
315
  #
308
- # @option options [Integer] :http_read_timeout (60) The default
316
+ # @option options [Float] :http_read_timeout (60) The default
309
317
  # number of seconds to wait for response data. This value can
310
318
  # safely be set per-request on the session.
311
319
  #
@@ -321,6 +329,9 @@ module Aws::SecretsManager
321
329
  # disables this behaviour. This value can safely be set per
322
330
  # request on the session.
323
331
  #
332
+ # @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
333
+ # in seconds.
334
+ #
324
335
  # @option options [Boolean] :http_wire_trace (false) When `true`,
325
336
  # HTTP debug output will be sent to the `:logger`.
326
337
  #
@@ -346,60 +357,32 @@ module Aws::SecretsManager
346
357
 
347
358
  # @!group API Operations
348
359
 
349
- # Disables automatic scheduled rotation and cancels the rotation of a
350
- # secret if currently in progress.
351
- #
352
- # To re-enable scheduled rotation, call RotateSecret with
353
- # `AutomaticallyRotateAfterDays` set to a value greater than 0. This
354
- # immediately rotates your secret and then enables the automatic
355
- # schedule.
356
- #
357
- # <note markdown="1"> If you cancel a rotation while in progress, it can leave the
358
- # `VersionStage` labels in an unexpected state. Depending on the step of
359
- # the rotation in progress, you might need to remove the staging label
360
- # `AWSPENDING` from the partially created version, specified by the
361
- # `VersionId` response value. You should also evaluate the partially
362
- # rotated new version to see if it should be deleted, which you can do
363
- # by removing all staging labels from the new version `VersionStage`
364
- # field.
365
- #
366
- # </note>
367
- #
368
- # To successfully start a rotation, the staging label `AWSPENDING` must
369
- # be in one of the following states:
370
- #
371
- # * Not attached to any version at all
372
- #
373
- # * Attached to the same version as the staging label `AWSCURRENT`
360
+ # Turns off automatic rotation, and if a rotation is currently in
361
+ # progress, cancels the rotation.
374
362
  #
375
- # If the staging label `AWSPENDING` attached to a different version than
376
- # the version with `AWSCURRENT` then the attempt to rotate fails.
363
+ # To turn on automatic rotation again, call RotateSecret.
377
364
  #
378
- # **Minimum permissions**
365
+ # <note markdown="1"> If you cancel a rotation in progress, it can leave the `VersionStage`
366
+ # labels in an unexpected state. Depending on the step of the rotation
367
+ # in progress, you might need to remove the staging label `AWSPENDING`
368
+ # from the partially created version, specified by the `VersionId`
369
+ # response value. We recommend you also evaluate the partially rotated
370
+ # new version to see if it should be deleted. You can delete a version
371
+ # by removing all staging labels from it.
379
372
  #
380
- # To run this command, you must have the following permissions:
381
- #
382
- # * secretsmanager:CancelRotateSecret
383
- #
384
- # ^
385
- #
386
- # **Related operations**
373
+ # </note>
387
374
  #
388
- # * To configure rotation for a secret or to manually trigger a
389
- # rotation, use RotateSecret.
375
+ # <b>Required permissions: </b> `secretsmanager:CancelRotateSecret`. For
376
+ # more information, see [ IAM policy actions for Secrets Manager][1] and
377
+ # [Authentication and access control in Secrets Manager][2].
390
378
  #
391
- # * To get the rotation configuration details for a secret, use
392
- # DescribeSecret.
393
379
  #
394
- # * To list all of the currently available secrets, use ListSecrets.
395
380
  #
396
- # * To list all of the versions currently associated with a secret, use
397
- # ListSecretVersionIds.
381
+ # [1]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions
382
+ # [2]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
398
383
  #
399
384
  # @option params [required, String] :secret_id
400
- # Specifies the secret to cancel a rotation request. You can specify
401
- # either the Amazon Resource Name (ARN) or the friendly name of the
402
- # secret.
385
+ # The ARN or name of the secret.
403
386
  #
404
387
  # For an ARN, we recommend that you specify a complete ARN rather than a
405
388
  # partial ARN.
@@ -448,119 +431,70 @@ module Aws::SecretsManager
448
431
  req.send_request(options)
449
432
  end
450
433
 
451
- # Creates a new secret. A secret in Secrets Manager consists of both the
452
- # protected secret data and the important information needed to manage
453
- # the secret.
454
- #
455
- # Secrets Manager stores the encrypted secret data in one of a
456
- # collection of "versions" associated with the secret. Each version
457
- # contains a copy of the encrypted secret data. Each version is
458
- # associated with one or more "staging labels" that identify where the
459
- # version is in the rotation cycle. The `SecretVersionsToStages` field
460
- # of the secret contains the mapping of staging labels to the active
461
- # versions of the secret. Versions without a staging label are
462
- # considered deprecated and not included in the list.
463
- #
464
- # You provide the secret data to be encrypted by putting text in either
465
- # the `SecretString` parameter or binary data in the `SecretBinary`
434
+ # Creates a new secret. A *secret* is a set of credentials, such as a
435
+ # user name and password, that you store in an encrypted form in Secrets
436
+ # Manager. The secret also includes the connection information to access
437
+ # a database or other service, which Secrets Manager doesn't encrypt. A
438
+ # secret in Secrets Manager consists of both the protected secret data
439
+ # and the important information needed to manage the secret.
440
+ #
441
+ # For information about creating a secret in the console, see [Create a
442
+ # secret][1].
443
+ #
444
+ # To create a secret, you can provide the secret value to be encrypted
445
+ # in either the `SecretString` parameter or the `SecretBinary`
466
446
  # parameter, but not both. If you include `SecretString` or
467
- # `SecretBinary` then Secrets Manager also creates an initial secret
468
- # version and automatically attaches the staging label `AWSCURRENT` to
469
- # the new version.
470
- #
471
- # <note markdown="1"> * If you call an operation to encrypt or decrypt the `SecretString` or
472
- # `SecretBinary` for a secret in the same account as the calling user
473
- # and that secret doesn't specify a Amazon Web Services KMS
474
- # encryption key, Secrets Manager uses the account's default Amazon
475
- # Web Services managed customer master key (CMK) with the alias
476
- # `aws/secretsmanager`. If this key doesn't already exist in your
477
- # account then Secrets Manager creates it for you automatically. All
478
- # users and roles in the same Amazon Web Services account
479
- # automatically have access to use the default CMK. Note that if an
480
- # Secrets Manager API call results in Amazon Web Services creating the
481
- # account's Amazon Web Services-managed CMK, it can result in a
482
- # one-time significant delay in returning the result.
483
- #
484
- # * If the secret resides in a different Amazon Web Services account
485
- # from the credentials calling an API that requires encryption or
486
- # decryption of the secret value then you must create and use a custom
487
- # Amazon Web Services KMS CMK because you can't access the default
488
- # CMK for the account using credentials from a different Amazon Web
489
- # Services account. Store the ARN of the CMK in the secret when you
490
- # create the secret or when you update it by including it in the
491
- # `KMSKeyId`. If you call an API that must encrypt or decrypt
492
- # `SecretString` or `SecretBinary` using credentials from a different
493
- # account then the Amazon Web Services KMS key policy must grant
494
- # cross-account access to that other account's user or role for both
495
- # the kms:GenerateDataKey and kms:Decrypt operations.
447
+ # `SecretBinary` then Secrets Manager creates an initial secret version
448
+ # and automatically attaches the staging label `AWSCURRENT` to it.
496
449
  #
497
- # </note>
498
- #
499
- #
500
- #
501
- # **Minimum permissions**
450
+ # If you don't specify an KMS encryption key, Secrets Manager uses the
451
+ # Amazon Web Services managed key `aws/secretsmanager`. If this key
452
+ # doesn't already exist in your account, then Secrets Manager creates
453
+ # it for you automatically. All users and roles in the Amazon Web
454
+ # Services account automatically have access to use
455
+ # `aws/secretsmanager`. Creating `aws/secretsmanager` can result in a
456
+ # one-time significant delay in returning the result.
502
457
  #
503
- # To run this command, you must have the following permissions:
458
+ # If the secret is in a different Amazon Web Services account from the
459
+ # credentials calling the API, then you can't use `aws/secretsmanager`
460
+ # to encrypt the secret, and you must create and use a customer managed
461
+ # KMS key.
504
462
  #
505
- # * secretsmanager:CreateSecret
463
+ # <b>Required permissions: </b> `secretsmanager:CreateSecret`. For more
464
+ # information, see [ IAM policy actions for Secrets Manager][2] and
465
+ # [Authentication and access control in Secrets Manager][3].
506
466
  #
507
- # * kms:GenerateDataKey - needed only if you use a customer-managed
508
- # Amazon Web Services KMS key to encrypt the secret. You do not need
509
- # this permission to use the account default Amazon Web Services
510
- # managed CMK for Secrets Manager.
511
- #
512
- # * kms:Decrypt - needed only if you use a customer-managed Amazon Web
513
- # Services KMS key to encrypt the secret. You do not need this
514
- # permission to use the account default Amazon Web Services managed
515
- # CMK for Secrets Manager.
516
- #
517
- # * secretsmanager:TagResource - needed only if you include the `Tags`
518
- # parameter.
519
467
  #
520
- # **Related operations**
521
468
  #
522
- # * To delete a secret, use DeleteSecret.
523
- #
524
- # * To modify an existing secret, use UpdateSecret.
525
- #
526
- # * To create a new version of a secret, use PutSecretValue.
527
- #
528
- # * To retrieve the encrypted secure string and secure binary values,
529
- # use GetSecretValue.
530
- #
531
- # * To retrieve all other details for a secret, use DescribeSecret. This
532
- # does not include the encrypted secure string and secure binary
533
- # values.
534
- #
535
- # * To retrieve the list of secret versions associated with the current
536
- # secret, use DescribeSecret and examine the `SecretVersionsToStages`
537
- # response value.
469
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/manage_create-basic-secret.html
470
+ # [2]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions
471
+ # [3]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
538
472
  #
539
473
  # @option params [required, String] :name
540
- # Specifies the friendly name of the new secret.
474
+ # The name of the new secret.
541
475
  #
542
- # The secret name must be ASCII letters, digits, or the following
543
- # characters : /\_+=.@-
476
+ # The secret name can contain ASCII letters, numbers, and the following
477
+ # characters: /\_+=.@-
544
478
  #
545
- # <note markdown="1"> Do not end your secret name with a hyphen followed by six characters.
479
+ # Do not end your secret name with a hyphen followed by six characters.
546
480
  # If you do so, you risk confusion and unexpected results when searching
547
481
  # for a secret by partial ARN. Secrets Manager automatically adds a
548
- # hyphen and six random characters at the end of the ARN.
549
- #
550
- # </note>
482
+ # hyphen and six random characters after the secret name at the end of
483
+ # the ARN.
551
484
  #
552
485
  # @option params [String] :client_request_token
553
- # (Optional) If you include `SecretString` or `SecretBinary`, then an
554
- # initial version is created as part of the secret, and this parameter
555
- # specifies a unique identifier for the new version.
486
+ # If you include `SecretString` or `SecretBinary`, then Secrets Manager
487
+ # creates an initial version for the secret, and this parameter
488
+ # specifies the unique identifier for the new version.
556
489
  #
557
490
  # <note markdown="1"> If you use the Amazon Web Services CLI or one of the Amazon Web
558
- # Services SDK to call this operation, then you can leave this parameter
559
- # empty. The CLI or SDK generates a random UUID for you and includes it
560
- # as the value for this parameter in the request. If you don't use the
561
- # SDK and instead generate a raw HTTP request to the Secrets Manager
562
- # service endpoint, then you must generate a `ClientRequestToken`
563
- # yourself for the new version and include the value in the request.
491
+ # Services SDKs to call this operation, then you can leave this
492
+ # parameter empty. The CLI or SDK generates a random UUID for you and
493
+ # includes it as the value for this parameter in the request. If you
494
+ # don't use the SDK and instead generate a raw HTTP request to the
495
+ # Secrets Manager service endpoint, then you must generate a
496
+ # `ClientRequestToken` yourself for the new version and include the
497
+ # value in the request.
564
498
  #
565
499
  # </note>
566
500
  #
@@ -593,99 +527,79 @@ module Aws::SecretsManager
593
527
  # [1]: https://wikipedia.org/wiki/Universally_unique_identifier
594
528
  #
595
529
  # @option params [String] :description
596
- # (Optional) Specifies a user-provided description of the secret.
530
+ # The description of the secret.
597
531
  #
598
532
  # @option params [String] :kms_key_id
599
- # (Optional) Specifies the ARN, Key ID, or alias of the Amazon Web
600
- # Services KMS customer master key (CMK) to be used to encrypt the
601
- # `SecretString` or `SecretBinary` values in the versions stored in this
602
- # secret.
533
+ # The ARN, key ID, or alias of the KMS key that Secrets Manager uses to
534
+ # encrypt the secret value in the secret.
603
535
  #
604
- # You can specify any of the supported ways to identify a Amazon Web
605
- # Services KMS key ID. If you need to reference a CMK in a different
606
- # account, you can use only the key ARN or the alias ARN.
536
+ # To use a KMS key in a different account, use the key ARN or the alias
537
+ # ARN.
607
538
  #
608
- # If you don't specify this value, then Secrets Manager defaults to
609
- # using the Amazon Web Services account's default CMK (the one named
610
- # `aws/secretsmanager`). If a Amazon Web Services KMS CMK with that name
611
- # doesn't yet exist, then Secrets Manager creates it for you
612
- # automatically the first time it needs to encrypt a version's
613
- # `SecretString` or `SecretBinary` fields.
539
+ # If you don't specify this value, then Secrets Manager uses the key
540
+ # `aws/secretsmanager`. If that key doesn't yet exist, then Secrets
541
+ # Manager creates it for you automatically the first time it encrypts
542
+ # the secret value.
614
543
  #
615
- # You can use the account default CMK to encrypt and decrypt only if you
616
- # call this operation using credentials from the same account that owns
617
- # the secret. If the secret resides in a different account, then you
618
- # must create a custom CMK and specify the ARN in this field.
544
+ # If the secret is in a different Amazon Web Services account from the
545
+ # credentials calling the API, then you can't use `aws/secretsmanager`
546
+ # to encrypt the secret, and you must create and use a customer managed
547
+ # KMS key.
619
548
  #
620
549
  # @option params [String, StringIO, File] :secret_binary
621
- # (Optional) Specifies binary data that you want to encrypt and store in
622
- # the new version of the secret. To use this parameter in the
623
- # command-line tools, we recommend that you store your binary data in a
624
- # file and then use the appropriate technique for your tool to pass the
625
- # contents of the file as a parameter.
550
+ # The binary data to encrypt and store in the new version of the secret.
551
+ # We recommend that you store your binary data in a file and then pass
552
+ # the contents of the file as a parameter.
626
553
  #
627
554
  # Either `SecretString` or `SecretBinary` must have a value, but not
628
- # both. They cannot both be empty.
555
+ # both.
629
556
  #
630
- # This parameter is not available using the Secrets Manager console. It
631
- # can be accessed only by using the Amazon Web Services CLI or one of
632
- # the Amazon Web Services SDKs.
557
+ # This parameter is not available in the Secrets Manager console.
633
558
  #
634
559
  # @option params [String] :secret_string
635
- # (Optional) Specifies text data that you want to encrypt and store in
636
- # this new version of the secret.
560
+ # The text data to encrypt and store in this new version of the secret.
561
+ # We recommend you use a JSON structure of key/value pairs for your
562
+ # secret value.
637
563
  #
638
564
  # Either `SecretString` or `SecretBinary` must have a value, but not
639
- # both. They cannot both be empty.
565
+ # both.
640
566
  #
641
567
  # If you create a secret by using the Secrets Manager console then
642
568
  # Secrets Manager puts the protected secret text in only the
643
569
  # `SecretString` parameter. The Secrets Manager console stores the
644
- # information as a JSON structure of key/value pairs that the Lambda
645
- # rotation function knows how to parse.
646
- #
647
- # For storing multiple values, we recommend that you use a JSON text
648
- # string argument and specify key/value pairs. For more information, see
649
- # [Specifying parameter values for the Amazon Web Services CLI][1] in
650
- # the Amazon Web Services CLI User Guide.
651
- #
652
- #
653
- #
654
- # [1]: https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html
570
+ # information as a JSON structure of key/value pairs that a Lambda
571
+ # rotation function can parse.
655
572
  #
656
573
  # @option params [Array<Types::Tag>] :tags
657
- # (Optional) Specifies a list of user-defined tags that are attached to
658
- # the secret. Each tag is a "Key" and "Value" pair of strings. This
659
- # operation only appends tags to the existing list of tags. To remove
660
- # tags, you must use UntagResource.
661
- #
662
- # * Secrets Manager tag key names are case sensitive. A tag with the key
663
- # "ABC" is a different tag from one with key "abc".
574
+ # A list of tags to attach to the secret. Each tag is a key and value
575
+ # pair of strings in a JSON text string, for example:
664
576
  #
665
- # * If you check tags in IAM policy `Condition` elements as part of your
666
- # security strategy, then adding or removing a tag can change
667
- # permissions. If the successful completion of this operation would
668
- # result in you losing your permissions for this secret, then this
669
- # operation is blocked and returns an `Access Denied` error.
577
+ # `[\{"Key":"CostCenter","Value":"12345"\},\{"Key":"environment","Value":"production"\}]`
670
578
  #
671
- # This parameter requires a JSON text string argument. For information
672
- # on how to format a JSON parameter for the various command line tool
673
- # environments, see [Using JSON for Parameters][1] in the *CLI User
674
- # Guide*. For example:
579
+ # Secrets Manager tag key names are case sensitive. A tag with the key
580
+ # "ABC" is a different tag from one with key "abc".
675
581
  #
676
- # `[\{"Key":"CostCenter","Value":"12345"\},\{"Key":"environment","Value":"production"\}]`
582
+ # If you check tags in permissions policies as part of your security
583
+ # strategy, then adding or removing a tag can change permissions. If the
584
+ # completion of this operation would result in you losing your
585
+ # permissions for this secret, then Secrets Manager blocks the operation
586
+ # and returns an `Access Denied` error. For more information, see
587
+ # [Control access to secrets using tags][1] and [Limit access to
588
+ # identities with tags that match secrets' tags][2].
677
589
  #
678
- # If your command-line tool or SDK requires quotation marks around the
590
+ # For information about how to format a JSON parameter for the various
591
+ # command line tool environments, see [Using JSON for Parameters][3]. If
592
+ # your command-line tool or SDK requires quotation marks around the
679
593
  # parameter, you should use single quotes to avoid confusion with the
680
594
  # double quotes required in the JSON text.
681
595
  #
682
- # The following basic restrictions apply to tags:
596
+ # The following restrictions apply to tags:
683
597
  #
684
- # * Maximum number of tags per secret50
598
+ # * Maximum number of tags per secret: 50
685
599
  #
686
- # * Maximum key length127 Unicode characters in UTF-8
600
+ # * Maximum key length: 127 Unicode characters in UTF-8
687
601
  #
688
- # * Maximum value length255 Unicode characters in UTF-8
602
+ # * Maximum value length: 255 Unicode characters in UTF-8
689
603
  #
690
604
  # * Tag keys and values are case sensitive.
691
605
  #
@@ -695,23 +609,23 @@ module Aws::SecretsManager
695
609
  # with this prefix do not count against your tags per secret limit.
696
610
  #
697
611
  # * If you use your tagging schema across multiple services and
698
- # resources, remember other services might have restrictions on
699
- # allowed characters. Generally allowed characters: letters, spaces,
700
- # and numbers representable in UTF-8, plus the following special
612
+ # resources, other services might have restrictions on allowed
613
+ # characters. Generally allowed characters: letters, spaces, and
614
+ # numbers representable in UTF-8, plus the following special
701
615
  # characters: + - = . \_ : / @.
702
616
  #
703
617
  #
704
618
  #
705
- # [1]: https://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json
619
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html#tag-secrets-abac
620
+ # [2]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html#auth-and-access_tags2
621
+ # [3]: https://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json
706
622
  #
707
623
  # @option params [Array<Types::ReplicaRegionType>] :add_replica_regions
708
- # (Optional) Add a list of regions to replicate secrets. Secrets Manager
709
- # replicates the KMSKeyID objects to the list of regions specified in
710
- # the parameter.
624
+ # A list of Regions and KMS keys to replicate secrets.
711
625
  #
712
626
  # @option params [Boolean] :force_overwrite_replica_secret
713
- # (Optional) If set, the replication overwrites a secret with the same
714
- # name in the destination region.
627
+ # Specifies whether to overwrite a secret with the same name in the
628
+ # destination Region.
715
629
  #
716
630
  # @return [Types::CreateSecretResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
717
631
  #
@@ -786,28 +700,20 @@ module Aws::SecretsManager
786
700
  end
787
701
 
788
702
  # Deletes the resource-based permission policy attached to the secret.
703
+ # To attach a policy to a secret, use PutResourcePolicy.
789
704
  #
790
- # **Minimum permissions**
791
- #
792
- # To run this command, you must have the following permissions:
793
- #
794
- # * secretsmanager:DeleteResourcePolicy
705
+ # <b>Required permissions: </b> `secretsmanager:DeleteResourcePolicy`.
706
+ # For more information, see [ IAM policy actions for Secrets Manager][1]
707
+ # and [Authentication and access control in Secrets Manager][2].
795
708
  #
796
- # ^
797
709
  #
798
- # **Related operations**
799
710
  #
800
- # * To attach a resource policy to a secret, use PutResourcePolicy.
801
- #
802
- # * To retrieve the current resource-based policy attached to a secret,
803
- # use GetResourcePolicy.
804
- #
805
- # * To list all of the currently available secrets, use ListSecrets.
711
+ # [1]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions
712
+ # [2]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
806
713
  #
807
714
  # @option params [required, String] :secret_id
808
- # Specifies the secret that you want to delete the attached
809
- # resource-based policy for. You can specify either the Amazon Resource
810
- # Name (ARN) or the friendly name of the secret.
715
+ # The ARN or name of the secret to delete the attached resource-based
716
+ # policy for.
811
717
  #
812
718
  # For an ARN, we recommend that you specify a complete ARN rather than a
813
719
  # partial ARN.
@@ -852,86 +758,68 @@ module Aws::SecretsManager
852
758
  req.send_request(options)
853
759
  end
854
760
 
855
- # Deletes an entire secret and all of the versions. You can optionally
856
- # include a recovery window during which you can restore the secret. If
857
- # you don't specify a recovery window value, the operation defaults to
858
- # 30 days. Secrets Manager attaches a `DeletionDate` stamp to the secret
859
- # that specifies the end of the recovery window. At the end of the
860
- # recovery window, Secrets Manager deletes the secret permanently.
761
+ # Deletes a secret and all of its versions. You can specify a recovery
762
+ # window during which you can restore the secret. The minimum recovery
763
+ # window is 7 days. The default recovery window is 30 days. Secrets
764
+ # Manager attaches a `DeletionDate` stamp to the secret that specifies
765
+ # the end of the recovery window. At the end of the recovery window,
766
+ # Secrets Manager deletes the secret permanently.
861
767
  #
862
- # At any time before recovery window ends, you can use RestoreSecret to
863
- # remove the `DeletionDate` and cancel the deletion of the secret.
864
- #
865
- # You cannot access the encrypted secret information in any secret
866
- # scheduled for deletion. If you need to access that information, you
867
- # must cancel the deletion with RestoreSecret and then retrieve the
868
- # information.
869
- #
870
- # <note markdown="1"> * There is no explicit operation to delete a version of a secret.
871
- # Instead, remove all staging labels from the `VersionStage` field of
872
- # a version. That marks the version as deprecated and allows Secrets
873
- # Manager to delete it as needed. Versions without any staging labels
874
- # do not show up in ListSecretVersionIds unless you specify
875
- # `IncludeDeprecated`.
876
- #
877
- # * The permanent secret deletion at the end of the waiting period is
878
- # performed as a background task with low priority. There is no
879
- # guarantee of a specific time after the recovery window for the
880
- # actual delete operation to occur.
881
- #
882
- # </note>
768
+ # For information about deleting a secret in the console, see
769
+ # [https://docs.aws.amazon.com/secretsmanager/latest/userguide/manage\_delete-secret.html][1].
883
770
  #
884
- # **Minimum permissions**
771
+ # Secrets Manager performs the permanent secret deletion at the end of
772
+ # the waiting period as a background task with low priority. There is no
773
+ # guarantee of a specific time after the recovery window for the
774
+ # permanent delete to occur.
885
775
  #
886
- # To run this command, you must have the following permissions:
776
+ # At any time before recovery window ends, you can use RestoreSecret to
777
+ # remove the `DeletionDate` and cancel the deletion of the secret.
887
778
  #
888
- # * secretsmanager:DeleteSecret
779
+ # In a secret scheduled for deletion, you cannot access the encrypted
780
+ # secret value. To access that information, first cancel the deletion
781
+ # with RestoreSecret and then retrieve the information.
889
782
  #
890
- # ^
783
+ # <b>Required permissions: </b> `secretsmanager:DeleteSecret`. For more
784
+ # information, see [ IAM policy actions for Secrets Manager][2] and
785
+ # [Authentication and access control in Secrets Manager][3].
891
786
  #
892
- # **Related operations**
893
787
  #
894
- # * To create a secret, use CreateSecret.
895
788
  #
896
- # * To cancel deletion of a version of a secret before the recovery
897
- # window has expired, use RestoreSecret.
789
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/manage_delete-secret.html
790
+ # [2]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions
791
+ # [3]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
898
792
  #
899
793
  # @option params [required, String] :secret_id
900
- # Specifies the secret to delete. You can specify either the Amazon
901
- # Resource Name (ARN) or the friendly name of the secret.
794
+ # The ARN or name of the secret to delete.
902
795
  #
903
796
  # For an ARN, we recommend that you specify a complete ARN rather than a
904
797
  # partial ARN.
905
798
  #
906
799
  # @option params [Integer] :recovery_window_in_days
907
- # (Optional) Specifies the number of days that Secrets Manager waits
908
- # before Secrets Manager can delete the secret. You can't use both this
909
- # parameter and the `ForceDeleteWithoutRecovery` parameter in the same
910
- # API call.
911
- #
912
- # This value can range from 7 to 30 days with a default value of 30.
800
+ # The number of days from 7 to 30 that Secrets Manager waits before
801
+ # permanently deleting the secret. You can't use both this parameter
802
+ # and `ForceDeleteWithoutRecovery` in the same call. If you don't use
803
+ # either, then Secrets Manager defaults to a 30 day recovery window.
913
804
  #
914
805
  # @option params [Boolean] :force_delete_without_recovery
915
- # (Optional) Specifies that the secret is to be deleted without any
916
- # recovery window. You can't use both this parameter and the
917
- # `RecoveryWindowInDays` parameter in the same API call.
806
+ # Specifies whether to delete the secret without any recovery window.
807
+ # You can't use both this parameter and `RecoveryWindowInDays` in the
808
+ # same call. If you don't use either, then Secrets Manager defaults to
809
+ # a 30 day recovery window.
918
810
  #
919
- # An asynchronous background process performs the actual deletion, so
920
- # there can be a short delay before the operation completes. If you
921
- # write code to delete and then immediately recreate a secret with the
922
- # same name, ensure that your code includes appropriate back off and
923
- # retry logic.
811
+ # Secrets Manager performs the actual deletion with an asynchronous
812
+ # background process, so there might be a short delay before the secret
813
+ # is permanently deleted. If you delete a secret and then immediately
814
+ # create a secret with the same name, use appropriate back off and retry
815
+ # logic.
924
816
  #
925
817
  # Use this parameter with caution. This parameter causes the operation
926
- # to skip the normal waiting period before the permanent deletion that
927
- # Amazon Web Services would normally impose with the
928
- # `RecoveryWindowInDays` parameter. If you delete a secret with the
929
- # `ForceDeleteWithouRecovery` parameter, then you have no opportunity to
930
- # recover the secret. You lose the secret permanently.
931
- #
932
- # If you use this parameter and include a previously deleted or
933
- # nonexistent secret, the operation does not return the error
934
- # `ResourceNotFoundException` in order to correctly handle retries.
818
+ # to skip the normal recovery window before the permanent deletion that
819
+ # Secrets Manager would normally impose with the `RecoveryWindowInDays`
820
+ # parameter. If you delete a secret with the `ForceDeleteWithouRecovery`
821
+ # parameter, then you have no opportunity to recover the secret. You
822
+ # lose the secret permanently.
935
823
  #
936
824
  # @return [Types::DeleteSecretResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
937
825
  #
@@ -982,33 +870,20 @@ module Aws::SecretsManager
982
870
  end
983
871
 
984
872
  # Retrieves the details of a secret. It does not include the encrypted
985
- # fields. Secrets Manager only returns fields populated with a value in
873
+ # secret value. Secrets Manager only returns fields that have a value in
986
874
  # the response.
987
875
  #
988
- # **Minimum permissions**
989
- #
990
- # To run this command, you must have the following permissions:
991
- #
992
- # * secretsmanager:DescribeSecret
993
- #
994
- # ^
876
+ # <b>Required permissions: </b> `secretsmanager:DescribeSecret`. For
877
+ # more information, see [ IAM policy actions for Secrets Manager][1] and
878
+ # [Authentication and access control in Secrets Manager][2].
995
879
  #
996
- # **Related operations**
997
880
  #
998
- # * To create a secret, use CreateSecret.
999
881
  #
1000
- # * To modify a secret, use UpdateSecret.
1001
- #
1002
- # * To retrieve the encrypted secret information in a version of the
1003
- # secret, use GetSecretValue.
1004
- #
1005
- # * To list all of the secrets in the Amazon Web Services account, use
1006
- # ListSecrets.
882
+ # [1]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions
883
+ # [2]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
1007
884
  #
1008
885
  # @option params [required, String] :secret_id
1009
- # The identifier of the secret whose details you want to retrieve. You
1010
- # can specify either the Amazon Resource Name (ARN) or the friendly name
1011
- # of the secret.
886
+ # The ARN or name of the secret.
1012
887
  #
1013
888
  # For an ARN, we recommend that you specify a complete ARN rather than a
1014
889
  # partial ARN.
@@ -1091,6 +966,8 @@ module Aws::SecretsManager
1091
966
  # resp.rotation_enabled #=> Boolean
1092
967
  # resp.rotation_lambda_arn #=> String
1093
968
  # resp.rotation_rules.automatically_after_days #=> Integer
969
+ # resp.rotation_rules.duration #=> String
970
+ # resp.rotation_rules.schedule_expression #=> String
1094
971
  # resp.last_rotated_date #=> Time
1095
972
  # resp.last_changed_date #=> Time
1096
973
  # resp.last_accessed_date #=> Time
@@ -1120,66 +997,54 @@ module Aws::SecretsManager
1120
997
  req.send_request(options)
1121
998
  end
1122
999
 
1123
- # Generates a random password of the specified complexity. This
1124
- # operation is intended for use in the Lambda rotation function. Per
1125
- # best practice, we recommend that you specify the maximum length and
1126
- # include every character type that the system you are generating a
1127
- # password for can support.
1000
+ # Generates a random password. We recommend that you specify the maximum
1001
+ # length and include every character type that the system you are
1002
+ # generating a password for can support.
1128
1003
  #
1129
- # **Minimum permissions**
1004
+ # <b>Required permissions: </b> `secretsmanager:GetRandomPassword`. For
1005
+ # more information, see [ IAM policy actions for Secrets Manager][1] and
1006
+ # [Authentication and access control in Secrets Manager][2].
1130
1007
  #
1131
- # To run this command, you must have the following permissions:
1132
1008
  #
1133
- # * secretsmanager:GetRandomPassword
1134
1009
  #
1135
- # ^
1010
+ # [1]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions
1011
+ # [2]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
1136
1012
  #
1137
1013
  # @option params [Integer] :password_length
1138
- # The desired length of the generated password. The default value if you
1139
- # do not include this parameter is 32 characters.
1014
+ # The length of the password. If you don't include this parameter, the
1015
+ # default length is 32 characters.
1140
1016
  #
1141
1017
  # @option params [String] :exclude_characters
1142
- # A string that includes characters that should not be included in the
1143
- # generated password. The default is that all characters from the
1144
- # included sets can be used.
1018
+ # A string of the characters that you don't want in the password.
1145
1019
  #
1146
1020
  # @option params [Boolean] :exclude_numbers
1147
- # Specifies that the generated password should not include digits. The
1148
- # default if you do not include this switch parameter is that digits can
1149
- # be included.
1021
+ # Specifies whether to exclude numbers from the password. If you don't
1022
+ # include this switch, the password can contain numbers.
1150
1023
  #
1151
1024
  # @option params [Boolean] :exclude_punctuation
1152
- # Specifies that the generated password should not include punctuation
1153
- # characters. The default if you do not include this switch parameter is
1154
- # that punctuation characters can be included.
1155
- #
1156
- # The following are the punctuation characters that *can* be included in
1157
- # the generated password if you don't explicitly exclude them with
1158
- # `ExcludeCharacters` or `ExcludePunctuation`\:
1159
- #
1160
- # `` ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` \{ | \} ~
1161
- # ``
1025
+ # Specifies whether to exclude the following punctuation characters from
1026
+ # the password: `` ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _
1027
+ # ` \{ | \} ~ ``. If you don't include this switch, the password can
1028
+ # contain punctuation.
1162
1029
  #
1163
1030
  # @option params [Boolean] :exclude_uppercase
1164
- # Specifies that the generated password should not include uppercase
1165
- # letters. The default if you do not include this switch parameter is
1166
- # that uppercase letters can be included.
1031
+ # Specifies whether to exclude uppercase letters from the password. If
1032
+ # you don't include this switch, the password can contain uppercase
1033
+ # letters.
1167
1034
  #
1168
1035
  # @option params [Boolean] :exclude_lowercase
1169
- # Specifies that the generated password should not include lowercase
1170
- # letters. The default if you do not include this switch parameter is
1171
- # that lowercase letters can be included.
1036
+ # Specifies whether to exclude lowercase letters from the password. If
1037
+ # you don't include this switch, the password can contain lowercase
1038
+ # letters.
1172
1039
  #
1173
1040
  # @option params [Boolean] :include_space
1174
- # Specifies that the generated password can include the space character.
1175
- # The default if you do not include this switch parameter is that the
1176
- # space character is not included.
1041
+ # Specifies whether to include the space character. If you include this
1042
+ # switch, the password can contain space characters.
1177
1043
  #
1178
1044
  # @option params [Boolean] :require_each_included_type
1179
- # A boolean value that specifies whether the generated password must
1180
- # include at least one of every allowed character type. The default
1181
- # value is `True` and the operation requires at least one of every
1182
- # character type.
1045
+ # Specifies whether to include at least one upper and lowercase letter,
1046
+ # one number, and one punctuation. If you don't include this switch,
1047
+ # the password contains at least one of every character type.
1183
1048
  #
1184
1049
  # @return [Types::GetRandomPasswordResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1185
1050
  #
@@ -1229,31 +1094,23 @@ module Aws::SecretsManager
1229
1094
  end
1230
1095
 
1231
1096
  # Retrieves the JSON text of the resource-based policy document attached
1232
- # to the specified secret. The JSON request string input and response
1233
- # output displays formatted code with white space and line breaks for
1234
- # better readability. Submit your input as a single line JSON string.
1235
- #
1236
- # **Minimum permissions**
1237
- #
1238
- # To run this command, you must have the following permissions:
1097
+ # to the secret. For more information about permissions policies
1098
+ # attached to a secret, see [Permissions policies attached to a
1099
+ # secret][1].
1239
1100
  #
1240
- # * secretsmanager:GetResourcePolicy
1101
+ # <b>Required permissions: </b> `secretsmanager:GetResourcePolicy`. For
1102
+ # more information, see [ IAM policy actions for Secrets Manager][2] and
1103
+ # [Authentication and access control in Secrets Manager][3].
1241
1104
  #
1242
- # ^
1243
1105
  #
1244
- # **Related operations**
1245
1106
  #
1246
- # * To attach a resource policy to a secret, use PutResourcePolicy.
1247
- #
1248
- # * To delete the resource-based policy attached to a secret, use
1249
- # DeleteResourcePolicy.
1250
- #
1251
- # * To list all of the currently available secrets, use ListSecrets.
1107
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_resource-policies.html
1108
+ # [2]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions
1109
+ # [3]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
1252
1110
  #
1253
1111
  # @option params [required, String] :secret_id
1254
- # Specifies the secret that you want to retrieve the attached
1255
- # resource-based policy for. You can specify either the Amazon Resource
1256
- # Name (ARN) or the friendly name of the secret.
1112
+ # The ARN or name of the secret to retrieve the attached resource-based
1113
+ # policy for.
1257
1114
  #
1258
1115
  # For an ARN, we recommend that you specify a complete ARN rather than a
1259
1116
  # partial ARN.
@@ -1305,40 +1162,35 @@ module Aws::SecretsManager
1305
1162
  # `SecretBinary` from the specified version of a secret, whichever
1306
1163
  # contains content.
1307
1164
  #
1308
- # **Minimum permissions**
1309
- #
1310
- # To run this command, you must have the following permissions:
1311
- #
1312
- # * secretsmanager:GetSecretValue
1165
+ # We recommend that you cache your secret values by using client-side
1166
+ # caching. Caching secrets improves speed and reduces your costs. For
1167
+ # more information, see [Cache secrets for your applications][1].
1313
1168
  #
1314
- # * kms:Decrypt - required only if you use a customer-managed Amazon Web
1315
- # Services KMS key to encrypt the secret. You do not need this
1316
- # permission to use the account's default Amazon Web Services managed
1317
- # CMK for Secrets Manager.
1169
+ # <b>Required permissions: </b> `secretsmanager:GetSecretValue`. If the
1170
+ # secret is encrypted using a customer-managed key instead of the Amazon
1171
+ # Web Services managed key `aws/secretsmanager`, then you also need
1172
+ # `kms:Decrypt` permissions for that key. For more information, see [
1173
+ # IAM policy actions for Secrets Manager][2] and [Authentication and
1174
+ # access control in Secrets Manager][3].
1318
1175
  #
1319
- # **Related operations**
1320
1176
  #
1321
- # * To create a new version of the secret with different encrypted
1322
- # information, use PutSecretValue.
1323
1177
  #
1324
- # * To retrieve the non-encrypted details for the secret, use
1325
- # DescribeSecret.
1178
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieving-secrets.html
1179
+ # [2]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions
1180
+ # [3]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
1326
1181
  #
1327
1182
  # @option params [required, String] :secret_id
1328
- # Specifies the secret containing the version that you want to retrieve.
1329
- # You can specify either the Amazon Resource Name (ARN) or the friendly
1330
- # name of the secret.
1183
+ # The ARN or name of the secret to retrieve.
1331
1184
  #
1332
1185
  # For an ARN, we recommend that you specify a complete ARN rather than a
1333
1186
  # partial ARN.
1334
1187
  #
1335
1188
  # @option params [String] :version_id
1336
- # Specifies the unique identifier of the version of the secret that you
1337
- # want to retrieve. If you specify both this parameter and
1338
- # `VersionStage`, the two parameters must refer to the same secret
1339
- # version. If you don't specify either a `VersionStage` or `VersionId`
1340
- # then the default is to perform the operation on the version with the
1341
- # `VersionStage` value of `AWSCURRENT`.
1189
+ # The unique identifier of the version of the secret to retrieve. If you
1190
+ # include both this parameter and `VersionStage`, the two parameters
1191
+ # must refer to the same secret version. If you don't specify either a
1192
+ # `VersionStage` or `VersionId`, then Secrets Manager returns the
1193
+ # `AWSCURRENT` version.
1342
1194
  #
1343
1195
  # This value is typically a [UUID-type][1] value with 32 hexadecimal
1344
1196
  # digits.
@@ -1348,15 +1200,13 @@ module Aws::SecretsManager
1348
1200
  # [1]: https://wikipedia.org/wiki/Universally_unique_identifier
1349
1201
  #
1350
1202
  # @option params [String] :version_stage
1351
- # Specifies the secret version that you want to retrieve by the staging
1352
- # label attached to the version.
1203
+ # The staging label of the version of the secret to retrieve.
1353
1204
  #
1354
- # Staging labels are used to keep track of different versions during the
1355
- # rotation process. If you specify both this parameter and `VersionId`,
1356
- # the two parameters must refer to the same secret version . If you
1357
- # don't specify either a `VersionStage` or `VersionId`, then the
1358
- # default is to perform the operation on the version with the
1359
- # `VersionStage` value of `AWSCURRENT`.
1205
+ # Secrets Manager uses staging labels to keep track of different
1206
+ # versions during the rotation process. If you include both this
1207
+ # parameter and `VersionId`, the two parameters must refer to the same
1208
+ # secret version. If you don't specify either a `VersionStage` or
1209
+ # `VersionId`, Secrets Manager returns the `AWSCURRENT` version.
1360
1210
  #
1361
1211
  # @return [Types::GetSecretValueResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1362
1212
  #
@@ -1420,66 +1270,44 @@ module Aws::SecretsManager
1420
1270
  req.send_request(options)
1421
1271
  end
1422
1272
 
1423
- # Lists all of the versions attached to the specified secret. The output
1424
- # does not include the `SecretString` or `SecretBinary` fields. By
1425
- # default, the list includes only versions that have at least one
1426
- # staging label in `VersionStage` attached.
1427
- #
1428
- # <note markdown="1"> Always check the `NextToken` response parameter when calling any of
1429
- # the `List*` operations. These operations can occasionally return an
1430
- # empty or shorter than expected list of results even when there more
1431
- # results become available. When this happens, the `NextToken` response
1432
- # parameter contains a value to pass to the next call to the same API to
1433
- # request the next part of the list.
1434
- #
1435
- # </note>
1436
- #
1437
- # **Minimum permissions**
1273
+ # Lists the versions for a secret.
1438
1274
  #
1439
- # To run this command, you must have the following permissions:
1275
+ # To list the secrets in the account, use ListSecrets.
1440
1276
  #
1441
- # * secretsmanager:ListSecretVersionIds
1277
+ # To get the secret value from `SecretString` or `SecretBinary`, call
1278
+ # GetSecretValue.
1442
1279
  #
1443
- # ^
1280
+ # <b>Required permissions: </b> `secretsmanager:ListSecretVersionIds`.
1281
+ # For more information, see [ IAM policy actions for Secrets Manager][1]
1282
+ # and [Authentication and access control in Secrets Manager][2].
1444
1283
  #
1445
- # **Related operations**
1446
1284
  #
1447
- # * To list the secrets in an account, use ListSecrets.
1448
1285
  #
1449
- # ^
1286
+ # [1]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions
1287
+ # [2]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
1450
1288
  #
1451
1289
  # @option params [required, String] :secret_id
1452
- # The identifier for the secret containing the versions you want to
1453
- # list. You can specify either the Amazon Resource Name (ARN) or the
1454
- # friendly name of the secret.
1290
+ # The ARN or name of the secret whose versions you want to list.
1455
1291
  #
1456
1292
  # For an ARN, we recommend that you specify a complete ARN rather than a
1457
1293
  # partial ARN.
1458
1294
  #
1459
1295
  # @option params [Integer] :max_results
1460
- # (Optional) Limits the number of results you want to include in the
1461
- # response. If you don't include this parameter, it defaults to a value
1462
- # that's specific to the operation. If additional items exist beyond
1463
- # the maximum you specify, the `NextToken` response element is present
1464
- # and has a value (isn't null). Include that value as the `NextToken`
1465
- # request parameter in the next call to the operation to get the next
1466
- # part of the results. Note that Secrets Manager might return fewer
1467
- # results than the maximum even when there are more results available.
1468
- # You should check `NextToken` after every operation to ensure that you
1469
- # receive all of the results.
1296
+ # The number of results to include in the response.
1297
+ #
1298
+ # If there are more results available, in the response, Secrets Manager
1299
+ # includes `NextToken`. To get the next results, call
1300
+ # `ListSecretVersionIds` again with the value from `NextToken`.
1470
1301
  #
1471
1302
  # @option params [String] :next_token
1472
- # (Optional) Use this parameter in a request if you receive a
1473
- # `NextToken` response in a previous request indicating there's more
1474
- # output available. In a subsequent call, set it to the value of the
1475
- # previous call `NextToken` response to indicate where the output should
1476
- # continue from.
1303
+ # A token that indicates where the output should continue from, if a
1304
+ # previous call did not show all results. To get the next results, call
1305
+ # `ListSecretVersionIds` again with this value.
1477
1306
  #
1478
1307
  # @option params [Boolean] :include_deprecated
1479
- # (Optional) Specifies that you want the results to include versions
1480
- # that do not have any staging labels attached to them. Such versions
1481
- # are considered deprecated and are subject to deletion by Secrets
1482
- # Manager as needed.
1308
+ # Specifies whether to include versions of secrets that don't have any
1309
+ # staging labels attached to them. Versions without staging labels are
1310
+ # considered deprecated and are subject to deletion by Secrets Manager.
1483
1311
  #
1484
1312
  # @return [Types::ListSecretVersionIdsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1485
1313
  #
@@ -1559,56 +1387,41 @@ module Aws::SecretsManager
1559
1387
  req.send_request(options)
1560
1388
  end
1561
1389
 
1562
- # Lists all of the secrets that are stored by Secrets Manager in the
1563
- # Amazon Web Services account. To list the versions currently stored for
1564
- # a specific secret, use ListSecretVersionIds. The encrypted fields
1565
- # `SecretString` and `SecretBinary` are not included in the output. To
1566
- # get that information, call the GetSecretValue operation.
1567
- #
1568
- # <note markdown="1"> Always check the `NextToken` response parameter when calling any of
1569
- # the `List*` operations. These operations can occasionally return an
1570
- # empty or shorter than expected list of results even when there more
1571
- # results become available. When this happens, the `NextToken` response
1572
- # parameter contains a value to pass to the next call to the same API to
1573
- # request the next part of the list.
1574
- #
1575
- # </note>
1390
+ # Lists the secrets that are stored by Secrets Manager in the Amazon Web
1391
+ # Services account.
1576
1392
  #
1577
- # **Minimum permissions**
1393
+ # To list the versions of a secret, use ListSecretVersionIds.
1578
1394
  #
1579
- # To run this command, you must have the following permissions:
1395
+ # To get the secret value from `SecretString` or `SecretBinary`, call
1396
+ # GetSecretValue.
1580
1397
  #
1581
- # * secretsmanager:ListSecrets
1398
+ # For information about finding secrets in the console, see [Enhanced
1399
+ # search capabilities for secrets in Secrets Manager][1].
1582
1400
  #
1583
- # ^
1401
+ # <b>Required permissions: </b> `secretsmanager:ListSecrets`. For more
1402
+ # information, see [ IAM policy actions for Secrets Manager][2] and
1403
+ # [Authentication and access control in Secrets Manager][3].
1584
1404
  #
1585
- # **Related operations**
1586
1405
  #
1587
- # * To list the versions attached to a secret, use ListSecretVersionIds.
1588
1406
  #
1589
- # ^
1407
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/manage_search-secret.html
1408
+ # [2]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions
1409
+ # [3]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
1590
1410
  #
1591
1411
  # @option params [Integer] :max_results
1592
- # (Optional) Limits the number of results you want to include in the
1593
- # response. If you don't include this parameter, it defaults to a value
1594
- # that's specific to the operation. If additional items exist beyond
1595
- # the maximum you specify, the `NextToken` response element is present
1596
- # and has a value (isn't null). Include that value as the `NextToken`
1597
- # request parameter in the next call to the operation to get the next
1598
- # part of the results. Note that Secrets Manager might return fewer
1599
- # results than the maximum even when there are more results available.
1600
- # You should check `NextToken` after every operation to ensure that you
1601
- # receive all of the results.
1412
+ # The number of results to include in the response.
1413
+ #
1414
+ # If there are more results available, in the response, Secrets Manager
1415
+ # includes `NextToken`. To get the next results, call `ListSecrets`
1416
+ # again with the value from `NextToken`.
1602
1417
  #
1603
1418
  # @option params [String] :next_token
1604
- # (Optional) Use this parameter in a request if you receive a
1605
- # `NextToken` response in a previous request indicating there's more
1606
- # output available. In a subsequent call, set it to the value of the
1607
- # previous call `NextToken` response to indicate where the output should
1608
- # continue from.
1419
+ # A token that indicates where the output should continue from, if a
1420
+ # previous call did not show all results. To get the next results, call
1421
+ # `ListSecrets` again with this value.
1609
1422
  #
1610
1423
  # @option params [Array<Types::Filter>] :filters
1611
- # Lists the secret request filters.
1424
+ # The filters to apply to the list of secrets.
1612
1425
  #
1613
1426
  # @option params [String] :sort_order
1614
1427
  # Lists secrets in the requested order.
@@ -1680,6 +1493,8 @@ module Aws::SecretsManager
1680
1493
  # resp.secret_list[0].rotation_enabled #=> Boolean
1681
1494
  # resp.secret_list[0].rotation_lambda_arn #=> String
1682
1495
  # resp.secret_list[0].rotation_rules.automatically_after_days #=> Integer
1496
+ # resp.secret_list[0].rotation_rules.duration #=> String
1497
+ # resp.secret_list[0].rotation_rules.schedule_expression #=> String
1683
1498
  # resp.secret_list[0].last_rotated_date #=> Time
1684
1499
  # resp.secret_list[0].last_changed_date #=> Time
1685
1500
  # resp.secret_list[0].last_accessed_date #=> Time
@@ -1704,65 +1519,42 @@ module Aws::SecretsManager
1704
1519
  req.send_request(options)
1705
1520
  end
1706
1521
 
1707
- # Attaches the contents of the specified resource-based permission
1708
- # policy to a secret. A resource-based policy is optional.
1709
- # Alternatively, you can use IAM identity-based policies that specify
1710
- # the secret's Amazon Resource Name (ARN) in the policy statement's
1711
- # `Resources` element. You can also use a combination of both
1712
- # identity-based and resource-based policies. The affected users and
1713
- # roles receive the permissions that are permitted by all of the
1714
- # relevant policies. For more information, see [Using Resource-Based
1715
- # Policies for Amazon Web Services Secrets Manager][1]. For the complete
1716
- # description of the Amazon Web Services policy syntax and grammar, see
1717
- # [IAM JSON Policy Reference][2] in the *IAM User Guide*.
1718
- #
1719
- # **Minimum permissions**
1720
- #
1721
- # To run this command, you must have the following permissions:
1522
+ # Attaches a resource-based permission policy to a secret. A
1523
+ # resource-based policy is optional. For more information, see
1524
+ # [Authentication and access control for Secrets Manager][1]
1722
1525
  #
1723
- # * secretsmanager:PutResourcePolicy
1526
+ # For information about attaching a policy in the console, see [Attach a
1527
+ # permissions policy to a secret][2].
1724
1528
  #
1725
- # ^
1529
+ # <b>Required permissions: </b> `secretsmanager:PutResourcePolicy`. For
1530
+ # more information, see [ IAM policy actions for Secrets Manager][3] and
1531
+ # [Authentication and access control in Secrets Manager][1].
1726
1532
  #
1727
- # **Related operations**
1728
1533
  #
1729
- # * To retrieve the resource policy attached to a secret, use
1730
- # GetResourcePolicy.
1731
1534
  #
1732
- # * To delete the resource-based policy attached to a secret, use
1733
- # DeleteResourcePolicy.
1734
- #
1735
- # * To list all of the currently available secrets, use ListSecrets.
1736
- #
1737
- #
1738
- #
1739
- # [1]: http://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_resource-based-policies.html
1740
- # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
1535
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
1536
+ # [2]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_resource-based-policies.html
1537
+ # [3]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions
1741
1538
  #
1742
1539
  # @option params [required, String] :secret_id
1743
- # Specifies the secret that you want to attach the resource-based
1744
- # policy. You can specify either the ARN or the friendly name of the
1745
- # secret.
1540
+ # The ARN or name of the secret to attach the resource-based policy.
1746
1541
  #
1747
1542
  # For an ARN, we recommend that you specify a complete ARN rather than a
1748
1543
  # partial ARN.
1749
1544
  #
1750
1545
  # @option params [required, String] :resource_policy
1751
- # A JSON-formatted string constructed according to the grammar and
1752
- # syntax for an Amazon Web Services resource-based policy. The policy in
1753
- # the string identifies who can access or manage this secret and its
1754
- # versions. For information on how to format a JSON parameter for the
1755
- # various command line tool environments, see [Using JSON for
1756
- # Parameters][1] in the *CLI User Guide*.
1546
+ # A JSON-formatted string for an Amazon Web Services resource-based
1547
+ # policy. For example policies, see [Permissions policy examples][1].
1757
1548
  #
1758
1549
  #
1759
1550
  #
1760
- # [1]: http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json
1551
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html
1761
1552
  #
1762
1553
  # @option params [Boolean] :block_public_policy
1763
- # (Optional) If you set the parameter, `BlockPublicPolicy` to true, then
1764
- # you block resource-based policies that allow broad access to the
1765
- # secret.
1554
+ # Specifies whether to block resource-based policies that allow broad
1555
+ # access to the secret. By default, Secrets Manager blocks policies that
1556
+ # allow broad access, for example those that use a wildcard for the
1557
+ # principal.
1766
1558
  #
1767
1559
  # @return [Types::PutResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1768
1560
  #
@@ -1807,11 +1599,9 @@ module Aws::SecretsManager
1807
1599
  req.send_request(options)
1808
1600
  end
1809
1601
 
1810
- # Stores a new encrypted secret value in the specified secret. To do
1811
- # this, the operation creates a new version and attaches it to the
1812
- # secret. The version can contain a new `SecretString` value or a new
1813
- # `SecretBinary` value. You can also specify the staging labels that are
1814
- # initially attached to the new version.
1602
+ # Creates a new version with a new encrypted secret value and attaches
1603
+ # it to the secret. The version can contain a new `SecretString` value
1604
+ # or a new `SecretBinary` value.
1815
1605
  #
1816
1606
  # We recommend you avoid calling `PutSecretValue` at a sustained rate of
1817
1607
  # more than once every 10 minutes. When you update the secret value,
@@ -1822,116 +1612,73 @@ module Aws::SecretsManager
1822
1612
  # versions than Secrets Manager removes, and you will reach the quota
1823
1613
  # for secret versions.
1824
1614
  #
1825
- # * If this operation creates the first version for the secret then
1826
- # Secrets Manager automatically attaches the staging label
1827
- # `AWSCURRENT` to the new version.
1828
- #
1829
- # * If you do not specify a value for VersionStages then Secrets Manager
1830
- # automatically moves the staging label `AWSCURRENT` to this new
1831
- # version.
1832
- #
1833
- # * If this operation moves the staging label `AWSCURRENT` from another
1834
- # version to this version, then Secrets Manager also automatically
1835
- # moves the staging label `AWSPREVIOUS` to the version that
1836
- # `AWSCURRENT` was removed from.
1837
- #
1838
- # * This operation is idempotent. If a version with a `VersionId` with
1839
- # the same value as the `ClientRequestToken` parameter already exists
1840
- # and you specify the same secret data, the operation succeeds but
1841
- # does nothing. However, if the secret data is different, then the
1842
- # operation fails because you cannot modify an existing version; you
1843
- # can only create new ones.
1844
- #
1845
- # <note markdown="1"> * If you call an operation to encrypt or decrypt the `SecretString` or
1846
- # `SecretBinary` for a secret in the same account as the calling user
1847
- # and that secret doesn't specify a Amazon Web Services KMS
1848
- # encryption key, Secrets Manager uses the account's default Amazon
1849
- # Web Services managed customer master key (CMK) with the alias
1850
- # `aws/secretsmanager`. If this key doesn't already exist in your
1851
- # account then Secrets Manager creates it for you automatically. All
1852
- # users and roles in the same Amazon Web Services account
1853
- # automatically have access to use the default CMK. Note that if an
1854
- # Secrets Manager API call results in Amazon Web Services creating the
1855
- # account's Amazon Web Services-managed CMK, it can result in a
1856
- # one-time significant delay in returning the result.
1857
- #
1858
- # * If the secret resides in a different Amazon Web Services account
1859
- # from the credentials calling an API that requires encryption or
1860
- # decryption of the secret value then you must create and use a custom
1861
- # Amazon Web Services KMS CMK because you can't access the default
1862
- # CMK for the account using credentials from a different Amazon Web
1863
- # Services account. Store the ARN of the CMK in the secret when you
1864
- # create the secret or when you update it by including it in the
1865
- # `KMSKeyId`. If you call an API that must encrypt or decrypt
1866
- # `SecretString` or `SecretBinary` using credentials from a different
1867
- # account then the Amazon Web Services KMS key policy must grant
1868
- # cross-account access to that other account's user or role for both
1869
- # the kms:GenerateDataKey and kms:Decrypt operations.
1870
- #
1871
- # </note>
1872
- #
1873
- # **Minimum permissions**
1874
- #
1875
- # To run this command, you must have the following permissions:
1615
+ # You can specify the staging labels to attach to the new version in
1616
+ # `VersionStages`. If you don't include `VersionStages`, then Secrets
1617
+ # Manager automatically moves the staging label `AWSCURRENT` to this
1618
+ # version. If this operation creates the first version for the secret,
1619
+ # then Secrets Manager automatically attaches the staging label
1620
+ # `AWSCURRENT` to it .
1876
1621
  #
1877
- # * secretsmanager:PutSecretValue
1622
+ # If this operation moves the staging label `AWSCURRENT` from another
1623
+ # version to this version, then Secrets Manager also automatically moves
1624
+ # the staging label `AWSPREVIOUS` to the version that `AWSCURRENT` was
1625
+ # removed from.
1878
1626
  #
1879
- # * kms:GenerateDataKey - needed only if you use a customer-managed
1880
- # Amazon Web Services KMS key to encrypt the secret. You do not need
1881
- # this permission to use the account's default Amazon Web Services
1882
- # managed CMK for Secrets Manager.
1627
+ # This operation is idempotent. If a version with a `VersionId` with the
1628
+ # same value as the `ClientRequestToken` parameter already exists, and
1629
+ # you specify the same secret data, the operation succeeds but does
1630
+ # nothing. However, if the secret data is different, then the operation
1631
+ # fails because you can't modify an existing version; you can only
1632
+ # create new ones.
1883
1633
  #
1884
- # **Related operations**
1634
+ # <b>Required permissions: </b> `secretsmanager:PutSecretValue`. For
1635
+ # more information, see [ IAM policy actions for Secrets Manager][1] and
1636
+ # [Authentication and access control in Secrets Manager][2].
1885
1637
  #
1886
- # * To retrieve the encrypted value you store in the version of a
1887
- # secret, use GetSecretValue.
1888
1638
  #
1889
- # * To create a secret, use CreateSecret.
1890
1639
  #
1891
- # * To get the details for a secret, use DescribeSecret.
1892
- #
1893
- # * To list the versions attached to a secret, use ListSecretVersionIds.
1640
+ # [1]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions
1641
+ # [2]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
1894
1642
  #
1895
1643
  # @option params [required, String] :secret_id
1896
- # Specifies the secret to which you want to add a new version. You can
1897
- # specify either the Amazon Resource Name (ARN) or the friendly name of
1898
- # the secret. The secret must already exist.
1644
+ # The ARN or name of the secret to add a new version to.
1899
1645
  #
1900
1646
  # For an ARN, we recommend that you specify a complete ARN rather than a
1901
1647
  # partial ARN.
1902
1648
  #
1649
+ # If the secret doesn't already exist, use `CreateSecret` instead.
1650
+ #
1903
1651
  # @option params [String] :client_request_token
1904
- # (Optional) Specifies a unique identifier for the new version of the
1905
- # secret.
1652
+ # A unique identifier for the new version of the secret.
1906
1653
  #
1907
1654
  # <note markdown="1"> If you use the Amazon Web Services CLI or one of the Amazon Web
1908
- # Services SDK to call this operation, then you can leave this parameter
1909
- # empty. The CLI or SDK generates a random UUID for you and includes
1910
- # that in the request. If you don't use the SDK and instead generate a
1911
- # raw HTTP request to the Secrets Manager service endpoint, then you
1912
- # must generate a `ClientRequestToken` yourself for new versions and
1913
- # include that value in the request.
1655
+ # Services SDKs to call this operation, then you can leave this
1656
+ # parameter empty because they generate a random UUID for you. If you
1657
+ # don't use the SDK and instead generate a raw HTTP request to the
1658
+ # Secrets Manager service endpoint, then you must generate a
1659
+ # `ClientRequestToken` yourself for new versions and include that value
1660
+ # in the request.
1914
1661
  #
1915
1662
  # </note>
1916
1663
  #
1917
1664
  # This value helps ensure idempotency. Secrets Manager uses this value
1918
1665
  # to prevent the accidental creation of duplicate versions if there are
1919
- # failures and retries during the Lambda rotation function's
1920
- # processing. We recommend that you generate a [UUID-type][1] value to
1921
- # ensure uniqueness within the specified secret.
1666
+ # failures and retries during the Lambda rotation function processing.
1667
+ # We recommend that you generate a [UUID-type][1] value to ensure
1668
+ # uniqueness within the specified secret.
1922
1669
  #
1923
1670
  # * If the `ClientRequestToken` value isn't already associated with a
1924
1671
  # version of the secret then a new version of the secret is created.
1925
1672
  #
1926
1673
  # * If a version with this value already exists and that version's
1927
1674
  # `SecretString` or `SecretBinary` values are the same as those in the
1928
- # request then the request is ignored (the operation is idempotent).
1675
+ # request then the request is ignored. The operation is idempotent.
1929
1676
  #
1930
1677
  # * If a version with this value already exists and the version of the
1931
1678
  # `SecretString` and `SecretBinary` values are different from those in
1932
- # the request then the request fails because you cannot modify an
1933
- # existing secret version. You can only create new versions to store
1934
- # new secret values.
1679
+ # the request, then the request fails because you can't modify a
1680
+ # secret version. You can only create new versions to store new secret
1681
+ # values.
1935
1682
  #
1936
1683
  # This value becomes the `VersionId` of the new version.
1937
1684
  #
@@ -1943,52 +1690,37 @@ module Aws::SecretsManager
1943
1690
  # [1]: https://wikipedia.org/wiki/Universally_unique_identifier
1944
1691
  #
1945
1692
  # @option params [String, StringIO, File] :secret_binary
1946
- # (Optional) Specifies binary data that you want to encrypt and store in
1947
- # the new version of the secret. To use this parameter in the
1948
- # command-line tools, we recommend that you store your binary data in a
1949
- # file and then use the appropriate technique for your tool to pass the
1950
- # contents of the file as a parameter. Either `SecretBinary` or
1951
- # `SecretString` must have a value, but not both. They cannot both be
1952
- # empty.
1693
+ # The binary data to encrypt and store in the new version of the secret.
1694
+ # To use this parameter in the command-line tools, we recommend that you
1695
+ # store your binary data in a file and then pass the contents of the
1696
+ # file as a parameter.
1953
1697
  #
1954
- # This parameter is not accessible if the secret using the Secrets
1955
- # Manager console.
1698
+ # You must include `SecretBinary` or `SecretString`, but not both.
1956
1699
  #
1957
- # @option params [String] :secret_string
1958
- # (Optional) Specifies text data that you want to encrypt and store in
1959
- # this new version of the secret. Either `SecretString` or
1960
- # `SecretBinary` must have a value, but not both. They cannot both be
1961
- # empty.
1962
- #
1963
- # If you create this secret by using the Secrets Manager console then
1964
- # Secrets Manager puts the protected secret text in only the
1965
- # `SecretString` parameter. The Secrets Manager console stores the
1966
- # information as a JSON structure of key/value pairs that the default
1967
- # Lambda rotation function knows how to parse.
1968
- #
1969
- # For storing multiple values, we recommend that you use a JSON text
1970
- # string argument and specify key/value pairs. For more information, see
1971
- # [Specifying parameter values for the Amazon Web Services CLI][1] in
1972
- # the Amazon Web Services CLI User Guide.
1700
+ # You can't access this value from the Secrets Manager console.
1973
1701
  #
1702
+ # @option params [String] :secret_string
1703
+ # The text to encrypt and store in the new version of the secret.
1974
1704
  #
1705
+ # You must include `SecretBinary` or `SecretString`, but not both.
1975
1706
  #
1976
- # [1]: https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html
1707
+ # We recommend you create the secret string as JSON key/value pairs, as
1708
+ # shown in the example.
1977
1709
  #
1978
1710
  # @option params [Array<String>] :version_stages
1979
- # (Optional) Specifies a list of staging labels that are attached to
1980
- # this version of the secret. These staging labels are used to track the
1981
- # versions through the rotation process by the Lambda rotation function.
1982
- #
1983
- # A staging label must be unique to a single version of the secret. If
1984
- # you specify a staging label that's already associated with a
1985
- # different version of the same secret then that staging label is
1986
- # automatically removed from the other version and attached to this
1987
- # version.
1711
+ # A list of staging labels to attach to this version of the secret.
1712
+ # Secrets Manager uses staging labels to track versions of a secret
1713
+ # through the rotation process.
1988
1714
  #
1989
- # If you do not specify a value for `VersionStages` then Secrets Manager
1990
- # automatically moves the staging label `AWSCURRENT` to this new
1991
- # version.
1715
+ # If you specify a staging label that's already associated with a
1716
+ # different version of the same secret, then Secrets Manager removes the
1717
+ # label from the other version and attaches it to this version. If you
1718
+ # specify `AWSCURRENT`, and it is already attached to another version,
1719
+ # then Secrets Manager also moves the staging label `AWSPREVIOUS` to the
1720
+ # version that `AWSCURRENT` was removed from.
1721
+ #
1722
+ # If you don't include `VersionStages`, then Secrets Manager
1723
+ # automatically moves the staging label `AWSCURRENT` to this version.
1992
1724
  #
1993
1725
  # @return [Types::PutSecretValueResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1994
1726
  #
@@ -2046,13 +1778,24 @@ module Aws::SecretsManager
2046
1778
  req.send_request(options)
2047
1779
  end
2048
1780
 
2049
- # Remove regions from replication.
1781
+ # For a secret that is replicated to other Regions, deletes the secret
1782
+ # replicas from the Regions you specify.
1783
+ #
1784
+ # <b>Required permissions: </b>
1785
+ # `secretsmanager:RemoveRegionsFromReplication`. For more information,
1786
+ # see [ IAM policy actions for Secrets Manager][1] and [Authentication
1787
+ # and access control in Secrets Manager][2].
1788
+ #
1789
+ #
1790
+ #
1791
+ # [1]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions
1792
+ # [2]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
2050
1793
  #
2051
1794
  # @option params [required, String] :secret_id
2052
- # Remove a secret by `SecretId` from replica Regions.
1795
+ # The ARN or name of the secret.
2053
1796
  #
2054
1797
  # @option params [required, Array<String>] :remove_replica_regions
2055
- # Remove replication from specific Regions.
1798
+ # The Regions of the replicas to remove.
2056
1799
  #
2057
1800
  # @return [Types::RemoveRegionsFromReplicationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2058
1801
  #
@@ -2085,18 +1828,28 @@ module Aws::SecretsManager
2085
1828
  req.send_request(options)
2086
1829
  end
2087
1830
 
2088
- # Converts an existing secret to a multi-Region secret and begins
2089
- # replication the secret to a list of new regions.
1831
+ # Replicates the secret to a new Regions. See [Multi-Region secrets][1].
1832
+ #
1833
+ # <b>Required permissions: </b>
1834
+ # `secretsmanager:ReplicateSecretToRegions`. For more information, see [
1835
+ # IAM policy actions for Secrets Manager][2] and [Authentication and
1836
+ # access control in Secrets Manager][3].
1837
+ #
1838
+ #
1839
+ #
1840
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/create-manage-multi-region-secrets.html
1841
+ # [2]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions
1842
+ # [3]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
2090
1843
  #
2091
1844
  # @option params [required, String] :secret_id
2092
- # Use the `Secret Id` to replicate a secret to regions.
1845
+ # The ARN or name of the secret to replicate.
2093
1846
  #
2094
1847
  # @option params [required, Array<Types::ReplicaRegionType>] :add_replica_regions
2095
- # Add Regions to replicate the secret.
1848
+ # A list of Regions in which to replicate the secret.
2096
1849
  #
2097
1850
  # @option params [Boolean] :force_overwrite_replica_secret
2098
- # (Optional) If set, Secrets Manager replication overwrites a secret
2099
- # with the same name in the destination region.
1851
+ # Specifies whether to overwrite a secret with the same name in the
1852
+ # destination Region.
2100
1853
  #
2101
1854
  # @return [Types::ReplicateSecretToRegionsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2102
1855
  #
@@ -2136,27 +1889,20 @@ module Aws::SecretsManager
2136
1889
  end
2137
1890
 
2138
1891
  # Cancels the scheduled deletion of a secret by removing the
2139
- # `DeletedDate` time stamp. This makes the secret accessible to query
2140
- # once again.
2141
- #
2142
- # **Minimum permissions**
2143
- #
2144
- # To run this command, you must have the following permissions:
1892
+ # `DeletedDate` time stamp. You can access a secret again after it has
1893
+ # been restored.
2145
1894
  #
2146
- # * secretsmanager:RestoreSecret
1895
+ # <b>Required permissions: </b> `secretsmanager:RestoreSecret`. For more
1896
+ # information, see [ IAM policy actions for Secrets Manager][1] and
1897
+ # [Authentication and access control in Secrets Manager][2].
2147
1898
  #
2148
- # ^
2149
1899
  #
2150
- # **Related operations**
2151
1900
  #
2152
- # * To delete a secret, use DeleteSecret.
2153
- #
2154
- # ^
1901
+ # [1]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions
1902
+ # [2]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
2155
1903
  #
2156
1904
  # @option params [required, String] :secret_id
2157
- # Specifies the secret that you want to restore from a previously
2158
- # scheduled deletion. You can specify either the Amazon Resource Name
2159
- # (ARN) or the friendly name of the secret.
1905
+ # The ARN or name of the secret to restore.
2160
1906
  #
2161
1907
  # For an ARN, we recommend that you specify a complete ARN rather than a
2162
1908
  # partial ARN.
@@ -2201,82 +1947,57 @@ module Aws::SecretsManager
2201
1947
  req.send_request(options)
2202
1948
  end
2203
1949
 
2204
- # Configures and starts the asynchronous process of rotating this
2205
- # secret. If you include the configuration parameters, the operation
2206
- # sets those values for the secret and then immediately starts a
2207
- # rotation. If you do not include the configuration parameters, the
2208
- # operation starts a rotation with the values already stored in the
2209
- # secret. After the rotation completes, the protected service and its
2210
- # clients all use the new version of the secret.
2211
- #
2212
- # This required configuration information includes the ARN of an Amazon
2213
- # Web Services Lambda function and optionally, the time between
2214
- # scheduled rotations. The Lambda rotation function creates a new
2215
- # version of the secret and creates or updates the credentials on the
2216
- # protected service to match. After testing the new credentials, the
2217
- # function marks the new secret with the staging label `AWSCURRENT` so
2218
- # that your clients all immediately begin to use the new version. For
2219
- # more information about rotating secrets and how to configure a Lambda
2220
- # function to rotate the secrets for your protected service, see
2221
- # [Rotating Secrets in Amazon Web Services Secrets Manager][1] in the
2222
- # *Amazon Web Services Secrets Manager User Guide*.
2223
- #
2224
- # Secrets Manager schedules the next rotation when the previous one
2225
- # completes. Secrets Manager schedules the date by adding the rotation
2226
- # interval (number of days) to the actual date of the last rotation. The
2227
- # service chooses the hour within that 24-hour date window randomly. The
2228
- # minute is also chosen somewhat randomly, but weighted towards the top
2229
- # of the hour and influenced by a variety of factors that help
2230
- # distribute load.
2231
- #
2232
- # The rotation function must end with the versions of the secret in one
2233
- # of two states:
2234
- #
2235
- # * The `AWSPENDING` and `AWSCURRENT` staging labels are attached to the
2236
- # same version of the secret, or
2237
- #
2238
- # * The `AWSPENDING` staging label is not attached to any version of the
2239
- # secret.
1950
+ # Configures and starts the asynchronous process of rotating the secret.
1951
+ #
1952
+ # If you include the configuration parameters, the operation sets the
1953
+ # values for the secret and then immediately starts a rotation. If you
1954
+ # don't include the configuration parameters, the operation starts a
1955
+ # rotation with the values already stored in the secret. For more
1956
+ # information about rotation, see [Rotate secrets][1].
1957
+ #
1958
+ # To configure rotation, you include the ARN of an Amazon Web Services
1959
+ # Lambda function and the schedule for the rotation. The Lambda rotation
1960
+ # function creates a new version of the secret and creates or updates
1961
+ # the credentials on the database or service to match. After testing the
1962
+ # new credentials, the function marks the new secret version with the
1963
+ # staging label `AWSCURRENT`. Then anyone who retrieves the secret gets
1964
+ # the new version. For more information, see [How rotation works][2].
1965
+ #
1966
+ # When rotation is successful, the `AWSPENDING` staging label might be
1967
+ # attached to the same version as the `AWSCURRENT` version, or it might
1968
+ # not be attached to any version.
2240
1969
  #
2241
1970
  # If the `AWSPENDING` staging label is present but not attached to the
2242
- # same version as `AWSCURRENT` then any later invocation of
1971
+ # same version as `AWSCURRENT`, then any later invocation of
2243
1972
  # `RotateSecret` assumes that a previous rotation request is still in
2244
1973
  # progress and returns an error.
2245
1974
  #
2246
- # **Minimum permissions**
2247
- #
2248
- # To run this command, you must have the following permissions:
2249
- #
2250
- # * secretsmanager:RotateSecret
2251
- #
2252
- # * lambda:InvokeFunction (on the function specified in the secret's
2253
- # metadata)
2254
- #
2255
- # **Related operations**
2256
- #
2257
- # * To list the secrets in your account, use ListSecrets.
2258
- #
2259
- # * To get the details for a version of a secret, use DescribeSecret.
2260
- #
2261
- # * To create a new version of a secret, use CreateSecret.
2262
- #
2263
- # * To attach staging labels to or remove staging labels from a version
2264
- # of a secret, use UpdateSecretVersionStage.
1975
+ # <b>Required permissions: </b> `secretsmanager:RotateSecret`. For more
1976
+ # information, see [ IAM policy actions for Secrets Manager][3] and
1977
+ # [Authentication and access control in Secrets Manager][4]. You also
1978
+ # need `lambda:InvokeFunction` permissions on the rotation function. For
1979
+ # more information, see [ Permissions for rotation][5].
2265
1980
  #
2266
1981
  #
2267
1982
  #
2268
1983
  # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html
1984
+ # [2]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html
1985
+ # [3]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions
1986
+ # [4]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
1987
+ # [5]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets-required-permissions-function.html
2269
1988
  #
2270
1989
  # @option params [required, String] :secret_id
2271
- # Specifies the secret that you want to rotate. You can specify either
2272
- # the Amazon Resource Name (ARN) or the friendly name of the secret.
1990
+ # The ARN or name of the secret to rotate.
2273
1991
  #
2274
1992
  # For an ARN, we recommend that you specify a complete ARN rather than a
2275
1993
  # partial ARN.
2276
1994
  #
2277
1995
  # @option params [String] :client_request_token
2278
- # (Optional) Specifies a unique identifier for the new version of the
2279
- # secret that helps ensure idempotency.
1996
+ # A unique identifier for the new version of the secret that helps
1997
+ # ensure idempotency. Secrets Manager uses this value to prevent the
1998
+ # accidental creation of duplicate versions if there are failures and
1999
+ # retries during rotation. This value becomes the `VersionId` of the new
2000
+ # version.
2280
2001
  #
2281
2002
  # If you use the Amazon Web Services CLI or one of the Amazon Web
2282
2003
  # Services SDK to call this operation, then you can leave this parameter
@@ -2286,15 +2007,10 @@ module Aws::SecretsManager
2286
2007
  # endpoint, then you must generate a `ClientRequestToken` yourself for
2287
2008
  # new versions and include that value in the request.
2288
2009
  #
2289
- # You only need to specify your own value if you implement your own
2290
- # retry logic and want to ensure that a given secret is not created
2291
- # twice. We recommend that you generate a [UUID-type][1] value to ensure
2292
- # uniqueness within the specified secret.
2293
- #
2294
- # Secrets Manager uses this value to prevent the accidental creation of
2295
- # duplicate versions if there are failures and retries during the
2296
- # function's processing. This value becomes the `VersionId` of the new
2297
- # version.
2010
+ # You only need to specify this value if you implement your own retry
2011
+ # logic and you want to ensure that Secrets Manager doesn't attempt to
2012
+ # create a secret version twice. We recommend that you generate a
2013
+ # [UUID-type][1] value to ensure uniqueness within the specified secret.
2298
2014
  #
2299
2015
  # **A suitable default value is auto-generated.** You should normally
2300
2016
  # not need to pass this option.**
@@ -2304,12 +2020,28 @@ module Aws::SecretsManager
2304
2020
  # [1]: https://wikipedia.org/wiki/Universally_unique_identifier
2305
2021
  #
2306
2022
  # @option params [String] :rotation_lambda_arn
2307
- # (Optional) Specifies the ARN of the Lambda function that can rotate
2308
- # the secret.
2023
+ # The ARN of the Lambda rotation function that can rotate the secret.
2309
2024
  #
2310
2025
  # @option params [Types::RotationRulesType] :rotation_rules
2311
2026
  # A structure that defines the rotation configuration for this secret.
2312
2027
  #
2028
+ # @option params [Boolean] :rotate_immediately
2029
+ # Specifies whether to rotate the secret immediately or wait until the
2030
+ # next scheduled rotation window. The rotation schedule is defined in
2031
+ # RotateSecretRequest$RotationRules.
2032
+ #
2033
+ # If you don't immediately rotate the secret, Secrets Manager tests the
2034
+ # rotation configuration by running the [ `testSecret` step][1] of the
2035
+ # Lambda rotation function. The test creates an `AWSPENDING` version of
2036
+ # the secret and then removes it.
2037
+ #
2038
+ # If you don't specify this value, then by default, Secrets Manager
2039
+ # rotates the secret immediately.
2040
+ #
2041
+ #
2042
+ #
2043
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html
2044
+ #
2313
2045
  # @return [Types::RotateSecretResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2314
2046
  #
2315
2047
  # * {Types::RotateSecretResponse#arn #arn} => String
@@ -2324,7 +2056,10 @@ module Aws::SecretsManager
2324
2056
  # rotation_lambda_arn: "RotationLambdaARNType",
2325
2057
  # rotation_rules: {
2326
2058
  # automatically_after_days: 1,
2059
+ # duration: "DurationType",
2060
+ # schedule_expression: "ScheduleExpressionType",
2327
2061
  # },
2062
+ # rotate_immediately: false,
2328
2063
  # })
2329
2064
  #
2330
2065
  # @example Response structure
@@ -2342,12 +2077,24 @@ module Aws::SecretsManager
2342
2077
  req.send_request(options)
2343
2078
  end
2344
2079
 
2345
- # Removes the secret from replication and promotes the secret to a
2346
- # regional secret in the replica Region.
2080
+ # Removes the link between the replica secret and the primary secret and
2081
+ # promotes the replica to a primary secret in the replica Region.
2082
+ #
2083
+ # You must call this operation from the Region in which you want to
2084
+ # promote the replica to a primary secret.
2085
+ #
2086
+ # <b>Required permissions: </b>
2087
+ # `secretsmanager:StopReplicationToReplica`. For more information, see [
2088
+ # IAM policy actions for Secrets Manager][1] and [Authentication and
2089
+ # access control in Secrets Manager][2].
2090
+ #
2091
+ #
2092
+ #
2093
+ # [1]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions
2094
+ # [2]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
2347
2095
  #
2348
2096
  # @option params [required, String] :secret_id
2349
- # Response to `StopReplicationToReplica` of a secret, based on the
2350
- # `SecretId`.
2097
+ # The ARN of the primary secret.
2351
2098
  #
2352
2099
  # @return [Types::StopReplicationToReplicaResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2353
2100
  #
@@ -2372,19 +2119,18 @@ module Aws::SecretsManager
2372
2119
  req.send_request(options)
2373
2120
  end
2374
2121
 
2375
- # Attaches one or more tags, each consisting of a key name and a value,
2376
- # to the specified secret. Tags are part of the secret's overall
2377
- # metadata, and are not associated with any specific version of the
2378
- # secret. This operation only appends tags to the existing list of tags.
2379
- # To remove tags, you must use UntagResource.
2122
+ # Attaches tags to a secret. Tags consist of a key name and a value.
2123
+ # Tags are part of the secret's metadata. They are not associated with
2124
+ # specific versions of the secret. This operation appends tags to the
2125
+ # existing list of tags.
2380
2126
  #
2381
- # The following basic restrictions apply to tags:
2127
+ # The following restrictions apply to tags:
2382
2128
  #
2383
- # * Maximum number of tags per secret50
2129
+ # * Maximum number of tags per secret: 50
2384
2130
  #
2385
- # * Maximum key length127 Unicode characters in UTF-8
2131
+ # * Maximum key length: 127 Unicode characters in UTF-8
2386
2132
  #
2387
- # * Maximum value length255 Unicode characters in UTF-8
2133
+ # * Maximum value length: 255 Unicode characters in UTF-8
2388
2134
  #
2389
2135
  # * Tag keys and values are case sensitive.
2390
2136
  #
@@ -2394,9 +2140,9 @@ module Aws::SecretsManager
2394
2140
  # with this prefix do not count against your tags per secret limit.
2395
2141
  #
2396
2142
  # * If you use your tagging schema across multiple services and
2397
- # resources, remember other services might have restrictions on
2398
- # allowed characters. Generally allowed characters: letters, spaces,
2399
- # and numbers representable in UTF-8, plus the following special
2143
+ # resources, other services might have restrictions on allowed
2144
+ # characters. Generally allowed characters: letters, spaces, and
2145
+ # numbers representable in UTF-8, plus the following special
2400
2146
  # characters: + - = . \_ : / @.
2401
2147
  #
2402
2148
  # If you use tags as part of your security strategy, then adding or
@@ -2404,34 +2150,26 @@ module Aws::SecretsManager
2404
2150
  # operation would result in you losing your permissions for this secret,
2405
2151
  # then the operation is blocked and returns an Access Denied error.
2406
2152
  #
2407
- # **Minimum permissions**
2408
- #
2409
- # To run this command, you must have the following permissions:
2153
+ # <b>Required permissions: </b> `secretsmanager:TagResource`. For more
2154
+ # information, see [ IAM policy actions for Secrets Manager][1] and
2155
+ # [Authentication and access control in Secrets Manager][2].
2410
2156
  #
2411
- # * secretsmanager:TagResource
2412
2157
  #
2413
- # ^
2414
2158
  #
2415
- # **Related operations**
2416
- #
2417
- # * To remove one or more tags from the collection attached to a secret,
2418
- # use UntagResource.
2419
- #
2420
- # * To view the list of tags attached to a secret, use DescribeSecret.
2159
+ # [1]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions
2160
+ # [2]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
2421
2161
  #
2422
2162
  # @option params [required, String] :secret_id
2423
- # The identifier for the secret that you want to attach tags to. You can
2424
- # specify either the Amazon Resource Name (ARN) or the friendly name of
2425
- # the secret.
2163
+ # The identifier for the secret to attach tags to. You can specify
2164
+ # either the Amazon Resource Name (ARN) or the friendly name of the
2165
+ # secret.
2426
2166
  #
2427
2167
  # For an ARN, we recommend that you specify a complete ARN rather than a
2428
2168
  # partial ARN.
2429
2169
  #
2430
2170
  # @option params [required, Array<Types::Tag>] :tags
2431
- # The tags to attach to the secret. Each element in the list consists of
2432
- # a `Key` and a `Value`.
2433
- #
2434
- # This parameter to the API requires a JSON text string argument.
2171
+ # The tags to attach to the secret as a JSON text string argument. Each
2172
+ # element in the list consists of a `Key` and a `Value`.
2435
2173
  #
2436
2174
  # For storing multiple values, we recommend that you use a JSON text
2437
2175
  # string argument and specify key/value pairs. For more information, see
@@ -2485,7 +2223,7 @@ module Aws::SecretsManager
2485
2223
  req.send_request(options)
2486
2224
  end
2487
2225
 
2488
- # Removes one or more tags from the specified secret.
2226
+ # Removes specific tags from a secret.
2489
2227
  #
2490
2228
  # This operation is idempotent. If a requested tag is not attached to
2491
2229
  # the secret, no error is returned and the secret metadata is unchanged.
@@ -2495,25 +2233,17 @@ module Aws::SecretsManager
2495
2233
  # would result in you losing your permissions for this secret, then the
2496
2234
  # operation is blocked and returns an Access Denied error.
2497
2235
  #
2498
- # **Minimum permissions**
2499
- #
2500
- # To run this command, you must have the following permissions:
2236
+ # <b>Required permissions: </b> `secretsmanager:UntagResource`. For more
2237
+ # information, see [ IAM policy actions for Secrets Manager][1] and
2238
+ # [Authentication and access control in Secrets Manager][2].
2501
2239
  #
2502
- # * secretsmanager:UntagResource
2503
2240
  #
2504
- # ^
2505
2241
  #
2506
- # **Related operations**
2507
- #
2508
- # * To add one or more tags to the collection attached to a secret, use
2509
- # TagResource.
2510
- #
2511
- # * To view the list of tags attached to a secret, use DescribeSecret.
2242
+ # [1]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions
2243
+ # [2]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
2512
2244
  #
2513
2245
  # @option params [required, String] :secret_id
2514
- # The identifier for the secret that you want to remove tags from. You
2515
- # can specify either the Amazon Resource Name (ARN) or the friendly name
2516
- # of the secret.
2246
+ # The ARN or name of the secret.
2517
2247
  #
2518
2248
  # For an ARN, we recommend that you specify a complete ARN rather than a
2519
2249
  # partial ARN.
@@ -2522,7 +2252,7 @@ module Aws::SecretsManager
2522
2252
  # A list of tag key names to remove from the secret. You don't specify
2523
2253
  # the value. Both the key and its associated value are removed.
2524
2254
  #
2525
- # This parameter to the API requires a JSON text string argument.
2255
+ # This parameter requires a JSON text string argument.
2526
2256
  #
2527
2257
  # For storing multiple values, we recommend that you use a JSON text
2528
2258
  # string argument and specify key/value pairs. For more information, see
@@ -2565,9 +2295,8 @@ module Aws::SecretsManager
2565
2295
  req.send_request(options)
2566
2296
  end
2567
2297
 
2568
- # Modifies many of the details of the specified secret.
2569
- #
2570
- # To change the secret value, you can also use PutSecretValue.
2298
+ # Modifies the details of a secret, including metadata and the secret
2299
+ # value. To change the secret value, you can also use PutSecretValue.
2571
2300
  #
2572
2301
  # To change the rotation configuration of a secret, use RotateSecret
2573
2302
  # instead.
@@ -2581,185 +2310,108 @@ module Aws::SecretsManager
2581
2310
  # you create more versions than Secrets Manager removes, and you will
2582
2311
  # reach the quota for secret versions.
2583
2312
  #
2584
- # <note markdown="1"> The Secrets Manager console uses only the `SecretString` parameter and
2585
- # therefore limits you to encrypting and storing only a text string. To
2586
- # encrypt and store binary data as part of the version of a secret, you
2587
- # must use either the Amazon Web Services CLI or one of the Amazon Web
2588
- # Services SDKs.
2313
+ # If you include `SecretString` or `SecretBinary` to create a new secret
2314
+ # version, Secrets Manager automatically attaches the staging label
2315
+ # `AWSCURRENT` to the new version.
2589
2316
  #
2590
- # </note>
2591
- #
2592
- # * If a version with a `VersionId` with the same value as the
2593
- # `ClientRequestToken` parameter already exists, the operation results
2594
- # in an error. You cannot modify an existing version, you can only
2595
- # create a new version.
2596
- #
2597
- # * If you include `SecretString` or `SecretBinary` to create a new
2598
- # secret version, Secrets Manager automatically attaches the staging
2599
- # label `AWSCURRENT` to the new version.
2600
- #
2601
- # <note markdown="1"> * If you call an operation to encrypt or decrypt the `SecretString` or
2602
- # `SecretBinary` for a secret in the same account as the calling user
2603
- # and that secret doesn't specify a Amazon Web Services KMS
2604
- # encryption key, Secrets Manager uses the account's default Amazon
2605
- # Web Services managed customer master key (CMK) with the alias
2606
- # `aws/secretsmanager`. If this key doesn't already exist in your
2607
- # account then Secrets Manager creates it for you automatically. All
2608
- # users and roles in the same Amazon Web Services account
2609
- # automatically have access to use the default CMK. Note that if an
2610
- # Secrets Manager API call results in Amazon Web Services creating the
2611
- # account's Amazon Web Services-managed CMK, it can result in a
2612
- # one-time significant delay in returning the result.
2613
- #
2614
- # * If the secret resides in a different Amazon Web Services account
2615
- # from the credentials calling an API that requires encryption or
2616
- # decryption of the secret value then you must create and use a custom
2617
- # Amazon Web Services KMS CMK because you can't access the default
2618
- # CMK for the account using credentials from a different Amazon Web
2619
- # Services account. Store the ARN of the CMK in the secret when you
2620
- # create the secret or when you update it by including it in the
2621
- # `KMSKeyId`. If you call an API that must encrypt or decrypt
2622
- # `SecretString` or `SecretBinary` using credentials from a different
2623
- # account then the Amazon Web Services KMS key policy must grant
2624
- # cross-account access to that other account's user or role for both
2625
- # the kms:GenerateDataKey and kms:Decrypt operations.
2626
- #
2627
- # </note>
2628
- #
2629
- # **Minimum permissions**
2630
- #
2631
- # To run this command, you must have the following permissions:
2632
- #
2633
- # * secretsmanager:UpdateSecret
2317
+ # If you call this operation with a `VersionId` that matches an existing
2318
+ # version's `ClientRequestToken`, the operation results in an error.
2319
+ # You can't modify an existing version, you can only create a new
2320
+ # version. To remove a version, remove all staging labels from it. See
2321
+ # UpdateSecretVersionStage.
2634
2322
  #
2635
- # * kms:GenerateDataKey - needed only if you use a custom Amazon Web
2636
- # Services KMS key to encrypt the secret. You do not need this
2637
- # permission to use the account's Amazon Web Services managed CMK for
2638
- # Secrets Manager.
2323
+ # If you don't specify an KMS encryption key, Secrets Manager uses the
2324
+ # Amazon Web Services managed key `aws/secretsmanager`. If this key
2325
+ # doesn't already exist in your account, then Secrets Manager creates
2326
+ # it for you automatically. All users and roles in the Amazon Web
2327
+ # Services account automatically have access to use
2328
+ # `aws/secretsmanager`. Creating `aws/secretsmanager` can result in a
2329
+ # one-time significant delay in returning the result.
2639
2330
  #
2640
- # * kms:Decrypt - needed only if you use a custom Amazon Web Services
2641
- # KMS key to encrypt the secret. You do not need this permission to
2642
- # use the account's Amazon Web Services managed CMK for Secrets
2643
- # Manager.
2331
+ # If the secret is in a different Amazon Web Services account from the
2332
+ # credentials calling the API, then you can't use `aws/secretsmanager`
2333
+ # to encrypt the secret, and you must create and use a customer managed
2334
+ # key.
2644
2335
  #
2645
- # **Related operations**
2336
+ # <b>Required permissions: </b> `secretsmanager:UpdateSecret`. For more
2337
+ # information, see [ IAM policy actions for Secrets Manager][1] and
2338
+ # [Authentication and access control in Secrets Manager][2]. If you use
2339
+ # a customer managed key, you must also have `kms:GenerateDataKey` and
2340
+ # `kms:Decrypt` permissions on the key. For more information, see [
2341
+ # Secret encryption and decryption][3].
2646
2342
  #
2647
- # * To create a new secret, use CreateSecret.
2648
2343
  #
2649
- # * To add only a new version to an existing secret, use PutSecretValue.
2650
2344
  #
2651
- # * To get the details for a secret, use DescribeSecret.
2652
- #
2653
- # * To list the versions contained in a secret, use
2654
- # ListSecretVersionIds.
2345
+ # [1]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions
2346
+ # [2]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
2347
+ # [3]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/security-encryption.html
2655
2348
  #
2656
2349
  # @option params [required, String] :secret_id
2657
- # Specifies the secret that you want to modify or to which you want to
2658
- # add a new version. You can specify either the Amazon Resource Name
2659
- # (ARN) or the friendly name of the secret.
2350
+ # The ARN or name of the secret.
2660
2351
  #
2661
2352
  # For an ARN, we recommend that you specify a complete ARN rather than a
2662
2353
  # partial ARN.
2663
2354
  #
2664
2355
  # @option params [String] :client_request_token
2665
- # (Optional) If you want to add a new version to the secret, this
2666
- # parameter specifies a unique identifier for the new version that helps
2667
- # ensure idempotency.
2668
- #
2669
- # If you use the Amazon Web Services CLI or one of the Amazon Web
2670
- # Services SDK to call this operation, then you can leave this parameter
2671
- # empty. The CLI or SDK generates a random UUID for you and includes
2672
- # that in the request. If you don't use the SDK and instead generate a
2673
- # raw HTTP request to the Secrets Manager service endpoint, then you
2674
- # must generate a `ClientRequestToken` yourself for new versions and
2675
- # include that value in the request.
2676
- #
2677
- # You typically only need to interact with this value if you implement
2678
- # your own retry logic and want to ensure that a given secret is not
2679
- # created twice. We recommend that you generate a [UUID-type][1] value
2680
- # to ensure uniqueness within the specified secret.
2356
+ # If you include `SecretString` or `SecretBinary`, then Secrets Manager
2357
+ # creates a new version for the secret, and this parameter specifies the
2358
+ # unique identifier for the new version.
2681
2359
  #
2682
- # Secrets Manager uses this value to prevent the accidental creation of
2683
- # duplicate versions if there are failures and retries during the Lambda
2684
- # rotation function's processing.
2685
- #
2686
- # * If the `ClientRequestToken` value isn't already associated with a
2687
- # version of the secret then a new version of the secret is created.
2688
- #
2689
- # * If a version with this value already exists and that version's
2690
- # `SecretString` and `SecretBinary` values are the same as those in
2691
- # the request then the request is ignored (the operation is
2692
- # idempotent).
2360
+ # <note markdown="1"> If you use the Amazon Web Services CLI or one of the Amazon Web
2361
+ # Services SDKs to call this operation, then you can leave this
2362
+ # parameter empty. The CLI or SDK generates a random UUID for you and
2363
+ # includes it as the value for this parameter in the request. If you
2364
+ # don't use the SDK and instead generate a raw HTTP request to the
2365
+ # Secrets Manager service endpoint, then you must generate a
2366
+ # `ClientRequestToken` yourself for the new version and include the
2367
+ # value in the request.
2693
2368
  #
2694
- # * If a version with this value already exists and that version's
2695
- # `SecretString` and `SecretBinary` values are different from the
2696
- # request then an error occurs because you cannot modify an existing
2697
- # secret value.
2369
+ # </note>
2698
2370
  #
2699
2371
  # This value becomes the `VersionId` of the new version.
2700
2372
  #
2701
2373
  # **A suitable default value is auto-generated.** You should normally
2702
2374
  # not need to pass this option.**
2703
2375
  #
2704
- #
2705
- #
2706
- # [1]: https://wikipedia.org/wiki/Universally_unique_identifier
2707
- #
2708
2376
  # @option params [String] :description
2709
- # (Optional) Specifies an updated user-provided description of the
2710
- # secret.
2377
+ # The description of the secret.
2711
2378
  #
2712
2379
  # @option params [String] :kms_key_id
2713
- # (Optional) Specifies an updated ARN or alias of the Amazon Web
2714
- # Services KMS customer master key (CMK) that Secrets Manager uses to
2715
- # encrypt the protected text in new versions of this secret as well as
2716
- # any existing versions of this secret that have the staging labels
2717
- # AWSCURRENT, AWSPENDING, or AWSPREVIOUS. For more information about
2718
- # staging labels, see [Staging Labels][1] in the *Amazon Web Services
2719
- # Secrets Manager User Guide*.
2380
+ # The ARN, key ID, or alias of the KMS key that Secrets Manager uses to
2381
+ # encrypt new secret versions as well as any existing versions the
2382
+ # staging labels `AWSCURRENT`, `AWSPENDING`, or `AWSPREVIOUS`. For more
2383
+ # information about versions and staging labels, see [Concepts:
2384
+ # Version][1].
2720
2385
  #
2721
- # You can only use the account's default CMK to encrypt and decrypt if
2722
- # you call this operation using credentials from the same account that
2723
- # owns the secret. If the secret is in a different account, then you
2724
- # must create a custom CMK and provide the ARN of that CMK in this
2725
- # field. The user making the call must have permissions to both the
2726
- # secret and the CMK in their respective accounts.
2386
+ # You can only use the Amazon Web Services managed key
2387
+ # `aws/secretsmanager` if you call this operation using credentials from
2388
+ # the same Amazon Web Services account that owns the secret. If the
2389
+ # secret is in a different account, then you must use a customer managed
2390
+ # key and provide the ARN of that KMS key in this field. The user making
2391
+ # the call must have permissions to both the secret and the KMS key in
2392
+ # their respective accounts.
2727
2393
  #
2728
2394
  #
2729
2395
  #
2730
- # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/terms-concepts.html#term_staging-label
2396
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/getting-started.html#term_version
2731
2397
  #
2732
2398
  # @option params [String, StringIO, File] :secret_binary
2733
- # (Optional) Specifies updated binary data that you want to encrypt and
2734
- # store in the new version of the secret. To use this parameter in the
2735
- # command-line tools, we recommend that you store your binary data in a
2736
- # file and then use the appropriate technique for your tool to pass the
2737
- # contents of the file as a parameter. Either `SecretBinary` or
2738
- # `SecretString` must have a value, but not both. They cannot both be
2739
- # empty.
2399
+ # The binary data to encrypt and store in the new version of the secret.
2400
+ # We recommend that you store your binary data in a file and then pass
2401
+ # the contents of the file as a parameter.
2740
2402
  #
2741
- # This parameter is not accessible using the Secrets Manager console.
2742
- #
2743
- # @option params [String] :secret_string
2744
- # (Optional) Specifies updated text data that you want to encrypt and
2745
- # store in this new version of the secret. Either `SecretBinary` or
2746
- # `SecretString` must have a value, but not both. They cannot both be
2747
- # empty.
2748
- #
2749
- # If you create this secret by using the Secrets Manager console then
2750
- # Secrets Manager puts the protected secret text in only the
2751
- # `SecretString` parameter. The Secrets Manager console stores the
2752
- # information as a JSON structure of key/value pairs that the default
2753
- # Lambda rotation function knows how to parse.
2754
- #
2755
- # For storing multiple values, we recommend that you use a JSON text
2756
- # string argument and specify key/value pairs. For more information, see
2757
- # [Specifying parameter values for the Amazon Web Services CLI][1] in
2758
- # the Amazon Web Services CLI User Guide.
2403
+ # Either `SecretBinary` or `SecretString` must have a value, but not
2404
+ # both.
2759
2405
  #
2406
+ # You can't access this parameter in the Secrets Manager console.
2760
2407
  #
2408
+ # @option params [String] :secret_string
2409
+ # The text data to encrypt and store in the new version of the secret.
2410
+ # We recommend you use a JSON structure of key/value pairs for your
2411
+ # secret value.
2761
2412
  #
2762
- # [1]: https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html
2413
+ # Either `SecretBinary` or `SecretString` must have a value, but not
2414
+ # both.
2763
2415
  #
2764
2416
  # @return [Types::UpdateSecretResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2765
2417
  #
@@ -2843,18 +2495,17 @@ module Aws::SecretsManager
2843
2495
  req.send_request(options)
2844
2496
  end
2845
2497
 
2846
- # Modifies the staging labels attached to a version of a secret. Staging
2847
- # labels are used to track a version as it progresses through the secret
2848
- # rotation process. You can attach a staging label to only one version
2849
- # of a secret at a time. If a staging label to be added is already
2850
- # attached to another version, then it is moved--removed from the other
2851
- # version first and then attached to this one. For more information
2852
- # about staging labels, see [Staging Labels][1] in the *Amazon Web
2853
- # Services Secrets Manager User Guide*.
2498
+ # Modifies the staging labels attached to a version of a secret. Secrets
2499
+ # Manager uses staging labels to track a version as it progresses
2500
+ # through the secret rotation process. Each staging label can be
2501
+ # attached to only one version at a time. To add a staging label to a
2502
+ # version when it is already attached to another version, Secrets
2503
+ # Manager first removes it from the other version first and then
2504
+ # attaches it to this one. For more information about versions and
2505
+ # staging labels, see [Concepts: Version][1].
2854
2506
  #
2855
2507
  # The staging labels that you specify in the `VersionStage` parameter
2856
- # are added to the existing list of staging labels--they don't replace
2857
- # it.
2508
+ # are added to the existing list of staging labels for the version.
2858
2509
  #
2859
2510
  # You can move the `AWSCURRENT` staging label to this version by
2860
2511
  # including it in this call.
@@ -2869,30 +2520,20 @@ module Aws::SecretsManager
2869
2520
  # then the version is considered to be 'deprecated' and can be deleted
2870
2521
  # by Secrets Manager.
2871
2522
  #
2872
- # **Minimum permissions**
2523
+ # <b>Required permissions: </b>
2524
+ # `secretsmanager:UpdateSecretVersionStage`. For more information, see [
2525
+ # IAM policy actions for Secrets Manager][2] and [Authentication and
2526
+ # access control in Secrets Manager][3].
2873
2527
  #
2874
- # To run this command, you must have the following permissions:
2875
2528
  #
2876
- # * secretsmanager:UpdateSecretVersionStage
2877
2529
  #
2878
- # ^
2879
- #
2880
- # **Related operations**
2881
- #
2882
- # * To get the list of staging labels that are currently associated with
2883
- # a version of a secret, use ` DescribeSecret ` and examine the
2884
- # `SecretVersionsToStages` response value.
2885
- #
2886
- # ^
2887
- #
2888
- #
2889
- #
2890
- # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/terms-concepts.html#term_staging-label
2530
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/getting-started.html#term_version
2531
+ # [2]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions
2532
+ # [3]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
2891
2533
  #
2892
2534
  # @option params [required, String] :secret_id
2893
- # Specifies the secret with the version with the list of staging labels
2894
- # you want to modify. You can specify either the Amazon Resource Name
2895
- # (ARN) or the friendly name of the secret.
2535
+ # The ARN or the name of the secret with the version and staging
2536
+ # labelsto modify.
2896
2537
  #
2897
2538
  # For an ARN, we recommend that you specify a complete ARN rather than a
2898
2539
  # partial ARN.
@@ -2901,18 +2542,16 @@ module Aws::SecretsManager
2901
2542
  # The staging label to add to this version.
2902
2543
  #
2903
2544
  # @option params [String] :remove_from_version_id
2904
- # Specifies the secret version ID of the version that the staging label
2905
- # is to be removed from. If the staging label you are trying to attach
2906
- # to one version is already attached to a different version, then you
2907
- # must include this parameter and specify the version that the label is
2908
- # to be removed from. If the label is attached and you either do not
2909
- # specify this parameter, or the version ID does not match, then the
2910
- # operation fails.
2545
+ # The ID of the version that the staging label is to be removed from. If
2546
+ # the staging label you are trying to attach to one version is already
2547
+ # attached to a different version, then you must include this parameter
2548
+ # and specify the version that the label is to be removed from. If the
2549
+ # label is attached and you either do not specify this parameter, or the
2550
+ # version ID does not match, then the operation fails.
2911
2551
  #
2912
2552
  # @option params [String] :move_to_version_id
2913
- # (Optional) The secret version ID that you want to add the staging
2914
- # label. If you want to remove a label from a version, then do not
2915
- # specify this parameter.
2553
+ # The ID of the version to add the staging label to. To remove a label
2554
+ # from a version, then do not specify this parameter.
2916
2555
  #
2917
2556
  # If the staging label is already attached to a different version of the
2918
2557
  # secret, then you must also specify the `RemoveFromVersionId`
@@ -3001,53 +2640,42 @@ module Aws::SecretsManager
3001
2640
  req.send_request(options)
3002
2641
  end
3003
2642
 
3004
- # Validates that the resource policy does not grant a wide range of IAM
3005
- # principals access to your secret. The JSON request string input and
3006
- # response output displays formatted code with white space and line
3007
- # breaks for better readability. Submit your input as a single line JSON
3008
- # string. A resource-based policy is optional for secrets.
2643
+ # Validates that a resource policy does not grant a wide range of
2644
+ # principals access to your secret. A resource-based policy is optional
2645
+ # for secrets.
3009
2646
  #
3010
- # The API performs three checks when validating the secret:
2647
+ # The API performs three checks when validating the policy:
3011
2648
  #
3012
2649
  # * Sends a call to [Zelkova][1], an automated reasoning engine, to
3013
- # ensure your Resource Policy does not allow broad access to your
3014
- # secret.
2650
+ # ensure your resource policy does not allow broad access to your
2651
+ # secret, for example policies that use a wildcard for the principal.
3015
2652
  #
3016
2653
  # * Checks for correct syntax in a policy.
3017
2654
  #
3018
2655
  # * Verifies the policy does not lock out a caller.
3019
2656
  #
3020
- # **Minimum Permissions**
3021
- #
3022
- # You must have the permissions required to access the following APIs:
3023
- #
3024
- # * `secretsmanager:PutResourcePolicy`
3025
- #
3026
- # * `secretsmanager:ValidateResourcePolicy`
2657
+ # <b>Required permissions: </b> `secretsmanager:ValidateResourcePolicy`.
2658
+ # For more information, see [ IAM policy actions for Secrets Manager][2]
2659
+ # and [Authentication and access control in Secrets Manager][3].
3027
2660
  #
3028
2661
  #
3029
2662
  #
3030
2663
  # [1]: https://aws.amazon.com/blogs/security/protect-sensitive-data-in-the-cloud-with-automated-reasoning-zelkova/
2664
+ # [2]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions
2665
+ # [3]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
3031
2666
  #
3032
2667
  # @option params [String] :secret_id
3033
- # (Optional) The identifier of the secret with the resource-based policy
3034
- # you want to validate. You can specify either the Amazon Resource Name
3035
- # (ARN) or the friendly name of the secret.
3036
- #
3037
- # For an ARN, we recommend that you specify a complete ARN rather than a
3038
- # partial ARN.
2668
+ # This field is reserved for internal use.
3039
2669
  #
3040
2670
  # @option params [required, String] :resource_policy
3041
- # A JSON-formatted string constructed according to the grammar and
3042
- # syntax for an Amazon Web Services resource-based policy. The policy in
3043
- # the string identifies who can access or manage this secret and its
3044
- # versions. For information on how to format a JSON parameter for the
3045
- # various command line tool environments, see [Using JSON for
3046
- # Parameters][1] in the *CLI User Guide*.publi
2671
+ # A JSON-formatted string that contains an Amazon Web Services
2672
+ # resource-based policy. The policy in the string identifies who can
2673
+ # access or manage this secret and its versions. For example policies,
2674
+ # see [Permissions policy examples][1].
3047
2675
  #
3048
2676
  #
3049
2677
  #
3050
- # [1]: http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json
2678
+ # [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html
3051
2679
  #
3052
2680
  # @return [Types::ValidateResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3053
2681
  #
@@ -3107,7 +2735,7 @@ module Aws::SecretsManager
3107
2735
  params: params,
3108
2736
  config: config)
3109
2737
  context[:gem_name] = 'aws-sdk-secretsmanager'
3110
- context[:gem_version] = '1.52.0'
2738
+ context[:gem_version] = '1.56.0'
3111
2739
  Seahorse::Client::Request.new(handlers, context)
3112
2740
  end
3113
2741