Skip to content

Policy

Source code in docs_src/capo_fms/types/policy.py
class Policy(TypedDict, closed=True):
    policy_id: NotRequired["capo_fms.types.policy_id.PolicyId"]
    """<p>The ID of the Firewall Manager policy.</p>"""
    policy_name: "capo_fms.types.resource_name.ResourceName"
    """<p>The name of the Firewall Manager policy.</p>"""
    policy_update_token: NotRequired[
        "capo_fms.types.policy_update_token.PolicyUpdateToken"
    ]
    """<p>A unique identifier for each update to the policy. When issuing a <code>PutPolicy</code> request, the <code>PolicyUpdateToken</code> in the request must match the <code>PolicyUpdateToken</code> of the current policy version. To get the <code>PolicyUpdateToken</code> of the current policy version, use a <code>GetPolicy</code> request.</p>"""
    security_service_policy_data: (
        "capo_fms.types.security_service_policy_data.SecurityServicePolicyData"
    )
    """<p>Details about the security service that is being used to protect the resources.</p>"""
    resource_type: "capo_fms.types.resource_type.ResourceType"
    """<p>The type of resource protected by or in scope of the policy. This is in the format shown in the <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon Web Services Resource Types Reference</a>. To apply this policy to multiple resource types, specify a resource type of <code>ResourceTypeList</code> and then specify the resource types in a <code>ResourceTypeList</code>.</p> <p>The following are valid resource types for each Firewall Manager policy type:</p> <ul> <li> <p>Amazon Web Services WAF Classic - <code>AWS::ApiGateway::Stage</code>, <code>AWS::CloudFront::Distribution</code>, and <code>AWS::ElasticLoadBalancingV2::LoadBalancer</code>.</p> </li> <li> <p>WAF - <code>AWS::ApiGateway::Stage</code>, <code>AWS::ElasticLoadBalancingV2::LoadBalancer</code>, and <code>AWS::CloudFront::Distribution</code>.</p> </li> <li> <p>Shield Advanced - <code>AWS::ElasticLoadBalancingV2::LoadBalancer</code>, <code>AWS::ElasticLoadBalancing::LoadBalancer</code>, <code>AWS::EC2::EIP</code>, and <code>AWS::CloudFront::Distribution</code>.</p> </li> <li> <p>Network ACL - <code>AWS::EC2::Subnet</code>.</p> </li> <li> <p>Security group usage audit - <code>AWS::EC2::SecurityGroup</code>.</p> </li> <li> <p>Security group content audit - <code>AWS::EC2::SecurityGroup</code>, <code>AWS::EC2::NetworkInterface</code>, and <code>AWS::EC2::Instance</code>.</p> </li> <li> <p>DNS Firewall, Network Firewall, and third-party firewall - <code>AWS::EC2::VPC</code>.</p> </li> </ul>"""
    resource_type_list: NotRequired[
        "capo_fms.types.resource_type_list.ResourceTypeList"
    ]
    """<p>An array of <code>ResourceType</code> objects. Use this only to specify multiple resource types. To specify a single resource type, use <code>ResourceType</code>.</p>"""
    resource_tags: NotRequired["capo_fms.types.resource_tags.ResourceTags"]
    """<p>An array of <code>ResourceTag</code> objects.</p>"""
    exclude_resource_tags: "capo_fms.types.boolean.Boolean"
    """<p>If set to <code>True</code>, resources with the tags that are specified in the <code>ResourceTag</code> array are not in scope of the policy. If set to <code>False</code>, and the <code>ResourceTag</code> array is not null, only resources with the specified tags are in scope of the policy.</p>"""
    remediation_enabled: "capo_fms.types.boolean.Boolean"
    """<p>Indicates if the policy should be automatically applied to new resources.</p>"""
    delete_unused_fm_managed_resources: "capo_fms.types.boolean.Boolean"
    """<p>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. </p> <p>By default, Firewall Manager doesn't remove protections or delete Firewall Manager managed resources. </p> <p>This option is not available for Shield Advanced or WAF Classic policies.</p>"""
    include_map: NotRequired[
        "capo_fms.types.customer_policy_scope_map.CustomerPolicyScopeMap"
    ]
    """<p>Specifies the Amazon Web Services account IDs and Organizations organizational units (OUs) to include in the policy. Specifying an OU is the equivalent of specifying all accounts in the OU and in any of its child OUs, including any child OUs and accounts that are added at a later time.</p> <p>You can specify inclusions or exclusions, but not both. If you specify an <code>IncludeMap</code>, Firewall Manager applies the policy to all accounts specified by the <code>IncludeMap</code>, and does not evaluate any <code>ExcludeMap</code> specifications. If you do not specify an <code>IncludeMap</code>, then Firewall Manager applies the policy to all accounts except for those specified by the <code>ExcludeMap</code>.</p> <p>You can specify account IDs, OUs, or a combination: </p> <ul> <li> <p>Specify account IDs by setting the key to <code>ACCOUNT</code>. For example, the following is a valid map: <code>{“ACCOUNT” : [“accountID1”, “accountID2”]}</code>.</p> </li> <li> <p>Specify OUs by setting the key to <code>ORG_UNIT</code>. For example, the following is a valid map: <code>{“ORG_UNIT” : [“ouid111”, “ouid112”]}</code>.</p> </li> <li> <p>Specify accounts and OUs together in a single map, separated with a comma. For example, the following is a valid map: <code>{“ACCOUNT” : [“accountID1”, “accountID2”], “ORG_UNIT” : [“ouid111”, “ouid112”]}</code>.</p> </li> </ul>"""
    exclude_map: NotRequired[
        "capo_fms.types.customer_policy_scope_map.CustomerPolicyScopeMap"
    ]
    """<p>Specifies the Amazon Web Services account IDs and Organizations organizational units (OUs) to exclude from the policy. Specifying an OU is the equivalent of specifying all accounts in the OU and in any of its child OUs, including any child OUs and accounts that are added at a later time.</p> <p>You can specify inclusions or exclusions, but not both. If you specify an <code>IncludeMap</code>, Firewall Manager applies the policy to all accounts specified by the <code>IncludeMap</code>, and does not evaluate any <code>ExcludeMap</code> specifications. If you do not specify an <code>IncludeMap</code>, then Firewall Manager applies the policy to all accounts except for those specified by the <code>ExcludeMap</code>.</p> <p>You can specify account IDs, OUs, or a combination: </p> <ul> <li> <p>Specify account IDs by setting the key to <code>ACCOUNT</code>. For example, the following is a valid map: <code>{“ACCOUNT” : [“accountID1”, “accountID2”]}</code>.</p> </li> <li> <p>Specify OUs by setting the key to <code>ORG_UNIT</code>. For example, the following is a valid map: <code>{“ORG_UNIT” : [“ouid111”, “ouid112”]}</code>.</p> </li> <li> <p>Specify accounts and OUs together in a single map, separated with a comma. For example, the following is a valid map: <code>{“ACCOUNT” : [“accountID1”, “accountID2”], “ORG_UNIT” : [“ouid111”, “ouid112”]}</code>.</p> </li> </ul>"""
    resource_set_ids: NotRequired["capo_fms.types.resource_set_ids.ResourceSetIds"]
    """<p>The unique identifiers of the resource sets used by the policy.</p>"""
    policy_description: NotRequired[
        "capo_fms.types.resource_description.ResourceDescription"
    ]
    """<p>Your description of the Firewall Manager policy.</p>"""
    policy_status: NotRequired[
        "capo_fms.types.customer_policy_status.CustomerPolicyStatus"
    ]
    """<p>Indicates whether the policy is in or out of an admin's policy or Region scope.</p> <ul> <li> <p> <code>ACTIVE</code> - The administrator can manage and delete the policy.</p> </li> <li> <p> <code>OUT_OF_ADMIN_SCOPE</code> - 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.</p> </li> </ul>"""
    resource_tag_logical_operator: NotRequired[
        "capo_fms.types.resource_tag_logical_operator.ResourceTagLogicalOperator"
    ]
    """<p>Specifies whether to combine multiple resource tags with AND, so that a resource must have all tags to be included or excluded, or OR, so that a resource must have at least one tag.</p> <p>Default: <code>AND</code> </p>"""

