Skip to content

SecretsManagerClient.associate_cross_account_replica

rboto-secrets-manager==0.4.0 · Service index · Types

Model summary (excerpt): Links a primary secret in your account to a replica secret in a different Amazon Web Services account and starts replication to this replica. The replica secret must already exist in the other Amazon Web Services account. Create the replica with CreateSecret and set its CrossAccountPrimaryARN field set to this primary secret's ARN. When you call AssociateCrossAccountReplica, Secrets Manager...

Install and imports

python -m pip install "rboto[secrets-manager]==0.4.0"
from rboto import SecretsManagerClient
from rboto_secrets_manager.types import (
    AssociateCrossAccountReplicaOutput,
    ReplicaRestrictionType,
)

Signature

async def associate_cross_account_replica(
    *,
    secret_id: str,
    cross_account_replica_arn: str,
    replica_restriction: ReplicaRestrictionType | None = None,
    replication_role_arn: str | None = None,
) -> AssociateCrossAccountReplicaOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
secret_id Yes The ARN or name of the primary secret in your account to replicate. For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See Finding a secret from a partial ARN .
cross_account_replica_arn Yes The ARN of the replica secret in the other Amazon Web Services account. The replica secret must be in the same Region and partition as the primary secret. Additionally, the replica account owner must have created the replica secret as a cross-account replica of the primary secret. For more information see CreateSecret .
replica_restriction No Whether the replica account must belong to the same Amazon Web Services organization as the primary account: SameOrg , which requires the replica account to be in the same organization as the primary account. This is the default. NoRestriction , which allows the replica account to be in any organization.
replication_role_arn No The ARN of an IAM role in the primary account that Secrets Manager assumes to perform replication. If you don't include this field, Secrets Manager replicates using the credentials of caller who updates the primary secret. For more information, see Cross-account replication permissions .

Output

AssociateCrossAccountReplicaOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
arn str | None Always present —
cross_account_replica_arn str | None Always present —
replication_status StatusTypeOutput | None Always present StatusTypeOutput

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

AssociateCrossAccountReplicaOutput, ReplicaRestrictionType

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_secrets_manager.exceptions:

InternalServiceError, InvalidParameterError, InvalidRequestError, LimitExceededError, ResourceNotFoundError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model