Struct aws_sdk_iam::client::fluent_builders::AddRoleToInstanceProfile [−][src]
pub struct AddRoleToInstanceProfile<C = DynConnector, M = AwsMiddleware, R = Standard> { /* fields omitted */ }
Expand description
Fluent builder constructing a request to AddRoleToInstanceProfile
.
Adds the specified IAM role to the specified instance profile. An instance profile can contain only one role, and this quota cannot be increased. You can remove the existing role and then add a different role to an instance profile. You must then wait for the change to appear across all of Amazon Web Services because of eventual consistency. To force the change, you must disassociate the instance profile and then associate the instance profile, or you can stop your instance and then restart it.
The caller of this operation must be granted the PassRole
permission
on the IAM role by a permissions policy.
For more information about roles, see Working with roles. For more information about instance profiles, see About instance profiles.
Implementations
impl<C, M, R> AddRoleToInstanceProfile<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> AddRoleToInstanceProfile<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
pub async fn send(
self
) -> Result<AddRoleToInstanceProfileOutput, SdkError<AddRoleToInstanceProfileError>> where
R::Policy: SmithyRetryPolicy<AddRoleToInstanceProfileInputOperationOutputAlias, AddRoleToInstanceProfileOutput, AddRoleToInstanceProfileError, AddRoleToInstanceProfileInputOperationRetryAlias>,
pub async fn send(
self
) -> Result<AddRoleToInstanceProfileOutput, SdkError<AddRoleToInstanceProfileError>> where
R::Policy: SmithyRetryPolicy<AddRoleToInstanceProfileInputOperationOutputAlias, AddRoleToInstanceProfileOutput, AddRoleToInstanceProfileError, AddRoleToInstanceProfileInputOperationRetryAlias>,
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.
The name of the instance profile to update.
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: _+=,.@-
The name of the instance profile to update.
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: _+=,.@-
The name of the role to add.
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: _+=,.@-
The name of the role to add.
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: _+=,.@-
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = AwsMiddleware, R = Standard> !RefUnwindSafe for AddRoleToInstanceProfile<C, M, R>
impl<C, M, R> Send for AddRoleToInstanceProfile<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Sync for AddRoleToInstanceProfile<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Unpin for AddRoleToInstanceProfile<C, M, R>
impl<C = DynConnector, M = AwsMiddleware, R = Standard> !UnwindSafe for AddRoleToInstanceProfile<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