aws-sdk-secretsmanager 1.44.0 → 1.48.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.
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.48.0
@@ -3,7 +3,7 @@
3
3
  # WARNING ABOUT GENERATED CODE
4
4
  #
5
5
  # This file is generated. See the contributing guide for more information:
6
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
@@ -48,6 +48,6 @@ require_relative 'aws-sdk-secretsmanager/customizations'
48
48
  # @!group service
49
49
  module Aws::SecretsManager
50
50
 
51
- GEM_VERSION = '1.44.0'
51
+ GEM_VERSION = '1.48.0'
52
52
 
53
53
  end
@@ -3,7 +3,7 @@
3
3
  # WARNING ABOUT GENERATED CODE
4
4
  #
5
5
  # This file is generated. See the contributing guide for more information:
6
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
@@ -479,25 +479,27 @@ module Aws::SecretsManager
479
479
  #
480
480
  # <note markdown="1"> * If you call an operation to encrypt or decrypt the `SecretString` or
481
481
  # `SecretBinary` for a secret in the same account as the calling user
482
- # and that secret doesn't specify a AWS KMS encryption key, Secrets
483
- # Manager uses the account's default AWS managed customer master key
484
- # (CMK) with the alias `aws/secretsmanager`. If this key doesn't
485
- # already exist in your account then Secrets Manager creates it for
486
- # you automatically. All users and roles in the same AWS account
482
+ # and that secret doesn't specify a Amazon Web Services KMS
483
+ # encryption key, Secrets Manager uses the account's default Amazon
484
+ # Web Services managed customer master key (CMK) with the alias
485
+ # `aws/secretsmanager`. If this key doesn't already exist in your
486
+ # account then Secrets Manager creates it for you automatically. All
487
+ # users and roles in the same Amazon Web Services account
487
488
  # automatically have access to use the default CMK. Note that if an
488
- # Secrets Manager API call results in AWS creating the account's
489
- # AWS-managed CMK, it can result in a one-time significant delay in
490
- # returning the result.
491
- #
492
- # * If the secret resides in a different AWS account from the
493
- # credentials calling an API that requires encryption or decryption of
494
- # the secret value then you must create and use a custom AWS KMS CMK
495
- # because you can't access the default CMK for the account using
496
- # credentials from a different AWS account. Store the ARN of the CMK
497
- # in the secret when you create the secret or when you update it by
498
- # including it in the `KMSKeyId`. If you call an API that must encrypt
499
- # or decrypt `SecretString` or `SecretBinary` using credentials from a
500
- # different account then the AWS KMS key policy must grant
489
+ # Secrets Manager API call results in Amazon Web Services creating the
490
+ # account's Amazon Web Services-managed CMK, it can result in a
491
+ # one-time significant delay in returning the result.
492
+ #
493
+ # * If the secret resides in a different Amazon Web Services account
494
+ # from the credentials calling an API that requires encryption or
495
+ # decryption of the secret value then you must create and use a custom
496
+ # Amazon Web Services KMS CMK because you can't access the default
497
+ # CMK for the account using credentials from a different Amazon Web
498
+ # Services account. Store the ARN of the CMK in the secret when you
499
+ # create the secret or when you update it by including it in the
500
+ # `KMSKeyId`. If you call an API that must encrypt or decrypt
501
+ # `SecretString` or `SecretBinary` using credentials from a different
502
+ # account then the Amazon Web Services KMS key policy must grant
501
503
  # cross-account access to that other account's user or role for both
502
504
  # the kms:GenerateDataKey and kms:Decrypt operations.
503
505
  #
@@ -511,13 +513,15 @@ module Aws::SecretsManager
511
513
  #
512
514
  # * secretsmanager:CreateSecret
513
515
  #
514
- # * kms:GenerateDataKey - needed only if you use a customer-managed AWS
515
- # KMS key to encrypt the secret. You do not need this permission to
516
- # use the account default AWS managed CMK for Secrets Manager.
516
+ # * kms:GenerateDataKey - needed only if you use a customer-managed
517
+ # Amazon Web Services KMS key to encrypt the secret. You do not need
518
+ # this permission to use the account default Amazon Web Services
519
+ # managed CMK for Secrets Manager.
517
520
  #
518
- # * kms:Decrypt - needed only if you use a customer-managed AWS KMS key
519
- # to encrypt the secret. You do not need this permission to use the
520
- # account default AWS managed CMK for Secrets Manager.
521
+ # * kms:Decrypt - needed only if you use a customer-managed Amazon Web
522
+ # Services KMS key to encrypt the secret. You do not need this
523
+ # permission to use the account default Amazon Web Services managed
524
+ # CMK for Secrets Manager.
521
525
  #
522
526
  # * secretsmanager:TagResource - needed only if you include the `Tags`
523
527
  # parameter.
@@ -559,13 +563,13 @@ module Aws::SecretsManager
559
563
  # initial version is created as part of the secret, and this parameter
560
564
  # specifies a unique identifier for the new version.
561
565
  #
562
- # <note markdown="1"> If you use the AWS CLI or one of the AWS SDK to call this operation,
563
- # then you can leave this parameter empty. The CLI or SDK generates a
564
- # random UUID for you and includes it as the value for this parameter in
565
- # the request. If you don't use the SDK and instead generate a raw HTTP
566
- # request to the Secrets Manager service endpoint, then you must
567
- # generate a `ClientRequestToken` yourself for the new version and
568
- # include the value in the request.
566
+ # <note markdown="1"> If you use the Amazon Web Services CLI or one of the Amazon Web
567
+ # Services SDK to call this operation, then you can leave this parameter
568
+ # empty. The CLI or SDK generates a random UUID for you and includes it
569
+ # as the value for this parameter in the request. If you don't use the
570
+ # SDK and instead generate a raw HTTP request to the Secrets Manager
571
+ # service endpoint, then you must generate a `ClientRequestToken`
572
+ # yourself for the new version and include the value in the request.
569
573
  #
570
574
  # </note>
571
575
  #
@@ -584,7 +588,7 @@ module Aws::SecretsManager
584
588
  #
585
589
  # * If a version with this value already exists and that version's
586
590
  # `SecretString` and `SecretBinary` values are different from those in
587
- # the request then the request fails because you cannot modify an
591
+ # the request, then the request fails because you cannot modify an
588
592
  # existing version. Instead, use PutSecretValue to create a new
589
593
  # version.
590
594
  #
@@ -601,20 +605,21 @@ module Aws::SecretsManager
601
605
  # (Optional) Specifies a user-provided description of the secret.
602
606
  #
603
607
  # @option params [String] :kms_key_id
604
- # (Optional) Specifies the ARN, Key ID, or alias of the AWS KMS customer
605
- # master key (CMK) to be used to encrypt the `SecretString` or
606
- # `SecretBinary` values in the versions stored in this secret.
608
+ # (Optional) Specifies the ARN, Key ID, or alias of the Amazon Web
609
+ # Services KMS customer master key (CMK) to be used to encrypt the
610
+ # `SecretString` or `SecretBinary` values in the versions stored in this
611
+ # secret.
607
612
  #
