amazonka-fms-2.0: Amazon Firewall Management Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.FMS.Types.Policy

Description

 
Synopsis

Documentation

data Policy Source #

An Firewall Manager policy.

See: newPolicy smart constructor.

Constructors

Policy' 

Fields

  • deleteUnusedFMManagedResources :: Maybe Bool

    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.

  • excludeMap :: Maybe (HashMap CustomerPolicyScopeIdType [Text])

    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”]}.
  • includeMap :: Maybe (HashMap CustomerPolicyScopeIdType [Text])

    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”]}.
  • policyDescription :: Maybe Text

    The definition of the Network Firewall firewall policy.

  • policyId :: Maybe Text

    The ID of the Firewall Manager policy.

  • policyUpdateToken :: Maybe Text

    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.

  • resourceSetIds :: Maybe [Text]

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

  • resourceTags :: Maybe [ResourceTag]

    An array of ResourceTag objects.

  • resourceTypeList :: Maybe [Text]

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

  • policyName :: Text

    The name of the Firewall Manager policy.

  • securityServicePolicyData :: SecurityServicePolicyData

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

  • resourceType :: Text

    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.

    For WAF and Shield Advanced, resource types include AWS::ElasticLoadBalancingV2::LoadBalancer, AWS::ElasticLoadBalancing::LoadBalancer, AWS::EC2::EIP, 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.

  • excludeResourceTags :: Bool

    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.

  • remediationEnabled :: Bool

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

Instances

Instances details
FromJSON Policy Source # 
Instance details

Defined in Amazonka.FMS.Types.Policy

ToJSON Policy Source # 
Instance details

Defined in Amazonka.FMS.Types.Policy

Generic Policy Source # 
Instance details

Defined in Amazonka.FMS.Types.Policy

Associated Types

type Rep Policy :: Type -> Type #

Methods

from :: Policy -> Rep Policy x #

to :: Rep Policy x -> Policy #

Read Policy Source # 
Instance details

Defined in Amazonka.FMS.Types.Policy

Show Policy Source # 
Instance details

Defined in Amazonka.FMS.Types.Policy

NFData Policy Source # 
Instance details

Defined in Amazonka.FMS.Types.Policy

Methods

rnf :: Policy -> () #

Eq Policy Source # 
Instance details

Defined in Amazonka.FMS.Types.Policy

Methods

(==) :: Policy -> Policy -> Bool #

(/=) :: Policy -> Policy -> Bool #

Hashable Policy Source # 
Instance details

Defined in Amazonka.FMS.Types.Policy

Methods

hashWithSalt :: Int -> Policy -> Int #

hash :: Policy -> Int #

type Rep Policy Source # 
Instance details

Defined in Amazonka.FMS.Types.Policy

type Rep Policy = D1 ('MetaData "Policy" "Amazonka.FMS.Types.Policy" "amazonka-fms-2.0-351knTjuYAjE9GRQTo0ohx" 'False) (C1 ('MetaCons "Policy'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "deleteUnusedFMManagedResources") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "excludeMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap CustomerPolicyScopeIdType [Text]))) :*: S1 ('MetaSel ('Just "includeMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap CustomerPolicyScopeIdType [Text]))))) :*: ((S1 ('MetaSel ('Just "policyDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "policyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "policyUpdateToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "resourceSetIds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text]))))) :*: ((S1 ('MetaSel ('Just "resourceTags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [ResourceTag])) :*: (S1 ('MetaSel ('Just "resourceTypeList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 ('MetaSel ('Just "policyName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))) :*: ((S1 ('MetaSel ('Just "securityServicePolicyData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SecurityServicePolicyData) :*: S1 ('MetaSel ('Just "resourceType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "excludeResourceTags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "remediationEnabled") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool))))))

newPolicy Source #

Create a value of Policy with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:deleteUnusedFMManagedResources:Policy', policy_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.

$sel:excludeMap:Policy', policy_excludeMap - 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”]}.

$sel:includeMap:Policy', policy_includeMap - 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”]}.

$sel:policyDescription:Policy', policy_policyDescription - The definition of the Network Firewall firewall policy.

$sel:policyId:Policy', policy_policyId - The ID of the Firewall Manager policy.

$sel:policyUpdateToken:Policy', policy_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.

$sel:resourceSetIds:Policy', policy_resourceSetIds - The unique identifiers of the resource sets used by the policy.

$sel:resourceTags:Policy', policy_resourceTags - An array of ResourceTag objects.

$sel:resourceTypeList:Policy', policy_resourceTypeList - An array of ResourceType objects. Use this only to specify multiple resource types. To specify a single resource type, use ResourceType.

$sel:policyName:Policy', policy_policyName - The name of the Firewall Manager policy.

$sel:securityServicePolicyData:Policy', policy_securityServicePolicyData - Details about the security service that is being used to protect the resources.

$sel:resourceType:Policy', policy_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.

For WAF and Shield Advanced, resource types include AWS::ElasticLoadBalancingV2::LoadBalancer, AWS::ElasticLoadBalancing::LoadBalancer, AWS::EC2::EIP, 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.

$sel:excludeResourceTags:Policy', policy_excludeResourceTags - 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.

$sel:remediationEnabled:Policy', policy_remediationEnabled - Indicates if the policy should be automatically applied to new resources.

policy_deleteUnusedFMManagedResources :: Lens' Policy (Maybe Bool) Source #

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.

policy_excludeMap :: Lens' Policy (Maybe (HashMap CustomerPolicyScopeIdType [Text])) Source #

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”]}.

policy_includeMap :: Lens' Policy (Maybe (HashMap CustomerPolicyScopeIdType [Text])) Source #

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_policyDescription :: Lens' Policy (Maybe Text) Source #

The definition of the Network Firewall firewall policy.

policy_policyId :: Lens' Policy (Maybe Text) Source #

The ID of the Firewall Manager policy.

policy_policyUpdateToken :: Lens' Policy (Maybe Text) Source #

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.

policy_resourceSetIds :: Lens' Policy (Maybe [Text]) Source #

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

policy_resourceTags :: Lens' Policy (Maybe [ResourceTag]) Source #

An array of ResourceTag objects.

policy_resourceTypeList :: Lens' Policy (Maybe [Text]) Source #

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

policy_policyName :: Lens' Policy Text Source #

The name of the Firewall Manager policy.

policy_securityServicePolicyData :: Lens' Policy SecurityServicePolicyData Source #

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

policy_resourceType :: Lens' Policy Text Source #

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.

For WAF and Shield Advanced, resource types include AWS::ElasticLoadBalancingV2::LoadBalancer, AWS::ElasticLoadBalancing::LoadBalancer, AWS::EC2::EIP, 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.

policy_excludeResourceTags :: Lens' Policy Bool Source #

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.

policy_remediationEnabled :: Lens' Policy Bool Source #

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