Skip to main content

aws_sdk_secretsmanager/client/
delete_resource_policy.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`DeleteResourcePolicy`](crate::operation::delete_resource_policy::builders::DeleteResourcePolicyFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`secret_id(impl Into<String>)`](crate::operation::delete_resource_policy::builders::DeleteResourcePolicyFluentBuilder::secret_id) / [`set_secret_id(Option<String>)`](crate::operation::delete_resource_policy::builders::DeleteResourcePolicyFluentBuilder::set_secret_id):<br>required: **true**<br><p>The ARN or name of the secret to delete the attached resource-based policy for.</p> <p>For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding a secret from a partial ARN</a>.</p><br>
7    ///   - [`policy_name(impl Into<String>)`](crate::operation::delete_resource_policy::builders::DeleteResourcePolicyFluentBuilder::policy_name) / [`set_policy_name(Option<String>)`](crate::operation::delete_resource_policy::builders::DeleteResourcePolicyFluentBuilder::set_policy_name):<br>required: **false**<br><p>The name of the resource policy to delete. If you don't specify this field, Secrets Manager uses <code>default</code>. You can only delete the <code>default</code> policy; if you specify any other name, the operation returns an <code>InvalidParameterException</code>.</p><br>
8    /// - On success, responds with [`DeleteResourcePolicyOutput`](crate::operation::delete_resource_policy::DeleteResourcePolicyOutput) with field(s):
9    ///   - [`arn(Option<String>)`](crate::operation::delete_resource_policy::DeleteResourcePolicyOutput::arn): <p>The ARN of the secret that the resource-based policy was deleted for.</p>
10    ///   - [`name(Option<String>)`](crate::operation::delete_resource_policy::DeleteResourcePolicyOutput::name): <p>The name of the secret that the resource-based policy was deleted for.</p>
11    ///   - [`policy_name(Option<String>)`](crate::operation::delete_resource_policy::DeleteResourcePolicyOutput::policy_name): <p>The name of the deleted resource policy. If you didn't specify <code>PolicyName</code> in the request, this is <code>default</code>.</p>
12    /// - On failure, responds with [`SdkError<DeleteResourcePolicyError>`](crate::operation::delete_resource_policy::DeleteResourcePolicyError)
13    pub fn delete_resource_policy(&self) -> crate::operation::delete_resource_policy::builders::DeleteResourcePolicyFluentBuilder {
14        crate::operation::delete_resource_policy::builders::DeleteResourcePolicyFluentBuilder::new(self.handle.clone())
15    }
16}