SecretsManager / Client / stop_replication_to_replica

stop_replication_to_replica

SecretsManager.Client.stop_replication_to_replica(**kwargs)

Removes the link between a replica secret and its primary secret, and stops replication to the replica. You call this operation from the replica account or Region. Depending on the type of replica, the behavior is:

  • Cross-Region replica: promotes the replica to a standalone primary secret in the replica Region.

  • Cross-account replica: promotes the replica in your account to a standalone secret and stops replication from its primary secret in the other account. Secrets Manager updates the primary secret’s replication status to Detached for this replica.

To stop cross-account replication from the primary account instead, use DisassociateCrossAccountReplica.

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

Required permissions: secretsmanager:StopReplicationToReplica. For cross-account replica secrets, you must also have secretsmanager:DeleteResourcePolicy permissions. For more information, see IAM policy actions for Secrets Manager and Authentication and access control in Secrets Manager.

See also: AWS API Documentation

Request Syntax

response = client.stop_replication_to_replica(
    SecretId='string'
)
Parameters:

SecretId (string) –

[REQUIRED]

The ARN or name of the replica secret.

For a cross-region replica, the replica ARN is the same as the original primary secret ARN except that the Region is changed to the replica Region. For a cross-account replica, this is the ARN or name of the replica secret in your account.

Return type:

dict

Returns:

Response Syntax

{
    'ARN': 'string'
}

Response Structure

  • (dict) –

    • ARN (string) –

      The ARN of the promoted secret. For a cross-region replica, this ARN is the same as the original primary secret’s ARN except that the Region is changed. For a cross-account replica, this is the ARN of the promoted secret in your account.

Exceptions