Struct aws_sdk_secretsmanager::operation::put_resource_policy::builders::PutResourcePolicyInputBuilder
source · #[non_exhaustive]pub struct PutResourcePolicyInputBuilder { /* private fields */ }
Expand description
A builder for PutResourcePolicyInput
.
Implementations§
source§impl PutResourcePolicyInputBuilder
impl PutResourcePolicyInputBuilder
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 secret to attach the resource-based policy.
For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See Finding a secret from a partial ARN.
This field is required.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 secret to attach the resource-based policy.
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 secret to attach the resource-based policy.
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 resource_policy(self, input: impl Into<String>) -> Self
pub fn resource_policy(self, input: impl Into<String>) -> Self
A JSON-formatted string for an Amazon Web Services resource-based policy. For example policies, see Permissions policy examples.
This field is required.sourcepub fn set_resource_policy(self, input: Option<String>) -> Self
pub fn set_resource_policy(self, input: Option<String>) -> Self
A JSON-formatted string for an Amazon Web Services resource-based policy. For example policies, see Permissions policy examples.
sourcepub fn get_resource_policy(&self) -> &Option<String>
pub fn get_resource_policy(&self) -> &Option<String>
A JSON-formatted string for an Amazon Web Services resource-based policy. For example policies, see Permissions policy examples.
sourcepub fn block_public_policy(self, input: bool) -> Self
pub fn block_public_policy(self, input: bool) -> Self
Specifies whether to block resource-based policies that allow broad access to the secret, for example those that use a wildcard for the principal. By default, public policies aren't blocked.
Resource policy validation and the BlockPublicPolicy parameter help protect your resources by preventing public access from being granted through the resource policies that are directly attached to your secrets. In addition to using these features, carefully inspect the following policies to confirm that they do not grant public access:
-
Identity-based policies attached to associated Amazon Web Services principals (for example, IAM roles)
-
Resource-based policies attached to associated Amazon Web Services resources (for example, Key Management Service (KMS) keys)
To review permissions to your secrets, see Determine who has permissions to your secrets.
sourcepub fn set_block_public_policy(self, input: Option<bool>) -> Self
pub fn set_block_public_policy(self, input: Option<bool>) -> Self
Specifies whether to block resource-based policies that allow broad access to the secret, for example those that use a wildcard for the principal. By default, public policies aren't blocked.
Resource policy validation and the BlockPublicPolicy parameter help protect your resources by preventing public access from being granted through the resource policies that are directly attached to your secrets. In addition to using these features, carefully inspect the following policies to confirm that they do not grant public access:
-
Identity-based policies attached to associated Amazon Web Services principals (for example, IAM roles)
-
Resource-based policies attached to associated Amazon Web Services resources (for example, Key Management Service (KMS) keys)
To review permissions to your secrets, see Determine who has permissions to your secrets.
sourcepub fn get_block_public_policy(&self) -> &Option<bool>
pub fn get_block_public_policy(&self) -> &Option<bool>
Specifies whether to block resource-based policies that allow broad access to the secret, for example those that use a wildcard for the principal. By default, public policies aren't blocked.
Resource policy validation and the BlockPublicPolicy parameter help protect your resources by preventing public access from being granted through the resource policies that are directly attached to your secrets. In addition to using these features, carefully inspect the following policies to confirm that they do not grant public access:
-
Identity-based policies attached to associated Amazon Web Services principals (for example, IAM roles)
-
Resource-based policies attached to associated Amazon Web Services resources (for example, Key Management Service (KMS) keys)
To review permissions to your secrets, see Determine who has permissions to your secrets.
sourcepub fn build(self) -> Result<PutResourcePolicyInput, BuildError>
pub fn build(self) -> Result<PutResourcePolicyInput, BuildError>
Consumes the builder and constructs a PutResourcePolicyInput
.
source§impl PutResourcePolicyInputBuilder
impl PutResourcePolicyInputBuilder
sourcepub async fn send_with(
self,
client: &Client,
) -> Result<PutResourcePolicyOutput, SdkError<PutResourcePolicyError, HttpResponse>>
pub async fn send_with( self, client: &Client, ) -> Result<PutResourcePolicyOutput, SdkError<PutResourcePolicyError, HttpResponse>>
Sends a request with this input using the given client.
Trait Implementations§
source§impl Clone for PutResourcePolicyInputBuilder
impl Clone for PutResourcePolicyInputBuilder
source§fn clone(&self) -> PutResourcePolicyInputBuilder
fn clone(&self) -> PutResourcePolicyInputBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for PutResourcePolicyInputBuilder
impl Default for PutResourcePolicyInputBuilder
source§fn default() -> PutResourcePolicyInputBuilder
fn default() -> PutResourcePolicyInputBuilder
source§impl PartialEq for PutResourcePolicyInputBuilder
impl PartialEq for PutResourcePolicyInputBuilder
source§fn eq(&self, other: &PutResourcePolicyInputBuilder) -> bool
fn eq(&self, other: &PutResourcePolicyInputBuilder) -> bool
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for PutResourcePolicyInputBuilder
Auto Trait Implementations§
impl Freeze for PutResourcePolicyInputBuilder
impl RefUnwindSafe for PutResourcePolicyInputBuilder
impl Send for PutResourcePolicyInputBuilder
impl Sync for PutResourcePolicyInputBuilder
impl Unpin for PutResourcePolicyInputBuilder
impl UnwindSafe for PutResourcePolicyInputBuilder
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)