608
- # You can specify any of the supported ways to identify a AWS KMS key
609
- # ID. If you need to reference a CMK in a different account, you can use
610
- # only the key ARN or the alias ARN.
613
+ # You can specify any of the supported ways to identify a Amazon Web
614
+ # Services KMS key ID. If you need to reference a CMK in a different
615
+ # account, you can use only the key ARN or the alias ARN.
611
616
  #
612
617
  # If you don't specify this value, then Secrets Manager defaults to
613
- # using the AWS account's default CMK (the one named
614
- # `aws/secretsmanager`). If a AWS KMS CMK with that name doesn't yet
615
- # exist, then Secrets Manager creates it for you automatically the first
616
- # time it needs to encrypt a version's `SecretString` or `SecretBinary`
617
- # fields.
618
+ # using the Amazon Web Services account's default CMK (the one named
619
+ # `aws/secretsmanager`). If a Amazon Web Services KMS CMK with that name
620
+ # doesn't yet exist, then Secrets Manager creates it for you
621
+ # automatically the first time it needs to encrypt a version's
622
+ # `SecretString` or `SecretBinary` fields.
618
623
  #
619
624
  # You can use the account default CMK to encrypt and decrypt only if you
620
625
  # call this operation using credentials from the same account that owns
@@ -632,7 +637,8 @@ module Aws::SecretsManager
632
637
  # both. They cannot both be empty.
633
638
  #
634
639
  # This parameter is not available using the Secrets Manager console. It
635
- # can be accessed only by using the AWS CLI or one of the AWS SDKs.
640
+ # can be accessed only by using the Amazon Web Services CLI or one of
641
+ # the Amazon Web Services SDKs.
636
642
  #
637
643
  # @option params [String] :secret_string
638
644
  # (Optional) Specifies text data that you want to encrypt and store in
@@ -650,7 +656,7 @@ module Aws::SecretsManager
650
656
  # For storing multiple values, we recommend that you use a JSON text
651
657
  # string argument and specify key/value pairs. For information on how to
652
658
  # format a JSON parameter for the various command line tool
653
- # environments, see [Using JSON for Parameters][1] in the *AWS CLI User
659
+ # environments, see [Using JSON for Parameters][1] in the *CLI User
654
660
  # Guide*. For example:
655
661
  #
656
662
  # `\{"username":"bob","password":"abc123xyz456"\}`
@@ -680,7 +686,7 @@ module Aws::SecretsManager
680
686
  #
681
687
  # This parameter requires a JSON text string argument. For information
682
688
  # on how to format a JSON parameter for the various command line tool
683
- # environments, see [Using JSON for Parameters][1] in the *AWS CLI User
689
+ # environments, see [Using JSON for Parameters][1] in the *CLI User
684
690
  # Guide*. For example:
685
691
  #
686
692
  # `[\{"Key":"CostCenter","Value":"12345"\},\{"Key":"environment","Value":"production"\}]`
@@ -699,10 +705,10 @@ module Aws::SecretsManager
699
705
  #
700
706
  # * Tag keys and values are case sensitive.
701
707
  #
702
- # * Do not use the `aws:` prefix in your tag names or values because AWS
703
- # reserves it for AWS use. You can't edit or delete tag names or
704
- # values with this prefix. Tags with this prefix do not count against
705
- # your tags per secret limit.
708
+ # * Do not use the `aws:` prefix in your tag names or values because
709
+ # Amazon Web Services reserves it for Amazon Web Services use. You
710
+ # can't edit or delete tag names or values with this prefix. Tags
711
+ # with this prefix do not count against your tags per secret limit.
706
712
  #
707
713
  # * If you use your tagging schema across multiple services and
708
714
  # resources, remember other services might have restrictions on
@@ -714,11 +720,21 @@ module Aws::SecretsManager
714
720
  #
715
721
  # [1]: https://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json
716
722
  #
723
+ # @option params [Array<Types::ReplicaRegionType>] :add_replica_regions
724
+ # (Optional) Add a list of regions to replicate secrets. Secrets Manager
725
+ # replicates the KMSKeyID objects to the list of regions specified in
726
+ # the parameter.
727
+ #
728
+ # @option params [Boolean] :force_overwrite_replica_secret
729
+ # (Optional) If set, the replication overwrites a secret with the same
730
+ # name in the destination region.
731
+ #
717
732
  # @return [Types::CreateSecretResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
718
733
  #
719
734
  # * {Types::CreateSecretResponse#arn #arn} => String
720
735
  # * {Types::CreateSecretResponse#name #name} => String
721
736
  # * {Types::CreateSecretResponse#version_id #version_id} => String
737
+ # * {Types::CreateSecretResponse#replication_status #replication_status} => Array&lt;Types::ReplicationStatusType&gt;
722
738
  #
723
739
  #
724
740
  # @example Example: To create a basic secret
@@ -755,6 +771,13 @@ module Aws::SecretsManager
755
771
  # value: "TagValueType",
756
772
  # },
757
773
  # ],
774
+ # add_replica_regions: [
775
+ # {
776
+ # region: "RegionType",
777
+ # kms_key_id: "KmsKeyIdType",
778
+ # },
779
+ # ],
780
+ # force_overwrite_replica_secret: false,
758
781
  # })
759
782
  #
760
783
  # @example Response structure
@@ -762,6 +785,12 @@ module Aws::SecretsManager
762
785
  # resp.arn #=> String
763
786
  # resp.name #=> String
764
787
  # resp.version_id #=> String
788
+ # resp.replication_status #=> Array
789
+ # resp.replication_status[0].region #=> String
790
+ # resp.replication_status[0].kms_key_id #=> String
791
+ # resp.replication_status[0].status #=> String, one of "InSync", "Failed", "InProgress"
792
+ # resp.replication_status[0].status_message #=> String
793
+ # resp.replication_status[0].last_accessed_date #=> Time
765
794
  #
766
795
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CreateSecret AWS API Documentation
767
796
  #
@@ -786,8 +815,8 @@ module Aws::SecretsManager
786
815
  #
787
816
  # * To attach a resource policy to a secret, use PutResourcePolicy.
788
817
  #
789
- # * To retrieve the current resource-based policy that's attached to a
790
- # secret, use GetResourcePolicy.
818
+ # * To retrieve the current resource-based policy attached to a secret,
819
+ # use GetResourcePolicy.
791
820
  #
792
821
  # * To list all of the currently available secrets, use ListSecrets.
793
822
  #
@@ -857,7 +886,7 @@ module Aws::SecretsManager
857
886
  req.send_request(options)
858
887
  end
859
888
 
860
- # Deletes an entire secret and all of its versions. You can optionally
889
+ # Deletes an entire secret and all of the versions. You can optionally
861
890
  # include a recovery window during which you can restore the secret. If
862
891
  # you don't specify a recovery window value, the operation defaults to
863
892
  # 30 days. Secrets Manager attaches a `DeletionDate` stamp to the secret
@@ -867,17 +896,17 @@ module Aws::SecretsManager
867
896
  # At any time before recovery window ends, you can use RestoreSecret to
868
897
  # remove the `DeletionDate` and cancel the deletion of the secret.
869
898
  #
870
- # You cannot access the encrypted secret information in any secret that
871
- # is scheduled for deletion. If you need to access that information, you
899
+ # You cannot access the encrypted secret information in any secret
900
+ # scheduled for deletion. If you need to access that information, you
872
901
  # must cancel the deletion with RestoreSecret and then retrieve the
873
902
  # information.
