aws-sdk-secretsmanager 1.146.0 → 1.147.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-secretsmanager/client.rb +460 -22
- data/lib/aws-sdk-secretsmanager/client_api.rb +112 -0
- data/lib/aws-sdk-secretsmanager/types.rb +379 -12
- data/lib/aws-sdk-secretsmanager.rb +2 -2
- data/sig/client.rbs +52 -3
- data/sig/types.rbs +70 -1
- metadata +1 -1
|
@@ -489,6 +489,132 @@ module Aws::SecretsManager
|
|
|
489
489
|
|
|
490
490
|
# @!group API Operations
|
|
491
491
|
|
|
492
|
+
# Links a primary secret in your account to a replica secret in a
|
|
493
|
+
# different Amazon Web Services account and starts replication to this
|
|
494
|
+
# replica. The replica secret must already exist in the other Amazon Web
|
|
495
|
+
# Services account. Create the replica with CreateSecret and set its
|
|
496
|
+
# `CrossAccountPrimaryARN` field set to this primary secret's ARN. When
|
|
497
|
+
# you call AssociateCrossAccountReplica, Secrets Manager calls
|
|
498
|
+
# AcceptCrossAccountReplication on the replica secret on your behalf.
|
|
499
|
+
#
|
|
500
|
+
# The primary and replica secrets must be in the same Amazon Web
|
|
501
|
+
# Services Region and partition, and you must call this operation from
|
|
502
|
+
# the account that owns the primary secret. A primary secret can have at
|
|
503
|
+
# most one cross-account replica. This operation is idempotent, so you
|
|
504
|
+
# can call it again for the same replica to repair replication. If the
|
|
505
|
+
# association fails, Secrets Manager does not modify either the primary
|
|
506
|
+
# or replica secret.
|
|
507
|
+
#
|
|
508
|
+
# Secrets Manager generates a CloudTrail log entry when you call this
|
|
509
|
+
# action. Do not include sensitive information in request parameters
|
|
510
|
+
# because it might be logged. For more information, see [Logging Secrets
|
|
511
|
+
# Manager events with CloudTrail][1].
|
|
512
|
+
#
|
|
513
|
+
# <b>Required permissions: </b>
|
|
514
|
+
# `secretsmanager:AssociateCrossAccountReplica`,
|
|
515
|
+
# `secretsmanager:GetSecretValue` on the primary secret, and
|
|
516
|
+
# `secretsmanager:AcceptCrossAccountReplication` on the replica secret.
|
|
517
|
+
# You must also have `kms:Decrypt` permission for the Key Management
|
|
518
|
+
# Service (KMS) key that encrypts the primary secret, and `kms:Encrypt`
|
|
519
|
+
# permission for the Amazon Web Services KMS key that encrypts the
|
|
520
|
+
# replica secret. If you supply `ReplicationRoleARN`, you also need
|
|
521
|
+
# `iam:PassRole` for that role. For more information, see [ IAM policy
|
|
522
|
+
# actions for Secrets Manager][2] and [Authentication and access control
|
|
523
|
+
# in Secrets Manager][3].
|
|
524
|
+
#
|
|
525
|
+
#
|
|
526
|
+
#
|
|
527
|
+
# [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html
|
|
528
|
+
# [2]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions
|
|
529
|
+
# [3]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
|
|
530
|
+
#
|
|
531
|
+
# @option params [required, String] :secret_id
|
|
532
|
+
# The ARN or name of the primary secret in your account to replicate.
|
|
533
|
+
#
|
|
534
|
+
# For an ARN, we recommend that you specify a complete ARN rather than a
|
|
535
|
+
# partial ARN. See [Finding a secret from a partial ARN][1].
|
|
536
|
+
#
|
|
537
|
+
#
|
|
538
|
+
#
|
|
539
|
+
# [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen
|
|
540
|
+
#
|
|
541
|
+
# @option params [required, String] :cross_account_replica_arn
|
|
542
|
+
# The ARN of the replica secret in the other Amazon Web Services
|
|
543
|
+
# account. The replica secret must be in the same Region and partition
|
|
544
|
+
# as the primary secret. Additionally, the replica account owner must
|
|
545
|
+
# have created the replica secret as a cross-account replica of the
|
|
546
|
+
# primary secret. For more information see CreateSecret.
|
|
547
|
+
#
|
|
548
|
+
# @option params [String] :replica_restriction
|
|
549
|
+
# Whether the replica account must belong to the same Amazon Web
|
|
550
|
+
# Services organization as the primary account:
|
|
551
|
+
#
|
|
552
|
+
# * `SameOrg`, which requires the replica account to be in the same
|
|
553
|
+
# organization as the primary account. This is the default.
|
|
554
|
+
#
|
|
555
|
+
# * `NoRestriction`, which allows the replica account to be in any
|
|
556
|
+
# organization.
|
|
557
|
+
#
|
|
558
|
+
# @option params [String] :replication_role_arn
|
|
559
|
+
# The ARN of an IAM role in the primary account that Secrets Manager
|
|
560
|
+
# assumes to perform replication. If you don't include this field,
|
|
561
|
+
# Secrets Manager replicates using the credentials of caller who updates
|
|
562
|
+
# the primary secret. For more information, see [ Cross-account
|
|
563
|
+
# replication permissions][1].
|
|
564
|
+
#
|
|
565
|
+
#
|
|
566
|
+
#
|
|
567
|
+
# [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/cross-account-replicate-permissions.html
|
|
568
|
+
#
|
|
569
|
+
# @return [Types::AssociateCrossAccountReplicaResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
570
|
+
#
|
|
571
|
+
# * {Types::AssociateCrossAccountReplicaResponse#arn #arn} => String
|
|
572
|
+
# * {Types::AssociateCrossAccountReplicaResponse#cross_account_replica_arn #cross_account_replica_arn} => String
|
|
573
|
+
# * {Types::AssociateCrossAccountReplicaResponse#replication_status #replication_status} => String
|
|
574
|
+
#
|
|
575
|
+
#
|
|
576
|
+
# @example Example: To replicate a secret to another account
|
|
577
|
+
#
|
|
578
|
+
# # The following example links a primary secret to a replica secret in another AWS account and starts replication. The
|
|
579
|
+
# # replica secret was previously created in the other account using CreateSecret with the CrossAccountPrimaryARN set to
|
|
580
|
+
# # this primary secret.
|
|
581
|
+
#
|
|
582
|
+
# resp = client.associate_cross_account_replica({
|
|
583
|
+
# cross_account_replica_arn: "arn:aws:secretsmanager:us-west-2:222222222222:secret:MyReplicaSecret-a1b2c3",
|
|
584
|
+
# secret_id: "MyTestDatabaseSecret",
|
|
585
|
+
# })
|
|
586
|
+
#
|
|
587
|
+
# resp.to_h outputs the following:
|
|
588
|
+
# {
|
|
589
|
+
# arn: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
590
|
+
# cross_account_replica_arn: "arn:aws:secretsmanager:us-west-2:222222222222:secret:MyReplicaSecret-a1b2c3",
|
|
591
|
+
# replication_status: "InProgress",
|
|
592
|
+
# }
|
|
593
|
+
#
|
|
594
|
+
# @example Request syntax with placeholder values
|
|
595
|
+
#
|
|
596
|
+
# resp = client.associate_cross_account_replica({
|
|
597
|
+
# secret_id: "SecretIdType", # required
|
|
598
|
+
# cross_account_replica_arn: "SecretARNType", # required
|
|
599
|
+
# replica_restriction: "SameOrg", # accepts SameOrg, NoRestriction
|
|
600
|
+
# replication_role_arn: "RoleARNType",
|
|
601
|
+
# })
|
|
602
|
+
#
|
|
603
|
+
# @example Response structure
|
|
604
|
+
#
|
|
605
|
+
# resp.arn #=> String
|
|
606
|
+
# resp.cross_account_replica_arn #=> String
|
|
607
|
+
# resp.replication_status #=> String, one of "InSync", "Failed", "InProgress", "Pending", "Detached"
|
|
608
|
+
#
|
|
609
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/AssociateCrossAccountReplica AWS API Documentation
|
|
610
|
+
#
|
|
611
|
+
# @overload associate_cross_account_replica(params = {})
|
|
612
|
+
# @param [Hash] params ({})
|
|
613
|
+
def associate_cross_account_replica(params = {}, options = {})
|
|
614
|
+
req = build_request(:associate_cross_account_replica, params)
|
|
615
|
+
req.send_request(options)
|
|
616
|
+
end
|
|
617
|
+
|
|
492
618
|
# Retrieves the contents of the encrypted fields `SecretString` or
|
|
493
619
|
# `SecretBinary` for up to 20 secrets. To retrieve a single secret, call
|
|
494
620
|
# GetSecretValue.
|
|
@@ -649,7 +775,7 @@ module Aws::SecretsManager
|
|
|
649
775
|
# to determine whether to roll back to the previous version of the
|
|
650
776
|
# secret by moving the staging label `AWSCURRENT` to the version that
|
|
651
777
|
# has `AWSPENDING`. To determine which version has a specific staging
|
|
652
|
-
# label, call
|
|
778
|
+
# label, call DescribeSecret. Then use UpdateSecretVersionStage to
|
|
653
779
|
# change staging labels. For more information, see [How rotation
|
|
654
780
|
# works][1].
|
|
655
781
|
#
|
|
@@ -729,9 +855,10 @@ module Aws::SecretsManager
|
|
|
729
855
|
# credentials such as a user name and password, an OAuth token, or other
|
|
730
856
|
# secret information that you store in an encrypted form in Secrets
|
|
731
857
|
# Manager. The secret also includes the connection information to access
|
|
732
|
-
# a database or other service
|
|
733
|
-
# secret in Secrets Manager consists of both
|
|
734
|
-
#
|
|
858
|
+
# a database or other service. Secrets Manager does not encrypt this
|
|
859
|
+
# connection information. A secret in Secrets Manager consists of both
|
|
860
|
+
# the encrypted secret versions and the metadata that Secrets Manager
|
|
861
|
+
# uses to manage the secret.
|
|
735
862
|
#
|
|
736
863
|
# For secrets that use *managed rotation*, you need to create the secret
|
|
737
864
|
# through the managing service. For more information, see [Secrets
|
|
@@ -743,7 +870,7 @@ module Aws::SecretsManager
|
|
|
743
870
|
# To create a secret, you can provide the secret value to be encrypted
|
|
744
871
|
# in either the `SecretString` parameter or the `SecretBinary`
|
|
745
872
|
# parameter, but not both. If you include `SecretString` or
|
|
746
|
-
# `SecretBinary
|
|
873
|
+
# `SecretBinary`, then Secrets Manager creates an initial secret version
|
|
747
874
|
# and automatically attaches the staging label `AWSCURRENT` to it.
|
|
748
875
|
#
|
|
749
876
|
# For database credentials you want to rotate, for Secrets Manager to be
|
|
@@ -757,13 +884,18 @@ module Aws::SecretsManager
|
|
|
757
884
|
# it for you automatically. All users and roles in the Amazon Web
|
|
758
885
|
# Services account automatically have access to use
|
|
759
886
|
# `aws/secretsmanager`. Creating `aws/secretsmanager` can result in a
|
|
760
|
-
# one-time
|
|
887
|
+
# one-time delay to complete the secret creation.
|
|
761
888
|
#
|
|
762
889
|
# If the secret is in a different Amazon Web Services account from the
|
|
763
890
|
# credentials calling the API, then you can't use `aws/secretsmanager`
|
|
764
891
|
# to encrypt the secret, and you must create and use a customer managed
|
|
765
892
|
# KMS key.
|
|
766
893
|
#
|
|
894
|
+
# To create a cross-account replica secret, include
|
|
895
|
+
# `CrossAccountPrimaryARN`. The replica must use a customer managed KMS
|
|
896
|
+
# key, and can't include `AddReplicaRegions`, `Description`,
|
|
897
|
+
# `SecretBinary`, `SecretString`, or `Type`.
|
|
898
|
+
#
|
|
767
899
|
# Secrets Manager generates a CloudTrail log entry when you call this
|
|
768
900
|
# action. Do not include sensitive information in request parameters
|
|
769
901
|
# except `SecretBinary` or `SecretString` because it might be logged.
|
|
@@ -773,7 +905,9 @@ module Aws::SecretsManager
|
|
|
773
905
|
# <b>Required permissions: </b> `secretsmanager:CreateSecret`. If you
|
|
774
906
|
# include tags in the secret, you also need
|
|
775
907
|
# `secretsmanager:TagResource`. To add replica Regions, you must also
|
|
776
|
-
# have `secretsmanager:ReplicateSecretToRegions`.
|
|
908
|
+
# have `secretsmanager:ReplicateSecretToRegions`. To create a
|
|
909
|
+
# cross-account replica secret, you must also have
|
|
910
|
+
# `secretsmanager:PutResourcePolicy` permissions. For more information,
|
|
777
911
|
# see [ IAM policy actions for Secrets Manager][5] and [Authentication
|
|
778
912
|
# and access control in Secrets Manager][6].
|
|
779
913
|
#
|
|
@@ -962,6 +1096,15 @@ module Aws::SecretsManager
|
|
|
962
1096
|
#
|
|
963
1097
|
# [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/managed-external-secrets.html
|
|
964
1098
|
#
|
|
1099
|
+
# @option params [String] :cross_account_primary_arn
|
|
1100
|
+
# The ARN of a primary secret in another Amazon Web Services account.
|
|
1101
|
+
# Include this field to create a cross-account replica secret that
|
|
1102
|
+
# receives replicated data from that primary secret. The primary secret
|
|
1103
|
+
# must be in the same Amazon Web Services Region and partition as the
|
|
1104
|
+
# replica, and you must specify a customer managed KMS key in
|
|
1105
|
+
# `KmsKeyId`. You can't include `SecretString`, `SecretBinary`,
|
|
1106
|
+
# `Description`, `AddReplicaRegions`, or `Type`.
|
|
1107
|
+
#
|
|
965
1108
|
# @return [Types::CreateSecretResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
966
1109
|
#
|
|
967
1110
|
# * {Types::CreateSecretResponse#arn #arn} => String
|
|
@@ -989,6 +1132,24 @@ module Aws::SecretsManager
|
|
|
989
1132
|
# version_id: "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1",
|
|
990
1133
|
# }
|
|
991
1134
|
#
|
|
1135
|
+
# @example Example: To create a cross-account replica secret
|
|
1136
|
+
#
|
|
1137
|
+
# # The following example creates a secret that receives replicated data from a primary secret in another AWS account, by
|
|
1138
|
+
# # setting the CrossAccountPrimaryARN parameter. After creating the replica, link it to the primary secret from the primary
|
|
1139
|
+
# # account with AssociateCrossAccountReplica.
|
|
1140
|
+
#
|
|
1141
|
+
# resp = client.create_secret({
|
|
1142
|
+
# cross_account_primary_arn: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
1143
|
+
# kms_key_id: "arn:aws:kms:us-west-2:222222222222:key/EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE",
|
|
1144
|
+
# name: "MyReplicaSecret",
|
|
1145
|
+
# })
|
|
1146
|
+
#
|
|
1147
|
+
# resp.to_h outputs the following:
|
|
1148
|
+
# {
|
|
1149
|
+
# arn: "arn:aws:secretsmanager:us-west-2:222222222222:secret:MyReplicaSecret-a1b2c3",
|
|
1150
|
+
# name: "MyReplicaSecret",
|
|
1151
|
+
# }
|
|
1152
|
+
#
|
|
992
1153
|
# @example Request syntax with placeholder values
|
|
993
1154
|
#
|
|
994
1155
|
# resp = client.create_secret({
|
|
@@ -1012,6 +1173,7 @@ module Aws::SecretsManager
|
|
|
1012
1173
|
# ],
|
|
1013
1174
|
# force_overwrite_replica_secret: false,
|
|
1014
1175
|
# type: "MedeaTypeType",
|
|
1176
|
+
# cross_account_primary_arn: "SecretARNType",
|
|
1015
1177
|
# })
|
|
1016
1178
|
#
|
|
1017
1179
|
# @example Response structure
|
|
@@ -1022,7 +1184,7 @@ module Aws::SecretsManager
|
|
|
1022
1184
|
# resp.replication_status #=> Array
|
|
1023
1185
|
# resp.replication_status[0].region #=> String
|
|
1024
1186
|
# resp.replication_status[0].kms_key_id #=> String
|
|
1025
|
-
# resp.replication_status[0].status #=> String, one of "InSync", "Failed", "InProgress"
|
|
1187
|
+
# resp.replication_status[0].status #=> String, one of "InSync", "Failed", "InProgress", "Pending", "Detached"
|
|
1026
1188
|
# resp.replication_status[0].status_message #=> String
|
|
1027
1189
|
# resp.replication_status[0].last_accessed_date #=> Time
|
|
1028
1190
|
#
|
|
@@ -1064,10 +1226,17 @@ module Aws::SecretsManager
|
|
|
1064
1226
|
#
|
|
1065
1227
|
# [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen
|
|
1066
1228
|
#
|
|
1229
|
+
# @option params [String] :policy_name
|
|
1230
|
+
# The name of the resource policy to delete. If you don't specify this
|
|
1231
|
+
# field, Secrets Manager uses `default`. You can only delete the
|
|
1232
|
+
# `default` policy; if you specify any other name, the operation returns
|
|
1233
|
+
# an `InvalidParameterException`.
|
|
1234
|
+
#
|
|
1067
1235
|
# @return [Types::DeleteResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
1068
1236
|
#
|
|
1069
1237
|
# * {Types::DeleteResourcePolicyResponse#arn #arn} => String
|
|
1070
1238
|
# * {Types::DeleteResourcePolicyResponse#name #name} => String
|
|
1239
|
+
# * {Types::DeleteResourcePolicyResponse#policy_name #policy_name} => String
|
|
1071
1240
|
#
|
|
1072
1241
|
#
|
|
1073
1242
|
# @example Example: To delete the resource-based policy attached to a secret
|
|
@@ -1082,18 +1251,21 @@ module Aws::SecretsManager
|
|
|
1082
1251
|
# {
|
|
1083
1252
|
# arn: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
1084
1253
|
# name: "MyTestDatabaseSecret",
|
|
1254
|
+
# policy_name: "default",
|
|
1085
1255
|
# }
|
|
1086
1256
|
#
|
|
1087
1257
|
# @example Request syntax with placeholder values
|
|
1088
1258
|
#
|
|
1089
1259
|
# resp = client.delete_resource_policy({
|
|
1090
1260
|
# secret_id: "SecretIdType", # required
|
|
1261
|
+
# policy_name: "ResourcePolicyNameType",
|
|
1091
1262
|
# })
|
|
1092
1263
|
#
|
|
1093
1264
|
# @example Response structure
|
|
1094
1265
|
#
|
|
1095
1266
|
# resp.arn #=> String
|
|
1096
1267
|
# resp.name #=> String
|
|
1268
|
+
# resp.policy_name #=> String
|
|
1097
1269
|
#
|
|
1098
1270
|
# @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DeleteResourcePolicy AWS API Documentation
|
|
1099
1271
|
#
|
|
@@ -1116,6 +1288,14 @@ module Aws::SecretsManager
|
|
|
1116
1288
|
# RemoveRegionsFromReplication, and then delete the primary secret. When
|
|
1117
1289
|
# you delete a replica, it is deleted immediately.
|
|
1118
1290
|
#
|
|
1291
|
+
# You can't delete a cross-account primary secret that is associated
|
|
1292
|
+
# with a cross-account replica secret. You must first disassociate each
|
|
1293
|
+
# of the replicas using DisassociateCrossAccountReplica, before deleting
|
|
1294
|
+
# the primary secret. Similarly, you can't delete a cross-account
|
|
1295
|
+
# replica secret without first stopping replication. Call
|
|
1296
|
+
# StopReplicationToReplica to stop replication, and then you can delete
|
|
1297
|
+
# the secret.
|
|
1298
|
+
#
|
|
1119
1299
|
# You can't directly delete a version of a secret. Instead, you remove
|
|
1120
1300
|
# all staging labels from the version using UpdateSecretVersionStage.
|
|
1121
1301
|
# This marks the version as deprecated, and then Secrets Manager can
|
|
@@ -1244,6 +1424,14 @@ module Aws::SecretsManager
|
|
|
1244
1424
|
# secret value. Secrets Manager only returns fields that have a value in
|
|
1245
1425
|
# the response.
|
|
1246
1426
|
#
|
|
1427
|
+
# <note markdown="1"> The `VersionIdsToStages` field in the response includes every version
|
|
1428
|
+
# ID that has a staging label attached, even if that version doesn't
|
|
1429
|
+
# contain a secret value. In contrast, `ListSecretVersionIds` only
|
|
1430
|
+
# returns versions that contain a secret value. To check whether a
|
|
1431
|
+
# secret version contains a value, call GetSecretValue.
|
|
1432
|
+
#
|
|
1433
|
+
# </note>
|
|
1434
|
+
#
|
|
1247
1435
|
# Secrets Manager generates a CloudTrail log entry when you call this
|
|
1248
1436
|
# action. Do not include sensitive information in request parameters
|
|
1249
1437
|
# because it might be logged. For more information, see [Logging Secrets
|
|
@@ -1292,6 +1480,8 @@ module Aws::SecretsManager
|
|
|
1292
1480
|
# * {Types::DescribeSecretResponse#created_date #created_date} => Time
|
|
1293
1481
|
# * {Types::DescribeSecretResponse#primary_region #primary_region} => String
|
|
1294
1482
|
# * {Types::DescribeSecretResponse#replication_status #replication_status} => Array<Types::ReplicationStatusType>
|
|
1483
|
+
# * {Types::DescribeSecretResponse#cross_account_primary #cross_account_primary} => Types::CrossAccountPrimaryType
|
|
1484
|
+
# * {Types::DescribeSecretResponse#cross_account_replicas #cross_account_replicas} => Array<Types::CrossAccountReplicaEntry>
|
|
1295
1485
|
#
|
|
1296
1486
|
#
|
|
1297
1487
|
# @example Example: To retrieve the details of a secret
|
|
@@ -1378,9 +1568,17 @@ module Aws::SecretsManager
|
|
|
1378
1568
|
# resp.replication_status #=> Array
|
|
1379
1569
|
# resp.replication_status[0].region #=> String
|
|
1380
1570
|
# resp.replication_status[0].kms_key_id #=> String
|
|
1381
|
-
# resp.replication_status[0].status #=> String, one of "InSync", "Failed", "InProgress"
|
|
1571
|
+
# resp.replication_status[0].status #=> String, one of "InSync", "Failed", "InProgress", "Pending", "Detached"
|
|
1382
1572
|
# resp.replication_status[0].status_message #=> String
|
|
1383
1573
|
# resp.replication_status[0].last_accessed_date #=> Time
|
|
1574
|
+
# resp.cross_account_primary.primary_secret_arn #=> String
|
|
1575
|
+
# resp.cross_account_primary.replication_status #=> String, one of "InSync", "Failed", "InProgress", "Pending", "Detached"
|
|
1576
|
+
# resp.cross_account_primary.status_message #=> String
|
|
1577
|
+
# resp.cross_account_replicas #=> Array
|
|
1578
|
+
# resp.cross_account_replicas[0].replica_secret_arn #=> String
|
|
1579
|
+
# resp.cross_account_replicas[0].replication_role_arn #=> String
|
|
1580
|
+
# resp.cross_account_replicas[0].replication_status #=> String, one of "InSync", "Failed", "InProgress", "Pending", "Detached"
|
|
1581
|
+
# resp.cross_account_replicas[0].status_message #=> String
|
|
1384
1582
|
#
|
|
1385
1583
|
# @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DescribeSecret AWS API Documentation
|
|
1386
1584
|
#
|
|
@@ -1391,6 +1589,97 @@ module Aws::SecretsManager
|
|
|
1391
1589
|
req.send_request(options)
|
|
1392
1590
|
end
|
|
1393
1591
|
|
|
1592
|
+
# Removes the link between a primary secret in your account and a
|
|
1593
|
+
# cross-account replica secret, and stops replication to the replica
|
|
1594
|
+
# secret. Call this operation on the primary secret. This action removes
|
|
1595
|
+
# the replica association created by AssociateCrossAccountReplica.
|
|
1596
|
+
#
|
|
1597
|
+
# Disassociating the replica from the primary does not delete the
|
|
1598
|
+
# replica secret or convert the replica secret to a standalone secret.
|
|
1599
|
+
# The replica secret remains in the other account and its replication
|
|
1600
|
+
# status changes to `Detached`. Secrets Manager no longer sends updates
|
|
1601
|
+
# from the primary secret to the replica secret after disassociation. To
|
|
1602
|
+
# convert a detached replica into a standalone secret, call
|
|
1603
|
+
# StopReplicationToReplica on the replica secret.
|
|
1604
|
+
#
|
|
1605
|
+
# You must disassociate a cross-account replica before you call
|
|
1606
|
+
# DeleteSecret for the primary secret. The DeleteSecret call fails if
|
|
1607
|
+
# any replicas are still associated with the primary secret.
|
|
1608
|
+
#
|
|
1609
|
+
# Secrets Manager generates a CloudTrail log entry when you call this
|
|
1610
|
+
# action. Do not include sensitive information in request parameters
|
|
1611
|
+
# because it might be logged. For more information, see [Logging Secrets
|
|
1612
|
+
# Manager events with CloudTrail][1].
|
|
1613
|
+
#
|
|
1614
|
+
# <b>Required permissions: </b>
|
|
1615
|
+
# `secretsmanager:DisassociateCrossAccountReplica`. For more
|
|
1616
|
+
# information, see [ IAM policy actions for Secrets Manager][2] and
|
|
1617
|
+
# [Authentication and access control in Secrets Manager][3].
|
|
1618
|
+
#
|
|
1619
|
+
#
|
|
1620
|
+
#
|
|
1621
|
+
# [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html
|
|
1622
|
+
# [2]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions
|
|
1623
|
+
# [3]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
|
|
1624
|
+
#
|
|
1625
|
+
# @option params [required, String] :secret_id
|
|
1626
|
+
# The ARN or name of the primary secret in your account.
|
|
1627
|
+
#
|
|
1628
|
+
# For an ARN, we recommend that you specify a complete ARN rather than a
|
|
1629
|
+
# partial ARN. See [Finding a secret from a partial ARN][1].
|
|
1630
|
+
#
|
|
1631
|
+
#
|
|
1632
|
+
#
|
|
1633
|
+
# [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen
|
|
1634
|
+
#
|
|
1635
|
+
# @option params [required, String] :cross_account_replica_arn
|
|
1636
|
+
# The ARN of the cross-account replica secret to unlink from the primary
|
|
1637
|
+
# secret.
|
|
1638
|
+
#
|
|
1639
|
+
# @return [Types::DisassociateCrossAccountReplicaResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
1640
|
+
#
|
|
1641
|
+
# * {Types::DisassociateCrossAccountReplicaResponse#arn #arn} => String
|
|
1642
|
+
# * {Types::DisassociateCrossAccountReplicaResponse#cross_account_replica_arn #cross_account_replica_arn} => String
|
|
1643
|
+
#
|
|
1644
|
+
#
|
|
1645
|
+
# @example Example: To stop replicating a secret to another account from the primary account
|
|
1646
|
+
#
|
|
1647
|
+
# # The following example, called from the primary account, removes the link between a primary secret and its cross-account
|
|
1648
|
+
# # replica and stops replication. The replica secret remains in the other account, now with a replication status of
|
|
1649
|
+
# # Detached.
|
|
1650
|
+
#
|
|
1651
|
+
# resp = client.disassociate_cross_account_replica({
|
|
1652
|
+
# cross_account_replica_arn: "arn:aws:secretsmanager:us-west-2:222222222222:secret:MyReplicaSecret-a1b2c3",
|
|
1653
|
+
# secret_id: "MyTestDatabaseSecret",
|
|
1654
|
+
# })
|
|
1655
|
+
#
|
|
1656
|
+
# resp.to_h outputs the following:
|
|
1657
|
+
# {
|
|
1658
|
+
# arn: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
1659
|
+
# cross_account_replica_arn: "arn:aws:secretsmanager:us-west-2:222222222222:secret:MyReplicaSecret-a1b2c3",
|
|
1660
|
+
# }
|
|
1661
|
+
#
|
|
1662
|
+
# @example Request syntax with placeholder values
|
|
1663
|
+
#
|
|
1664
|
+
# resp = client.disassociate_cross_account_replica({
|
|
1665
|
+
# secret_id: "SecretIdType", # required
|
|
1666
|
+
# cross_account_replica_arn: "SecretARNType", # required
|
|
1667
|
+
# })
|
|
1668
|
+
#
|
|
1669
|
+
# @example Response structure
|
|
1670
|
+
#
|
|
1671
|
+
# resp.arn #=> String
|
|
1672
|
+
# resp.cross_account_replica_arn #=> String
|
|
1673
|
+
#
|
|
1674
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DisassociateCrossAccountReplica AWS API Documentation
|
|
1675
|
+
#
|
|
1676
|
+
# @overload disassociate_cross_account_replica(params = {})
|
|
1677
|
+
# @param [Hash] params ({})
|
|
1678
|
+
def disassociate_cross_account_replica(params = {}, options = {})
|
|
1679
|
+
req = build_request(:disassociate_cross_account_replica, params)
|
|
1680
|
+
req.send_request(options)
|
|
1681
|
+
end
|
|
1682
|
+
|
|
1394
1683
|
# Generates a random password. We recommend that you specify the maximum
|
|
1395
1684
|
# length and include every character type that the system you are
|
|
1396
1685
|
# generating a password for can support. By default, Secrets Manager
|
|
@@ -1524,11 +1813,18 @@ module Aws::SecretsManager
|
|
|
1524
1813
|
#
|
|
1525
1814
|
# [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen
|
|
1526
1815
|
#
|
|
1816
|
+
# @option params [String] :policy_name
|
|
1817
|
+
# The name of the resource policy to retrieve. If you don't specify
|
|
1818
|
+
# this field, Secrets Manager uses `default`. If you specify a name
|
|
1819
|
+
# other than `default` and no policy with that name exists, the
|
|
1820
|
+
# operation returns a `ResourceNotFoundException`.
|
|
1821
|
+
#
|
|
1527
1822
|
# @return [Types::GetResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
1528
1823
|
#
|
|
1529
1824
|
# * {Types::GetResourcePolicyResponse#arn #arn} => String
|
|
1530
1825
|
# * {Types::GetResourcePolicyResponse#name #name} => String
|
|
1531
1826
|
# * {Types::GetResourcePolicyResponse#resource_policy #resource_policy} => String
|
|
1827
|
+
# * {Types::GetResourcePolicyResponse#policy_name #policy_name} => String
|
|
1532
1828
|
#
|
|
1533
1829
|
#
|
|
1534
1830
|
# @example Example: To retrieve the resource-based policy attached to a secret
|
|
@@ -1543,6 +1839,7 @@ module Aws::SecretsManager
|
|
|
1543
1839
|
# {
|
|
1544
1840
|
# arn: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
1545
1841
|
# name: "MyTestDatabaseSecret",
|
|
1842
|
+
# policy_name: "default",
|
|
1546
1843
|
# resource_policy: "{\n\"Version\":\"2012-10-17\",\n\"Statement\":[{\n\"Effect\":\"Allow\",\n\"Principal\":{\n\"AWS\":\"arn:aws:iam::123456789012:root\"\n},\n\"Action\":\"secretsmanager:GetSecretValue\",\n\"Resource\":\"*\"\n}]\n}",
|
|
1547
1844
|
# }
|
|
1548
1845
|
#
|
|
@@ -1550,6 +1847,7 @@ module Aws::SecretsManager
|
|
|
1550
1847
|
#
|
|
1551
1848
|
# resp = client.get_resource_policy({
|
|
1552
1849
|
# secret_id: "SecretIdType", # required
|
|
1850
|
+
# policy_name: "ResourcePolicyNameType",
|
|
1553
1851
|
# })
|
|
1554
1852
|
#
|
|
1555
1853
|
# @example Response structure
|
|
@@ -1557,6 +1855,7 @@ module Aws::SecretsManager
|
|
|
1557
1855
|
# resp.arn #=> String
|
|
1558
1856
|
# resp.name #=> String
|
|
1559
1857
|
# resp.resource_policy #=> String
|
|
1858
|
+
# resp.policy_name #=> String
|
|
1560
1859
|
#
|
|
1561
1860
|
# @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetResourcePolicy AWS API Documentation
|
|
1562
1861
|
#
|
|
@@ -1695,12 +1994,111 @@ module Aws::SecretsManager
|
|
|
1695
1994
|
req.send_request(options)
|
|
1696
1995
|
end
|
|
1697
1996
|
|
|
1997
|
+
# Lists the resource-based policies attached to a secret. The response
|
|
1998
|
+
# contains only the names of the policies, not their contents. Secrets
|
|
1999
|
+
# Manager lists `default` first, followed by any other policies in
|
|
2000
|
+
# alphabetical order. To get the contents of a policy, use
|
|
2001
|
+
# GetResourcePolicy. You can modify only the `default` policy.
|
|
2002
|
+
#
|
|
2003
|
+
# Secrets Manager generates a CloudTrail log entry when you call this
|
|
2004
|
+
# action. Do not include sensitive information in request parameters
|
|
2005
|
+
# because it might be logged. For more information, see [Logging Secrets
|
|
2006
|
+
# Manager events with CloudTrail][1].
|
|
2007
|
+
#
|
|
2008
|
+
# <b>Required permissions: </b> `secretsmanager:ListResourcePolicies`.
|
|
2009
|
+
# For more information, see [ IAM policy actions for Secrets Manager][2]
|
|
2010
|
+
# and [Authentication and access control in Secrets Manager][3].
|
|
2011
|
+
#
|
|
2012
|
+
#
|
|
2013
|
+
#
|
|
2014
|
+
# [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html
|
|
2015
|
+
# [2]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions
|
|
2016
|
+
# [3]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
|
|
2017
|
+
#
|
|
2018
|
+
# @option params [required, String] :secret_id
|
|
2019
|
+
# The ARN or name of the secret.
|
|
2020
|
+
#
|
|
2021
|
+
# For an ARN, we recommend that you specify a complete ARN rather than a
|
|
2022
|
+
# partial ARN. See [Finding a secret from a partial ARN][1].
|
|
2023
|
+
#
|
|
2024
|
+
#
|
|
2025
|
+
#
|
|
2026
|
+
# [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen
|
|
2027
|
+
#
|
|
2028
|
+
# @option params [Integer] :max_results
|
|
2029
|
+
# The number of results to include in the response. If you don't
|
|
2030
|
+
# specify this value, the service returns up to 100 results.
|
|
2031
|
+
#
|
|
2032
|
+
# If there are more results available, in the response, Secrets Manager
|
|
2033
|
+
# includes `NextToken`. To get the next results, call
|
|
2034
|
+
# `ListResourcePolicies` again with the value from `NextToken`.
|
|
2035
|
+
#
|
|
2036
|
+
# @option params [String] :next_token
|
|
2037
|
+
# A token that indicates where the output should continue from, if a
|
|
2038
|
+
# previous call did not show all results. To get the next results, call
|
|
2039
|
+
# `ListResourcePolicies` again with this value.
|
|
2040
|
+
#
|
|
2041
|
+
# @return [Types::ListResourcePoliciesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
2042
|
+
#
|
|
2043
|
+
# * {Types::ListResourcePoliciesResponse#resource_policies #resource_policies} => Array<Types::ResourcePolicySummary>
|
|
2044
|
+
# * {Types::ListResourcePoliciesResponse#next_token #next_token} => String
|
|
2045
|
+
#
|
|
2046
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
|
2047
|
+
#
|
|
2048
|
+
#
|
|
2049
|
+
# @example Example: To list the resource-based policies attached to a secret
|
|
2050
|
+
#
|
|
2051
|
+
# # The following example shows how to list the resource-based policies attached to a secret.
|
|
2052
|
+
#
|
|
2053
|
+
# resp = client.list_resource_policies({
|
|
2054
|
+
# secret_id: "MyTestDatabaseSecret",
|
|
2055
|
+
# })
|
|
2056
|
+
#
|
|
2057
|
+
# resp.to_h outputs the following:
|
|
2058
|
+
# {
|
|
2059
|
+
# resource_policies: [
|
|
2060
|
+
# {
|
|
2061
|
+
# policy_name: "default",
|
|
2062
|
+
# },
|
|
2063
|
+
# ],
|
|
2064
|
+
# }
|
|
2065
|
+
#
|
|
2066
|
+
# @example Request syntax with placeholder values
|
|
2067
|
+
#
|
|
2068
|
+
# resp = client.list_resource_policies({
|
|
2069
|
+
# secret_id: "SecretIdType", # required
|
|
2070
|
+
# max_results: 1,
|
|
2071
|
+
# next_token: "NextTokenType",
|
|
2072
|
+
# })
|
|
2073
|
+
#
|
|
2074
|
+
# @example Response structure
|
|
2075
|
+
#
|
|
2076
|
+
# resp.resource_policies #=> Array
|
|
2077
|
+
# resp.resource_policies[0].policy_name #=> String
|
|
2078
|
+
# resp.next_token #=> String
|
|
2079
|
+
#
|
|
2080
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListResourcePolicies AWS API Documentation
|
|
2081
|
+
#
|
|
2082
|
+
# @overload list_resource_policies(params = {})
|
|
2083
|
+
# @param [Hash] params ({})
|
|
2084
|
+
def list_resource_policies(params = {}, options = {})
|
|
2085
|
+
req = build_request(:list_resource_policies, params)
|
|
2086
|
+
req.send_request(options)
|
|
2087
|
+
end
|
|
2088
|
+
|
|
1698
2089
|
# Lists the versions of a secret. Secrets Manager uses staging labels to
|
|
1699
2090
|
# indicate the different versions of a secret. For more information, see
|
|
1700
2091
|
# [ Secrets Manager concepts: Versions][1].
|
|
1701
2092
|
#
|
|
1702
2093
|
# To list the secrets in the account, use ListSecrets.
|
|
1703
2094
|
#
|
|
2095
|
+
# <note markdown="1"> `ListSecretVersionIds` only returns versions that contain a secret
|
|
2096
|
+
# value. To see all version IDs that have staging labels attached,
|
|
2097
|
+
# including ones without a secret value, call `DescribeSecret` and check
|
|
2098
|
+
# `VersionIdsToStages`.
|
|
2099
|
+
#
|
|
2100
|
+
# </note>
|
|
2101
|
+
#
|
|
1704
2102
|
# Secrets Manager generates a CloudTrail log entry when you call this
|
|
1705
2103
|
# action. Do not include sensitive information in request parameters
|
|
1706
2104
|
# because it might be logged. For more information, see [Logging Secrets
|
|
@@ -2022,6 +2420,12 @@ module Aws::SecretsManager
|
|
|
2022
2420
|
#
|
|
2023
2421
|
# [1]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html
|
|
2024
2422
|
#
|
|
2423
|
+
# @option params [String] :policy_name
|
|
2424
|
+
# The name of the resource policy to attach. If you don't specify this
|
|
2425
|
+
# field, Secrets Manager uses `default`. You can only attach the
|
|
2426
|
+
# `default` policy; if you specify any other name, the operation returns
|
|
2427
|
+
# an `InvalidParameterException`.
|
|
2428
|
+
#
|
|
2025
2429
|
# @option params [Boolean] :block_public_policy
|
|
2026
2430
|
# Specifies whether to block resource-based policies that allow broad
|
|
2027
2431
|
# access to the secret, for example those that use a wildcard for the
|
|
@@ -2050,6 +2454,7 @@ module Aws::SecretsManager
|
|
|
2050
2454
|
#
|
|
2051
2455
|
# * {Types::PutResourcePolicyResponse#arn #arn} => String
|
|
2052
2456
|
# * {Types::PutResourcePolicyResponse#name #name} => String
|
|
2457
|
+
# * {Types::PutResourcePolicyResponse#policy_name #policy_name} => String
|
|
2053
2458
|
#
|
|
2054
2459
|
#
|
|
2055
2460
|
# @example Example: To add a resource-based policy to a secret
|
|
@@ -2065,6 +2470,7 @@ module Aws::SecretsManager
|
|
|
2065
2470
|
# {
|
|
2066
2471
|
# arn: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
2067
2472
|
# name: "MyTestDatabaseSecret",
|
|
2473
|
+
# policy_name: "default",
|
|
2068
2474
|
# }
|
|
2069
2475
|
#
|
|
2070
2476
|
# @example Request syntax with placeholder values
|
|
@@ -2072,6 +2478,7 @@ module Aws::SecretsManager
|
|
|
2072
2478
|
# resp = client.put_resource_policy({
|
|
2073
2479
|
# secret_id: "SecretIdType", # required
|
|
2074
2480
|
# resource_policy: "NonEmptyResourcePolicyType", # required
|
|
2481
|
+
# policy_name: "ResourcePolicyNameType",
|
|
2075
2482
|
# block_public_policy: false,
|
|
2076
2483
|
# })
|
|
2077
2484
|
#
|
|
@@ -2079,6 +2486,7 @@ module Aws::SecretsManager
|
|
|
2079
2486
|
#
|
|
2080
2487
|
# resp.arn #=> String
|
|
2081
2488
|
# resp.name #=> String
|
|
2489
|
+
# resp.policy_name #=> String
|
|
2082
2490
|
#
|
|
2083
2491
|
# @see http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutResourcePolicy AWS API Documentation
|
|
2084
2492
|
#
|
|
@@ -2358,7 +2766,7 @@ module Aws::SecretsManager
|
|
|
2358
2766
|
# resp.replication_status #=> Array
|
|
2359
2767
|
# resp.replication_status[0].region #=> String
|
|
2360
2768
|
# resp.replication_status[0].kms_key_id #=> String
|
|
2361
|
-
# resp.replication_status[0].status #=> String, one of "InSync", "Failed", "InProgress"
|
|
2769
|
+
# resp.replication_status[0].status #=> String, one of "InSync", "Failed", "InProgress", "Pending", "Detached"
|
|
2362
2770
|
# resp.replication_status[0].status_message #=> String
|
|
2363
2771
|
# resp.replication_status[0].last_accessed_date #=> Time
|
|
2364
2772
|
#
|
|
@@ -2456,7 +2864,7 @@ module Aws::SecretsManager
|
|
|
2456
2864
|
# resp.replication_status #=> Array
|
|
2457
2865
|
# resp.replication_status[0].region #=> String
|
|
2458
2866
|
# resp.replication_status[0].kms_key_id #=> String
|
|
2459
|
-
# resp.replication_status[0].status #=> String, one of "InSync", "Failed", "InProgress"
|
|
2867
|
+
# resp.replication_status[0].status #=> String, one of "InSync", "Failed", "InProgress", "Pending", "Detached"
|
|
2460
2868
|
# resp.replication_status[0].status_message #=> String
|
|
2461
2869
|
# resp.replication_status[0].last_accessed_date #=> Time
|
|
2462
2870
|
#
|
|
@@ -2769,11 +3177,21 @@ module Aws::SecretsManager
|
|
|
2769
3177
|
req.send_request(options)
|
|
2770
3178
|
end
|
|
2771
3179
|
|
|
2772
|
-
# Removes the link between
|
|
2773
|
-
#
|
|
3180
|
+
# Removes the link between a replica secret and its primary secret, and
|
|
3181
|
+
# stops replication to the replica. You call this operation from the
|
|
3182
|
+
# replica account or Region. Depending on the type of replica, the
|
|
3183
|
+
# behavior is:
|
|
3184
|
+
#
|
|
3185
|
+
# * **Cross-Region replica**: promotes the replica to a standalone
|
|
3186
|
+
# primary secret in the replica Region.
|
|
2774
3187
|
#
|
|
2775
|
-
#
|
|
2776
|
-
#
|
|
3188
|
+
# * **Cross-account replica**: promotes the replica in your account to a
|
|
3189
|
+
# standalone secret and stops replication from its primary secret in
|
|
3190
|
+
# the other account. Secrets Manager updates the primary secret's
|
|
3191
|
+
# replication status to `Detached` for this replica.
|
|
3192
|
+
#
|
|
3193
|
+
# To stop cross-account replication from the primary account instead,
|
|
3194
|
+
# use DisassociateCrossAccountReplica.
|
|
2777
3195
|
#
|
|
2778
3196
|
# Secrets Manager generates a CloudTrail log entry when you call this
|
|
2779
3197
|
# action. Do not include sensitive information in request parameters
|
|
@@ -2781,9 +3199,11 @@ module Aws::SecretsManager
|
|
|
2781
3199
|
# Manager events with CloudTrail][1].
|
|
2782
3200
|
#
|
|
2783
3201
|
# <b>Required permissions: </b>
|
|
2784
|
-
# `secretsmanager:StopReplicationToReplica`. For
|
|
2785
|
-
#
|
|
2786
|
-
#
|
|
3202
|
+
# `secretsmanager:StopReplicationToReplica`. For cross-account replica
|
|
3203
|
+
# secrets, you must also have `secretsmanager:DeleteResourcePolicy`
|
|
3204
|
+
# permissions. For more information, see [ IAM policy actions for
|
|
3205
|
+
# Secrets Manager][2] and [Authentication and access control in Secrets
|
|
3206
|
+
# Manager][3].
|
|
2787
3207
|
#
|
|
2788
3208
|
#
|
|
2789
3209
|
#
|
|
@@ -2792,14 +3212,32 @@ module Aws::SecretsManager
|
|
|
2792
3212
|
# [3]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html
|
|
2793
3213
|
#
|
|
2794
3214
|
# @option params [required, String] :secret_id
|
|
2795
|
-
# The name of the
|
|
2796
|
-
#
|
|
2797
|
-
# replica
|
|
3215
|
+
# The ARN or name of the replica secret.
|
|
3216
|
+
#
|
|
3217
|
+
# For a cross-region replica, the replica ARN is the same as the
|
|
3218
|
+
# original primary secret ARN except that the Region is changed to the
|
|
3219
|
+
# replica Region. For a cross-account replica, this is the ARN or name
|
|
3220
|
+
# of the replica secret in your account.
|
|
2798
3221
|
#
|
|
2799
3222
|
# @return [Types::StopReplicationToReplicaResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
2800
3223
|
#
|
|
2801
3224
|
# * {Types::StopReplicationToReplicaResponse#arn #arn} => String
|
|
2802
3225
|
#
|
|
3226
|
+
#
|
|
3227
|
+
# @example Example: To stop cross-account replication from the replica account
|
|
3228
|
+
#
|
|
3229
|
+
# # The following example, called from the replica account, unlinks a cross-account replica secret from its primary secret
|
|
3230
|
+
# # in another account and stops replication. The secret remains in the replica account as a standalone secret.
|
|
3231
|
+
#
|
|
3232
|
+
# resp = client.stop_replication_to_replica({
|
|
3233
|
+
# secret_id: "arn:aws:secretsmanager:us-west-2:222222222222:secret:MyReplicaSecret-a1b2c3",
|
|
3234
|
+
# })
|
|
3235
|
+
#
|
|
3236
|
+
# resp.to_h outputs the following:
|
|
3237
|
+
# {
|
|
3238
|
+
# arn: "arn:aws:secretsmanager:us-west-2:222222222222:secret:MyReplicaSecret-a1b2c3",
|
|
3239
|
+
# }
|
|
3240
|
+
#
|
|
2803
3241
|
# @example Request syntax with placeholder values
|
|
2804
3242
|
#
|
|
2805
3243
|
# resp = client.stop_replication_to_replica({
|
|
@@ -3518,7 +3956,7 @@ module Aws::SecretsManager
|
|
|
3518
3956
|
tracer: tracer
|
|
3519
3957
|
)
|
|
3520
3958
|
context[:gem_name] = 'aws-sdk-secretsmanager'
|
|
3521
|
-
context[:gem_version] = '1.
|
|
3959
|
+
context[:gem_version] = '1.147.0'
|
|
3522
3960
|
Seahorse::Client::Request.new(handlers, context)
|
|
3523
3961
|
end
|
|
3524
3962
|
|