aws_sdk_iam/client/get_role_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 [`GetRolePolicy`](crate::operation::get_role_policy::builders::GetRolePolicyFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`role_name(impl Into<String>)`](crate::operation::get_role_policy::builders::GetRolePolicyFluentBuilder::role_name) / [`set_role_name(Option<String>)`](crate::operation::get_role_policy::builders::GetRolePolicyFluentBuilder::set_role_name):<br>required: **true**<br><p>The name of the role associated with the policy.</p> <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p><br>
7 /// - [`policy_name(impl Into<String>)`](crate::operation::get_role_policy::builders::GetRolePolicyFluentBuilder::policy_name) / [`set_policy_name(Option<String>)`](crate::operation::get_role_policy::builders::GetRolePolicyFluentBuilder::set_policy_name):<br>required: **true**<br><p>The name of the policy document to get.</p> <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p><br>
8 /// - On success, responds with [`GetRolePolicyOutput`](crate::operation::get_role_policy::GetRolePolicyOutput) with field(s):
9 /// - [`role_name(String)`](crate::operation::get_role_policy::GetRolePolicyOutput::role_name): <p>The role the policy is associated with.</p>
10 /// - [`policy_name(String)`](crate::operation::get_role_policy::GetRolePolicyOutput::policy_name): <p>The name of the policy.</p>
11 /// - [`policy_document(String)`](crate::operation::get_role_policy::GetRolePolicyOutput::policy_document): <p>The policy document.</p> <p>IAM stores policies in JSON format. However, resources that were created using CloudFormation templates can be formatted in YAML. CloudFormation always converts a YAML policy to JSON format before submitting it to IAM.</p>
12 /// - On failure, responds with [`SdkError<GetRolePolicyError>`](crate::operation::get_role_policy::GetRolePolicyError)
13 pub fn get_role_policy(&self) -> crate::operation::get_role_policy::builders::GetRolePolicyFluentBuilder {
14 crate::operation::get_role_policy::builders::GetRolePolicyFluentBuilder::new(self.handle.clone())
15 }
16}