874
903
  #
875
904
  # <note markdown="1"> * There is no explicit operation to delete a version of a secret.
876
905
  # Instead, remove all staging labels from the `VersionStage` field of
877
906
  # a version. That marks the version as deprecated and allows Secrets
878
- # Manager to delete it as needed. Versions that do not have any
879
- # staging labels do not show up in ListSecretVersionIds unless you
880
- # specify `IncludeDeprecated`.
907
+ # Manager to delete it as needed. Versions without any staging labels
908
+ # do not show up in ListSecretVersionIds unless you specify
909
+ # `IncludeDeprecated`.
881
910
  #
882
911
  # * The permanent secret deletion at the end of the waiting period is
883
912
  # performed as a background task with low priority. There is no
@@ -902,8 +931,8 @@ module Aws::SecretsManager
902
931
  # window has expired, use RestoreSecret.
903
932
  #
904
933
  # @option params [required, String] :secret_id
905
- # Specifies the secret that you want to delete. You can specify either
906
- # the Amazon Resource Name (ARN) or the friendly name of the secret.
934
+ # Specifies the secret to delete. You can specify either the Amazon
935
+ # Resource Name (ARN) or the friendly name of the secret.
907
936
  #
908
937
  # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
909
938
  # complete ARN. You can specify a partial ARN too—for example, if you
@@ -928,10 +957,11 @@ module Aws::SecretsManager
928
957
  #
929
958
  # @option params [Integer] :recovery_window_in_days
930
959
  # (Optional) Specifies the number of days that Secrets Manager waits
931
- # before it can delete the secret. You can't use both this parameter
932
- # and the `ForceDeleteWithoutRecovery` parameter in the same API call.
960
+ # before Secrets Manager can delete the secret. You can't use both this
961
+ # parameter and the `ForceDeleteWithoutRecovery` parameter in the same
962
+ # API call.
933
963
  #
934
- # This value can range from 7 to 30 days. The default value is 30.
964
+ # This value can range from 7 to 30 days with a default value of 30.
935
965
  #
936
966
  # @option params [Boolean] :force_delete_without_recovery
937
967
  # (Optional) Specifies that the secret is to be deleted without any
@@ -946,10 +976,14 @@ module Aws::SecretsManager
946
976
  #
947
977
  # Use this parameter with caution. This parameter causes the operation
948
978
  # to skip the normal waiting period before the permanent deletion that
949
- # AWS would normally impose with the `RecoveryWindowInDays` parameter.
950
- # If you delete a secret with the `ForceDeleteWithouRecovery` parameter,
951
- # then you have no opportunity to recover the secret. It is permanently
952
- # lost.
979
+ # Amazon Web Services would normally impose with the
980
+ # `RecoveryWindowInDays` parameter. If you delete a secret with the
981
+ # `ForceDeleteWithouRecovery` parameter, then you have no opportunity to
982
+ # recover the secret. You lose the secret permanently.
983
+ #
984
+ # If you use this parameter and include a previously deleted or
985
+ # nonexistent secret, the operation does not return the error
986
+ # `ResourceNotFoundException` in order to correctly handle retries.
953
987
  #
954
988
  # @return [Types::DeleteSecretResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
955
989
  #
@@ -1020,7 +1054,8 @@ module Aws::SecretsManager
1020
1054
  # * To retrieve the encrypted secret information in a version of the
1021
1055
  # secret, use GetSecretValue.
1022
1056
  #
1023
- # * To list all of the secrets in the AWS account, use ListSecrets.
1057
+ # * To list all of the secrets in the Amazon Web Services account, use
1058
+ # ListSecrets.
1024
1059
  #
1025
1060
  # @option params [required, String] :secret_id
1026
1061
  # The identifier of the secret whose details you want to retrieve. You
@@ -1065,6 +1100,8 @@ module Aws::SecretsManager
1065
1100
  # * {Types::DescribeSecretResponse#version_ids_to_stages #version_ids_to_stages} => Hash&lt;String,Array&lt;String&gt;&gt;
1066
1101
  # * {Types::DescribeSecretResponse#owning_service #owning_service} => String
1067
1102
  # * {Types::DescribeSecretResponse#created_date #created_date} => Time
1103
+ # * {Types::DescribeSecretResponse#primary_region #primary_region} => String
1104
+ # * {Types::DescribeSecretResponse#replication_status #replication_status} => Array&lt;Types::ReplicationStatusType&gt;
1068
1105
  #
1069
1106
  #
1070
1107
  # @example Example: To retrieve the details of a secret
@@ -1136,6 +1173,13 @@ module Aws::SecretsManager
1136
1173
  # resp.version_ids_to_stages["SecretVersionIdType"][0] #=> String
1137
1174
  # resp.owning_service #=> String
1138
1175
  # resp.created_date #=> Time
1176
+ # resp.primary_region #=> String
1177
+ # resp.replication_status #=> Array
1178
+ # resp.replication_status[0].region #=> String
1179
+ # resp.replication_status[0].kms_key_id #=> String
1180
+ # resp.replication_status[0].status #=> String, one of "InSync", "Failed", "InProgress"
1181
+ # resp.replication_status[0].status_message #=> String
1182
+ # resp.replication_status[0].last_accessed_date #=> Time
1139
1183
  #
1140
1184
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DescribeSecret AWS API Documentation
1141
1185
  #
@@ -1355,9 +1399,10 @@ module Aws::SecretsManager
1355
1399
  #
1356
1400
  # * secretsmanager:GetSecretValue
1357
1401
  #
1358
- # * kms:Decrypt - required only if you use a customer-managed AWS KMS
1359
- # key to encrypt the secret. You do not need this permission to use
1360
- # the account's default AWS managed CMK for Secrets Manager.
1402
+ # * kms:Decrypt - required only if you use a customer-managed Amazon Web
1403
+ # Services KMS key to encrypt the secret. You do not need this
1404
+ # permission to use the account's default Amazon Web Services managed
1405
+ # CMK for Secrets Manager.
1361
1406
  #
1362
1407
  # **Related operations**
1363
1408
  #
@@ -1395,10 +1440,11 @@ module Aws::SecretsManager
1395
1440
  #
1396
1441
  # @option params [String] :version_id
1397
1442
  # Specifies the unique identifier of the version of the secret that you
1398
- # want to retrieve. If you specify this parameter then don't specify
1399
- # `VersionStage`. If you don't specify either a `VersionStage` or
1400
- # `VersionId` then the default is to perform the operation on the
1401
- # version with the `VersionStage` value of `AWSCURRENT`.
1443
+ # want to retrieve. If you specify both this parameter and
1444
+ # `VersionStage`, the two parameters must refer to the same secret
1445
+ # version. If you don't specify either a `VersionStage` or `VersionId`
1446
+ # then the default is to perform the operation on the version with the
1447
+ # `VersionStage` value of `AWSCURRENT`.
1402
1448
  #
1403
1449
  # This value is typically a [UUID-type][1] value with 32 hexadecimal
1404
1450
  # digits.
@@ -1412,10 +1458,11 @@ module Aws::SecretsManager
1412
1458
  # label attached to the version.
1413
1459
  #
1414
1460
  # Staging labels are used to keep track of different versions during the
