aws_sdk_verifiedpermissions/client/
create_policy_store.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreatePolicyStore`](crate::operation::create_policy_store::builders::CreatePolicyStoreFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`client_token(impl Into<String>)`](crate::operation::create_policy_store::builders::CreatePolicyStoreFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::create_policy_store::builders::CreatePolicyStoreFluentBuilder::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>
    ///   - [`validation_settings(ValidationSettings)`](crate::operation::create_policy_store::builders::CreatePolicyStoreFluentBuilder::validation_settings) / [`set_validation_settings(Option<ValidationSettings>)`](crate::operation::create_policy_store::builders::CreatePolicyStoreFluentBuilder::set_validation_settings):<br>required: **true**<br><p>Specifies the validation setting for this policy store.</p> <p>Currently, the only valid and required value is <code>Mode</code>.</p><important>  <p>We recommend that you turn on <code>STRICT</code> mode only after you define a schema. If a schema doesn't exist, then <code>STRICT</code> mode causes any policy to fail validation, and Verified Permissions rejects the policy. You can turn off validation by using the <a href="https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_UpdatePolicyStore">UpdatePolicyStore</a>. Then, when you have a schema defined, use <a href="https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_UpdatePolicyStore">UpdatePolicyStore</a> again to turn validation back on.</p> </important><br>
    ///   - [`description(impl Into<String>)`](crate::operation::create_policy_store::builders::CreatePolicyStoreFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_policy_store::builders::CreatePolicyStoreFluentBuilder::set_description):<br>required: **false**<br><p>Descriptive text that you can provide to help with identification of the current policy store.</p><br>
    /// - On success, responds with [`CreatePolicyStoreOutput`](crate::operation::create_policy_store::CreatePolicyStoreOutput) with field(s):
    ///   - [`policy_store_id(String)`](crate::operation::create_policy_store::CreatePolicyStoreOutput::policy_store_id): <p>The unique ID of the new policy store.</p>
    ///   - [`arn(String)`](crate::operation::create_policy_store::CreatePolicyStoreOutput::arn): <p>The Amazon Resource Name (ARN) of the new policy store.</p>
    ///   - [`created_date(DateTime)`](crate::operation::create_policy_store::CreatePolicyStoreOutput::created_date): <p>The date and time the policy store was originally created.</p>
    ///   - [`last_updated_date(DateTime)`](crate::operation::create_policy_store::CreatePolicyStoreOutput::last_updated_date): <p>The date and time the policy store was last updated.</p>
    /// - On failure, responds with [`SdkError<CreatePolicyStoreError>`](crate::operation::create_policy_store::CreatePolicyStoreError)
    pub fn create_policy_store(&self) -> crate::operation::create_policy_store::builders::CreatePolicyStoreFluentBuilder {
        crate::operation::create_policy_store::builders::CreatePolicyStoreFluentBuilder::new(self.handle.clone())
    }
}