1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 - | pub use crate::operation::attach_role_policy::_attach_role_policy_output::AttachRolePolicyOutputBuilder;
|
3 - |
|
4 2 | pub use crate::operation::attach_role_policy::_attach_role_policy_input::AttachRolePolicyInputBuilder;
|
5 3 |
|
4 + | pub use crate::operation::attach_role_policy::_attach_role_policy_output::AttachRolePolicyOutputBuilder;
|
5 + |
|
6 6 | impl crate::operation::attach_role_policy::builders::AttachRolePolicyInputBuilder {
|
7 7 | /// Sends a request with this input using the given client.
|
8 8 | pub async fn send_with(
|
9 9 | self,
|
10 10 | client: &crate::Client,
|
11 11 | ) -> ::std::result::Result<
|
12 12 | crate::operation::attach_role_policy::AttachRolePolicyOutput,
|
13 13 | ::aws_smithy_runtime_api::client::result::SdkError<
|
14 14 | crate::operation::attach_role_policy::AttachRolePolicyError,
|
15 15 | ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
|
16 16 | >,
|
17 17 | > {
|
18 18 | let mut fluent_builder = client.attach_role_policy();
|
19 19 | fluent_builder.inner = self;
|
20 20 | fluent_builder.send().await
|
21 21 | }
|
22 22 | }
|
23 23 | /// Fluent builder constructing a request to `AttachRolePolicy`.
|
24 24 | ///
|
25 25 | /// <p>Attaches the specified managed policy to the specified IAM role. When you attach a managed policy to a role, the managed policy becomes part of the role's permission (access) policy.</p><note>
|
26 26 | /// <p>You cannot use a managed policy as the role's trust policy. The role's trust policy is created at the same time as the role, using <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html"> <code>CreateRole</code> </a>. You can update a role's trust policy using <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateAssumeRolePolicy.html"> <code>UpdateAssumerolePolicy</code> </a>.</p>
|
27 27 | /// </note>
|
28 28 | /// <p>Use this operation to attach a <i>managed</i> policy to a role. To embed an inline policy in a role, use <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutRolePolicy.html"> <code>PutRolePolicy</code> </a>. For more information about policies, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html">Managed policies and inline policies</a> in the <i>IAM User Guide</i>.</p>
|
29 29 | /// <p>As a best practice, you can validate your IAM policies. To learn more, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html">Validating IAM policies</a> in the <i>IAM User Guide</i>.</p>
|
30 30 | #[derive(::std::clone::Clone, ::std::fmt::Debug)]
|
31 31 | pub struct AttachRolePolicyFluentBuilder {
|
32 32 | handle: ::std::sync::Arc<crate::client::Handle>,
|
33 33 | inner: crate::operation::attach_role_policy::builders::AttachRolePolicyInputBuilder,
|
34 34 | config_override: ::std::option::Option<crate::config::Builder>,
|
35 35 | }
|