1415
- # rotation process. If you use this parameter then don't specify
1416
- # `VersionId`. If you don't specify either a `VersionStage` or
1417
- # `VersionId`, then the default is to perform the operation on the
1418
- # version with the `VersionStage` value of `AWSCURRENT`.
1461
+ # rotation process. If you specify both this parameter and `VersionId`,
1462
+ # the two parameters must refer to the same secret version . If you
1463
+ # don't specify either a `VersionStage` or `VersionId`, then the
1464
+ # default is to perform the operation on the version with the
1465
+ # `VersionStage` value of `AWSCURRENT`.
1419
1466
  #
1420
1467
  # @return [Types::GetSecretValueResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1421
1468
  #
@@ -1621,6 +1668,8 @@ module Aws::SecretsManager
1621
1668
  # resp.versions[0].version_stages[0] #=> String
1622
1669
  # resp.versions[0].last_accessed_date #=> Time
1623
1670
  # resp.versions[0].created_date #=> Time
1671
+ # resp.versions[0].kms_key_ids #=> Array
1672
+ # resp.versions[0].kms_key_ids[0] #=> String
1624
1673
  # resp.next_token #=> String
1625
1674
  # resp.arn #=> String
1626
1675
  # resp.name #=> String
@@ -1634,11 +1683,11 @@ module Aws::SecretsManager
1634
1683
  req.send_request(options)
1635
1684
  end
1636
1685
 
1637
- # Lists all of the secrets that are stored by Secrets Manager in the AWS
1638
- # account. To list the versions currently stored for a specific secret,
1639
- # use ListSecretVersionIds. The encrypted fields `SecretString` and
1640
- # `SecretBinary` are not included in the output. To get that
1641
- # information, call the GetSecretValue operation.
1686
+ # Lists all of the secrets that are stored by Secrets Manager in the
1687
+ # Amazon Web Services account. To list the versions currently stored for
1688
+ # a specific secret, use ListSecretVersionIds. The encrypted fields
1689
+ # `SecretString` and `SecretBinary` are not included in the output. To
1690
+ # get that information, call the GetSecretValue operation.
1642
1691
  #
1643
1692
  # <note markdown="1"> Always check the `NextToken` response parameter when calling any of
1644
1693
  # the `List*` operations. These operations can occasionally return an
@@ -1738,7 +1787,7 @@ module Aws::SecretsManager
1738
1787
  # next_token: "NextTokenType",
1739
1788
  # filters: [
1740
1789
  # {
1741
- # key: "description", # accepts description, name, tag-key, tag-value, all
1790
+ # key: "description", # accepts description, name, tag-key, tag-value, primary-region, all
1742
1791
  # values: ["FilterValueStringType"],
1743
1792
  # },
1744
1793
  # ],
@@ -1767,6 +1816,7 @@ module Aws::SecretsManager
1767
1816
  # resp.secret_list[0].secret_versions_to_stages["SecretVersionIdType"][0] #=> String
1768
1817
  # resp.secret_list[0].owning_service #=> String
1769
1818
  # resp.secret_list[0].created_date #=> Time
1819
+ # resp.secret_list[0].primary_region #=> String
1770
1820
  # resp.next_token #=> String
1771
1821
  #
1772
1822
  # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecrets AWS API Documentation
@@ -1786,9 +1836,9 @@ module Aws::SecretsManager
1786
1836
  # identity-based and resource-based policies. The affected users and
1787
1837
  # roles receive the permissions that are permitted by all of the
1788
1838
  # relevant policies. For more information, see [Using Resource-Based
1789
- # Policies for AWS Secrets Manager][1]. For the complete description of
1790
- # the AWS policy syntax and grammar, see [IAM JSON Policy Reference][2]
1791
- # in the *IAM User Guide*.
1839
+ # Policies for Amazon Web Services Secrets Manager][1]. For the complete
1840
+ # description of the Amazon Web Services policy syntax and grammar, see
1841
+ # [IAM JSON Policy Reference][2] in the *IAM User Guide*.
1792
1842
  #
1793
1843
  # **Minimum permissions**
1794
1844
  #
@@ -1803,8 +1853,8 @@ module Aws::SecretsManager
1803
1853
  # * To retrieve the resource policy attached to a secret, use
1804
1854
  # GetResourcePolicy.
1805
1855
  #
1806
- # * To delete the resource-based policy that's attached to a secret,
1807
- # use DeleteResourcePolicy.
1856
+ # * To delete the resource-based policy attached to a secret, use
1857
+ # DeleteResourcePolicy.
1808
1858
  #
1809
1859
  # * To list all of the currently available secrets, use ListSecrets.
1810
1860
  #
@@ -1814,8 +1864,9 @@ module Aws::SecretsManager
1814
1864
  # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
1815
1865
  #
1816
1866
  # @option params [required, String] :secret_id
1817
- # Specifies the secret that you want to attach the resource-based policy
1818
- # to. You can specify either the ARN or the friendly name of the secret.
1867
+ # Specifies the secret that you want to attach the resource-based
1868
+ # policy. You can specify either the ARN or the friendly name of the
1869
+ # secret.
1819
1870
  #
1820
1871
  # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
1821
1872
  # complete ARN. You can specify a partial ARN too—for example, if you
@@ -1839,20 +1890,21 @@ module Aws::SecretsManager
1839
1890
  # </note>
1840
1891
  #
1841
1892
  # @option params [required, String] :resource_policy
1842
- # A JSON-formatted string that's constructed according to the grammar
1843
- # and syntax for an AWS resource-based policy. The policy in the string
1844
- # identifies who can access or manage this secret and its versions. For
1845
- # information on how to format a JSON parameter for the various command
1846
- # line tool environments, see [Using JSON for Parameters][1] in the *AWS
1847
- # CLI User Guide*.
1893
+ # A JSON-formatted string constructed according to the grammar and
1894
+ # syntax for an Amazon Web Services resource-based policy. The policy in
1895
+ # the string identifies who can access or manage this secret and its
1896
+ # versions. For information on how to format a JSON parameter for the
1897
+ # various command line tool environments, see [Using JSON for
1898
+ # Parameters][1] in the *CLI User Guide*.
1848
1899
  #
1849
1900
  #
1850
1901
  #
1851
1902
  # [1]: http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json
1852
1903
  #
1853
1904
  # @option params [Boolean] :block_public_policy
1854
- # Makes an optional API call to Zelkova to validate the Resource Policy
1855
- # to prevent broad access to your secret.
1905
+ # (Optional) If you set the parameter, `BlockPublicPolicy` to true, then
1906
+ # you block resource-based policies that allow broad access to the
1907
+ # secret.
1856
1908
  #
1857
1909
  # @return [Types::PutResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1858
1910
  #
@@ -1905,7 +1957,7 @@ module Aws::SecretsManager
1905
1957
  #
1906
1958
  # <note markdown="1"> The Secrets Manager console uses only the `SecretString` field. To add
1907
1959
  # binary data to a secret with the `SecretBinary` field you must use the
1908
- # AWS CLI or one of the AWS SDKs.
1960
+ # Amazon Web Services CLI or one of the Amazon Web Services SDKs.
1909
1961
  #
1910
1962
  # </note>
1911
1963
  #
@@ -1913,13 +1965,12 @@ module Aws::SecretsManager
1913
1965
  # Secrets Manager automatically attaches the staging label