delete_unused_fm_managed_resources instance-attribute

delete_unused_fm_managed_resources: Boolean

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.

exclude_map instance-attribute

exclude_map: NotRequired[CustomerPolicyScopeMap]

Specifies the Amazon Web Services account IDs and Organizations organizational units (OUs) to exclude from the policy. Specifying an OU is the equivalent of specifying all accounts in the OU and in any of its child OUs, including any child OUs and accounts that are added at a later time.

You can specify inclusions or exclusions, but not both. If you specify an IncludeMap, Firewall Manager applies the policy to all accounts specified by the IncludeMap, and does not evaluate any ExcludeMap specifications. If you do not specify an IncludeMap, then Firewall Manager applies the policy to all accounts except for those specified by the ExcludeMap.

You can specify account IDs, OUs, or a combination:

  • Specify account IDs by setting the key to ACCOUNT. For example, the following is a valid map: {“ACCOUNT” : [“accountID1”, “accountID2”]}.

  • Specify OUs by setting the key to ORG_UNIT. For example, the following is a valid map: {“ORG_UNIT” : [“ouid111”, “ouid112”]}.

  • Specify accounts and OUs together in a single map, separated with a comma. For example, the following is a valid map: {“ACCOUNT” : [“accountID1”, “accountID2”], “ORG_UNIT” : [“ouid111”, “ouid112”]}.

