{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.FMS.Types
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.FMS.Types
  ( -- * Service Configuration
    defaultService,

    -- * Errors
    _InternalErrorException,
    _InvalidInputException,
    _InvalidOperationException,
    _InvalidTypeException,
    _ResourceNotFoundException,
    _LimitExceededException,

    -- * AccountRoleStatus
    AccountRoleStatus (..),

    -- * CustomerPolicyScopeIdType
    CustomerPolicyScopeIdType (..),

    -- * DependentServiceName
    DependentServiceName (..),

    -- * DestinationType
    DestinationType (..),

    -- * PolicyComplianceStatusType
    PolicyComplianceStatusType (..),

    -- * RemediationActionType
    RemediationActionType (..),

    -- * SecurityServiceType
    SecurityServiceType (..),

    -- * TargetType
    TargetType (..),

    -- * ViolationReason
    ViolationReason (..),

    -- * ActionTarget
    ActionTarget (..),
    newActionTarget,
    actionTarget_resourceId,
    actionTarget_description,

    -- * App
    App (..),
    newApp,
    app_appName,
    app_protocol,
    app_port,

    -- * AppsListData
    AppsListData (..),
    newAppsListData,
    appsListData_listUpdateToken,
    appsListData_listId,
    appsListData_lastUpdateTime,
    appsListData_previousAppsList,
    appsListData_createTime,
    appsListData_listName,
    appsListData_appsList,

    -- * AppsListDataSummary
    AppsListDataSummary (..),
    newAppsListDataSummary,
    appsListDataSummary_listArn,
    appsListDataSummary_appsList,
    appsListDataSummary_listId,
    appsListDataSummary_listName,

    -- * AwsEc2InstanceViolation
    AwsEc2InstanceViolation (..),
    newAwsEc2InstanceViolation,
    awsEc2InstanceViolation_violationTarget,
    awsEc2InstanceViolation_awsEc2NetworkInterfaceViolations,

    -- * AwsEc2NetworkInterfaceViolation
    AwsEc2NetworkInterfaceViolation (..),
    newAwsEc2NetworkInterfaceViolation,
    awsEc2NetworkInterfaceViolation_violatingSecurityGroups,
    awsEc2NetworkInterfaceViolation_violationTarget,

    -- * AwsVPCSecurityGroupViolation
    AwsVPCSecurityGroupViolation (..),
    newAwsVPCSecurityGroupViolation,
    awsVPCSecurityGroupViolation_violationTargetDescription,
    awsVPCSecurityGroupViolation_possibleSecurityGroupRemediationActions,
    awsVPCSecurityGroupViolation_violationTarget,
    awsVPCSecurityGroupViolation_partialMatches,

    -- * ComplianceViolator
    ComplianceViolator (..),
    newComplianceViolator,
    complianceViolator_resourceId,
    complianceViolator_resourceType,
    complianceViolator_violationReason,

    -- * DnsDuplicateRuleGroupViolation
    DnsDuplicateRuleGroupViolation (..),
    newDnsDuplicateRuleGroupViolation,
    dnsDuplicateRuleGroupViolation_violationTargetDescription,
    dnsDuplicateRuleGroupViolation_violationTarget,

    -- * DnsRuleGroupLimitExceededViolation
    DnsRuleGroupLimitExceededViolation (..),
    newDnsRuleGroupLimitExceededViolation,
    dnsRuleGroupLimitExceededViolation_violationTargetDescription,
    dnsRuleGroupLimitExceededViolation_violationTarget,
    dnsRuleGroupLimitExceededViolation_numberOfRuleGroupsAlreadyAssociated,

    -- * DnsRuleGroupPriorityConflictViolation
    DnsRuleGroupPriorityConflictViolation (..),
    newDnsRuleGroupPriorityConflictViolation,
    dnsRuleGroupPriorityConflictViolation_conflictingPriority,
    dnsRuleGroupPriorityConflictViolation_conflictingPolicyId,
    dnsRuleGroupPriorityConflictViolation_violationTargetDescription,
    dnsRuleGroupPriorityConflictViolation_violationTarget,
    dnsRuleGroupPriorityConflictViolation_unavailablePriorities,

    -- * EC2AssociateRouteTableAction
    EC2AssociateRouteTableAction (..),
    newEC2AssociateRouteTableAction,
    eC2AssociateRouteTableAction_subnetId,
    eC2AssociateRouteTableAction_gatewayId,
    eC2AssociateRouteTableAction_description,
    eC2AssociateRouteTableAction_routeTableId,

    -- * EC2CopyRouteTableAction
    EC2CopyRouteTableAction (..),
    newEC2CopyRouteTableAction,
    eC2CopyRouteTableAction_description,
    eC2CopyRouteTableAction_vpcId,
    eC2CopyRouteTableAction_routeTableId,

    -- * EC2CreateRouteAction
    EC2CreateRouteAction (..),
    newEC2CreateRouteAction,
    eC2CreateRouteAction_destinationIpv6CidrBlock,
    eC2CreateRouteAction_gatewayId,
    eC2CreateRouteAction_vpcEndpointId,
    eC2CreateRouteAction_destinationPrefixListId,
    eC2CreateRouteAction_description,
    eC2CreateRouteAction_destinationCidrBlock,
    eC2CreateRouteAction_routeTableId,

    -- * EC2CreateRouteTableAction
    EC2CreateRouteTableAction (..),
    newEC2CreateRouteTableAction,
    eC2CreateRouteTableAction_description,
    eC2CreateRouteTableAction_vpcId,

    -- * EC2DeleteRouteAction
    EC2DeleteRouteAction (..),
    newEC2DeleteRouteAction,
    eC2DeleteRouteAction_destinationIpv6CidrBlock,
    eC2DeleteRouteAction_destinationPrefixListId,
    eC2DeleteRouteAction_description,
    eC2DeleteRouteAction_destinationCidrBlock,
    eC2DeleteRouteAction_routeTableId,

    -- * EC2ReplaceRouteAction
    EC2ReplaceRouteAction (..),
    newEC2ReplaceRouteAction,
    eC2ReplaceRouteAction_destinationIpv6CidrBlock,
    eC2ReplaceRouteAction_gatewayId,
    eC2ReplaceRouteAction_destinationPrefixListId,
    eC2ReplaceRouteAction_description,
    eC2ReplaceRouteAction_destinationCidrBlock,
    eC2ReplaceRouteAction_routeTableId,

    -- * EC2ReplaceRouteTableAssociationAction
    EC2ReplaceRouteTableAssociationAction (..),
    newEC2ReplaceRouteTableAssociationAction,
    eC2ReplaceRouteTableAssociationAction_description,
    eC2ReplaceRouteTableAssociationAction_associationId,
    eC2ReplaceRouteTableAssociationAction_routeTableId,

    -- * EvaluationResult
    EvaluationResult (..),
    newEvaluationResult,
    evaluationResult_violatorCount,
    evaluationResult_complianceStatus,
    evaluationResult_evaluationLimitExceeded,

    -- * ExpectedRoute
    ExpectedRoute (..),
    newExpectedRoute,
    expectedRoute_ipV4Cidr,
    expectedRoute_routeTableId,
    expectedRoute_allowedTargets,
    expectedRoute_prefixListId,
    expectedRoute_ipV6Cidr,
    expectedRoute_contributingSubnets,

    -- * NetworkFirewallBlackHoleRouteDetectedViolation
    NetworkFirewallBlackHoleRouteDetectedViolation (..),
    newNetworkFirewallBlackHoleRouteDetectedViolation,
    networkFirewallBlackHoleRouteDetectedViolation_routeTableId,
    networkFirewallBlackHoleRouteDetectedViolation_vpcId,
    networkFirewallBlackHoleRouteDetectedViolation_violatingRoutes,
    networkFirewallBlackHoleRouteDetectedViolation_violationTarget,

    -- * NetworkFirewallInternetTrafficNotInspectedViolation
    NetworkFirewallInternetTrafficNotInspectedViolation (..),
    newNetworkFirewallInternetTrafficNotInspectedViolation,
    networkFirewallInternetTrafficNotInspectedViolation_actualInternetGatewayRoutes,
    networkFirewallInternetTrafficNotInspectedViolation_routeTableId,
    networkFirewallInternetTrafficNotInspectedViolation_vpcId,
    networkFirewallInternetTrafficNotInspectedViolation_violatingRoutes,
    networkFirewallInternetTrafficNotInspectedViolation_subnetId,
    networkFirewallInternetTrafficNotInspectedViolation_expectedFirewallSubnetRoutes,
    networkFirewallInternetTrafficNotInspectedViolation_subnetAvailabilityZone,
    networkFirewallInternetTrafficNotInspectedViolation_expectedInternetGatewayRoutes,
    networkFirewallInternetTrafficNotInspectedViolation_currentInternetGatewayRouteTable,
    networkFirewallInternetTrafficNotInspectedViolation_firewallSubnetId,
    networkFirewallInternetTrafficNotInspectedViolation_currentFirewallSubnetRouteTable,
    networkFirewallInternetTrafficNotInspectedViolation_expectedFirewallEndpoint,
    networkFirewallInternetTrafficNotInspectedViolation_isRouteTableUsedInDifferentAZ,
    networkFirewallInternetTrafficNotInspectedViolation_internetGatewayId,
    networkFirewallInternetTrafficNotInspectedViolation_actualFirewallSubnetRoutes,

    -- * NetworkFirewallInvalidRouteConfigurationViolation
    NetworkFirewallInvalidRouteConfigurationViolation (..),
    newNetworkFirewallInvalidRouteConfigurationViolation,
    networkFirewallInvalidRouteConfigurationViolation_actualInternetGatewayRoutes,
    networkFirewallInvalidRouteConfigurationViolation_routeTableId,
    networkFirewallInvalidRouteConfigurationViolation_affectedSubnets,
    networkFirewallInvalidRouteConfigurationViolation_vpcId,
    networkFirewallInvalidRouteConfigurationViolation_actualFirewallEndpoint,
    networkFirewallInvalidRouteConfigurationViolation_expectedFirewallSubnetId,
    networkFirewallInvalidRouteConfigurationViolation_expectedFirewallSubnetRoutes,
    networkFirewallInvalidRouteConfigurationViolation_expectedInternetGatewayRoutes,
    networkFirewallInvalidRouteConfigurationViolation_currentInternetGatewayRouteTable,
    networkFirewallInvalidRouteConfigurationViolation_violatingRoute,
    networkFirewallInvalidRouteConfigurationViolation_currentFirewallSubnetRouteTable,
    networkFirewallInvalidRouteConfigurationViolation_expectedFirewallEndpoint,
    networkFirewallInvalidRouteConfigurationViolation_isRouteTableUsedInDifferentAZ,
    networkFirewallInvalidRouteConfigurationViolation_actualFirewallSubnetId,
    networkFirewallInvalidRouteConfigurationViolation_internetGatewayId,
    networkFirewallInvalidRouteConfigurationViolation_actualFirewallSubnetRoutes,

    -- * NetworkFirewallMissingExpectedRTViolation
    NetworkFirewallMissingExpectedRTViolation (..),
    newNetworkFirewallMissingExpectedRTViolation,
    networkFirewallMissingExpectedRTViolation_currentRouteTable,
    networkFirewallMissingExpectedRTViolation_availabilityZone,
    networkFirewallMissingExpectedRTViolation_vpc,
    networkFirewallMissingExpectedRTViolation_violationTarget,
    networkFirewallMissingExpectedRTViolation_expectedRouteTable,

    -- * NetworkFirewallMissingExpectedRoutesViolation
    NetworkFirewallMissingExpectedRoutesViolation (..),
    newNetworkFirewallMissingExpectedRoutesViolation,
    networkFirewallMissingExpectedRoutesViolation_expectedRoutes,
    networkFirewallMissingExpectedRoutesViolation_vpcId,
    networkFirewallMissingExpectedRoutesViolation_violationTarget,

    -- * NetworkFirewallMissingFirewallViolation
    NetworkFirewallMissingFirewallViolation (..),
    newNetworkFirewallMissingFirewallViolation,
    networkFirewallMissingFirewallViolation_targetViolationReason,
    networkFirewallMissingFirewallViolation_availabilityZone,
    networkFirewallMissingFirewallViolation_vpc,
    networkFirewallMissingFirewallViolation_violationTarget,

    -- * NetworkFirewallMissingSubnetViolation
    NetworkFirewallMissingSubnetViolation (..),
    newNetworkFirewallMissingSubnetViolation,
    networkFirewallMissingSubnetViolation_targetViolationReason,
    networkFirewallMissingSubnetViolation_availabilityZone,
    networkFirewallMissingSubnetViolation_vpc,
    networkFirewallMissingSubnetViolation_violationTarget,

    -- * NetworkFirewallPolicyDescription
    NetworkFirewallPolicyDescription (..),
    newNetworkFirewallPolicyDescription,
    networkFirewallPolicyDescription_statefulRuleGroups,
    networkFirewallPolicyDescription_statelessRuleGroups,
    networkFirewallPolicyDescription_statelessFragmentDefaultActions,
    networkFirewallPolicyDescription_statelessCustomActions,
    networkFirewallPolicyDescription_statelessDefaultActions,

    -- * NetworkFirewallPolicyModifiedViolation
    NetworkFirewallPolicyModifiedViolation (..),
    newNetworkFirewallPolicyModifiedViolation,
    networkFirewallPolicyModifiedViolation_currentPolicyDescription,
    networkFirewallPolicyModifiedViolation_violationTarget,
    networkFirewallPolicyModifiedViolation_expectedPolicyDescription,

    -- * NetworkFirewallUnexpectedFirewallRoutesViolation
    NetworkFirewallUnexpectedFirewallRoutesViolation (..),
    newNetworkFirewallUnexpectedFirewallRoutesViolation,
    networkFirewallUnexpectedFirewallRoutesViolation_routeTableId,
    networkFirewallUnexpectedFirewallRoutesViolation_vpcId,
    networkFirewallUnexpectedFirewallRoutesViolation_violatingRoutes,
    networkFirewallUnexpectedFirewallRoutesViolation_firewallEndpoint,
    networkFirewallUnexpectedFirewallRoutesViolation_firewallSubnetId,

    -- * NetworkFirewallUnexpectedGatewayRoutesViolation
    NetworkFirewallUnexpectedGatewayRoutesViolation (..),
    newNetworkFirewallUnexpectedGatewayRoutesViolation,
    networkFirewallUnexpectedGatewayRoutesViolation_routeTableId,
    networkFirewallUnexpectedGatewayRoutesViolation_vpcId,
    networkFirewallUnexpectedGatewayRoutesViolation_violatingRoutes,
    networkFirewallUnexpectedGatewayRoutesViolation_gatewayId,

    -- * PartialMatch
    PartialMatch (..),
    newPartialMatch,
    partialMatch_targetViolationReasons,
    partialMatch_reference,

    -- * Policy
    Policy (..),
    newPolicy,
    policy_policyId,
    policy_resourceTypeList,
    policy_resourceTags,
    policy_policyUpdateToken,
    policy_deleteUnusedFMManagedResources,
    policy_excludeMap,
    policy_includeMap,
    policy_policyName,
    policy_securityServicePolicyData,
    policy_resourceType,
    policy_excludeResourceTags,
    policy_remediationEnabled,

    -- * PolicyComplianceDetail
    PolicyComplianceDetail (..),
    newPolicyComplianceDetail,
    policyComplianceDetail_expiredAt,
    policyComplianceDetail_policyId,
    policyComplianceDetail_violators,
    policyComplianceDetail_evaluationLimitExceeded,
    policyComplianceDetail_issueInfoMap,
    policyComplianceDetail_policyOwner,
    policyComplianceDetail_memberAccount,

    -- * PolicyComplianceStatus
    PolicyComplianceStatus (..),
    newPolicyComplianceStatus,
    policyComplianceStatus_evaluationResults,
    policyComplianceStatus_lastUpdated,
    policyComplianceStatus_policyName,
    policyComplianceStatus_policyId,
    policyComplianceStatus_issueInfoMap,
    policyComplianceStatus_policyOwner,
    policyComplianceStatus_memberAccount,

    -- * PolicySummary
    PolicySummary (..),
    newPolicySummary,
    policySummary_policyName,
    policySummary_remediationEnabled,
    policySummary_resourceType,
    policySummary_policyId,
    policySummary_deleteUnusedFMManagedResources,
    policySummary_policyArn,
    policySummary_securityServiceType,

    -- * PossibleRemediationAction
    PossibleRemediationAction (..),
    newPossibleRemediationAction,
    possibleRemediationAction_isDefaultAction,
    possibleRemediationAction_description,
    possibleRemediationAction_orderedRemediationActions,

    -- * PossibleRemediationActions
    PossibleRemediationActions (..),
    newPossibleRemediationActions,
    possibleRemediationActions_actions,
    possibleRemediationActions_description,

    -- * ProtocolsListData
    ProtocolsListData (..),
    newProtocolsListData,
    protocolsListData_listUpdateToken,
    protocolsListData_listId,
    protocolsListData_lastUpdateTime,
    protocolsListData_previousProtocolsList,
    protocolsListData_createTime,
    protocolsListData_listName,
    protocolsListData_protocolsList,

    -- * ProtocolsListDataSummary
    ProtocolsListDataSummary (..),
    newProtocolsListDataSummary,
    protocolsListDataSummary_protocolsList,
    protocolsListDataSummary_listArn,
    protocolsListDataSummary_listId,
    protocolsListDataSummary_listName,

    -- * RemediationAction
    RemediationAction (..),
    newRemediationAction,
    remediationAction_eC2CreateRouteAction,
    remediationAction_eC2CopyRouteTableAction,
    remediationAction_eC2ReplaceRouteTableAssociationAction,
    remediationAction_eC2AssociateRouteTableAction,
    remediationAction_eC2ReplaceRouteAction,
    remediationAction_eC2DeleteRouteAction,
    remediationAction_description,
    remediationAction_eC2CreateRouteTableAction,

    -- * RemediationActionWithOrder
    RemediationActionWithOrder (..),
    newRemediationActionWithOrder,
    remediationActionWithOrder_remediationAction,
    remediationActionWithOrder_order,

    -- * ResourceTag
    ResourceTag (..),
    newResourceTag,
    resourceTag_value,
    resourceTag_key,

    -- * ResourceViolation
    ResourceViolation (..),
    newResourceViolation,
    resourceViolation_possibleRemediationActions,
    resourceViolation_networkFirewallBlackHoleRouteDetectedViolation,
    resourceViolation_dnsRuleGroupLimitExceededViolation,
    resourceViolation_networkFirewallMissingExpectedRTViolation,
    resourceViolation_networkFirewallInternetTrafficNotInspectedViolation,
    resourceViolation_networkFirewallMissingFirewallViolation,
    resourceViolation_networkFirewallMissingSubnetViolation,
    resourceViolation_awsEc2InstanceViolation,
    resourceViolation_networkFirewallMissingExpectedRoutesViolation,
    resourceViolation_dnsRuleGroupPriorityConflictViolation,
    resourceViolation_awsVPCSecurityGroupViolation,
    resourceViolation_networkFirewallPolicyModifiedViolation,
    resourceViolation_networkFirewallUnexpectedFirewallRoutesViolation,
    resourceViolation_awsEc2NetworkInterfaceViolation,
    resourceViolation_networkFirewallUnexpectedGatewayRoutesViolation,
    resourceViolation_dnsDuplicateRuleGroupViolation,
    resourceViolation_networkFirewallInvalidRouteConfigurationViolation,

    -- * Route
    Route (..),
    newRoute,
    route_destination,
    route_targetType,
    route_destinationType,
    route_target,

    -- * SecurityGroupRemediationAction
    SecurityGroupRemediationAction (..),
    newSecurityGroupRemediationAction,
    securityGroupRemediationAction_isDefaultAction,
    securityGroupRemediationAction_remediationResult,
    securityGroupRemediationAction_description,
    securityGroupRemediationAction_remediationActionType,

    -- * SecurityGroupRuleDescription
    SecurityGroupRuleDescription (..),
    newSecurityGroupRuleDescription,
    securityGroupRuleDescription_fromPort,
    securityGroupRuleDescription_protocol,
    securityGroupRuleDescription_iPV4Range,
    securityGroupRuleDescription_prefixListId,
    securityGroupRuleDescription_toPort,
    securityGroupRuleDescription_iPV6Range,

    -- * SecurityServicePolicyData
    SecurityServicePolicyData (..),
    newSecurityServicePolicyData,
    securityServicePolicyData_managedServiceData,
    securityServicePolicyData_type,

    -- * StatefulRuleGroup
    StatefulRuleGroup (..),
    newStatefulRuleGroup,
    statefulRuleGroup_resourceId,
    statefulRuleGroup_ruleGroupName,

    -- * StatelessRuleGroup
    StatelessRuleGroup (..),
    newStatelessRuleGroup,
    statelessRuleGroup_resourceId,
    statelessRuleGroup_priority,
    statelessRuleGroup_ruleGroupName,

    -- * Tag
    Tag (..),
    newTag,
    tag_key,
    tag_value,

    -- * ViolationDetail
    ViolationDetail (..),
    newViolationDetail,
    violationDetail_resourceTags,
    violationDetail_resourceDescription,
    violationDetail_policyId,
    violationDetail_memberAccount,
    violationDetail_resourceId,
    violationDetail_resourceType,
    violationDetail_resourceViolations,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.FMS.Types.AccountRoleStatus
import Amazonka.FMS.Types.ActionTarget
import Amazonka.FMS.Types.App
import Amazonka.FMS.Types.AppsListData
import Amazonka.FMS.Types.AppsListDataSummary
import Amazonka.FMS.Types.AwsEc2InstanceViolation
import Amazonka.FMS.Types.AwsEc2NetworkInterfaceViolation
import Amazonka.FMS.Types.AwsVPCSecurityGroupViolation
import Amazonka.FMS.Types.ComplianceViolator
import Amazonka.FMS.Types.CustomerPolicyScopeIdType
import Amazonka.FMS.Types.DependentServiceName
import Amazonka.FMS.Types.DestinationType
import Amazonka.FMS.Types.DnsDuplicateRuleGroupViolation
import Amazonka.FMS.Types.DnsRuleGroupLimitExceededViolation
import Amazonka.FMS.Types.DnsRuleGroupPriorityConflictViolation
import Amazonka.FMS.Types.EC2AssociateRouteTableAction
import Amazonka.FMS.Types.EC2CopyRouteTableAction
import Amazonka.FMS.Types.EC2CreateRouteAction
import Amazonka.FMS.Types.EC2CreateRouteTableAction
import Amazonka.FMS.Types.EC2DeleteRouteAction
import Amazonka.FMS.Types.EC2ReplaceRouteAction
import Amazonka.FMS.Types.EC2ReplaceRouteTableAssociationAction
import Amazonka.FMS.Types.EvaluationResult
import Amazonka.FMS.Types.ExpectedRoute
import Amazonka.FMS.Types.NetworkFirewallBlackHoleRouteDetectedViolation
import Amazonka.FMS.Types.NetworkFirewallInternetTrafficNotInspectedViolation
import Amazonka.FMS.Types.NetworkFirewallInvalidRouteConfigurationViolation
import Amazonka.FMS.Types.NetworkFirewallMissingExpectedRTViolation
import Amazonka.FMS.Types.NetworkFirewallMissingExpectedRoutesViolation
import Amazonka.FMS.Types.NetworkFirewallMissingFirewallViolation
import Amazonka.FMS.Types.NetworkFirewallMissingSubnetViolation
import Amazonka.FMS.Types.NetworkFirewallPolicyDescription
import Amazonka.FMS.Types.NetworkFirewallPolicyModifiedViolation
import Amazonka.FMS.Types.NetworkFirewallUnexpectedFirewallRoutesViolation
import Amazonka.FMS.Types.NetworkFirewallUnexpectedGatewayRoutesViolation
import Amazonka.FMS.Types.PartialMatch
import Amazonka.FMS.Types.Policy
import Amazonka.FMS.Types.PolicyComplianceDetail
import Amazonka.FMS.Types.PolicyComplianceStatus
import Amazonka.FMS.Types.PolicyComplianceStatusType
import Amazonka.FMS.Types.PolicySummary
import Amazonka.FMS.Types.PossibleRemediationAction
import Amazonka.FMS.Types.PossibleRemediationActions
import Amazonka.FMS.Types.ProtocolsListData
import Amazonka.FMS.Types.ProtocolsListDataSummary
import Amazonka.FMS.Types.RemediationAction
import Amazonka.FMS.Types.RemediationActionType
import Amazonka.FMS.Types.RemediationActionWithOrder
import Amazonka.FMS.Types.ResourceTag
import Amazonka.FMS.Types.ResourceViolation
import Amazonka.FMS.Types.Route
import Amazonka.FMS.Types.SecurityGroupRemediationAction
import Amazonka.FMS.Types.SecurityGroupRuleDescription
import Amazonka.FMS.Types.SecurityServicePolicyData
import Amazonka.FMS.Types.SecurityServiceType
import Amazonka.FMS.Types.StatefulRuleGroup
import Amazonka.FMS.Types.StatelessRuleGroup
import Amazonka.FMS.Types.Tag
import Amazonka.FMS.Types.TargetType
import Amazonka.FMS.Types.ViolationDetail
import Amazonka.FMS.Types.ViolationReason
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign

-- | API version @2018-01-01@ of the Amazon Firewall Management Service SDK configuration.
defaultService :: Core.Service
defaultService :: Service
defaultService =
  Service :: Abbrev
-> Signer
-> ByteString
-> ByteString
-> ByteString
-> (Region -> Endpoint)
-> Maybe Seconds
-> (Status -> Bool)
-> (Status -> [Header] -> ByteStringLazy -> Error)
-> Retry
-> Service
Core.Service
    { $sel:_serviceAbbrev:Service :: Abbrev
Core._serviceAbbrev = Abbrev
"FMS",
      $sel:_serviceSigner:Service :: Signer
Core._serviceSigner = Signer
Sign.v4,
      $sel:_serviceEndpointPrefix:Service :: ByteString
Core._serviceEndpointPrefix = ByteString
"fms",
      $sel:_serviceSigningName:Service :: ByteString
Core._serviceSigningName = ByteString
"fms",
      $sel:_serviceVersion:Service :: ByteString
Core._serviceVersion = ByteString
"2018-01-01",
      $sel:_serviceEndpoint:Service :: Region -> Endpoint
Core._serviceEndpoint =
        Service -> Region -> Endpoint
Core.defaultEndpoint Service
defaultService,
      $sel:_serviceTimeout:Service :: Maybe Seconds
Core._serviceTimeout = Seconds -> Maybe Seconds
forall a. a -> Maybe a
Prelude.Just Seconds
70,
      $sel:_serviceCheck:Service :: Status -> Bool
Core._serviceCheck = Status -> Bool
Core.statusSuccess,
      $sel:_serviceError:Service :: Status -> [Header] -> ByteStringLazy -> Error
Core._serviceError = Abbrev -> Status -> [Header] -> ByteStringLazy -> Error
Core.parseJSONError Abbrev
"FMS",
      $sel:_serviceRetry:Service :: Retry
Core._serviceRetry = Retry
retry
    }
  where
    retry :: Retry
retry =
      Exponential :: Double -> Int -> Int -> (ServiceError -> Maybe Text) -> Retry
Core.Exponential
        { $sel:_retryBase:Exponential :: Double
Core._retryBase = Double
5.0e-2,
          $sel:_retryGrowth:Exponential :: Int
Core._retryGrowth = Int
2,
          $sel:_retryAttempts:Exponential :: Int
Core._retryAttempts = Int
5,
          $sel:_retryCheck:Exponential :: ServiceError -> Maybe Text
Core._retryCheck = ServiceError -> Maybe Text
forall a. IsString a => ServiceError -> Maybe a
check
        }
    check :: ServiceError -> Maybe a
check ServiceError
e
      | Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
          ( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottledException"
              Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
          )
          ServiceError
e =
        a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"throttled_exception"
      | Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429) ServiceError
e =
        a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"too_many_requests"
      | Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
          ( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottlingException"
              Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
          )
          ServiceError
e =
        a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"throttling_exception"
      | Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
          ( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"Throttling"
              Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
          )
          ServiceError
e =
        a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"throttling"
      | Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
          ( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode
              ErrorCode
"ProvisionedThroughputExceededException"
              Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
          )
          ServiceError
e =
        a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"throughput_exceeded"
      | Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
504) ServiceError
e =
        a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"gateway_timeout"
      | Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
          ( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"RequestThrottledException"
              Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
          )
          ServiceError