1914
1966
  # `AWSCURRENT` to the new version.
1915
1967
  #
1916
- # * If another version of this secret already exists, then this
1917
- # operation does not automatically move any staging labels other than
1918
- # those that you explicitly specify in the `VersionStages` parameter.
1968
+ # * If you do not specify a value for VersionStages then Secrets Manager
1969
+ # automatically moves the staging label `AWSCURRENT` to this new
1970
+ # version.
1919
1971
  #
1920
1972
  # * If this operation moves the staging label `AWSCURRENT` from another
1921
- # version to this version (because you included it in the
1922
- # `StagingLabels` parameter) then Secrets Manager also automatically
1973
+ # version to this version, then Secrets Manager also automatically
1923
1974
  # moves the staging label `AWSPREVIOUS` to the version that
1924
1975
  # `AWSCURRENT` was removed from.
1925
1976
  #
@@ -1932,25 +1983,27 @@ module Aws::SecretsManager
1932
1983
  #
1933
1984
  # <note markdown="1"> * If you call an operation to encrypt or decrypt the `SecretString` or
1934
1985
  # `SecretBinary` for a secret in the same account as the calling user
1935
- # and that secret doesn't specify a AWS KMS encryption key, Secrets
1936
- # Manager uses the account's default AWS managed customer master key
1937
- # (CMK) with the alias `aws/secretsmanager`. If this key doesn't
1938
- # already exist in your account then Secrets Manager creates it for
1939
- # you automatically. All users and roles in the same AWS account
1986
+ # and that secret doesn't specify a Amazon Web Services KMS
1987
+ # encryption key, Secrets Manager uses the account's default Amazon
1988
+ # Web Services managed customer master key (CMK) with the alias
1989
+ # `aws/secretsmanager`. If this key doesn't already exist in your
1990
+ # account then Secrets Manager creates it for you automatically. All
1991
+ # users and roles in the same Amazon Web Services account
1940
1992
  # automatically have access to use the default CMK. Note that if an
1941
- # Secrets Manager API call results in AWS creating the account's
1942
- # AWS-managed CMK, it can result in a one-time significant delay in
1943
- # returning the result.
1944
- #
1945
- # * If the secret resides in a different AWS account from the
1946
- # credentials calling an API that requires encryption or decryption of
1947
- # the secret value then you must create and use a custom AWS KMS CMK
1948
- # because you can't access the default CMK for the account using
1949
- # credentials from a different AWS account. Store the ARN of the CMK
1950
- # in the secret when you create the secret or when you update it by
1951
- # including it in the `KMSKeyId`. If you call an API that must encrypt
1952
- # or decrypt `SecretString` or `SecretBinary` using credentials from a
1953
- # different account then the AWS KMS key policy must grant
1993
+ # Secrets Manager API call results in Amazon Web Services creating the
1994
+ # account's Amazon Web Services-managed CMK, it can result in a
1995
+ # one-time significant delay in returning the result.
1996
+ #
1997
+ # * If the secret resides in a different Amazon Web Services account
1998
+ # from the credentials calling an API that requires encryption or
1999
+ # decryption of the secret value then you must create and use a custom
2000
+ # Amazon Web Services KMS CMK because you can't access the default
2001
+ # CMK for the account using credentials from a different Amazon Web
2002
+ # Services account. Store the ARN of the CMK in the secret when you
2003
+ # create the secret or when you update it by including it in the
2004
+ # `KMSKeyId`. If you call an API that must encrypt or decrypt
2005
+ # `SecretString` or `SecretBinary` using credentials from a different
2006
+ # account then the Amazon Web Services KMS key policy must grant
1954
2007
  # cross-account access to that other account's user or role for both
1955
2008
  # the kms:GenerateDataKey and kms:Decrypt operations.
1956
2009
  #
@@ -1962,9 +2015,10 @@ module Aws::SecretsManager
1962
2015
  #
1963
2016
  # * secretsmanager:PutSecretValue
1964
2017
  #
1965
- # * kms:GenerateDataKey - needed only if you use a customer-managed AWS
1966
- # KMS key to encrypt the secret. You do not need this permission to
1967
- # use the account's default AWS managed CMK for Secrets Manager.
2018
+ # * kms:GenerateDataKey - needed only if you use a customer-managed
2019
+ # Amazon Web Services KMS key to encrypt the secret. You do not need
2020
+ # this permission to use the account's default Amazon Web Services
2021
+ # managed CMK for Secrets Manager.
1968
2022
  #
1969
2023
  # **Related operations**
1970
2024
  #
@@ -2007,13 +2061,13 @@ module Aws::SecretsManager
2007
2061
  # (Optional) Specifies a unique identifier for the new version of the
2008
2062
  # secret.
2009
2063
  #
2010
- # <note markdown="1"> If you use the AWS CLI or one of the AWS SDK to call this operation,
2011
- # then you can leave this parameter empty. The CLI or SDK generates a
2012
- # random UUID for you and includes that in the request. If you don't
2013
- # use the SDK and instead generate a raw HTTP request to the Secrets
2014
- # Manager service endpoint, then you must generate a
2015
- # `ClientRequestToken` yourself for new versions and include that value
2016
- # in the request.
2064
+ # <note markdown="1"> If you use the Amazon Web Services CLI or one of the Amazon Web
2065
+ # Services SDK to call this operation, then you can leave this parameter
2066
+ # empty. The CLI or SDK generates a random UUID for you and includes
2067
+ # that in the request. If you don't use the SDK and instead generate a
2068
+ # raw HTTP request to the Secrets Manager service endpoint, then you
2069
+ # must generate a `ClientRequestToken` yourself for new versions and
2070
+ # include that value in the request.
2017
2071
  #
2018
2072
  # </note>
2019
2073
  #
@@ -2072,7 +2126,7 @@ module Aws::SecretsManager
2072
2126
  # For storing multiple values, we recommend that you use a JSON text
2073
2127
  # string argument and specify key/value pairs. For information on how to
2074
2128
  # format a JSON parameter for the various command line tool
2075
- # environments, see [Using JSON for Parameters][1] in the *AWS CLI User
2129
+ # environments, see [Using JSON for Parameters][1] in the *CLI User
2076
2130
  # Guide*.
2077
2131
  #
2078
2132
  # For example:
@@ -2158,6 +2212,95 @@ module Aws::SecretsManager
2158
2212
  req.send_request(options)
2159
2213
  end
2160
2214
 
