aws_sdk_wafv2/client/put_permission_policy.rs
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`PutPermissionPolicy`](crate::operation::put_permission_policy::builders::PutPermissionPolicyFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`resource_arn(impl Into<String>)`](crate::operation::put_permission_policy::builders::PutPermissionPolicyFluentBuilder::resource_arn) / [`set_resource_arn(Option<String>)`](crate::operation::put_permission_policy::builders::PutPermissionPolicyFluentBuilder::set_resource_arn):<br>required: **true**<br><p>The Amazon Resource Name (ARN) of the <code>RuleGroup</code> to which you want to attach the policy.</p><br>
/// - [`policy(impl Into<String>)`](crate::operation::put_permission_policy::builders::PutPermissionPolicyFluentBuilder::policy) / [`set_policy(Option<String>)`](crate::operation::put_permission_policy::builders::PutPermissionPolicyFluentBuilder::set_policy):<br>required: **true**<br><p>The policy to attach to the specified rule group.</p> <p>The policy specifications must conform to the following:</p> <ul> <li> <p>The policy must be composed using IAM Policy version 2012-10-17.</p></li> <li> <p>The policy must include specifications for <code>Effect</code>, <code>Action</code>, and <code>Principal</code>.</p></li> <li> <p><code>Effect</code> must specify <code>Allow</code>.</p></li> <li> <p><code>Action</code> must specify <code>wafv2:CreateWebACL</code>, <code>wafv2:UpdateWebACL</code>, and <code>wafv2:PutFirewallManagerRuleGroups</code> and may optionally specify <code>wafv2:GetRuleGroup</code>. WAF rejects any extra actions or wildcard actions in the policy.</p></li> <li> <p>The policy must not include a <code>Resource</code> parameter.</p></li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html">IAM Policies</a>.</p><br>
/// - On success, responds with [`PutPermissionPolicyOutput`](crate::operation::put_permission_policy::PutPermissionPolicyOutput)
/// - On failure, responds with [`SdkError<PutPermissionPolicyError>`](crate::operation::put_permission_policy::PutPermissionPolicyError)
pub fn put_permission_policy(&self) -> crate::operation::put_permission_policy::builders::PutPermissionPolicyFluentBuilder {
crate::operation::put_permission_policy::builders::PutPermissionPolicyFluentBuilder::new(self.handle.clone())
}
}