/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace WAFV2 { namespace Model { /** */ class AWS_WAFV2_API PutPermissionPolicyRequest : public WAFV2Request { public: PutPermissionPolicyRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "PutPermissionPolicy"; } Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The Amazon Resource Name (ARN) of the RuleGroup to which you want to * attach the policy.

*/ inline const Aws::String& GetResourceArn() const{ return m_resourceArn; } /** *

The Amazon Resource Name (ARN) of the RuleGroup to which you want to * attach the policy.

*/ inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the RuleGroup to which you want to * attach the policy.

*/ inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; } /** *

The Amazon Resource Name (ARN) of the RuleGroup to which you want to * attach the policy.

*/ inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the RuleGroup to which you want to * attach the policy.

*/ inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the RuleGroup to which you want to * attach the policy.

*/ inline PutPermissionPolicyRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the RuleGroup to which you want to * attach the policy.

*/ inline PutPermissionPolicyRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the RuleGroup to which you want to * attach the policy.

*/ inline PutPermissionPolicyRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;} /** *

The policy to attach to the specified rule group.

The policy * specifications must conform to the following:

  • The policy must * be composed using IAM Policy version 2012-10-17 or version 2015-01-01.

  • *
  • The policy must include specifications for Effect, * Action, and Principal.

  • * Effect must specify Allow.

  • * Action must specify wafv2:CreateWebACL, * wafv2:UpdateWebACL, and * wafv2:PutFirewallManagerRuleGroups. AWS WAF rejects any extra * actions or wildcard actions in the policy.

  • The policy must not * include a Resource parameter.

For more * information, see IAM * Policies.

*/ inline const Aws::String& GetPolicy() const{ return m_policy; } /** *

The policy to attach to the specified rule group.

The policy * specifications must conform to the following:

  • The policy must * be composed using IAM Policy version 2012-10-17 or version 2015-01-01.

  • *
  • The policy must include specifications for Effect, * Action, and Principal.

  • * Effect must specify Allow.

  • * Action must specify wafv2:CreateWebACL, * wafv2:UpdateWebACL, and * wafv2:PutFirewallManagerRuleGroups. AWS WAF rejects any extra * actions or wildcard actions in the policy.

  • The policy must not * include a Resource parameter.

For more * information, see IAM * Policies.

*/ inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; } /** *

The policy to attach to the specified rule group.

The policy * specifications must conform to the following:

  • The policy must * be composed using IAM Policy version 2012-10-17 or version 2015-01-01.

  • *
  • The policy must include specifications for Effect, * Action, and Principal.

  • * Effect must specify Allow.

  • * Action must specify wafv2:CreateWebACL, * wafv2:UpdateWebACL, and * wafv2:PutFirewallManagerRuleGroups. AWS WAF rejects any extra * actions or wildcard actions in the policy.

  • The policy must not * include a Resource parameter.

For more * information, see IAM * Policies.

*/ inline void SetPolicy(const Aws::String& value) { m_policyHasBeenSet = true; m_policy = value; } /** *

The policy to attach to the specified rule group.

The policy * specifications must conform to the following:

  • The policy must * be composed using IAM Policy version 2012-10-17 or version 2015-01-01.

  • *
  • The policy must include specifications for Effect, * Action, and Principal.

  • * Effect must specify Allow.

  • * Action must specify wafv2:CreateWebACL, * wafv2:UpdateWebACL, and * wafv2:PutFirewallManagerRuleGroups. AWS WAF rejects any extra * actions or wildcard actions in the policy.

  • The policy must not * include a Resource parameter.

For more * information, see IAM * Policies.

*/ inline void SetPolicy(Aws::String&& value) { m_policyHasBeenSet = true; m_policy = std::move(value); } /** *

The policy to attach to the specified rule group.

The policy * specifications must conform to the following:

  • The policy must * be composed using IAM Policy version 2012-10-17 or version 2015-01-01.

  • *
  • The policy must include specifications for Effect, * Action, and Principal.

  • * Effect must specify Allow.

  • * Action must specify wafv2:CreateWebACL, * wafv2:UpdateWebACL, and * wafv2:PutFirewallManagerRuleGroups. AWS WAF rejects any extra * actions or wildcard actions in the policy.

  • The policy must not * include a Resource parameter.

For more * information, see IAM * Policies.

*/ inline void SetPolicy(const char* value) { m_policyHasBeenSet = true; m_policy.assign(value); } /** *

The policy to attach to the specified rule group.

The policy * specifications must conform to the following:

  • The policy must * be composed using IAM Policy version 2012-10-17 or version 2015-01-01.

  • *
  • The policy must include specifications for Effect, * Action, and Principal.

  • * Effect must specify Allow.

  • * Action must specify wafv2:CreateWebACL, * wafv2:UpdateWebACL, and * wafv2:PutFirewallManagerRuleGroups. AWS WAF rejects any extra * actions or wildcard actions in the policy.

  • The policy must not * include a Resource parameter.

For more * information, see IAM * Policies.

*/ inline PutPermissionPolicyRequest& WithPolicy(const Aws::String& value) { SetPolicy(value); return *this;} /** *

The policy to attach to the specified rule group.

The policy * specifications must conform to the following:

  • The policy must * be composed using IAM Policy version 2012-10-17 or version 2015-01-01.

  • *
  • The policy must include specifications for Effect, * Action, and Principal.

  • * Effect must specify Allow.

  • * Action must specify wafv2:CreateWebACL, * wafv2:UpdateWebACL, and * wafv2:PutFirewallManagerRuleGroups. AWS WAF rejects any extra * actions or wildcard actions in the policy.

  • The policy must not * include a Resource parameter.

For more * information, see IAM * Policies.

*/ inline PutPermissionPolicyRequest& WithPolicy(Aws::String&& value) { SetPolicy(std::move(value)); return *this;} /** *

The policy to attach to the specified rule group.

The policy * specifications must conform to the following:

  • The policy must * be composed using IAM Policy version 2012-10-17 or version 2015-01-01.

  • *
  • The policy must include specifications for Effect, * Action, and Principal.

  • * Effect must specify Allow.

  • * Action must specify wafv2:CreateWebACL, * wafv2:UpdateWebACL, and * wafv2:PutFirewallManagerRuleGroups. AWS WAF rejects any extra * actions or wildcard actions in the policy.

  • The policy must not * include a Resource parameter.

For more * information, see IAM * Policies.

*/ inline PutPermissionPolicyRequest& WithPolicy(const char* value) { SetPolicy(value); return *this;} private: Aws::String m_resourceArn; bool m_resourceArnHasBeenSet; Aws::String m_policy; bool m_policyHasBeenSet; }; } // namespace Model } // namespace WAFV2 } // namespace Aws