2215
+ # Remove regions from replication.
2216
+ #
2217
+ # @option params [required, String] :secret_id
2218
+ # Remove a secret by `SecretId` from replica Regions.
2219
+ #
2220
+ # @option params [required, Array<String>] :remove_replica_regions
2221
+ # Remove replication from specific Regions.
2222
+ #
2223
+ # @return [Types::RemoveRegionsFromReplicationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2224
+ #
2225
+ # * {Types::RemoveRegionsFromReplicationResponse#arn #arn} => String
2226
+ # * {Types::RemoveRegionsFromReplicationResponse#replication_status #replication_status} => Array&lt;Types::ReplicationStatusType&gt;
2227
+ #
2228
+ # @example Request syntax with placeholder values
2229
+ #
2230
+ # resp = client.remove_regions_from_replication({
2231
+ # secret_id: "SecretIdType", # required
2232
+ # remove_replica_regions: ["RegionType"], # required
2233
+ # })
2234
+ #
2235
+ # @example Response structure
2236
+ #
2237
+ # resp.arn #=> String
2238
+ # resp.replication_status #=> Array
2239
+ # resp.replication_status[0].region #=> String
2240
+ # resp.replication_status[0].kms_key_id #=> String
2241
+ # resp.replication_status[0].status #=> String, one of "InSync", "Failed", "InProgress"
2242
+ # resp.replication_status[0].status_message #=> String
2243
+ # resp.replication_status[0].last_accessed_date #=> Time
2244
+ #
2245
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RemoveRegionsFromReplication AWS API Documentation
2246
+ #
2247
+ # @overload remove_regions_from_replication(params = {})
2248
+ # @param [Hash] params ({})
2249
+ def remove_regions_from_replication(params = {}, options = {})
2250
+ req = build_request(:remove_regions_from_replication, params)
2251
+ req.send_request(options)
2252
+ end
2253
+
2254
+ # Converts an existing secret to a multi-Region secret and begins
2255
+ # replication the secret to a list of new regions.
2256
+ #
2257
+ # @option params [required, String] :secret_id
2258
+ # Use the `Secret Id` to replicate a secret to regions.
2259
+ #
2260
+ # @option params [required, Array<Types::ReplicaRegionType>] :add_replica_regions
2261
+ # Add Regions to replicate the secret.
2262
+ #
2263
+ # @option params [Boolean] :force_overwrite_replica_secret
2264
+ # (Optional) If set, Secrets Manager replication overwrites a secret
2265
+ # with the same name in the destination region.
2266
+ #
2267
+ # @return [Types::ReplicateSecretToRegionsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2268
+ #
2269
+ # * {Types::ReplicateSecretToRegionsResponse#arn #arn} => String
2270
+ # * {Types::ReplicateSecretToRegionsResponse#replication_status #replication_status} => Array&lt;Types::ReplicationStatusType&gt;
2271
+ #
2272
+ # @example Request syntax with placeholder values
2273
+ #
2274
+ # resp = client.replicate_secret_to_regions({
2275
+ # secret_id: "SecretIdType", # required
2276
+ # add_replica_regions: [ # required
2277
+ # {
2278
+ # region: "RegionType",
2279
+ # kms_key_id: "KmsKeyIdType",
2280
+ # },
2281
+ # ],
2282
+ # force_overwrite_replica_secret: false,
2283
+ # })
2284
+ #
2285
+ # @example Response structure
2286
+ #
2287
+ # resp.arn #=> String
2288
+ # resp.replication_status #=> Array
2289
+ # resp.replication_status[0].region #=> String
2290
+ # resp.replication_status[0].kms_key_id #=> String
2291
+ # resp.replication_status[0].status #=> String, one of "InSync", "Failed", "InProgress"
2292
+ # resp.replication_status[0].status_message #=> String
2293
+ # resp.replication_status[0].last_accessed_date #=> Time
2294
+ #
2295
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ReplicateSecretToRegions AWS API Documentation
2296
+ #
2297
+ # @overload replicate_secret_to_regions(params = {})
2298
+ # @param [Hash] params ({})
2299
+ def replicate_secret_to_regions(params = {}, options = {})
2300
+ req = build_request(:replicate_secret_to_regions, params)
2301
+ req.send_request(options)
2302
+ end
2303
+
2161
2304
  # Cancels the scheduled deletion of a secret by removing the
2162
2305
  # `DeletedDate` time stamp. This makes the secret accessible to query
2163
2306
  # once again.
@@ -2250,16 +2393,17 @@ module Aws::SecretsManager
2250
2393
  # secret. After the rotation completes, the protected service and its
2251
2394
  # clients all use the new version of the secret.
2252
2395
  #
2253
- # This required configuration information includes the ARN of an AWS
2254
- # Lambda function and the time between scheduled rotations. The Lambda
2255
- # rotation function creates a new version of the secret and creates or
2256
- # updates the credentials on the protected service to match. After
2257
- # testing the new credentials, the function marks the new secret with
2258
- # the staging label `AWSCURRENT` so that your clients all immediately
2259
- # begin to use the new version. For more information about rotating
2260
- # secrets and how to configure a Lambda function to rotate the secrets
2261
- # for your protected service, see [Rotating Secrets in AWS Secrets
2262
- # Manager][1] in the *AWS Secrets Manager User Guide*.
2396
+ # This required configuration information includes the ARN of an Amazon
2397
+ # Web Services Lambda function and optionally, the time between
2398
+ # scheduled rotations. The Lambda rotation function creates a new
2399
+ # version of the secret and creates or updates the credentials on the
2400
+ # protected service to match. After testing the new credentials, the
2401
+ # function marks the new secret with the staging label `AWSCURRENT` so
2402
+ # that your clients all immediately begin to use the new version. For
2403
+ # more information about rotating secrets and how to configure a Lambda
2404
+ # function to rotate the secrets for your protected service, see
2405
+ # [Rotating Secrets in Amazon Web Services Secrets Manager][1] in the
2406
+ # *Amazon Web Services Secrets Manager User Guide*.
2263
2407
  #
2264
2408
  # Secrets Manager schedules the next rotation when the previous one
2265
2409
  # completes. Secrets Manager schedules the date by adding the rotation
@@ -2336,13 +2480,13 @@ module Aws::SecretsManager
2336
2480
  # (Optional) Specifies a unique identifier for the new version of the
2337
2481
  # secret that helps ensure idempotency.
2338
2482
  #
2339
- # If you use the AWS CLI or one of the AWS SDK to call this operation,
2340
- # then you can leave this parameter empty. The CLI or SDK generates a
2341
- # random UUID for you and includes that in the request for this
2342
- # parameter. If you don't use the SDK and instead generate a raw HTTP
2343
- # request to the Secrets Manager service endpoint, then you must
2344
- # generate a `ClientRequestToken` yourself for new versions and include
2345
- # that value in the request.
2483
+ # If you use the Amazon Web Services CLI or one of the Amazon Web
2484
+ # Services SDK to call this operation, then you can leave this parameter
2485
+ # empty. The CLI or SDK generates a random UUID for you and includes
2486
+ # that in the request for this parameter. If you don't use the SDK and
2487
+ # instead generate a raw HTTP request to the Secrets Manager service
2488
+ # endpoint, then you must generate a `ClientRequestToken` yourself for
2489
+ # new versions and include that value in the request.
2346
2490
  #
2347
2491
  # You only need to specify your own value if you implement your own
2348
2492
  # retry logic and want to ensure that a given secret is not created
@@ -2400,6 +2544,36 @@ module Aws::SecretsManager
2400
2544
  req.send_request(options)
2401
2545
  end
2402
2546
 
