aws_sdk_entityresolution/client/
add_policy_statement.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 [`AddPolicyStatement`](crate::operation::add_policy_statement::builders::AddPolicyStatementFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`arn(impl Into<String>)`](crate::operation::add_policy_statement::builders::AddPolicyStatementFluentBuilder::arn) / [`set_arn(Option<String>)`](crate::operation::add_policy_statement::builders::AddPolicyStatementFluentBuilder::set_arn):<br>required: **true**<br><p>The Amazon Resource Name (ARN) of the resource that will be accessed by the principal.</p><br>
7    ///   - [`statement_id(impl Into<String>)`](crate::operation::add_policy_statement::builders::AddPolicyStatementFluentBuilder::statement_id) / [`set_statement_id(Option<String>)`](crate::operation::add_policy_statement::builders::AddPolicyStatementFluentBuilder::set_statement_id):<br>required: **true**<br><p>A statement identifier that differentiates the statement from others in the same policy.</p><br>
8    ///   - [`effect(StatementEffect)`](crate::operation::add_policy_statement::builders::AddPolicyStatementFluentBuilder::effect) / [`set_effect(Option<StatementEffect>)`](crate::operation::add_policy_statement::builders::AddPolicyStatementFluentBuilder::set_effect):<br>required: **true**<br><p>Determines whether the permissions specified in the policy are to be allowed (<code>Allow</code>) or denied (<code>Deny</code>).</p><important>  <p>If you set the value of the <code>effect</code> parameter to <code>Deny</code> for the <code>AddPolicyStatement</code> operation, you must also set the value of the <code>effect</code> parameter in the <code>policy</code> to <code>Deny</code> for the <code>PutPolicy</code> operation.</p> </important><br>
9    ///   - [`action(impl Into<String>)`](crate::operation::add_policy_statement::builders::AddPolicyStatementFluentBuilder::action) / [`set_action(Option<Vec::<String>>)`](crate::operation::add_policy_statement::builders::AddPolicyStatementFluentBuilder::set_action):<br>required: **true**<br><p>The action that the principal can use on the resource.</p> <p>For example, <code>entityresolution:GetIdMappingJob</code>, <code>entityresolution:GetMatchingJob</code>.</p><br>
10    ///   - [`principal(impl Into<String>)`](crate::operation::add_policy_statement::builders::AddPolicyStatementFluentBuilder::principal) / [`set_principal(Option<Vec::<String>>)`](crate::operation::add_policy_statement::builders::AddPolicyStatementFluentBuilder::set_principal):<br>required: **true**<br><p>The Amazon Web Services service or Amazon Web Services account that can access the resource defined as ARN.</p><br>
11    ///   - [`condition(impl Into<String>)`](crate::operation::add_policy_statement::builders::AddPolicyStatementFluentBuilder::condition) / [`set_condition(Option<String>)`](crate::operation::add_policy_statement::builders::AddPolicyStatementFluentBuilder::set_condition):<br>required: **false**<br><p>A set of condition keys that you can use in key policies.</p><br>
12    /// - On success, responds with [`AddPolicyStatementOutput`](crate::operation::add_policy_statement::AddPolicyStatementOutput) with field(s):
13    ///   - [`arn(String)`](crate::operation::add_policy_statement::AddPolicyStatementOutput::arn): <p>The Amazon Resource Name (ARN) of the resource that will be accessed by the principal.</p>
14    ///   - [`token(String)`](crate::operation::add_policy_statement::AddPolicyStatementOutput::token): <p>A unique identifier for the current revision of the policy.</p>
15    ///   - [`policy(Option<String>)`](crate::operation::add_policy_statement::AddPolicyStatementOutput::policy): <p>The resource-based policy.</p>
16    /// - On failure, responds with [`SdkError<AddPolicyStatementError>`](crate::operation::add_policy_statement::AddPolicyStatementError)
17    pub fn add_policy_statement(&self) -> crate::operation::add_policy_statement::builders::AddPolicyStatementFluentBuilder {
18        crate::operation::add_policy_statement::builders::AddPolicyStatementFluentBuilder::new(self.handle.clone())
19    }
20}