aws_sdk_iot/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_name(impl Into<String>)`](crate::operation::get_policy::builders::GetPolicyFluentBuilder::policy_name) / [`set_policy_name(Option<String>)`](crate::operation::get_policy::builders::GetPolicyFluentBuilder::set_policy_name):<br>required: **true**<br><p>The name of the policy.</p><br>
7    /// - On success, responds with [`GetPolicyOutput`](crate::operation::get_policy::GetPolicyOutput) with field(s):
8    ///   - [`policy_name(Option<String>)`](crate::operation::get_policy::GetPolicyOutput::policy_name): <p>The policy name.</p>
9    ///   - [`policy_arn(Option<String>)`](crate::operation::get_policy::GetPolicyOutput::policy_arn): <p>The policy ARN.</p>
10    ///   - [`policy_document(Option<String>)`](crate::operation::get_policy::GetPolicyOutput::policy_document): <p>The JSON document that describes the policy.</p>
11    ///   - [`default_version_id(Option<String>)`](crate::operation::get_policy::GetPolicyOutput::default_version_id): <p>The default policy version ID.</p>
12    ///   - [`creation_date(Option<DateTime>)`](crate::operation::get_policy::GetPolicyOutput::creation_date): <p>The date the policy was created.</p>
13    ///   - [`last_modified_date(Option<DateTime>)`](crate::operation::get_policy::GetPolicyOutput::last_modified_date): <p>The date the policy was last modified.</p>
14    ///   - [`generation_id(Option<String>)`](crate::operation::get_policy::GetPolicyOutput::generation_id): <p>The generation ID of the policy.</p>
15    /// - On failure, responds with [`SdkError<GetPolicyError>`](crate::operation::get_policy::GetPolicyError)
16    pub fn get_policy(&self) -> crate::operation::get_policy::builders::GetPolicyFluentBuilder {
17        crate::operation::get_policy::builders::GetPolicyFluentBuilder::new(self.handle.clone())
18    }
19}