pub struct AttachUserPolicyFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to AttachUserPolicy
.
Attaches the specified managed policy to the specified user.
You use this operation to attach a managed policy to a user. To embed an inline policy in a user, use PutUserPolicy
.
As a best practice, you can validate your IAM policies. To learn more, see Validating IAM policies in the IAM User Guide.
For more information about policies, see Managed policies and inline policies in the IAM User Guide.
Implementations§
source§impl AttachUserPolicyFluentBuilder
impl AttachUserPolicyFluentBuilder
sourcepub fn as_input(&self) -> &AttachUserPolicyInputBuilder
pub fn as_input(&self) -> &AttachUserPolicyInputBuilder
Access the AttachUserPolicy as a reference.
sourcepub async fn send(
self
) -> Result<AttachUserPolicyOutput, SdkError<AttachUserPolicyError, HttpResponse>>
pub async fn send( self ) -> Result<AttachUserPolicyOutput, SdkError<AttachUserPolicyError, 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<AttachUserPolicyOutput, AttachUserPolicyError, Self>
pub fn customize( self ) -> CustomizableOperation<AttachUserPolicyOutput, AttachUserPolicyError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn user_name(self, input: impl Into<String>) -> Self
pub fn user_name(self, input: impl Into<String>) -> Self
The name (friendly name, not ARN) of the IAM user to attach the policy to.
This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
sourcepub fn set_user_name(self, input: Option<String>) -> Self
pub fn set_user_name(self, input: Option<String>) -> Self
The name (friendly name, not ARN) of the IAM user to attach the policy to.
This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
sourcepub fn get_user_name(&self) -> &Option<String>
pub fn get_user_name(&self) -> &Option<String>
The name (friendly name, not ARN) of the IAM user to attach the policy to.
This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
sourcepub fn policy_arn(self, input: impl Into<String>) -> Self
pub fn policy_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the IAM policy you want to attach.
For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.
sourcepub fn set_policy_arn(self, input: Option<String>) -> Self
pub fn set_policy_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the IAM policy you want to attach.
For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.
sourcepub fn get_policy_arn(&self) -> &Option<String>
pub fn get_policy_arn(&self) -> &Option<String>
The Amazon Resource Name (ARN) of the IAM policy you want to attach.
For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.
Trait Implementations§
source§impl Clone for AttachUserPolicyFluentBuilder
impl Clone for AttachUserPolicyFluentBuilder
source§fn clone(&self) -> AttachUserPolicyFluentBuilder
fn clone(&self) -> AttachUserPolicyFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more