/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace FMS { namespace Model { /** *

Details of the Firewall Manager policy.

See Also:

AWS * API Reference

*/ class PolicySummary { public: AWS_FMS_API PolicySummary(); AWS_FMS_API PolicySummary(Aws::Utils::Json::JsonView jsonValue); AWS_FMS_API PolicySummary& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_FMS_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The Amazon Resource Name (ARN) of the specified policy.

*/ inline const Aws::String& GetPolicyArn() const{ return m_policyArn; } /** *

The Amazon Resource Name (ARN) of the specified policy.

*/ inline bool PolicyArnHasBeenSet() const { return m_policyArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the specified policy.

*/ inline void SetPolicyArn(const Aws::String& value) { m_policyArnHasBeenSet = true; m_policyArn = value; } /** *

The Amazon Resource Name (ARN) of the specified policy.

*/ inline void SetPolicyArn(Aws::String&& value) { m_policyArnHasBeenSet = true; m_policyArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the specified policy.

*/ inline void SetPolicyArn(const char* value) { m_policyArnHasBeenSet = true; m_policyArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the specified policy.

*/ inline PolicySummary& WithPolicyArn(const Aws::String& value) { SetPolicyArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the specified policy.

*/ inline PolicySummary& WithPolicyArn(Aws::String&& value) { SetPolicyArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the specified policy.

*/ inline PolicySummary& WithPolicyArn(const char* value) { SetPolicyArn(value); return *this;} /** *

The ID of the specified policy.

*/ inline const Aws::String& GetPolicyId() const{ return m_policyId; } /** *

The ID of the specified policy.

*/ inline bool PolicyIdHasBeenSet() const { return m_policyIdHasBeenSet; } /** *

The ID of the specified policy.

*/ inline void SetPolicyId(const Aws::String& value) { m_policyIdHasBeenSet = true; m_policyId = value; } /** *

The ID of the specified policy.

*/ inline void SetPolicyId(Aws::String&& value) { m_policyIdHasBeenSet = true; m_policyId = std::move(value); } /** *

The ID of the specified policy.

*/ inline void SetPolicyId(const char* value) { m_policyIdHasBeenSet = true; m_policyId.assign(value); } /** *

The ID of the specified policy.

*/ inline PolicySummary& WithPolicyId(const Aws::String& value) { SetPolicyId(value); return *this;} /** *

The ID of the specified policy.

*/ inline PolicySummary& WithPolicyId(Aws::String&& value) { SetPolicyId(std::move(value)); return *this;} /** *

The ID of the specified policy.

*/ inline PolicySummary& WithPolicyId(const char* value) { SetPolicyId(value); return *this;} /** *

The name of the specified policy.

*/ inline const Aws::String& GetPolicyName() const{ return m_policyName; } /** *

The name of the specified policy.

*/ inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } /** *

The name of the specified policy.

*/ inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } /** *

The name of the specified policy.

*/ inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } /** *

The name of the specified policy.

*/ inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } /** *

The name of the specified policy.

*/ inline PolicySummary& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} /** *

The name of the specified policy.

*/ inline PolicySummary& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} /** *

The name of the specified policy.

*/ inline PolicySummary& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} /** *

The type of resource protected by or in scope of the policy. This is in the * format shown in the Amazon * Web Services Resource Types Reference. For WAF and Shield Advanced, examples * include AWS::ElasticLoadBalancingV2::LoadBalancer and * AWS::CloudFront::Distribution. For a security group common policy, * valid values are AWS::EC2::NetworkInterface and * AWS::EC2::Instance. For a security group content audit policy, * valid values are AWS::EC2::SecurityGroup, * AWS::EC2::NetworkInterface, and AWS::EC2::Instance. * For a security group usage audit policy, the value is * AWS::EC2::SecurityGroup. For an Network Firewall policy or DNS * Firewall policy, the value is AWS::EC2::VPC.

*/ inline const Aws::String& GetResourceType() const{ return m_resourceType; } /** *

The type of resource protected by or in scope of the policy. This is in the * format shown in the Amazon * Web Services Resource Types Reference. For WAF and Shield Advanced, examples * include AWS::ElasticLoadBalancingV2::LoadBalancer and * AWS::CloudFront::Distribution. For a security group common policy, * valid values are AWS::EC2::NetworkInterface and * AWS::EC2::Instance. For a security group content audit policy, * valid values are AWS::EC2::SecurityGroup, * AWS::EC2::NetworkInterface, and AWS::EC2::Instance. * For a security group usage audit policy, the value is * AWS::EC2::SecurityGroup. For an Network Firewall policy or DNS * Firewall policy, the value is AWS::EC2::VPC.

*/ inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; } /** *

The type of resource protected by or in scope of the policy. This is in the * format shown in the Amazon * Web Services Resource Types Reference. For WAF and Shield Advanced, examples * include AWS::ElasticLoadBalancingV2::LoadBalancer and * AWS::CloudFront::Distribution. For a security group common policy, * valid values are AWS::EC2::NetworkInterface and * AWS::EC2::Instance. For a security group content audit policy, * valid values are AWS::EC2::SecurityGroup, * AWS::EC2::NetworkInterface, and AWS::EC2::Instance. * For a security group usage audit policy, the value is * AWS::EC2::SecurityGroup. For an Network Firewall policy or DNS * Firewall policy, the value is AWS::EC2::VPC.

*/ inline void SetResourceType(const Aws::String& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; } /** *

The type of resource protected by or in scope of the policy. This is in the * format shown in the Amazon * Web Services Resource Types Reference. For WAF and Shield Advanced, examples * include AWS::ElasticLoadBalancingV2::LoadBalancer and * AWS::CloudFront::Distribution. For a security group common policy, * valid values are AWS::EC2::NetworkInterface and * AWS::EC2::Instance. For a security group content audit policy, * valid values are AWS::EC2::SecurityGroup, * AWS::EC2::NetworkInterface, and AWS::EC2::Instance. * For a security group usage audit policy, the value is * AWS::EC2::SecurityGroup. For an Network Firewall policy or DNS * Firewall policy, the value is AWS::EC2::VPC.

*/ inline void SetResourceType(Aws::String&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); } /** *

The type of resource protected by or in scope of the policy. This is in the * format shown in the Amazon * Web Services Resource Types Reference. For WAF and Shield Advanced, examples * include AWS::ElasticLoadBalancingV2::LoadBalancer and * AWS::CloudFront::Distribution. For a security group common policy, * valid values are AWS::EC2::NetworkInterface and * AWS::EC2::Instance. For a security group content audit policy, * valid values are AWS::EC2::SecurityGroup, * AWS::EC2::NetworkInterface, and AWS::EC2::Instance. * For a security group usage audit policy, the value is * AWS::EC2::SecurityGroup. For an Network Firewall policy or DNS * Firewall policy, the value is AWS::EC2::VPC.

*/ inline void SetResourceType(const char* value) { m_resourceTypeHasBeenSet = true; m_resourceType.assign(value); } /** *

The type of resource protected by or in scope of the policy. This is in the * format shown in the Amazon * Web Services Resource Types Reference. For WAF and Shield Advanced, examples * include AWS::ElasticLoadBalancingV2::LoadBalancer and * AWS::CloudFront::Distribution. For a security group common policy, * valid values are AWS::EC2::NetworkInterface and * AWS::EC2::Instance. For a security group content audit policy, * valid values are AWS::EC2::SecurityGroup, * AWS::EC2::NetworkInterface, and AWS::EC2::Instance. * For a security group usage audit policy, the value is * AWS::EC2::SecurityGroup. For an Network Firewall policy or DNS * Firewall policy, the value is AWS::EC2::VPC.

*/ inline PolicySummary& WithResourceType(const Aws::String& value) { SetResourceType(value); return *this;} /** *

The type of resource protected by or in scope of the policy. This is in the * format shown in the Amazon * Web Services Resource Types Reference. For WAF and Shield Advanced, examples * include AWS::ElasticLoadBalancingV2::LoadBalancer and * AWS::CloudFront::Distribution. For a security group common policy, * valid values are AWS::EC2::NetworkInterface and * AWS::EC2::Instance. For a security group content audit policy, * valid values are AWS::EC2::SecurityGroup, * AWS::EC2::NetworkInterface, and AWS::EC2::Instance. * For a security group usage audit policy, the value is * AWS::EC2::SecurityGroup. For an Network Firewall policy or DNS * Firewall policy, the value is AWS::EC2::VPC.

*/ inline PolicySummary& WithResourceType(Aws::String&& value) { SetResourceType(std::move(value)); return *this;} /** *

The type of resource protected by or in scope of the policy. This is in the * format shown in the Amazon * Web Services Resource Types Reference. For WAF and Shield Advanced, examples * include AWS::ElasticLoadBalancingV2::LoadBalancer and * AWS::CloudFront::Distribution. For a security group common policy, * valid values are AWS::EC2::NetworkInterface and * AWS::EC2::Instance. For a security group content audit policy, * valid values are AWS::EC2::SecurityGroup, * AWS::EC2::NetworkInterface, and AWS::EC2::Instance. * For a security group usage audit policy, the value is * AWS::EC2::SecurityGroup. For an Network Firewall policy or DNS * Firewall policy, the value is AWS::EC2::VPC.

*/ inline PolicySummary& WithResourceType(const char* value) { SetResourceType(value); return *this;} /** *

The service that the policy is using to protect the resources. This specifies * the type of policy that is created, either an WAF policy, a Shield Advanced * policy, or a security group policy.

*/ inline const SecurityServiceType& GetSecurityServiceType() const{ return m_securityServiceType; } /** *

The service that the policy is using to protect the resources. This specifies * the type of policy that is created, either an WAF policy, a Shield Advanced * policy, or a security group policy.

*/ inline bool SecurityServiceTypeHasBeenSet() const { return m_securityServiceTypeHasBeenSet; } /** *

The service that the policy is using to protect the resources. This specifies * the type of policy that is created, either an WAF policy, a Shield Advanced * policy, or a security group policy.

*/ inline void SetSecurityServiceType(const SecurityServiceType& value) { m_securityServiceTypeHasBeenSet = true; m_securityServiceType = value; } /** *

The service that the policy is using to protect the resources. This specifies * the type of policy that is created, either an WAF policy, a Shield Advanced * policy, or a security group policy.

*/ inline void SetSecurityServiceType(SecurityServiceType&& value) { m_securityServiceTypeHasBeenSet = true; m_securityServiceType = std::move(value); } /** *

The service that the policy is using to protect the resources. This specifies * the type of policy that is created, either an WAF policy, a Shield Advanced * policy, or a security group policy.

*/ inline PolicySummary& WithSecurityServiceType(const SecurityServiceType& value) { SetSecurityServiceType(value); return *this;} /** *

The service that the policy is using to protect the resources. This specifies * the type of policy that is created, either an WAF policy, a Shield Advanced * policy, or a security group policy.

*/ inline PolicySummary& WithSecurityServiceType(SecurityServiceType&& value) { SetSecurityServiceType(std::move(value)); return *this;} /** *

Indicates if the policy should be automatically applied to new resources.

*/ inline bool GetRemediationEnabled() const{ return m_remediationEnabled; } /** *

Indicates if the policy should be automatically applied to new resources.

*/ inline bool RemediationEnabledHasBeenSet() const { return m_remediationEnabledHasBeenSet; } /** *

Indicates if the policy should be automatically applied to new resources.

*/ inline void SetRemediationEnabled(bool value) { m_remediationEnabledHasBeenSet = true; m_remediationEnabled = value; } /** *

Indicates if the policy should be automatically applied to new resources.

*/ inline PolicySummary& WithRemediationEnabled(bool value) { SetRemediationEnabled(value); return *this;} /** *

Indicates whether Firewall Manager should automatically remove protections * from resources that leave the policy scope and clean up resources that Firewall * Manager is managing for accounts when those accounts leave policy scope. For * example, Firewall Manager will disassociate a Firewall Manager managed web ACL * from a protected customer resource when the customer resource leaves policy * scope.

By default, Firewall Manager doesn't remove protections or delete * Firewall Manager managed resources.

This option is not available for * Shield Advanced or WAF Classic policies.

*/ inline bool GetDeleteUnusedFMManagedResources() const{ return m_deleteUnusedFMManagedResources; } /** *

Indicates whether Firewall Manager should automatically remove protections * from resources that leave the policy scope and clean up resources that Firewall * Manager is managing for accounts when those accounts leave policy scope. For * example, Firewall Manager will disassociate a Firewall Manager managed web ACL * from a protected customer resource when the customer resource leaves policy * scope.

By default, Firewall Manager doesn't remove protections or delete * Firewall Manager managed resources.

This option is not available for * Shield Advanced or WAF Classic policies.

*/ inline bool DeleteUnusedFMManagedResourcesHasBeenSet() const { return m_deleteUnusedFMManagedResourcesHasBeenSet; } /** *

Indicates whether Firewall Manager should automatically remove protections * from resources that leave the policy scope and clean up resources that Firewall * Manager is managing for accounts when those accounts leave policy scope. For * example, Firewall Manager will disassociate a Firewall Manager managed web ACL * from a protected customer resource when the customer resource leaves policy * scope.

By default, Firewall Manager doesn't remove protections or delete * Firewall Manager managed resources.

This option is not available for * Shield Advanced or WAF Classic policies.

*/ inline void SetDeleteUnusedFMManagedResources(bool value) { m_deleteUnusedFMManagedResourcesHasBeenSet = true; m_deleteUnusedFMManagedResources = value; } /** *

Indicates whether Firewall Manager should automatically remove protections * from resources that leave the policy scope and clean up resources that Firewall * Manager is managing for accounts when those accounts leave policy scope. For * example, Firewall Manager will disassociate a Firewall Manager managed web ACL * from a protected customer resource when the customer resource leaves policy * scope.

By default, Firewall Manager doesn't remove protections or delete * Firewall Manager managed resources.

This option is not available for * Shield Advanced or WAF Classic policies.

*/ inline PolicySummary& WithDeleteUnusedFMManagedResources(bool value) { SetDeleteUnusedFMManagedResources(value); return *this;} /** *

Indicates whether the policy is in or out of an admin's policy or Region * scope.

  • ACTIVE - The administrator can manage and * delete the policy.

  • OUT_OF_ADMIN_SCOPE - The * administrator can view the policy, but they can't edit or delete the policy. * Existing policy protections stay in place. Any new resources that come into * scope of the policy won't be protected.

*/ inline const CustomerPolicyStatus& GetPolicyStatus() const{ return m_policyStatus; } /** *

Indicates whether the policy is in or out of an admin's policy or Region * scope.

  • ACTIVE - The administrator can manage and * delete the policy.

  • OUT_OF_ADMIN_SCOPE - The * administrator can view the policy, but they can't edit or delete the policy. * Existing policy protections stay in place. Any new resources that come into * scope of the policy won't be protected.

*/ inline bool PolicyStatusHasBeenSet() const { return m_policyStatusHasBeenSet; } /** *

Indicates whether the policy is in or out of an admin's policy or Region * scope.

  • ACTIVE - The administrator can manage and * delete the policy.

  • OUT_OF_ADMIN_SCOPE - The * administrator can view the policy, but they can't edit or delete the policy. * Existing policy protections stay in place. Any new resources that come into * scope of the policy won't be protected.

*/ inline void SetPolicyStatus(const CustomerPolicyStatus& value) { m_policyStatusHasBeenSet = true; m_policyStatus = value; } /** *

Indicates whether the policy is in or out of an admin's policy or Region * scope.

  • ACTIVE - The administrator can manage and * delete the policy.

  • OUT_OF_ADMIN_SCOPE - The * administrator can view the policy, but they can't edit or delete the policy. * Existing policy protections stay in place. Any new resources that come into * scope of the policy won't be protected.

*/ inline void SetPolicyStatus(CustomerPolicyStatus&& value) { m_policyStatusHasBeenSet = true; m_policyStatus = std::move(value); } /** *

Indicates whether the policy is in or out of an admin's policy or Region * scope.

  • ACTIVE - The administrator can manage and * delete the policy.

  • OUT_OF_ADMIN_SCOPE - The * administrator can view the policy, but they can't edit or delete the policy. * Existing policy protections stay in place. Any new resources that come into * scope of the policy won't be protected.

*/ inline PolicySummary& WithPolicyStatus(const CustomerPolicyStatus& value) { SetPolicyStatus(value); return *this;} /** *

Indicates whether the policy is in or out of an admin's policy or Region * scope.

  • ACTIVE - The administrator can manage and * delete the policy.

  • OUT_OF_ADMIN_SCOPE - The * administrator can view the policy, but they can't edit or delete the policy. * Existing policy protections stay in place. Any new resources that come into * scope of the policy won't be protected.

*/ inline PolicySummary& WithPolicyStatus(CustomerPolicyStatus&& value) { SetPolicyStatus(std::move(value)); return *this;} private: Aws::String m_policyArn; bool m_policyArnHasBeenSet = false; Aws::String m_policyId; bool m_policyIdHasBeenSet = false; Aws::String m_policyName; bool m_policyNameHasBeenSet = false; Aws::String m_resourceType; bool m_resourceTypeHasBeenSet = false; SecurityServiceType m_securityServiceType; bool m_securityServiceTypeHasBeenSet = false; bool m_remediationEnabled; bool m_remediationEnabledHasBeenSet = false; bool m_deleteUnusedFMManagedResources; bool m_deleteUnusedFMManagedResourcesHasBeenSet = false; CustomerPolicyStatus m_policyStatus; bool m_policyStatusHasBeenSet = false; }; } // namespace Model } // namespace FMS } // namespace Aws