e =
        a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"request_throttled_exception"
      | Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
502) ServiceError
e =
        a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"bad_gateway"
      | Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
503) ServiceError
e =
        a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"service_unavailable"
      | Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500) ServiceError
e =
        a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"general_server_error"
      | Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
509) ServiceError
e =
        a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"limit_exceeded"
      | Bool
Prelude.otherwise = Maybe a
forall a. Maybe a
Prelude.Nothing

-- | The operation failed because of a system problem, even though the
-- request was valid. Retry your request.
_InternalErrorException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_InternalErrorException :: Getting (First ServiceError) a ServiceError
_InternalErrorException =
  Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"InternalErrorException"

-- | The parameters of the request were invalid.
_InvalidInputException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_InvalidInputException :: Getting (First ServiceError) a ServiceError
_InvalidInputException =
  Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"InvalidInputException"

-- | The operation failed because there was nothing to do or the operation
-- wasn\'t possible. For example, you might have submitted an
-- @AssociateAdminAccount@ request for an account ID that was already set
-- as the Firewall Manager administrator. Or you might have tried to access
-- a Region that\'s disabled by default, and that you need to enable for
-- the Firewall Manager administrator account and for Organizations before
-- you can access it.
_InvalidOperationException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_InvalidOperationException :: Getting (First ServiceError) a ServiceError
_InvalidOperationException =
  Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"InvalidOperationException"

-- | The value of the @Type@ parameter is invalid.
_InvalidTypeException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_InvalidTypeException :: Getting (First ServiceError) a ServiceError
_InvalidTypeException =
  Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"InvalidTypeException"

-- | The specified resource was not found.
_ResourceNotFoundException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_ResourceNotFoundException :: Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
  Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"ResourceNotFoundException"

-- | The operation exceeds a resource limit, for example, the maximum number
-- of @policy@ objects that you can create for an Amazon Web Services
-- account. For more information, see
-- <https://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html Firewall Manager Limits>
-- in the /WAF Developer Guide/.
_LimitExceededException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_LimitExceededException :: Getting (First ServiceError) a ServiceError
_LimitExceededException =
  Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"LimitExceededException"