pub struct AssociateCrossAccountReplicaFluentBuilder { /* private fields */ }Expand description
Fluent builder constructing a request to AssociateCrossAccountReplica.
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 calls AcceptCrossAccountReplication on the replica secret on your behalf.
The primary and replica secrets must be in the same Amazon Web Services Region and partition, and you must call this operation from the account that owns the primary secret. A primary secret can have at most one cross-account replica. This operation is idempotent, so you can call it again for the same replica to repair replication. If the association fails, Secrets Manager does not modify either the primary or replica secret.
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:AssociateCrossAccountReplica, secretsmanager:GetSecretValue on the primary secret, and secretsmanager:AcceptCrossAccountReplication on the replica secret. You must also have kms:Decrypt permission for the Key Management Service (KMS) key that encrypts the primary secret, and kms:Encrypt permission for the Amazon Web Services KMS key that encrypts the replica secret. If you supply ReplicationRoleARN, you also need iam:PassRole for that role. For more information, see IAM policy actions for Secrets Manager and Authentication and access control in Secrets Manager.
Implementations§
Source§impl AssociateCrossAccountReplicaFluentBuilder
impl AssociateCrossAccountReplicaFluentBuilder
Sourcepub fn as_input(&self) -> &AssociateCrossAccountReplicaInputBuilder
pub fn as_input(&self) -> &AssociateCrossAccountReplicaInputBuilder
Access the AssociateCrossAccountReplica as a reference.
Sourcepub async fn send(
self,
) -> Result<AssociateCrossAccountReplicaOutput, SdkError<AssociateCrossAccountReplicaError, HttpResponse>>
pub async fn send( self, ) -> Result<AssociateCrossAccountReplicaOutput, SdkError<AssociateCrossAccountReplicaError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
Sourcepub fn customize(
self,
) -> CustomizableOperation<AssociateCrossAccountReplicaOutput, AssociateCrossAccountReplicaError, Self>
pub fn customize( self, ) -> CustomizableOperation<AssociateCrossAccountReplicaOutput, AssociateCrossAccountReplicaError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
Sourcepub fn secret_id(self, input: impl Into<String>) -> Self
pub fn secret_id(self, input: impl Into<String>) -> Self
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.
Sourcepub fn set_secret_id(self, input: Option<String>) -> Self
pub fn set_secret_id(self, input: Option<String>) -> Self
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.
Sourcepub fn get_secret_id(&self) -> &Option<String>
pub fn get_secret_id(&self) -> &Option<String>
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.
Sourcepub fn cross_account_replica_arn(self, input: impl Into<String>) -> Self
pub fn cross_account_replica_arn(self, input: impl Into<String>) -> Self
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.
Sourcepub fn set_cross_account_replica_arn(self, input: Option<String>) -> Self
pub fn set_cross_account_replica_arn(self, input: Option<String>) -> Self
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.
Sourcepub fn get_cross_account_replica_arn(&self) -> &Option<String>
pub fn get_cross_account_replica_arn(&self) -> &Option<String>
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.
Sourcepub fn replica_restriction(self, input: ReplicaRestrictionType) -> Self
pub fn replica_restriction(self, input: ReplicaRestrictionType) -> Self
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.
Sourcepub fn set_replica_restriction(
self,
input: Option<ReplicaRestrictionType>,
) -> Self
pub fn set_replica_restriction( self, input: Option<ReplicaRestrictionType>, ) -> Self
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.
Sourcepub fn get_replica_restriction(&self) -> &Option<ReplicaRestrictionType>
pub fn get_replica_restriction(&self) -> &Option<ReplicaRestrictionType>
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.
Sourcepub fn replication_role_arn(self, input: impl Into<String>) -> Self
pub fn replication_role_arn(self, input: impl Into<String>) -> Self
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.
Sourcepub fn set_replication_role_arn(self, input: Option<String>) -> Self
pub fn set_replication_role_arn(self, input: Option<String>) -> Self
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.
Sourcepub fn get_replication_role_arn(&self) -> &Option<String>
pub fn get_replication_role_arn(&self) -> &Option<String>
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.
Trait Implementations§
Source§impl Clone for AssociateCrossAccountReplicaFluentBuilder
impl Clone for AssociateCrossAccountReplicaFluentBuilder
Source§fn clone(&self) -> AssociateCrossAccountReplicaFluentBuilder
fn clone(&self) -> AssociateCrossAccountReplicaFluentBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for AssociateCrossAccountReplicaFluentBuilder
impl !UnwindSafe for AssociateCrossAccountReplicaFluentBuilder
impl Freeze for AssociateCrossAccountReplicaFluentBuilder
impl Send for AssociateCrossAccountReplicaFluentBuilder
impl Sync for AssociateCrossAccountReplicaFluentBuilder
impl Unpin for AssociateCrossAccountReplicaFluentBuilder
impl UnsafeUnpin for AssociateCrossAccountReplicaFluentBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more