2547
+ # Removes the secret from replication and promotes the secret to a
2548
+ # regional secret in the replica Region.
2549
+ #
2550
+ # @option params [required, String] :secret_id
2551
+ # Response to `StopReplicationToReplica` of a secret, based on the
2552
+ # `SecretId`.
2553
+ #
2554
+ # @return [Types::StopReplicationToReplicaResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2555
+ #
2556
+ # * {Types::StopReplicationToReplicaResponse#arn #arn} => String
2557
+ #
2558
+ # @example Request syntax with placeholder values
2559
+ #
2560
+ # resp = client.stop_replication_to_replica({
2561
+ # secret_id: "SecretIdType", # required
2562
+ # })
2563
+ #
2564
+ # @example Response structure
2565
+ #
2566
+ # resp.arn #=> String
2567
+ #
2568
+ # @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/StopReplicationToReplica AWS API Documentation
2569
+ #
2570
+ # @overload stop_replication_to_replica(params = {})
2571
+ # @param [Hash] params ({})
2572
+ def stop_replication_to_replica(params = {}, options = {})
2573
+ req = build_request(:stop_replication_to_replica, params)
2574
+ req.send_request(options)
2575
+ end
2576
+
2403
2577
  # Attaches one or more tags, each consisting of a key name and a value,
2404
2578
  # to the specified secret. Tags are part of the secret's overall
2405
2579
  # metadata, and are not associated with any specific version of the
@@ -2416,10 +2590,10 @@ module Aws::SecretsManager
2416
2590
  #
2417
2591
  # * Tag keys and values are case sensitive.
2418
2592
  #
2419
- # * Do not use the `aws:` prefix in your tag names or values because AWS
2420
- # reserves it for AWS use. You can't edit or delete tag names or
2421
- # values with this prefix. Tags with this prefix do not count against
2422
- # your tags per secret limit.
2593
+ # * Do not use the `aws:` prefix in your tag names or values because
2594
+ # Amazon Web Services reserves it for Amazon Web Services use. You
2595
+ # can't edit or delete tag names or values with this prefix. Tags
2596
+ # with this prefix do not count against your tags per secret limit.
2423
2597
  #
2424
2598
  # * If you use your tagging schema across multiple services and
2425
2599
  # resources, remember other services might have restrictions on
@@ -2479,9 +2653,9 @@ module Aws::SecretsManager
2479
2653
  #
2480
2654
  # This parameter to the API requires a JSON text string argument. For
2481
2655
  # information on how to format a JSON parameter for the various command
2482
- # line tool environments, see [Using JSON for Parameters][1] in the *AWS
2483
- # CLI User Guide*. For the AWS CLI, you can also use the syntax: `--Tags
2484
- # Key="Key1",Value="Value1",Key="Key2",Value="Value2"[,…]`
2656
+ # line tool environments, see [Using JSON for Parameters][1] in the *CLI
2657
+ # User Guide*. For the CLI, you can also use the syntax: `--Tags
2658
+ # Key="Key1",Value="Value1" Key="Key2",Value="Value2"[,…]`
2485
2659
  #
2486
2660
  #
2487
2661
  #
@@ -2587,8 +2761,8 @@ module Aws::SecretsManager
2587
2761
  #
2588
2762
  # This parameter to the API requires a JSON text string argument. For
2589
2763
  # information on how to format a JSON parameter for the various command
2590
- # line tool environments, see [Using JSON for Parameters][1] in the *AWS
2591
- # CLI User Guide*.
2764
+ # line tool environments, see [Using JSON for Parameters][1] in the *CLI
2765
+ # User Guide*.
2592
2766
  #
2593
2767
  #
2594
2768
  #
@@ -2636,7 +2810,8 @@ module Aws::SecretsManager
2636
2810
  # <note markdown="1"> The Secrets Manager console uses only the `SecretString` parameter and
2637
2811
  # therefore limits you to encrypting and storing only a text string. To
2638
2812
  # encrypt and store binary data as part of the version of a secret, you
2639
- # must use either the AWS CLI or one of the AWS SDKs.
2813
+ # must use either the Amazon Web Services CLI or one of the Amazon Web
2814
+ # Services SDKs.
2640
2815
  #
2641
2816
  # </note>
2642
2817
  #
@@ -2651,25 +2826,27 @@ module Aws::SecretsManager
2651
2826
  #
2652
2827
  # <note markdown="1"> * If you call an operation to encrypt or decrypt the `SecretString` or
2653
2828
  # `SecretBinary` for a secret in the same account as the calling user
2654
- # and that secret doesn't specify a AWS KMS encryption key, Secrets
2655
- # Manager uses the account's default AWS managed customer master key
2656
- # (CMK) with the alias `aws/secretsmanager`. If this key doesn't
2657
- # already exist in your account then Secrets Manager creates it for
2658
- # you automatically. All users and roles in the same AWS account
2829
+ # and that secret doesn't specify a Amazon Web Services KMS
2830
+ # encryption key, Secrets Manager uses the account's default Amazon
2831
+ # Web Services managed customer master key (CMK) with the alias
2832
+ # `aws/secretsmanager`. If this key doesn't already exist in your
2833
+ # account then Secrets Manager creates it for you automatically. All
2834
+ # users and roles in the same Amazon Web Services account
2659
2835
  # automatically have access to use the default CMK. Note that if an
2660
- # Secrets Manager API call results in AWS creating the account's
2661
- # AWS-managed CMK, it can result in a one-time significant delay in
2662
- # returning the result.
2663
- #
2664
- # * If the secret resides in a different AWS account from the
2665
- # credentials calling an API that requires encryption or decryption of
2666
- # the secret value then you must create and use a custom AWS KMS CMK
2667
- # because you can't access the default CMK for the account using
2668
- # credentials from a different AWS account. Store the ARN of the CMK
2669
- # in the secret when you create the secret or when you update it by
2670
- # including it in the `KMSKeyId`. If you call an API that must encrypt
2671
- # or decrypt `SecretString` or `SecretBinary` using credentials from a
2672
- # different account then the AWS KMS key policy must grant
2836
+ # Secrets Manager API call results in Amazon Web Services creating the
2837
+ # account's Amazon Web Services-managed CMK, it can result in a
2838
+ # one-time significant delay in returning the result.
2839
+ #
2840
+ # * If the secret resides in a different Amazon Web Services account
2841
+ # from the credentials calling an API that requires encryption or
2842
+ # decryption of the secret value then you must create and use a custom
2843
+ # Amazon Web Services KMS CMK because you can't access the default
2844
+ # CMK for the account using credentials from a different Amazon Web
2845
+ # Services account. Store the ARN of the CMK in the secret when you
2846
+ # create the secret or when you update it by including it in the
2847
+ # `KMSKeyId`. If you call an API that must encrypt or decrypt
2848
+ # `SecretString` or `SecretBinary` using credentials from a different
2849
+ # account then the Amazon Web Services KMS key policy must grant
2673
2850
  # cross-account access to that other account's user or role for both
2674
2851
  # the kms:GenerateDataKey and kms:Decrypt operations.
2675
2852
  #
@@ -2681,13 +2858,15 @@ module Aws::SecretsManager
2681
2858
  #
2682
2859
  # * secretsmanager:UpdateSecret
2683
2860
  #
2684
- # * kms:GenerateDataKey - needed only if you use a custom AWS KMS key to
2685
- # encrypt the secret. You do not need this permission to use the
2686
- # account's AWS managed CMK for Secrets Manager.
2861
+ # * kms:GenerateDataKey - needed only if you use a custom Amazon Web
2862
+ # Services KMS key to encrypt the secret. You do not need this
2863
+ # permission to use the account's Amazon Web Services managed CMK for
2864
+ # Secrets Manager.
2687
2865
  #
