aws_sdk_iot/client/create_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 [`CreatePolicy`](crate::operation::create_policy::builders::CreatePolicyFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`policy_name(impl Into<String>)`](crate::operation::create_policy::builders::CreatePolicyFluentBuilder::policy_name) / [`set_policy_name(Option<String>)`](crate::operation::create_policy::builders::CreatePolicyFluentBuilder::set_policy_name):<br>required: **true**<br><p>The policy name.</p><br>
7 /// - [`policy_document(impl Into<String>)`](crate::operation::create_policy::builders::CreatePolicyFluentBuilder::policy_document) / [`set_policy_document(Option<String>)`](crate::operation::create_policy::builders::CreatePolicyFluentBuilder::set_policy_document):<br>required: **true**<br><p>The JSON document that describes the policy. <b>policyDocument</b> must have a minimum length of 1, with a maximum length of 2048, excluding whitespace.</p><br>
8 /// - [`tags(Tag)`](crate::operation::create_policy::builders::CreatePolicyFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_policy::builders::CreatePolicyFluentBuilder::set_tags):<br>required: **false**<br><p>Metadata which can be used to manage the policy.</p><note> <p>For URI Request parameters use format: ...key1=value1&key2=value2...</p> <p>For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."</p> <p>For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."</p> </note><br>
9 /// - On success, responds with [`CreatePolicyOutput`](crate::operation::create_policy::CreatePolicyOutput) with field(s):
10 /// - [`policy_name(Option<String>)`](crate::operation::create_policy::CreatePolicyOutput::policy_name): <p>The policy name.</p>
11 /// - [`policy_arn(Option<String>)`](crate::operation::create_policy::CreatePolicyOutput::policy_arn): <p>The policy ARN.</p>
12 /// - [`policy_document(Option<String>)`](crate::operation::create_policy::CreatePolicyOutput::policy_document): <p>The JSON document that describes the policy.</p>
13 /// - [`policy_version_id(Option<String>)`](crate::operation::create_policy::CreatePolicyOutput::policy_version_id): <p>The policy version ID.</p>
14 /// - On failure, responds with [`SdkError<CreatePolicyError>`](crate::operation::create_policy::CreatePolicyError)
15 pub fn create_policy(&self) -> crate::operation::create_policy::builders::CreatePolicyFluentBuilder {
16 crate::operation::create_policy::builders::CreatePolicyFluentBuilder::new(self.handle.clone())
17 }
18}