aws_sdk_dsql/client/
put_cluster_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 [`PutClusterPolicy`](crate::operation::put_cluster_policy::builders::PutClusterPolicyFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`identifier(impl Into<String>)`](crate::operation::put_cluster_policy::builders::PutClusterPolicyFluentBuilder::identifier) / [`set_identifier(Option<String>)`](crate::operation::put_cluster_policy::builders::PutClusterPolicyFluentBuilder::set_identifier):<br>required: **true**<br><p>The ID of the cluster.</p><br>
7    ///   - [`policy(impl Into<String>)`](crate::operation::put_cluster_policy::builders::PutClusterPolicyFluentBuilder::policy) / [`set_policy(Option<String>)`](crate::operation::put_cluster_policy::builders::PutClusterPolicyFluentBuilder::set_policy):<br>required: **true**<br><p>The resource-based policy document to attach to the cluster. This should be a valid JSON policy document that defines permissions and conditions.</p><br>
8    ///   - [`bypass_policy_lockout_safety_check(bool)`](crate::operation::put_cluster_policy::builders::PutClusterPolicyFluentBuilder::bypass_policy_lockout_safety_check) / [`set_bypass_policy_lockout_safety_check(Option<bool>)`](crate::operation::put_cluster_policy::builders::PutClusterPolicyFluentBuilder::set_bypass_policy_lockout_safety_check):<br>required: **false**<br><p>A flag that allows you to bypass the policy lockout safety check. When set to true, this parameter allows you to apply a policy that might lock you out of the cluster. Use with caution.</p><br>
9    ///   - [`expected_policy_version(impl Into<String>)`](crate::operation::put_cluster_policy::builders::PutClusterPolicyFluentBuilder::expected_policy_version) / [`set_expected_policy_version(Option<String>)`](crate::operation::put_cluster_policy::builders::PutClusterPolicyFluentBuilder::set_expected_policy_version):<br>required: **false**<br><p>The expected version of the current policy. This parameter ensures that you're updating the correct version of the policy and helps prevent concurrent modification conflicts.</p><br>
10    ///   - [`client_token(impl Into<String>)`](crate::operation::put_cluster_policy::builders::PutClusterPolicyFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::put_cluster_policy::builders::PutClusterPolicyFluentBuilder::set_client_token):<br>required: **false**<br><p>Idempotency token so a request is only processed once.</p><br>
11    /// - On success, responds with [`PutClusterPolicyOutput`](crate::operation::put_cluster_policy::PutClusterPolicyOutput) with field(s):
12    ///   - [`policy_version(String)`](crate::operation::put_cluster_policy::PutClusterPolicyOutput::policy_version): <p>The version of the policy after it has been updated or created.</p>
13    /// - On failure, responds with [`SdkError<PutClusterPolicyError>`](crate::operation::put_cluster_policy::PutClusterPolicyError)
14    pub fn put_cluster_policy(&self) -> crate::operation::put_cluster_policy::builders::PutClusterPolicyFluentBuilder {
15        crate::operation::put_cluster_policy::builders::PutClusterPolicyFluentBuilder::new(self.handle.clone())
16    }
17}