2688
- # * kms:Decrypt - needed only if you use a custom AWS KMS key to encrypt
2689
- # the secret. You do not need this permission to use the account's
2690
- # AWS managed CMK for Secrets Manager.
2866
+ # * kms:Decrypt - needed only if you use a custom Amazon Web Services
2867
+ # KMS key to encrypt the secret. You do not need this permission to
2868
+ # use the account's Amazon Web Services managed CMK for Secrets
2869
+ # Manager.
2691
2870
  #
2692
2871
  # **Related operations**
2693
2872
  #
@@ -2731,13 +2910,13 @@ module Aws::SecretsManager
2731
2910
  # parameter specifies a unique identifier for the new version that helps
2732
2911
  # ensure idempotency.
2733
2912
  #
2734
- # If you use the AWS CLI or one of the AWS SDK to call this operation,
2735
- # then you can leave this parameter empty. The CLI or SDK generates a
2736
- # random UUID for you and includes that in the request. If you don't
2737
- # use the SDK and instead generate a raw HTTP request to the Secrets
2738
- # Manager service endpoint, then you must generate a
2739
- # `ClientRequestToken` yourself for new versions and include that value
2740
- # in the request.
2913
+ # If you use the Amazon Web Services CLI or one of the Amazon Web
2914
+ # Services SDK to call this operation, then you can leave this parameter
2915
+ # empty. The CLI or SDK generates a random UUID for you and includes
2916
+ # that in the request. If you don't use the SDK and instead generate a
2917
+ # raw HTTP request to the Secrets Manager service endpoint, then you
2918
+ # must generate a `ClientRequestToken` yourself for new versions and
2919
+ # include that value in the request.
2741
2920
  #
2742
2921
  # You typically only need to interact with this value if you implement
2743
2922
  # your own retry logic and want to ensure that a given secret is not
@@ -2775,9 +2954,9 @@ module Aws::SecretsManager
2775
2954
  # secret.
2776
2955
  #
2777
2956
  # @option params [String] :kms_key_id
2778
- # (Optional) Specifies an updated ARN or alias of the AWS KMS customer
2779
- # master key (CMK) to be used to encrypt the protected text in new
2780
- # versions of this secret.
2957
+ # (Optional) Specifies an updated ARN or alias of the Amazon Web
2958
+ # Services KMS customer master key (CMK) to be used to encrypt the
2959
+ # protected text in new versions of this secret.
2781
2960
  #
2782
2961
  # You can only use the account's default CMK to encrypt and decrypt if
2783
2962
  # you call this operation using credentials from the same account that
@@ -2812,7 +2991,7 @@ module Aws::SecretsManager
2812
2991
  # For storing multiple values, we recommend that you use a JSON text
2813
2992
  # string argument and specify key/value pairs. For information on how to
2814
2993
  # format a JSON parameter for the various command line tool
2815
- # environments, see [Using JSON for Parameters][1] in the *AWS CLI User
2994
+ # environments, see [Using JSON for Parameters][1] in the *CLI User
2816
2995
  # Guide*. For example:
2817
2996
  #
2818
2997
  # `[\{"username":"bob"\},\{"password":"abc123xyz456"\}]`
@@ -2918,8 +3097,8 @@ module Aws::SecretsManager
2918
3097
  # of a secret at a time. If a staging label to be added is already
2919
3098
  # attached to another version, then it is moved--removed from the other
2920
3099
  # version first and then attached to this one. For more information
2921
- # about staging labels, see [Staging Labels][1] in the *AWS Secrets
2922
- # Manager User Guide*.
3100
+ # about staging labels, see [Staging Labels][1] in the *Amazon Web
3101
+ # Services Secrets Manager User Guide*.
2923
3102
  #
2924
3103
  # The staging labels that you specify in the `VersionStage` parameter
2925
3104
  # are added to the existing list of staging labels--they don't replace
@@ -3088,16 +3267,38 @@ module Aws::SecretsManager
3088
3267
  req.send_request(options)
3089
3268
  end
3090
3269
 
3091
- # Validates the JSON text of the resource-based policy document attached
3092
- # to the specified secret. The JSON request string input and response
3093
- # output displays formatted code with white space and line breaks for
3094
- # better readability. Submit your input as a single line JSON string. A
3095
- # resource-based policy is optional.
3270
+ # Validates that the resource policy does not grant a wide range of IAM
3271
+ # principals access to your secret. The JSON request string input and
3272
+ # response output displays formatted code with white space and line
3273
+ # breaks for better readability. Submit your input as a single line JSON
3274
+ # string. A resource-based policy is optional for secrets.
3275
+ #
3276
+ # The API performs three checks when validating the secret:
3277
+ #
3278
+ # * Sends a call to [Zelkova][1], an automated reasoning engine, to
3279
+ # ensure your Resource Policy does not allow broad access to your
3280
+ # secret.
3281
+ #
3282
+ # * Checks for correct syntax in a policy.
3283
+ #
3284
+ # * Verifies the policy does not lock out a caller.
3285
+ #
3286
+ # **Minimum Permissions**
3287
+ #
3288
+ # You must have the permissions required to access the following APIs:
3289
+ #
3290
+ # * `secretsmanager:PutResourcePolicy`
3291
+ #
3292
+ # * `secretsmanager:ValidateResourcePolicy`
3293
+ #
3294
+ #
3295
+ #
3296
+ # [1]: https://aws.amazon.com/blogs/security/protect-sensitive-data-in-the-cloud-with-automated-reasoning-zelkova/
3096
3297
  #
3097
3298
  # @option params [String] :secret_id
3098
- # The identifier for the secret that you want to validate a resource
3099
- # policy. You can specify either the Amazon Resource Name (ARN) or the
3100
- # friendly name of the secret.
3299
+ # (Optional) The identifier of the secret with the resource-based policy
3300
+ # you want to validate. You can specify either the Amazon Resource Name
3301
+ # (ARN) or the friendly name of the secret.
3101
3302
  #
3102
3303
  # <note markdown="1"> If you specify an ARN, we generally recommend that you specify a
3103
3304
  # complete ARN. You can specify a partial ARN too—for example, if you
@@ -3121,7 +3322,16 @@ module Aws::SecretsManager
3121
3322
  # </note>
3122
3323
  #
3123
3324
  # @option params [required, String] :resource_policy
3124
- # Identifies the Resource Policy attached to the secret.
3325
+ # A JSON-formatted string constructed according to the grammar and
3326
+ # syntax for an Amazon Web Services resource-based policy. The policy in
3327
+ # the string identifies who can access or manage this secret and its
3328
+ # versions. For information on how to format a JSON parameter for the
3329
+ # various command line tool environments, see [Using JSON for
3330
+ # Parameters][1] in the *CLI User Guide*.publi
3331
+ #
3332
+ #
3333
+ #
3334
+ # [1]: http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json
3125
3335
  #
3126
3336
  # @return [Types::ValidateResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3127
3337
  #
@@ -3181,7 +3391,7 @@ module Aws::SecretsManager
3181
3391
  params: params,
3182
3392
  config: config)
3183
3393
  context[:gem_name] = 'aws-sdk-secretsmanager'
3184
- context[:gem_version] = '1.44.0'
3394
+ context[:gem_version] = '1.48.0'
3185
3395
  Seahorse::Client::Request.new(handlers, context)
3186
3396
  end
3187
3397