aws_sdk_verifiedpermissions/client/
create_policy_template.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreatePolicyTemplate`](crate::operation::create_policy_template::builders::CreatePolicyTemplateFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`client_token(impl Into<String>)`](crate::operation::create_policy_template::builders::CreatePolicyTemplateFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::create_policy_template::builders::CreatePolicyTemplateFluentBuilder::set_client_token):<br>required: **false**<br><p>Specifies a unique, case-sensitive ID that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p> <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p> <p>If you retry the operation with the same <code>ClientToken</code>, but with different parameters, the retry fails with an <code>ConflictException</code> error.</p> <p>Verified Permissions recognizes a <code>ClientToken</code> for eight hours. After eight hours, the next request with the same parameters performs the operation again regardless of the value of <code>ClientToken</code>.</p><br>
    ///   - [`policy_store_id(impl Into<String>)`](crate::operation::create_policy_template::builders::CreatePolicyTemplateFluentBuilder::policy_store_id) / [`set_policy_store_id(Option<String>)`](crate::operation::create_policy_template::builders::CreatePolicyTemplateFluentBuilder::set_policy_store_id):<br>required: **true**<br><p>The ID of the policy store in which to create the policy template.</p><br>
    ///   - [`description(impl Into<String>)`](crate::operation::create_policy_template::builders::CreatePolicyTemplateFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_policy_template::builders::CreatePolicyTemplateFluentBuilder::set_description):<br>required: **false**<br><p>Specifies a description for the policy template.</p><br>
    ///   - [`statement(impl Into<String>)`](crate::operation::create_policy_template::builders::CreatePolicyTemplateFluentBuilder::statement) / [`set_statement(Option<String>)`](crate::operation::create_policy_template::builders::CreatePolicyTemplateFluentBuilder::set_statement):<br>required: **true**<br><p>Specifies the content that you want to use for the new policy template, written in the Cedar policy language.</p><br>
    /// - On success, responds with [`CreatePolicyTemplateOutput`](crate::operation::create_policy_template::CreatePolicyTemplateOutput) with field(s):
    ///   - [`policy_store_id(String)`](crate::operation::create_policy_template::CreatePolicyTemplateOutput::policy_store_id): <p>The ID of the policy store that contains the policy template.</p>
    ///   - [`policy_template_id(String)`](crate::operation::create_policy_template::CreatePolicyTemplateOutput::policy_template_id): <p>The unique ID of the new policy template.</p>
    ///   - [`created_date(DateTime)`](crate::operation::create_policy_template::CreatePolicyTemplateOutput::created_date): <p>The date and time the policy template was originally created.</p>
    ///   - [`last_updated_date(DateTime)`](crate::operation::create_policy_template::CreatePolicyTemplateOutput::last_updated_date): <p>The date and time the policy template was most recently updated.</p>
    /// - On failure, responds with [`SdkError<CreatePolicyTemplateError>`](crate::operation::create_policy_template::CreatePolicyTemplateError)
    pub fn create_policy_template(&self) -> crate::operation::create_policy_template::builders::CreatePolicyTemplateFluentBuilder {
        crate::operation::create_policy_template::builders::CreatePolicyTemplateFluentBuilder::new(self.handle.clone())
    }
}