exclude_resource_tags instance-attribute

exclude_resource_tags: Boolean

If set to True, resources with the tags that are specified in the ResourceTag array are not in scope of the policy. If set to False, and the ResourceTag array is not null, only resources with the specified tags are in scope of the policy.

include_map instance-attribute

include_map: NotRequired[CustomerPolicyScopeMap]

Specifies the Amazon Web Services account IDs and Organizations organizational units (OUs) to include in the policy. Specifying an OU is the equivalent of specifying all accounts in the OU and in any of its child OUs, including any child OUs and accounts that are added at a later time.

You can specify inclusions or exclusions, but not both. If you specify an IncludeMap, Firewall Manager applies the policy to all accounts specified by the IncludeMap, and does not evaluate any ExcludeMap specifications. If you do not specify an IncludeMap, then Firewall Manager applies the policy to all accounts except for those specified by the ExcludeMap.

You can specify account IDs, OUs, or a combination:

  • Specify account IDs by setting the key to ACCOUNT. For example, the following is a valid map: {“ACCOUNT” : [“accountID1”, “accountID2”]}.

  • Specify OUs by setting the key to ORG_UNIT. For example, the following is a valid map: {“ORG_UNIT” : [“ouid111”, “ouid112”]}.

  • Specify accounts and OUs together in a single map, separated with a comma. For example, the following is a valid map: {“ACCOUNT” : [“accountID1”, “accountID2”], “ORG_UNIT” : [“ouid111”, “ouid112”]}.

policy_description instance-attribute

policy_description: NotRequired[ResourceDescription]

Your description of the Firewall Manager policy.

policy_id instance-attribute

policy_id: NotRequired[PolicyId]

The ID of the Firewall Manager policy.

policy_name instance-attribute

policy_name: ResourceName

The name of the Firewall Manager policy.

policy_status instance-attribute

policy_status: NotRequired[CustomerPolicyStatus]

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.

policy_update_token instance-attribute

policy_update_token: NotRequired[PolicyUpdateToken]

A unique identifier for each update to the policy. When issuing a PutPolicy request, the PolicyUpdateToken in the request must match the PolicyUpdateToken of the current policy version. To get the PolicyUpdateToken of the current policy version, use a GetPolicy request.

remediation_enabled instance-attribute

remediation_enabled: Boolean

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

resource_set_ids instance-attribute

resource_set_ids: NotRequired[ResourceSetIds]

The unique identifiers of the resource sets used by the policy.

resource_tag_logical_operator instance-attribute

resource_tag_logical_operator: NotRequired[ResourceTagLogicalOperator]

Specifies whether to combine multiple resource tags with AND, so that a resource must have all tags to be included or excluded, or OR, so that a resource must have at least one tag.

Default: AND

resource_tags instance-attribute

resource_tags: NotRequired[ResourceTags]

An array of ResourceTag objects.

resource_type instance-attribute

resource_type: 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. To apply this policy to multiple resource types, specify a resource type of ResourceTypeList and then specify the resource types in a ResourceTypeList.

The following are valid resource types for each Firewall Manager policy type:

  • Amazon Web Services WAF Classic - AWS::ApiGateway::Stage, AWS::CloudFront::Distribution, and AWS::ElasticLoadBalancingV2::LoadBalancer.

  • WAF - AWS::ApiGateway::Stage, AWS::ElasticLoadBalancingV2::LoadBalancer, and AWS::CloudFront::Distribution.

  • Shield Advanced - AWS::ElasticLoadBalancingV2::LoadBalancer, AWS::ElasticLoadBalancing::LoadBalancer, AWS::EC2::EIP, and AWS::CloudFront::Distribution.

  • Network ACL - AWS::EC2::Subnet.

  • Security group usage audit - AWS::EC2::SecurityGroup.

  • Security group content audit - AWS::EC2::SecurityGroup, AWS::EC2::NetworkInterface, and AWS::EC2::Instance.

  • DNS Firewall, Network Firewall, and third-party firewall - AWS::EC2::VPC.

resource_type_list instance-attribute

resource_type_list: NotRequired[ResourceTypeList]

An array of ResourceType objects. Use this only to specify multiple resource types. To specify a single resource type, use ResourceType.

security_service_policy_data instance-attribute

security_service_policy_data: SecurityServicePolicyData

Details about the security service that is being used to protect the resources.