aws_sdk_iam/client/get_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 [`GetPolicy`](crate::operation::get_policy::builders::GetPolicyFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`policy_arn(impl Into<String>)`](crate::operation::get_policy::builders::GetPolicyFluentBuilder::policy_arn) / [`set_policy_arn(Option<String>)`](crate::operation::get_policy::builders::GetPolicyFluentBuilder::set_policy_arn):<br>required: **true**<br><p>The Amazon Resource Name (ARN) of the managed policy that you want information about.</p> <p>For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>.</p><br>
7 /// - On success, responds with [`GetPolicyOutput`](crate::operation::get_policy::GetPolicyOutput) with field(s):
8 /// - [`policy(Option<Policy>)`](crate::operation::get_policy::GetPolicyOutput::policy): <p>A structure containing details about the policy.</p>
9 /// - On failure, responds with [`SdkError<GetPolicyError>`](crate::operation::get_policy::GetPolicyError)
10 pub fn get_policy(&self) -> crate::operation::get_policy::builders::GetPolicyFluentBuilder {
11 crate::operation::get_policy::builders::GetPolicyFluentBuilder::new(self.handle.clone())
12 }
13}