Struct aws_sdk_secretsmanager::client::fluent_builders::PutResourcePolicy [−][src]
pub struct PutResourcePolicy<C = DynConnector, M = AwsMiddleware, R = Standard> { /* fields omitted */ }Expand description
Fluent builder constructing a request to PutResourcePolicy.
Attaches the contents of the specified resource-based permission policy to a secret. A
resource-based policy is optional. Alternatively, you can use IAM identity-based policies
that specify the secret's Amazon Resource Name (ARN) in the policy statement's
Resources element. You can also use a combination of both identity-based and
resource-based policies. The affected users and roles receive the permissions that are
permitted by all of the relevant policies. For more information, see Using Resource-Based
Policies for Amazon Web Services Secrets Manager. For the complete description of the Amazon Web Services policy syntax and
grammar, see IAM JSON
Policy Reference in the IAM User Guide.
Minimum permissions
To run this command, you must have the following permissions:
-
secretsmanager:PutResourcePolicy
Related operations
-
To retrieve the resource policy attached to a secret, use GetResourcePolicy.
-
To delete the resource-based policy attached to a secret, use DeleteResourcePolicy.
-
To list all of the currently available secrets, use ListSecrets.
Implementations
impl<C, M, R> PutResourcePolicy<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> PutResourcePolicy<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
pub async fn send(
self
) -> Result<PutResourcePolicyOutput, SdkError<PutResourcePolicyError>> where
R::Policy: SmithyRetryPolicy<PutResourcePolicyInputOperationOutputAlias, PutResourcePolicyOutput, PutResourcePolicyError, PutResourcePolicyInputOperationRetryAlias>,
pub async fn send(
self
) -> Result<PutResourcePolicyOutput, SdkError<PutResourcePolicyError>> where
R::Policy: SmithyRetryPolicy<PutResourcePolicyInputOperationOutputAlias, PutResourcePolicyOutput, PutResourcePolicyError, PutResourcePolicyInputOperationRetryAlias>,
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.
Specifies the secret that you want to attach the resource-based policy. You can specify either the ARN or the friendly name of the secret.
For an ARN, we recommend that you specify a complete ARN rather than a partial ARN.
Specifies the secret that you want to attach the resource-based policy. You can specify either the ARN or the friendly name of the secret.
For an ARN, we recommend that you specify a complete ARN rather than a partial ARN.
A JSON-formatted string constructed according to the grammar and syntax for an Amazon Web Services resource-based policy. The policy in the string identifies who can access or manage this secret and its versions. For information on how to format a JSON parameter for the various command line tool environments, see Using JSON for Parameters in the CLI User Guide.
A JSON-formatted string constructed according to the grammar and syntax for an Amazon Web Services resource-based policy. The policy in the string identifies who can access or manage this secret and its versions. For information on how to format a JSON parameter for the various command line tool environments, see Using JSON for Parameters in the CLI User Guide.
(Optional) If you set the parameter, BlockPublicPolicy to true, then you
block resource-based policies that allow broad access to the secret.
(Optional) If you set the parameter, BlockPublicPolicy to true, then you
block resource-based policies that allow broad access to the secret.
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = AwsMiddleware, R = Standard> !RefUnwindSafe for PutResourcePolicy<C, M, R>
impl<C, M, R> Send for PutResourcePolicy<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Sync for PutResourcePolicy<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Unpin for PutResourcePolicy<C, M, R>
impl<C = DynConnector, M = AwsMiddleware, R = Standard> !UnwindSafe for PutResourcePolicy<C, M, R>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more