{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.AWS.Config.Types.Product where
import Network.AWS.Config.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
data AccountAggregationSource = AccountAggregationSource'
{ _aasAWSRegions :: !(Maybe (List1 Text))
, _aasAllAWSRegions :: !(Maybe Bool)
, _aasAccountIds :: !(List1 Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
accountAggregationSource
:: NonEmpty Text
-> AccountAggregationSource
accountAggregationSource pAccountIds_ =
AccountAggregationSource'
{ _aasAWSRegions = Nothing
, _aasAllAWSRegions = Nothing
, _aasAccountIds = _List1 # pAccountIds_
}
aasAWSRegions :: Lens' AccountAggregationSource (Maybe (NonEmpty Text))
aasAWSRegions = lens _aasAWSRegions (\ s a -> s{_aasAWSRegions = a}) . mapping _List1
aasAllAWSRegions :: Lens' AccountAggregationSource (Maybe Bool)
aasAllAWSRegions = lens _aasAllAWSRegions (\ s a -> s{_aasAllAWSRegions = a})
aasAccountIds :: Lens' AccountAggregationSource (NonEmpty Text)
aasAccountIds = lens _aasAccountIds (\ s a -> s{_aasAccountIds = a}) . _List1
instance FromJSON AccountAggregationSource where
parseJSON
= withObject "AccountAggregationSource"
(\ x ->
AccountAggregationSource' <$>
(x .:? "AwsRegions") <*> (x .:? "AllAwsRegions") <*>
(x .: "AccountIds"))
instance Hashable AccountAggregationSource where
instance NFData AccountAggregationSource where
instance ToJSON AccountAggregationSource where
toJSON AccountAggregationSource'{..}
= object
(catMaybes
[("AwsRegions" .=) <$> _aasAWSRegions,
("AllAwsRegions" .=) <$> _aasAllAWSRegions,
Just ("AccountIds" .= _aasAccountIds)])
data AggregateComplianceByConfigRule = AggregateComplianceByConfigRule'
{ _acbcrCompliance :: !(Maybe Compliance)
, _acbcrConfigRuleName :: !(Maybe Text)
, _acbcrAccountId :: !(Maybe Text)
, _acbcrAWSRegion :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
aggregateComplianceByConfigRule
:: AggregateComplianceByConfigRule
aggregateComplianceByConfigRule =
AggregateComplianceByConfigRule'
{ _acbcrCompliance = Nothing
, _acbcrConfigRuleName = Nothing
, _acbcrAccountId = Nothing
, _acbcrAWSRegion = Nothing
}
acbcrCompliance :: Lens' AggregateComplianceByConfigRule (Maybe Compliance)
acbcrCompliance = lens _acbcrCompliance (\ s a -> s{_acbcrCompliance = a})
acbcrConfigRuleName :: Lens' AggregateComplianceByConfigRule (Maybe Text)
acbcrConfigRuleName = lens _acbcrConfigRuleName (\ s a -> s{_acbcrConfigRuleName = a})
acbcrAccountId :: Lens' AggregateComplianceByConfigRule (Maybe Text)
acbcrAccountId = lens _acbcrAccountId (\ s a -> s{_acbcrAccountId = a})
acbcrAWSRegion :: Lens' AggregateComplianceByConfigRule (Maybe Text)
acbcrAWSRegion = lens _acbcrAWSRegion (\ s a -> s{_acbcrAWSRegion = a})
instance FromJSON AggregateComplianceByConfigRule
where
parseJSON
= withObject "AggregateComplianceByConfigRule"
(\ x ->
AggregateComplianceByConfigRule' <$>
(x .:? "Compliance") <*> (x .:? "ConfigRuleName") <*>
(x .:? "AccountId")
<*> (x .:? "AwsRegion"))
instance Hashable AggregateComplianceByConfigRule
where
instance NFData AggregateComplianceByConfigRule where
data AggregateComplianceCount = AggregateComplianceCount'
{ _accGroupName :: !(Maybe Text)
, _accComplianceSummary :: !(Maybe ComplianceSummary)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
aggregateComplianceCount
:: AggregateComplianceCount
aggregateComplianceCount =
AggregateComplianceCount'
{_accGroupName = Nothing, _accComplianceSummary = Nothing}
accGroupName :: Lens' AggregateComplianceCount (Maybe Text)
accGroupName = lens _accGroupName (\ s a -> s{_accGroupName = a})
accComplianceSummary :: Lens' AggregateComplianceCount (Maybe ComplianceSummary)
accComplianceSummary = lens _accComplianceSummary (\ s a -> s{_accComplianceSummary = a})
instance FromJSON AggregateComplianceCount where
parseJSON
= withObject "AggregateComplianceCount"
(\ x ->
AggregateComplianceCount' <$>
(x .:? "GroupName") <*> (x .:? "ComplianceSummary"))
instance Hashable AggregateComplianceCount where
instance NFData AggregateComplianceCount where
data AggregateEvaluationResult = AggregateEvaluationResult'
{ _aerEvaluationResultIdentifier :: !(Maybe EvaluationResultIdentifier)
, _aerAnnotation :: !(Maybe Text)
, _aerConfigRuleInvokedTime :: !(Maybe POSIX)
, _aerResultRecordedTime :: !(Maybe POSIX)
, _aerAccountId :: !(Maybe Text)
, _aerComplianceType :: !(Maybe ComplianceType)
, _aerAWSRegion :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
aggregateEvaluationResult
:: AggregateEvaluationResult
aggregateEvaluationResult =
AggregateEvaluationResult'
{ _aerEvaluationResultIdentifier = Nothing
, _aerAnnotation = Nothing
, _aerConfigRuleInvokedTime = Nothing
, _aerResultRecordedTime = Nothing
, _aerAccountId = Nothing
, _aerComplianceType = Nothing
, _aerAWSRegion = Nothing
}
aerEvaluationResultIdentifier :: Lens' AggregateEvaluationResult (Maybe EvaluationResultIdentifier)
aerEvaluationResultIdentifier = lens _aerEvaluationResultIdentifier (\ s a -> s{_aerEvaluationResultIdentifier = a})
aerAnnotation :: Lens' AggregateEvaluationResult (Maybe Text)
aerAnnotation = lens _aerAnnotation (\ s a -> s{_aerAnnotation = a})
aerConfigRuleInvokedTime :: Lens' AggregateEvaluationResult (Maybe UTCTime)
aerConfigRuleInvokedTime = lens _aerConfigRuleInvokedTime (\ s a -> s{_aerConfigRuleInvokedTime = a}) . mapping _Time
aerResultRecordedTime :: Lens' AggregateEvaluationResult (Maybe UTCTime)
aerResultRecordedTime = lens _aerResultRecordedTime (\ s a -> s{_aerResultRecordedTime = a}) . mapping _Time
aerAccountId :: Lens' AggregateEvaluationResult (Maybe Text)
aerAccountId = lens _aerAccountId (\ s a -> s{_aerAccountId = a})
aerComplianceType :: Lens' AggregateEvaluationResult (Maybe ComplianceType)
aerComplianceType = lens _aerComplianceType (\ s a -> s{_aerComplianceType = a})
aerAWSRegion :: Lens' AggregateEvaluationResult (Maybe Text)
aerAWSRegion = lens _aerAWSRegion (\ s a -> s{_aerAWSRegion = a})
instance FromJSON AggregateEvaluationResult where
parseJSON
= withObject "AggregateEvaluationResult"
(\ x ->
AggregateEvaluationResult' <$>
(x .:? "EvaluationResultIdentifier") <*>
(x .:? "Annotation")
<*> (x .:? "ConfigRuleInvokedTime")
<*> (x .:? "ResultRecordedTime")
<*> (x .:? "AccountId")
<*> (x .:? "ComplianceType")
<*> (x .:? "AwsRegion"))
instance Hashable AggregateEvaluationResult where
instance NFData AggregateEvaluationResult where
data AggregatedSourceStatus = AggregatedSourceStatus'
{ _assLastErrorCode :: !(Maybe Text)
, _assLastUpdateStatus :: !(Maybe AggregatedSourceStatusType)
, _assSourceType :: !(Maybe AggregatedSourceType)
, _assSourceId :: !(Maybe Text)
, _assLastErrorMessage :: !(Maybe Text)
, _assAWSRegion :: !(Maybe Text)
, _assLastUpdateTime :: !(Maybe POSIX)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
aggregatedSourceStatus
:: AggregatedSourceStatus
aggregatedSourceStatus =
AggregatedSourceStatus'
{ _assLastErrorCode = Nothing
, _assLastUpdateStatus = Nothing
, _assSourceType = Nothing
, _assSourceId = Nothing
, _assLastErrorMessage = Nothing
, _assAWSRegion = Nothing
, _assLastUpdateTime = Nothing
}
assLastErrorCode :: Lens' AggregatedSourceStatus (Maybe Text)
assLastErrorCode = lens _assLastErrorCode (\ s a -> s{_assLastErrorCode = a})
assLastUpdateStatus :: Lens' AggregatedSourceStatus (Maybe AggregatedSourceStatusType)
assLastUpdateStatus = lens _assLastUpdateStatus (\ s a -> s{_assLastUpdateStatus = a})
assSourceType :: Lens' AggregatedSourceStatus (Maybe AggregatedSourceType)
assSourceType = lens _assSourceType (\ s a -> s{_assSourceType = a})
assSourceId :: Lens' AggregatedSourceStatus (Maybe Text)
assSourceId = lens _assSourceId (\ s a -> s{_assSourceId = a})
assLastErrorMessage :: Lens' AggregatedSourceStatus (Maybe Text)
assLastErrorMessage = lens _assLastErrorMessage (\ s a -> s{_assLastErrorMessage = a})
assAWSRegion :: Lens' AggregatedSourceStatus (Maybe Text)
assAWSRegion = lens _assAWSRegion (\ s a -> s{_assAWSRegion = a})
assLastUpdateTime :: Lens' AggregatedSourceStatus (Maybe UTCTime)
assLastUpdateTime = lens _assLastUpdateTime (\ s a -> s{_assLastUpdateTime = a}) . mapping _Time
instance FromJSON AggregatedSourceStatus where
parseJSON
= withObject "AggregatedSourceStatus"
(\ x ->
AggregatedSourceStatus' <$>
(x .:? "LastErrorCode") <*>
(x .:? "LastUpdateStatus")
<*> (x .:? "SourceType")
<*> (x .:? "SourceId")
<*> (x .:? "LastErrorMessage")
<*> (x .:? "AwsRegion")
<*> (x .:? "LastUpdateTime"))
instance Hashable AggregatedSourceStatus where
instance NFData AggregatedSourceStatus where
data AggregationAuthorization = AggregationAuthorization'
{ _aaCreationTime :: !(Maybe POSIX)
, _aaAuthorizedAWSRegion :: !(Maybe Text)
, _aaAggregationAuthorizationARN :: !(Maybe Text)
, _aaAuthorizedAccountId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
aggregationAuthorization
:: AggregationAuthorization
aggregationAuthorization =
AggregationAuthorization'
{ _aaCreationTime = Nothing
, _aaAuthorizedAWSRegion = Nothing
, _aaAggregationAuthorizationARN = Nothing
, _aaAuthorizedAccountId = Nothing
}
aaCreationTime :: Lens' AggregationAuthorization (Maybe UTCTime)
aaCreationTime = lens _aaCreationTime (\ s a -> s{_aaCreationTime = a}) . mapping _Time
aaAuthorizedAWSRegion :: Lens' AggregationAuthorization (Maybe Text)
aaAuthorizedAWSRegion = lens _aaAuthorizedAWSRegion (\ s a -> s{_aaAuthorizedAWSRegion = a})
aaAggregationAuthorizationARN :: Lens' AggregationAuthorization (Maybe Text)
aaAggregationAuthorizationARN = lens _aaAggregationAuthorizationARN (\ s a -> s{_aaAggregationAuthorizationARN = a})
aaAuthorizedAccountId :: Lens' AggregationAuthorization (Maybe Text)
aaAuthorizedAccountId = lens _aaAuthorizedAccountId (\ s a -> s{_aaAuthorizedAccountId = a})
instance FromJSON AggregationAuthorization where
parseJSON
= withObject "AggregationAuthorization"
(\ x ->
AggregationAuthorization' <$>
(x .:? "CreationTime") <*>
(x .:? "AuthorizedAwsRegion")
<*> (x .:? "AggregationAuthorizationArn")
<*> (x .:? "AuthorizedAccountId"))
instance Hashable AggregationAuthorization where
instance NFData AggregationAuthorization where
data BaseConfigurationItem = BaseConfigurationItem'
{ _bciResourceId :: !(Maybe Text)
, _bciResourceType :: !(Maybe ResourceType)
, _bciConfigurationStateId :: !(Maybe Text)
, _bciArn :: !(Maybe Text)
, _bciResourceName :: !(Maybe Text)
, _bciResourceCreationTime :: !(Maybe POSIX)
, _bciConfigurationItemStatus :: !(Maybe ConfigurationItemStatus)
, _bciConfigurationItemCaptureTime :: !(Maybe POSIX)
, _bciAccountId :: !(Maybe Text)
, _bciSupplementaryConfiguration :: !(Maybe (Map Text Text))
, _bciAvailabilityZone :: !(Maybe Text)
, _bciVersion :: !(Maybe Text)
, _bciAwsRegion :: !(Maybe Text)
, _bciConfiguration :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
baseConfigurationItem
:: BaseConfigurationItem
baseConfigurationItem =
BaseConfigurationItem'
{ _bciResourceId = Nothing
, _bciResourceType = Nothing
, _bciConfigurationStateId = Nothing
, _bciArn = Nothing
, _bciResourceName = Nothing
, _bciResourceCreationTime = Nothing
, _bciConfigurationItemStatus = Nothing
, _bciConfigurationItemCaptureTime = Nothing
, _bciAccountId = Nothing
, _bciSupplementaryConfiguration = Nothing
, _bciAvailabilityZone = Nothing
, _bciVersion = Nothing
, _bciAwsRegion = Nothing
, _bciConfiguration = Nothing
}
bciResourceId :: Lens' BaseConfigurationItem (Maybe Text)
bciResourceId = lens _bciResourceId (\ s a -> s{_bciResourceId = a})
bciResourceType :: Lens' BaseConfigurationItem (Maybe ResourceType)
bciResourceType = lens _bciResourceType (\ s a -> s{_bciResourceType = a})
bciConfigurationStateId :: Lens' BaseConfigurationItem (Maybe Text)
bciConfigurationStateId = lens _bciConfigurationStateId (\ s a -> s{_bciConfigurationStateId = a})
bciArn :: Lens' BaseConfigurationItem (Maybe Text)
bciArn = lens _bciArn (\ s a -> s{_bciArn = a})
bciResourceName :: Lens' BaseConfigurationItem (Maybe Text)
bciResourceName = lens _bciResourceName (\ s a -> s{_bciResourceName = a})
bciResourceCreationTime :: Lens' BaseConfigurationItem (Maybe UTCTime)
bciResourceCreationTime = lens _bciResourceCreationTime (\ s a -> s{_bciResourceCreationTime = a}) . mapping _Time
bciConfigurationItemStatus :: Lens' BaseConfigurationItem (Maybe ConfigurationItemStatus)
bciConfigurationItemStatus = lens _bciConfigurationItemStatus (\ s a -> s{_bciConfigurationItemStatus = a})
bciConfigurationItemCaptureTime :: Lens' BaseConfigurationItem (Maybe UTCTime)
bciConfigurationItemCaptureTime = lens _bciConfigurationItemCaptureTime (\ s a -> s{_bciConfigurationItemCaptureTime = a}) . mapping _Time
bciAccountId :: Lens' BaseConfigurationItem (Maybe Text)
bciAccountId = lens _bciAccountId (\ s a -> s{_bciAccountId = a})
bciSupplementaryConfiguration :: Lens' BaseConfigurationItem (HashMap Text Text)
bciSupplementaryConfiguration = lens _bciSupplementaryConfiguration (\ s a -> s{_bciSupplementaryConfiguration = a}) . _Default . _Map
bciAvailabilityZone :: Lens' BaseConfigurationItem (Maybe Text)
bciAvailabilityZone = lens _bciAvailabilityZone (\ s a -> s{_bciAvailabilityZone = a})
bciVersion :: Lens' BaseConfigurationItem (Maybe Text)
bciVersion = lens _bciVersion (\ s a -> s{_bciVersion = a})
bciAwsRegion :: Lens' BaseConfigurationItem (Maybe Text)
bciAwsRegion = lens _bciAwsRegion (\ s a -> s{_bciAwsRegion = a})
bciConfiguration :: Lens' BaseConfigurationItem (Maybe Text)
bciConfiguration = lens _bciConfiguration (\ s a -> s{_bciConfiguration = a})
instance FromJSON BaseConfigurationItem where
parseJSON
= withObject "BaseConfigurationItem"
(\ x ->
BaseConfigurationItem' <$>
(x .:? "resourceId") <*> (x .:? "resourceType") <*>
(x .:? "configurationStateId")
<*> (x .:? "arn")
<*> (x .:? "resourceName")
<*> (x .:? "resourceCreationTime")
<*> (x .:? "configurationItemStatus")
<*> (x .:? "configurationItemCaptureTime")
<*> (x .:? "accountId")
<*> (x .:? "supplementaryConfiguration" .!= mempty)
<*> (x .:? "availabilityZone")
<*> (x .:? "version")
<*> (x .:? "awsRegion")
<*> (x .:? "configuration"))
instance Hashable BaseConfigurationItem where
instance NFData BaseConfigurationItem where
data Compliance = Compliance'
{ _cComplianceContributorCount :: !(Maybe ComplianceContributorCount)
, _cComplianceType :: !(Maybe ComplianceType)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
compliance
:: Compliance
compliance =
Compliance'
{_cComplianceContributorCount = Nothing, _cComplianceType = Nothing}
cComplianceContributorCount :: Lens' Compliance (Maybe ComplianceContributorCount)
cComplianceContributorCount = lens _cComplianceContributorCount (\ s a -> s{_cComplianceContributorCount = a})
cComplianceType :: Lens' Compliance (Maybe ComplianceType)
cComplianceType = lens _cComplianceType (\ s a -> s{_cComplianceType = a})
instance FromJSON Compliance where
parseJSON
= withObject "Compliance"
(\ x ->
Compliance' <$>
(x .:? "ComplianceContributorCount") <*>
(x .:? "ComplianceType"))
instance Hashable Compliance where
instance NFData Compliance where
data ComplianceByConfigRule = ComplianceByConfigRule'
{ _cbcrCompliance :: !(Maybe Compliance)
, _cbcrConfigRuleName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
complianceByConfigRule
:: ComplianceByConfigRule
complianceByConfigRule =
ComplianceByConfigRule'
{_cbcrCompliance = Nothing, _cbcrConfigRuleName = Nothing}
cbcrCompliance :: Lens' ComplianceByConfigRule (Maybe Compliance)
cbcrCompliance = lens _cbcrCompliance (\ s a -> s{_cbcrCompliance = a})
cbcrConfigRuleName :: Lens' ComplianceByConfigRule (Maybe Text)
cbcrConfigRuleName = lens _cbcrConfigRuleName (\ s a -> s{_cbcrConfigRuleName = a})
instance FromJSON ComplianceByConfigRule where
parseJSON
= withObject "ComplianceByConfigRule"
(\ x ->
ComplianceByConfigRule' <$>
(x .:? "Compliance") <*> (x .:? "ConfigRuleName"))
instance Hashable ComplianceByConfigRule where
instance NFData ComplianceByConfigRule where
data ComplianceByResource = ComplianceByResource'
{ _cbrResourceId :: !(Maybe Text)
, _cbrResourceType :: !(Maybe Text)
, _cbrCompliance :: !(Maybe Compliance)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
complianceByResource
:: ComplianceByResource
complianceByResource =
ComplianceByResource'
{ _cbrResourceId = Nothing
, _cbrResourceType = Nothing
, _cbrCompliance = Nothing
}
cbrResourceId :: Lens' ComplianceByResource (Maybe Text)
cbrResourceId = lens _cbrResourceId (\ s a -> s{_cbrResourceId = a})
cbrResourceType :: Lens' ComplianceByResource (Maybe Text)
cbrResourceType = lens _cbrResourceType (\ s a -> s{_cbrResourceType = a})
cbrCompliance :: Lens' ComplianceByResource (Maybe Compliance)
cbrCompliance = lens _cbrCompliance (\ s a -> s{_cbrCompliance = a})
instance FromJSON ComplianceByResource where
parseJSON
= withObject "ComplianceByResource"
(\ x ->
ComplianceByResource' <$>
(x .:? "ResourceId") <*> (x .:? "ResourceType") <*>
(x .:? "Compliance"))
instance Hashable ComplianceByResource where
instance NFData ComplianceByResource where
data ComplianceContributorCount = ComplianceContributorCount'
{ _cccCappedCount :: !(Maybe Int)
, _cccCapExceeded :: !(Maybe Bool)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
complianceContributorCount
:: ComplianceContributorCount
complianceContributorCount =
ComplianceContributorCount'
{_cccCappedCount = Nothing, _cccCapExceeded = Nothing}
cccCappedCount :: Lens' ComplianceContributorCount (Maybe Int)
cccCappedCount = lens _cccCappedCount (\ s a -> s{_cccCappedCount = a})
cccCapExceeded :: Lens' ComplianceContributorCount (Maybe Bool)
cccCapExceeded = lens _cccCapExceeded (\ s a -> s{_cccCapExceeded = a})
instance FromJSON ComplianceContributorCount where
parseJSON
= withObject "ComplianceContributorCount"
(\ x ->
ComplianceContributorCount' <$>
(x .:? "CappedCount") <*> (x .:? "CapExceeded"))
instance Hashable ComplianceContributorCount where
instance NFData ComplianceContributorCount where
data ComplianceSummary = ComplianceSummary'
{ _csComplianceSummaryTimestamp :: !(Maybe POSIX)
, _csCompliantResourceCount :: !(Maybe ComplianceContributorCount)
, _csNonCompliantResourceCount :: !(Maybe ComplianceContributorCount)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
complianceSummary
:: ComplianceSummary
complianceSummary =
ComplianceSummary'
{ _csComplianceSummaryTimestamp = Nothing
, _csCompliantResourceCount = Nothing
, _csNonCompliantResourceCount = Nothing
}
csComplianceSummaryTimestamp :: Lens' ComplianceSummary (Maybe UTCTime)
csComplianceSummaryTimestamp = lens _csComplianceSummaryTimestamp (\ s a -> s{_csComplianceSummaryTimestamp = a}) . mapping _Time
csCompliantResourceCount :: Lens' ComplianceSummary (Maybe ComplianceContributorCount)
csCompliantResourceCount = lens _csCompliantResourceCount (\ s a -> s{_csCompliantResourceCount = a})
csNonCompliantResourceCount :: Lens' ComplianceSummary (Maybe ComplianceContributorCount)
csNonCompliantResourceCount = lens _csNonCompliantResourceCount (\ s a -> s{_csNonCompliantResourceCount = a})
instance FromJSON ComplianceSummary where
parseJSON
= withObject "ComplianceSummary"
(\ x ->
ComplianceSummary' <$>
(x .:? "ComplianceSummaryTimestamp") <*>
(x .:? "CompliantResourceCount")
<*> (x .:? "NonCompliantResourceCount"))
instance Hashable ComplianceSummary where
instance NFData ComplianceSummary where
data ComplianceSummaryByResourceType = ComplianceSummaryByResourceType'
{ _csbrtResourceType :: !(Maybe Text)
, _csbrtComplianceSummary :: !(Maybe ComplianceSummary)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
complianceSummaryByResourceType
:: ComplianceSummaryByResourceType
complianceSummaryByResourceType =
ComplianceSummaryByResourceType'
{_csbrtResourceType = Nothing, _csbrtComplianceSummary = Nothing}
csbrtResourceType :: Lens' ComplianceSummaryByResourceType (Maybe Text)
csbrtResourceType = lens _csbrtResourceType (\ s a -> s{_csbrtResourceType = a})
csbrtComplianceSummary :: Lens' ComplianceSummaryByResourceType (Maybe ComplianceSummary)
csbrtComplianceSummary = lens _csbrtComplianceSummary (\ s a -> s{_csbrtComplianceSummary = a})
instance FromJSON ComplianceSummaryByResourceType
where
parseJSON
= withObject "ComplianceSummaryByResourceType"
(\ x ->
ComplianceSummaryByResourceType' <$>
(x .:? "ResourceType") <*>
(x .:? "ComplianceSummary"))
instance Hashable ComplianceSummaryByResourceType
where
instance NFData ComplianceSummaryByResourceType where
data ConfigExportDeliveryInfo = ConfigExportDeliveryInfo'
{ _cediLastErrorCode :: !(Maybe Text)
, _cediLastAttemptTime :: !(Maybe POSIX)
, _cediLastSuccessfulTime :: !(Maybe POSIX)
, _cediLastStatus :: !(Maybe DeliveryStatus)
, _cediLastErrorMessage :: !(Maybe Text)
, _cediNextDeliveryTime :: !(Maybe POSIX)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
configExportDeliveryInfo
:: ConfigExportDeliveryInfo
configExportDeliveryInfo =
ConfigExportDeliveryInfo'
{ _cediLastErrorCode = Nothing
, _cediLastAttemptTime = Nothing
, _cediLastSuccessfulTime = Nothing
, _cediLastStatus = Nothing
, _cediLastErrorMessage = Nothing
, _cediNextDeliveryTime = Nothing
}
cediLastErrorCode :: Lens' ConfigExportDeliveryInfo (Maybe Text)
cediLastErrorCode = lens _cediLastErrorCode (\ s a -> s{_cediLastErrorCode = a})
cediLastAttemptTime :: Lens' ConfigExportDeliveryInfo (Maybe UTCTime)
cediLastAttemptTime = lens _cediLastAttemptTime (\ s a -> s{_cediLastAttemptTime = a}) . mapping _Time
cediLastSuccessfulTime :: Lens' ConfigExportDeliveryInfo (Maybe UTCTime)
cediLastSuccessfulTime = lens _cediLastSuccessfulTime (\ s a -> s{_cediLastSuccessfulTime = a}) . mapping _Time
cediLastStatus :: Lens' ConfigExportDeliveryInfo (Maybe DeliveryStatus)
cediLastStatus = lens _cediLastStatus (\ s a -> s{_cediLastStatus = a})
cediLastErrorMessage :: Lens' ConfigExportDeliveryInfo (Maybe Text)
cediLastErrorMessage = lens _cediLastErrorMessage (\ s a -> s{_cediLastErrorMessage = a})
cediNextDeliveryTime :: Lens' ConfigExportDeliveryInfo (Maybe UTCTime)
cediNextDeliveryTime = lens _cediNextDeliveryTime (\ s a -> s{_cediNextDeliveryTime = a}) . mapping _Time
instance FromJSON ConfigExportDeliveryInfo where
parseJSON
= withObject "ConfigExportDeliveryInfo"
(\ x ->
ConfigExportDeliveryInfo' <$>
(x .:? "lastErrorCode") <*> (x .:? "lastAttemptTime")
<*> (x .:? "lastSuccessfulTime")
<*> (x .:? "lastStatus")
<*> (x .:? "lastErrorMessage")
<*> (x .:? "nextDeliveryTime"))
instance Hashable ConfigExportDeliveryInfo where
instance NFData ConfigExportDeliveryInfo where
data ConfigRule = ConfigRule'
{ _crInputParameters :: !(Maybe Text)
, _crConfigRuleName :: !(Maybe Text)
, _crMaximumExecutionFrequency :: !(Maybe MaximumExecutionFrequency)
, _crConfigRuleId :: !(Maybe Text)
, _crScope :: !(Maybe Scope)
, _crConfigRuleState :: !(Maybe ConfigRuleState)
, _crDescription :: !(Maybe Text)
, _crConfigRuleARN :: !(Maybe Text)
, _crSource :: !Source
} deriving (Eq, Read, Show, Data, Typeable, Generic)
configRule
:: Source
-> ConfigRule
configRule pSource_ =
ConfigRule'
{ _crInputParameters = Nothing
, _crConfigRuleName = Nothing
, _crMaximumExecutionFrequency = Nothing
, _crConfigRuleId = Nothing
, _crScope = Nothing
, _crConfigRuleState = Nothing
, _crDescription = Nothing
, _crConfigRuleARN = Nothing
, _crSource = pSource_
}
crInputParameters :: Lens' ConfigRule (Maybe Text)
crInputParameters = lens _crInputParameters (\ s a -> s{_crInputParameters = a})
crConfigRuleName :: Lens' ConfigRule (Maybe Text)
crConfigRuleName = lens _crConfigRuleName (\ s a -> s{_crConfigRuleName = a})
crMaximumExecutionFrequency :: Lens' ConfigRule (Maybe MaximumExecutionFrequency)
crMaximumExecutionFrequency = lens _crMaximumExecutionFrequency (\ s a -> s{_crMaximumExecutionFrequency = a})
crConfigRuleId :: Lens' ConfigRule (Maybe Text)
crConfigRuleId = lens _crConfigRuleId (\ s a -> s{_crConfigRuleId = a})
crScope :: Lens' ConfigRule (Maybe Scope)
crScope = lens _crScope (\ s a -> s{_crScope = a})
crConfigRuleState :: Lens' ConfigRule (Maybe ConfigRuleState)
crConfigRuleState = lens _crConfigRuleState (\ s a -> s{_crConfigRuleState = a})
crDescription :: Lens' ConfigRule (Maybe Text)
crDescription = lens _crDescription (\ s a -> s{_crDescription = a})
crConfigRuleARN :: Lens' ConfigRule (Maybe Text)
crConfigRuleARN = lens _crConfigRuleARN (\ s a -> s{_crConfigRuleARN = a})
crSource :: Lens' ConfigRule Source
crSource = lens _crSource (\ s a -> s{_crSource = a})
instance FromJSON ConfigRule where
parseJSON
= withObject "ConfigRule"
(\ x ->
ConfigRule' <$>
(x .:? "InputParameters") <*>
(x .:? "ConfigRuleName")
<*> (x .:? "MaximumExecutionFrequency")
<*> (x .:? "ConfigRuleId")
<*> (x .:? "Scope")
<*> (x .:? "ConfigRuleState")
<*> (x .:? "Description")
<*> (x .:? "ConfigRuleArn")
<*> (x .: "Source"))
instance Hashable ConfigRule where
instance NFData ConfigRule where
instance ToJSON ConfigRule where
toJSON ConfigRule'{..}
= object
(catMaybes
[("InputParameters" .=) <$> _crInputParameters,
("ConfigRuleName" .=) <$> _crConfigRuleName,
("MaximumExecutionFrequency" .=) <$>
_crMaximumExecutionFrequency,
("ConfigRuleId" .=) <$> _crConfigRuleId,
("Scope" .=) <$> _crScope,
("ConfigRuleState" .=) <$> _crConfigRuleState,
("Description" .=) <$> _crDescription,
("ConfigRuleArn" .=) <$> _crConfigRuleARN,
Just ("Source" .= _crSource)])
data ConfigRuleComplianceFilters = ConfigRuleComplianceFilters'
{ _crcfConfigRuleName :: !(Maybe Text)
, _crcfAccountId :: !(Maybe Text)
, _crcfComplianceType :: !(Maybe ComplianceType)
, _crcfAWSRegion :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
configRuleComplianceFilters
:: ConfigRuleComplianceFilters
configRuleComplianceFilters =
ConfigRuleComplianceFilters'
{ _crcfConfigRuleName = Nothing
, _crcfAccountId = Nothing
, _crcfComplianceType = Nothing
, _crcfAWSRegion = Nothing
}
crcfConfigRuleName :: Lens' ConfigRuleComplianceFilters (Maybe Text)
crcfConfigRuleName = lens _crcfConfigRuleName (\ s a -> s{_crcfConfigRuleName = a})
crcfAccountId :: Lens' ConfigRuleComplianceFilters (Maybe Text)
crcfAccountId = lens _crcfAccountId (\ s a -> s{_crcfAccountId = a})
crcfComplianceType :: Lens' ConfigRuleComplianceFilters (Maybe ComplianceType)
crcfComplianceType = lens _crcfComplianceType (\ s a -> s{_crcfComplianceType = a})
crcfAWSRegion :: Lens' ConfigRuleComplianceFilters (Maybe Text)
crcfAWSRegion = lens _crcfAWSRegion (\ s a -> s{_crcfAWSRegion = a})
instance Hashable ConfigRuleComplianceFilters where
instance NFData ConfigRuleComplianceFilters where
instance ToJSON ConfigRuleComplianceFilters where
toJSON ConfigRuleComplianceFilters'{..}
= object
(catMaybes
[("ConfigRuleName" .=) <$> _crcfConfigRuleName,
("AccountId" .=) <$> _crcfAccountId,
("ComplianceType" .=) <$> _crcfComplianceType,
("AwsRegion" .=) <$> _crcfAWSRegion])
data ConfigRuleComplianceSummaryFilters = ConfigRuleComplianceSummaryFilters'
{ _crcsfAccountId :: !(Maybe Text)
, _crcsfAWSRegion :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
configRuleComplianceSummaryFilters
:: ConfigRuleComplianceSummaryFilters
configRuleComplianceSummaryFilters =
ConfigRuleComplianceSummaryFilters'
{_crcsfAccountId = Nothing, _crcsfAWSRegion = Nothing}
crcsfAccountId :: Lens' ConfigRuleComplianceSummaryFilters (Maybe Text)
crcsfAccountId = lens _crcsfAccountId (\ s a -> s{_crcsfAccountId = a})
crcsfAWSRegion :: Lens' ConfigRuleComplianceSummaryFilters (Maybe Text)
crcsfAWSRegion = lens _crcsfAWSRegion (\ s a -> s{_crcsfAWSRegion = a})
instance Hashable ConfigRuleComplianceSummaryFilters
where
instance NFData ConfigRuleComplianceSummaryFilters
where
instance ToJSON ConfigRuleComplianceSummaryFilters
where
toJSON ConfigRuleComplianceSummaryFilters'{..}
= object
(catMaybes
[("AccountId" .=) <$> _crcsfAccountId,
("AwsRegion" .=) <$> _crcsfAWSRegion])
data ConfigRuleEvaluationStatus = ConfigRuleEvaluationStatus'
{ _cresLastErrorCode :: !(Maybe Text)
, _cresLastFailedEvaluationTime :: !(Maybe POSIX)
, _cresFirstActivatedTime :: !(Maybe POSIX)
, _cresLastSuccessfulEvaluationTime :: !(Maybe POSIX)
, _cresConfigRuleName :: !(Maybe Text)
, _cresLastErrorMessage :: !(Maybe Text)
, _cresConfigRuleId :: !(Maybe Text)
, _cresLastFailedInvocationTime :: !(Maybe POSIX)
, _cresFirstEvaluationStarted :: !(Maybe Bool)
, _cresLastSuccessfulInvocationTime :: !(Maybe POSIX)
, _cresConfigRuleARN :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
configRuleEvaluationStatus
:: ConfigRuleEvaluationStatus
configRuleEvaluationStatus =
ConfigRuleEvaluationStatus'
{ _cresLastErrorCode = Nothing
, _cresLastFailedEvaluationTime = Nothing
, _cresFirstActivatedTime = Nothing
, _cresLastSuccessfulEvaluationTime = Nothing
, _cresConfigRuleName = Nothing
, _cresLastErrorMessage = Nothing
, _cresConfigRuleId = Nothing
, _cresLastFailedInvocationTime = Nothing
, _cresFirstEvaluationStarted = Nothing
, _cresLastSuccessfulInvocationTime = Nothing
, _cresConfigRuleARN = Nothing
}
cresLastErrorCode :: Lens' ConfigRuleEvaluationStatus (Maybe Text)
cresLastErrorCode = lens _cresLastErrorCode (\ s a -> s{_cresLastErrorCode = a})
cresLastFailedEvaluationTime :: Lens' ConfigRuleEvaluationStatus (Maybe UTCTime)
cresLastFailedEvaluationTime = lens _cresLastFailedEvaluationTime (\ s a -> s{_cresLastFailedEvaluationTime = a}) . mapping _Time
cresFirstActivatedTime :: Lens' ConfigRuleEvaluationStatus (Maybe UTCTime)
cresFirstActivatedTime = lens _cresFirstActivatedTime (\ s a -> s{_cresFirstActivatedTime = a}) . mapping _Time
cresLastSuccessfulEvaluationTime :: Lens' ConfigRuleEvaluationStatus (Maybe UTCTime)
cresLastSuccessfulEvaluationTime = lens _cresLastSuccessfulEvaluationTime (\ s a -> s{_cresLastSuccessfulEvaluationTime = a}) . mapping _Time
cresConfigRuleName :: Lens' ConfigRuleEvaluationStatus (Maybe Text)
cresConfigRuleName = lens _cresConfigRuleName (\ s a -> s{_cresConfigRuleName = a})
cresLastErrorMessage :: Lens' ConfigRuleEvaluationStatus (Maybe Text)
cresLastErrorMessage = lens _cresLastErrorMessage (\ s a -> s{_cresLastErrorMessage = a})
cresConfigRuleId :: Lens' ConfigRuleEvaluationStatus (Maybe Text)
cresConfigRuleId = lens _cresConfigRuleId (\ s a -> s{_cresConfigRuleId = a})
cresLastFailedInvocationTime :: Lens' ConfigRuleEvaluationStatus (Maybe UTCTime)
cresLastFailedInvocationTime = lens _cresLastFailedInvocationTime (\ s a -> s{_cresLastFailedInvocationTime = a}) . mapping _Time
cresFirstEvaluationStarted :: Lens' ConfigRuleEvaluationStatus (Maybe Bool)
cresFirstEvaluationStarted = lens _cresFirstEvaluationStarted (\ s a -> s{_cresFirstEvaluationStarted = a})
cresLastSuccessfulInvocationTime :: Lens' ConfigRuleEvaluationStatus (Maybe UTCTime)
cresLastSuccessfulInvocationTime = lens _cresLastSuccessfulInvocationTime (\ s a -> s{_cresLastSuccessfulInvocationTime = a}) . mapping _Time
cresConfigRuleARN :: Lens' ConfigRuleEvaluationStatus (Maybe Text)
cresConfigRuleARN = lens _cresConfigRuleARN (\ s a -> s{_cresConfigRuleARN = a})
instance FromJSON ConfigRuleEvaluationStatus where
parseJSON
= withObject "ConfigRuleEvaluationStatus"
(\ x ->
ConfigRuleEvaluationStatus' <$>
(x .:? "LastErrorCode") <*>
(x .:? "LastFailedEvaluationTime")
<*> (x .:? "FirstActivatedTime")
<*> (x .:? "LastSuccessfulEvaluationTime")
<*> (x .:? "ConfigRuleName")
<*> (x .:? "LastErrorMessage")
<*> (x .:? "ConfigRuleId")
<*> (x .:? "LastFailedInvocationTime")
<*> (x .:? "FirstEvaluationStarted")
<*> (x .:? "LastSuccessfulInvocationTime")
<*> (x .:? "ConfigRuleArn"))
instance Hashable ConfigRuleEvaluationStatus where
instance NFData ConfigRuleEvaluationStatus where
newtype ConfigSnapshotDeliveryProperties = ConfigSnapshotDeliveryProperties'
{ _csdpDeliveryFrequency :: Maybe MaximumExecutionFrequency
} deriving (Eq, Read, Show, Data, Typeable, Generic)
configSnapshotDeliveryProperties
:: ConfigSnapshotDeliveryProperties
configSnapshotDeliveryProperties =
ConfigSnapshotDeliveryProperties' {_csdpDeliveryFrequency = Nothing}
csdpDeliveryFrequency :: Lens' ConfigSnapshotDeliveryProperties (Maybe MaximumExecutionFrequency)
csdpDeliveryFrequency = lens _csdpDeliveryFrequency (\ s a -> s{_csdpDeliveryFrequency = a})
instance FromJSON ConfigSnapshotDeliveryProperties
where
parseJSON
= withObject "ConfigSnapshotDeliveryProperties"
(\ x ->
ConfigSnapshotDeliveryProperties' <$>
(x .:? "deliveryFrequency"))
instance Hashable ConfigSnapshotDeliveryProperties
where
instance NFData ConfigSnapshotDeliveryProperties
where
instance ToJSON ConfigSnapshotDeliveryProperties
where
toJSON ConfigSnapshotDeliveryProperties'{..}
= object
(catMaybes
[("deliveryFrequency" .=) <$>
_csdpDeliveryFrequency])
data ConfigStreamDeliveryInfo = ConfigStreamDeliveryInfo'
{ _csdiLastErrorCode :: !(Maybe Text)
, _csdiLastStatusChangeTime :: !(Maybe POSIX)
, _csdiLastStatus :: !(Maybe DeliveryStatus)
, _csdiLastErrorMessage :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
configStreamDeliveryInfo
:: ConfigStreamDeliveryInfo
configStreamDeliveryInfo =
ConfigStreamDeliveryInfo'
{ _csdiLastErrorCode = Nothing
, _csdiLastStatusChangeTime = Nothing
, _csdiLastStatus = Nothing
, _csdiLastErrorMessage = Nothing
}
csdiLastErrorCode :: Lens' ConfigStreamDeliveryInfo (Maybe Text)
csdiLastErrorCode = lens _csdiLastErrorCode (\ s a -> s{_csdiLastErrorCode = a})
csdiLastStatusChangeTime :: Lens' ConfigStreamDeliveryInfo (Maybe UTCTime)
csdiLastStatusChangeTime = lens _csdiLastStatusChangeTime (\ s a -> s{_csdiLastStatusChangeTime = a}) . mapping _Time
csdiLastStatus :: Lens' ConfigStreamDeliveryInfo (Maybe DeliveryStatus)
csdiLastStatus = lens _csdiLastStatus (\ s a -> s{_csdiLastStatus = a})
csdiLastErrorMessage :: Lens' ConfigStreamDeliveryInfo (Maybe Text)
csdiLastErrorMessage = lens _csdiLastErrorMessage (\ s a -> s{_csdiLastErrorMessage = a})
instance FromJSON ConfigStreamDeliveryInfo where
parseJSON
= withObject "ConfigStreamDeliveryInfo"
(\ x ->
ConfigStreamDeliveryInfo' <$>
(x .:? "lastErrorCode") <*>
(x .:? "lastStatusChangeTime")
<*> (x .:? "lastStatus")
<*> (x .:? "lastErrorMessage"))
instance Hashable ConfigStreamDeliveryInfo where
instance NFData ConfigStreamDeliveryInfo where
data ConfigurationAggregator = ConfigurationAggregator'
{ _caConfigurationAggregatorARN :: !(Maybe Text)
, _caCreationTime :: !(Maybe POSIX)
, _caOrganizationAggregationSource :: !(Maybe OrganizationAggregationSource)
, _caLastUpdatedTime :: !(Maybe POSIX)
, _caAccountAggregationSources :: !(Maybe [AccountAggregationSource])
, _caConfigurationAggregatorName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
configurationAggregator
:: ConfigurationAggregator
configurationAggregator =
ConfigurationAggregator'
{ _caConfigurationAggregatorARN = Nothing
, _caCreationTime = Nothing
, _caOrganizationAggregationSource = Nothing
, _caLastUpdatedTime = Nothing
, _caAccountAggregationSources = Nothing
, _caConfigurationAggregatorName = Nothing
}
caConfigurationAggregatorARN :: Lens' ConfigurationAggregator (Maybe Text)
caConfigurationAggregatorARN = lens _caConfigurationAggregatorARN (\ s a -> s{_caConfigurationAggregatorARN = a})
caCreationTime :: Lens' ConfigurationAggregator (Maybe UTCTime)
caCreationTime = lens _caCreationTime (\ s a -> s{_caCreationTime = a}) . mapping _Time
caOrganizationAggregationSource :: Lens' ConfigurationAggregator (Maybe OrganizationAggregationSource)
caOrganizationAggregationSource = lens _caOrganizationAggregationSource (\ s a -> s{_caOrganizationAggregationSource = a})
caLastUpdatedTime :: Lens' ConfigurationAggregator (Maybe UTCTime)
caLastUpdatedTime = lens _caLastUpdatedTime (\ s a -> s{_caLastUpdatedTime = a}) . mapping _Time
caAccountAggregationSources :: Lens' ConfigurationAggregator [AccountAggregationSource]
caAccountAggregationSources = lens _caAccountAggregationSources (\ s a -> s{_caAccountAggregationSources = a}) . _Default . _Coerce
caConfigurationAggregatorName :: Lens' ConfigurationAggregator (Maybe Text)
caConfigurationAggregatorName = lens _caConfigurationAggregatorName (\ s a -> s{_caConfigurationAggregatorName = a})
instance FromJSON ConfigurationAggregator where
parseJSON
= withObject "ConfigurationAggregator"
(\ x ->
ConfigurationAggregator' <$>
(x .:? "ConfigurationAggregatorArn") <*>
(x .:? "CreationTime")
<*> (x .:? "OrganizationAggregationSource")
<*> (x .:? "LastUpdatedTime")
<*> (x .:? "AccountAggregationSources" .!= mempty)
<*> (x .:? "ConfigurationAggregatorName"))
instance Hashable ConfigurationAggregator where
instance NFData ConfigurationAggregator where
data ConfigurationItem = ConfigurationItem'
{ _ciResourceId :: !(Maybe Text)
, _ciResourceType :: !(Maybe ResourceType)
, _ciConfigurationStateId :: !(Maybe Text)
, _ciArn :: !(Maybe Text)
, _ciResourceName :: !(Maybe Text)
, _ciResourceCreationTime :: !(Maybe POSIX)
, _ciConfigurationItemStatus :: !(Maybe ConfigurationItemStatus)
, _ciConfigurationItemCaptureTime :: !(Maybe POSIX)
, _ciAccountId :: !(Maybe Text)
, _ciSupplementaryConfiguration :: !(Maybe (Map Text Text))
, _ciAvailabilityZone :: !(Maybe Text)
, _ciRelationships :: !(Maybe [Relationship])
, _ciVersion :: !(Maybe Text)
, _ciAwsRegion :: !(Maybe Text)
, _ciRelatedEvents :: !(Maybe [Text])
, _ciConfiguration :: !(Maybe Text)
, _ciConfigurationItemMD5Hash :: !(Maybe Text)
, _ciTags :: !(Maybe (Map Text Text))
} deriving (Eq, Read, Show, Data, Typeable, Generic)
configurationItem
:: ConfigurationItem
configurationItem =
ConfigurationItem'
{ _ciResourceId = Nothing
, _ciResourceType = Nothing
, _ciConfigurationStateId = Nothing
, _ciArn = Nothing
, _ciResourceName = Nothing
, _ciResourceCreationTime = Nothing
, _ciConfigurationItemStatus = Nothing
, _ciConfigurationItemCaptureTime = Nothing
, _ciAccountId = Nothing
, _ciSupplementaryConfiguration = Nothing
, _ciAvailabilityZone = Nothing
, _ciRelationships = Nothing
, _ciVersion = Nothing
, _ciAwsRegion = Nothing
, _ciRelatedEvents = Nothing
, _ciConfiguration = Nothing
, _ciConfigurationItemMD5Hash = Nothing
, _ciTags = Nothing
}
ciResourceId :: Lens' ConfigurationItem (Maybe Text)
ciResourceId = lens _ciResourceId (\ s a -> s{_ciResourceId = a})
ciResourceType :: Lens' ConfigurationItem (Maybe ResourceType)
ciResourceType = lens _ciResourceType (\ s a -> s{_ciResourceType = a})
ciConfigurationStateId :: Lens' ConfigurationItem (Maybe Text)
ciConfigurationStateId = lens _ciConfigurationStateId (\ s a -> s{_ciConfigurationStateId = a})
ciArn :: Lens' ConfigurationItem (Maybe Text)
ciArn = lens _ciArn (\ s a -> s{_ciArn = a})
ciResourceName :: Lens' ConfigurationItem (Maybe Text)
ciResourceName = lens _ciResourceName (\ s a -> s{_ciResourceName = a})
ciResourceCreationTime :: Lens' ConfigurationItem (Maybe UTCTime)
ciResourceCreationTime = lens _ciResourceCreationTime (\ s a -> s{_ciResourceCreationTime = a}) . mapping _Time
ciConfigurationItemStatus :: Lens' ConfigurationItem (Maybe ConfigurationItemStatus)
ciConfigurationItemStatus = lens _ciConfigurationItemStatus (\ s a -> s{_ciConfigurationItemStatus = a})
ciConfigurationItemCaptureTime :: Lens' ConfigurationItem (Maybe UTCTime)
ciConfigurationItemCaptureTime = lens _ciConfigurationItemCaptureTime (\ s a -> s{_ciConfigurationItemCaptureTime = a}) . mapping _Time
ciAccountId :: Lens' ConfigurationItem (Maybe Text)
ciAccountId = lens _ciAccountId (\ s a -> s{_ciAccountId = a})
ciSupplementaryConfiguration :: Lens' ConfigurationItem (HashMap Text Text)
ciSupplementaryConfiguration = lens _ciSupplementaryConfiguration (\ s a -> s{_ciSupplementaryConfiguration = a}) . _Default . _Map
ciAvailabilityZone :: Lens' ConfigurationItem (Maybe Text)
ciAvailabilityZone = lens _ciAvailabilityZone (\ s a -> s{_ciAvailabilityZone = a})
ciRelationships :: Lens' ConfigurationItem [Relationship]
ciRelationships = lens _ciRelationships (\ s a -> s{_ciRelationships = a}) . _Default . _Coerce
ciVersion :: Lens' ConfigurationItem (Maybe Text)
ciVersion = lens _ciVersion (\ s a -> s{_ciVersion = a})
ciAwsRegion :: Lens' ConfigurationItem (Maybe Text)
ciAwsRegion = lens _ciAwsRegion (\ s a -> s{_ciAwsRegion = a})
ciRelatedEvents :: Lens' ConfigurationItem [Text]
ciRelatedEvents = lens _ciRelatedEvents (\ s a -> s{_ciRelatedEvents = a}) . _Default . _Coerce
ciConfiguration :: Lens' ConfigurationItem (Maybe Text)
ciConfiguration = lens _ciConfiguration (\ s a -> s{_ciConfiguration = a})
ciConfigurationItemMD5Hash :: Lens' ConfigurationItem (Maybe Text)
ciConfigurationItemMD5Hash = lens _ciConfigurationItemMD5Hash (\ s a -> s{_ciConfigurationItemMD5Hash = a})
ciTags :: Lens' ConfigurationItem (HashMap Text Text)
ciTags = lens _ciTags (\ s a -> s{_ciTags = a}) . _Default . _Map
instance FromJSON ConfigurationItem where
parseJSON
= withObject "ConfigurationItem"
(\ x ->
ConfigurationItem' <$>
(x .:? "resourceId") <*> (x .:? "resourceType") <*>
(x .:? "configurationStateId")
<*> (x .:? "arn")
<*> (x .:? "resourceName")
<*> (x .:? "resourceCreationTime")
<*> (x .:? "configurationItemStatus")
<*> (x .:? "configurationItemCaptureTime")
<*> (x .:? "accountId")
<*> (x .:? "supplementaryConfiguration" .!= mempty)
<*> (x .:? "availabilityZone")
<*> (x .:? "relationships" .!= mempty)
<*> (x .:? "version")
<*> (x .:? "awsRegion")
<*> (x .:? "relatedEvents" .!= mempty)
<*> (x .:? "configuration")
<*> (x .:? "configurationItemMD5Hash")
<*> (x .:? "tags" .!= mempty))
instance Hashable ConfigurationItem where
instance NFData ConfigurationItem where
data ConfigurationRecorder = ConfigurationRecorder'
{ _crName :: !(Maybe Text)
, _crRecordingGroup :: !(Maybe RecordingGroup)
, _crRoleARN :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
configurationRecorder
:: ConfigurationRecorder
configurationRecorder =
ConfigurationRecorder'
{_crName = Nothing, _crRecordingGroup = Nothing, _crRoleARN = Nothing}
crName :: Lens' ConfigurationRecorder (Maybe Text)
crName = lens _crName (\ s a -> s{_crName = a})
crRecordingGroup :: Lens' ConfigurationRecorder (Maybe RecordingGroup)
crRecordingGroup = lens _crRecordingGroup (\ s a -> s{_crRecordingGroup = a})
crRoleARN :: Lens' ConfigurationRecorder (Maybe Text)
crRoleARN = lens _crRoleARN (\ s a -> s{_crRoleARN = a})
instance FromJSON ConfigurationRecorder where
parseJSON
= withObject "ConfigurationRecorder"
(\ x ->
ConfigurationRecorder' <$>
(x .:? "name") <*> (x .:? "recordingGroup") <*>
(x .:? "roleARN"))
instance Hashable ConfigurationRecorder where
instance NFData ConfigurationRecorder where
instance ToJSON ConfigurationRecorder where
toJSON ConfigurationRecorder'{..}
= object
(catMaybes
[("name" .=) <$> _crName,
("recordingGroup" .=) <$> _crRecordingGroup,
("roleARN" .=) <$> _crRoleARN])
data ConfigurationRecorderStatus = ConfigurationRecorderStatus'
{ _crsLastErrorCode :: !(Maybe Text)
, _crsLastStopTime :: !(Maybe POSIX)
, _crsLastStatusChangeTime :: !(Maybe POSIX)
, _crsRecording :: !(Maybe Bool)
, _crsLastStatus :: !(Maybe RecorderStatus)
, _crsLastErrorMessage :: !(Maybe Text)
, _crsName :: !(Maybe Text)
, _crsLastStartTime :: !(Maybe POSIX)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
configurationRecorderStatus
:: ConfigurationRecorderStatus
configurationRecorderStatus =
ConfigurationRecorderStatus'
{ _crsLastErrorCode = Nothing
, _crsLastStopTime = Nothing
, _crsLastStatusChangeTime = Nothing
, _crsRecording = Nothing
, _crsLastStatus = Nothing
, _crsLastErrorMessage = Nothing
, _crsName = Nothing
, _crsLastStartTime = Nothing
}
crsLastErrorCode :: Lens' ConfigurationRecorderStatus (Maybe Text)
crsLastErrorCode = lens _crsLastErrorCode (\ s a -> s{_crsLastErrorCode = a})
crsLastStopTime :: Lens' ConfigurationRecorderStatus (Maybe UTCTime)
crsLastStopTime = lens _crsLastStopTime (\ s a -> s{_crsLastStopTime = a}) . mapping _Time
crsLastStatusChangeTime :: Lens' ConfigurationRecorderStatus (Maybe UTCTime)
crsLastStatusChangeTime = lens _crsLastStatusChangeTime (\ s a -> s{_crsLastStatusChangeTime = a}) . mapping _Time
crsRecording :: Lens' ConfigurationRecorderStatus (Maybe Bool)
crsRecording = lens _crsRecording (\ s a -> s{_crsRecording = a})
crsLastStatus :: Lens' ConfigurationRecorderStatus (Maybe RecorderStatus)
crsLastStatus = lens _crsLastStatus (\ s a -> s{_crsLastStatus = a})
crsLastErrorMessage :: Lens' ConfigurationRecorderStatus (Maybe Text)
crsLastErrorMessage = lens _crsLastErrorMessage (\ s a -> s{_crsLastErrorMessage = a})
crsName :: Lens' ConfigurationRecorderStatus (Maybe Text)
crsName = lens _crsName (\ s a -> s{_crsName = a})
crsLastStartTime :: Lens' ConfigurationRecorderStatus (Maybe UTCTime)
crsLastStartTime = lens _crsLastStartTime (\ s a -> s{_crsLastStartTime = a}) . mapping _Time
instance FromJSON ConfigurationRecorderStatus where
parseJSON
= withObject "ConfigurationRecorderStatus"
(\ x ->
ConfigurationRecorderStatus' <$>
(x .:? "lastErrorCode") <*> (x .:? "lastStopTime")
<*> (x .:? "lastStatusChangeTime")
<*> (x .:? "recording")
<*> (x .:? "lastStatus")
<*> (x .:? "lastErrorMessage")
<*> (x .:? "name")
<*> (x .:? "lastStartTime"))
instance Hashable ConfigurationRecorderStatus where
instance NFData ConfigurationRecorderStatus where
data DeliveryChannel = DeliveryChannel'
{ _dcS3KeyPrefix :: !(Maybe Text)
, _dcSnsTopicARN :: !(Maybe Text)
, _dcName :: !(Maybe Text)
, _dcConfigSnapshotDeliveryProperties :: !(Maybe ConfigSnapshotDeliveryProperties)
, _dcS3BucketName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deliveryChannel
:: DeliveryChannel
deliveryChannel =
DeliveryChannel'
{ _dcS3KeyPrefix = Nothing
, _dcSnsTopicARN = Nothing
, _dcName = Nothing
, _dcConfigSnapshotDeliveryProperties = Nothing
, _dcS3BucketName = Nothing
}
dcS3KeyPrefix :: Lens' DeliveryChannel (Maybe Text)
dcS3KeyPrefix = lens _dcS3KeyPrefix (\ s a -> s{_dcS3KeyPrefix = a})
dcSnsTopicARN :: Lens' DeliveryChannel (Maybe Text)
dcSnsTopicARN = lens _dcSnsTopicARN (\ s a -> s{_dcSnsTopicARN = a})
dcName :: Lens' DeliveryChannel (Maybe Text)
dcName = lens _dcName (\ s a -> s{_dcName = a})
dcConfigSnapshotDeliveryProperties :: Lens' DeliveryChannel (Maybe ConfigSnapshotDeliveryProperties)
dcConfigSnapshotDeliveryProperties = lens _dcConfigSnapshotDeliveryProperties (\ s a -> s{_dcConfigSnapshotDeliveryProperties = a})
dcS3BucketName :: Lens' DeliveryChannel (Maybe Text)
dcS3BucketName = lens _dcS3BucketName (\ s a -> s{_dcS3BucketName = a})
instance FromJSON DeliveryChannel where
parseJSON
= withObject "DeliveryChannel"
(\ x ->
DeliveryChannel' <$>
(x .:? "s3KeyPrefix") <*> (x .:? "snsTopicARN") <*>
(x .:? "name")
<*> (x .:? "configSnapshotDeliveryProperties")
<*> (x .:? "s3BucketName"))
instance Hashable DeliveryChannel where
instance NFData DeliveryChannel where
instance ToJSON DeliveryChannel where
toJSON DeliveryChannel'{..}
= object
(catMaybes
[("s3KeyPrefix" .=) <$> _dcS3KeyPrefix,
("snsTopicARN" .=) <$> _dcSnsTopicARN,
("name" .=) <$> _dcName,
("configSnapshotDeliveryProperties" .=) <$>
_dcConfigSnapshotDeliveryProperties,
("s3BucketName" .=) <$> _dcS3BucketName])
data DeliveryChannelStatus = DeliveryChannelStatus'
{ _dcsConfigSnapshotDeliveryInfo :: !(Maybe ConfigExportDeliveryInfo)
, _dcsConfigStreamDeliveryInfo :: !(Maybe ConfigStreamDeliveryInfo)
, _dcsConfigHistoryDeliveryInfo :: !(Maybe ConfigExportDeliveryInfo)
, _dcsName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deliveryChannelStatus
:: DeliveryChannelStatus
deliveryChannelStatus =
DeliveryChannelStatus'
{ _dcsConfigSnapshotDeliveryInfo = Nothing
, _dcsConfigStreamDeliveryInfo = Nothing
, _dcsConfigHistoryDeliveryInfo = Nothing
, _dcsName = Nothing
}
dcsConfigSnapshotDeliveryInfo :: Lens' DeliveryChannelStatus (Maybe ConfigExportDeliveryInfo)
dcsConfigSnapshotDeliveryInfo = lens _dcsConfigSnapshotDeliveryInfo (\ s a -> s{_dcsConfigSnapshotDeliveryInfo = a})
dcsConfigStreamDeliveryInfo :: Lens' DeliveryChannelStatus (Maybe ConfigStreamDeliveryInfo)
dcsConfigStreamDeliveryInfo = lens _dcsConfigStreamDeliveryInfo (\ s a -> s{_dcsConfigStreamDeliveryInfo = a})
dcsConfigHistoryDeliveryInfo :: Lens' DeliveryChannelStatus (Maybe ConfigExportDeliveryInfo)
dcsConfigHistoryDeliveryInfo = lens _dcsConfigHistoryDeliveryInfo (\ s a -> s{_dcsConfigHistoryDeliveryInfo = a})
dcsName :: Lens' DeliveryChannelStatus (Maybe Text)
dcsName = lens _dcsName (\ s a -> s{_dcsName = a})
instance FromJSON DeliveryChannelStatus where
parseJSON
= withObject "DeliveryChannelStatus"
(\ x ->
DeliveryChannelStatus' <$>
(x .:? "configSnapshotDeliveryInfo") <*>
(x .:? "configStreamDeliveryInfo")
<*> (x .:? "configHistoryDeliveryInfo")
<*> (x .:? "name"))
instance Hashable DeliveryChannelStatus where
instance NFData DeliveryChannelStatus where
data Evaluation = Evaluation'
{ _eAnnotation :: !(Maybe Text)
, _eComplianceResourceType :: !Text
, _eComplianceResourceId :: !Text
, _eComplianceType :: !ComplianceType
, _eOrderingTimestamp :: !POSIX
} deriving (Eq, Read, Show, Data, Typeable, Generic)
evaluation
:: Text
-> Text
-> ComplianceType
-> UTCTime
-> Evaluation
evaluation pComplianceResourceType_ pComplianceResourceId_ pComplianceType_ pOrderingTimestamp_ =
Evaluation'
{ _eAnnotation = Nothing
, _eComplianceResourceType = pComplianceResourceType_
, _eComplianceResourceId = pComplianceResourceId_
, _eComplianceType = pComplianceType_
, _eOrderingTimestamp = _Time # pOrderingTimestamp_
}
eAnnotation :: Lens' Evaluation (Maybe Text)
eAnnotation = lens _eAnnotation (\ s a -> s{_eAnnotation = a})
eComplianceResourceType :: Lens' Evaluation Text
eComplianceResourceType = lens _eComplianceResourceType (\ s a -> s{_eComplianceResourceType = a})
eComplianceResourceId :: Lens' Evaluation Text
eComplianceResourceId = lens _eComplianceResourceId (\ s a -> s{_eComplianceResourceId = a})
eComplianceType :: Lens' Evaluation ComplianceType
eComplianceType = lens _eComplianceType (\ s a -> s{_eComplianceType = a})
eOrderingTimestamp :: Lens' Evaluation UTCTime
eOrderingTimestamp = lens _eOrderingTimestamp (\ s a -> s{_eOrderingTimestamp = a}) . _Time
instance FromJSON Evaluation where
parseJSON
= withObject "Evaluation"
(\ x ->
Evaluation' <$>
(x .:? "Annotation") <*>
(x .: "ComplianceResourceType")
<*> (x .: "ComplianceResourceId")
<*> (x .: "ComplianceType")
<*> (x .: "OrderingTimestamp"))
instance Hashable Evaluation where
instance NFData Evaluation where
instance ToJSON Evaluation where
toJSON Evaluation'{..}
= object
(catMaybes
[("Annotation" .=) <$> _eAnnotation,
Just
("ComplianceResourceType" .=
_eComplianceResourceType),
Just
("ComplianceResourceId" .= _eComplianceResourceId),
Just ("ComplianceType" .= _eComplianceType),
Just ("OrderingTimestamp" .= _eOrderingTimestamp)])
data EvaluationResult = EvaluationResult'
{ _erEvaluationResultIdentifier :: !(Maybe EvaluationResultIdentifier)
, _erAnnotation :: !(Maybe Text)
, _erConfigRuleInvokedTime :: !(Maybe POSIX)
, _erResultRecordedTime :: !(Maybe POSIX)
, _erResultToken :: !(Maybe Text)
, _erComplianceType :: !(Maybe ComplianceType)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
evaluationResult
:: EvaluationResult
evaluationResult =
EvaluationResult'
{ _erEvaluationResultIdentifier = Nothing
, _erAnnotation = Nothing
, _erConfigRuleInvokedTime = Nothing
, _erResultRecordedTime = Nothing
, _erResultToken = Nothing
, _erComplianceType = Nothing
}
erEvaluationResultIdentifier :: Lens' EvaluationResult (Maybe EvaluationResultIdentifier)
erEvaluationResultIdentifier = lens _erEvaluationResultIdentifier (\ s a -> s{_erEvaluationResultIdentifier = a})
erAnnotation :: Lens' EvaluationResult (Maybe Text)
erAnnotation = lens _erAnnotation (\ s a -> s{_erAnnotation = a})
erConfigRuleInvokedTime :: Lens' EvaluationResult (Maybe UTCTime)
erConfigRuleInvokedTime = lens _erConfigRuleInvokedTime (\ s a -> s{_erConfigRuleInvokedTime = a}) . mapping _Time
erResultRecordedTime :: Lens' EvaluationResult (Maybe UTCTime)
erResultRecordedTime = lens _erResultRecordedTime (\ s a -> s{_erResultRecordedTime = a}) . mapping _Time
erResultToken :: Lens' EvaluationResult (Maybe Text)
erResultToken = lens _erResultToken (\ s a -> s{_erResultToken = a})
erComplianceType :: Lens' EvaluationResult (Maybe ComplianceType)
erComplianceType = lens _erComplianceType (\ s a -> s{_erComplianceType = a})
instance FromJSON EvaluationResult where
parseJSON
= withObject "EvaluationResult"
(\ x ->
EvaluationResult' <$>
(x .:? "EvaluationResultIdentifier") <*>
(x .:? "Annotation")
<*> (x .:? "ConfigRuleInvokedTime")
<*> (x .:? "ResultRecordedTime")
<*> (x .:? "ResultToken")
<*> (x .:? "ComplianceType"))
instance Hashable EvaluationResult where
instance NFData EvaluationResult where
data EvaluationResultIdentifier = EvaluationResultIdentifier'
{ _eriEvaluationResultQualifier :: !(Maybe EvaluationResultQualifier)
, _eriOrderingTimestamp :: !(Maybe POSIX)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
evaluationResultIdentifier
:: EvaluationResultIdentifier
evaluationResultIdentifier =
EvaluationResultIdentifier'
{_eriEvaluationResultQualifier = Nothing, _eriOrderingTimestamp = Nothing}
eriEvaluationResultQualifier :: Lens' EvaluationResultIdentifier (Maybe EvaluationResultQualifier)
eriEvaluationResultQualifier = lens _eriEvaluationResultQualifier (\ s a -> s{_eriEvaluationResultQualifier = a})
eriOrderingTimestamp :: Lens' EvaluationResultIdentifier (Maybe UTCTime)
eriOrderingTimestamp = lens _eriOrderingTimestamp (\ s a -> s{_eriOrderingTimestamp = a}) . mapping _Time
instance FromJSON EvaluationResultIdentifier where
parseJSON
= withObject "EvaluationResultIdentifier"
(\ x ->
EvaluationResultIdentifier' <$>
(x .:? "EvaluationResultQualifier") <*>
(x .:? "OrderingTimestamp"))
instance Hashable EvaluationResultIdentifier where
instance NFData EvaluationResultIdentifier where
data EvaluationResultQualifier = EvaluationResultQualifier'
{ _erqResourceId :: !(Maybe Text)
, _erqResourceType :: !(Maybe Text)
, _erqConfigRuleName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
evaluationResultQualifier
:: EvaluationResultQualifier
evaluationResultQualifier =
EvaluationResultQualifier'
{ _erqResourceId = Nothing
, _erqResourceType = Nothing
, _erqConfigRuleName = Nothing
}
erqResourceId :: Lens' EvaluationResultQualifier (Maybe Text)
erqResourceId = lens _erqResourceId (\ s a -> s{_erqResourceId = a})
erqResourceType :: Lens' EvaluationResultQualifier (Maybe Text)
erqResourceType = lens _erqResourceType (\ s a -> s{_erqResourceType = a})
erqConfigRuleName :: Lens' EvaluationResultQualifier (Maybe Text)
erqConfigRuleName = lens _erqConfigRuleName (\ s a -> s{_erqConfigRuleName = a})
instance FromJSON EvaluationResultQualifier where
parseJSON
= withObject "EvaluationResultQualifier"
(\ x ->
EvaluationResultQualifier' <$>
(x .:? "ResourceId") <*> (x .:? "ResourceType") <*>
(x .:? "ConfigRuleName"))
instance Hashable EvaluationResultQualifier where
instance NFData EvaluationResultQualifier where
data OrganizationAggregationSource = OrganizationAggregationSource'
{ _oasAWSRegions :: !(Maybe (List1 Text))
, _oasAllAWSRegions :: !(Maybe Bool)
, _oasRoleARN :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
organizationAggregationSource
:: Text
-> OrganizationAggregationSource
organizationAggregationSource pRoleARN_ =
OrganizationAggregationSource'
{ _oasAWSRegions = Nothing
, _oasAllAWSRegions = Nothing
, _oasRoleARN = pRoleARN_
}
oasAWSRegions :: Lens' OrganizationAggregationSource (Maybe (NonEmpty Text))
oasAWSRegions = lens _oasAWSRegions (\ s a -> s{_oasAWSRegions = a}) . mapping _List1
oasAllAWSRegions :: Lens' OrganizationAggregationSource (Maybe Bool)
oasAllAWSRegions = lens _oasAllAWSRegions (\ s a -> s{_oasAllAWSRegions = a})
oasRoleARN :: Lens' OrganizationAggregationSource Text
oasRoleARN = lens _oasRoleARN (\ s a -> s{_oasRoleARN = a})
instance FromJSON OrganizationAggregationSource where
parseJSON
= withObject "OrganizationAggregationSource"
(\ x ->
OrganizationAggregationSource' <$>
(x .:? "AwsRegions") <*> (x .:? "AllAwsRegions") <*>
(x .: "RoleArn"))
instance Hashable OrganizationAggregationSource where
instance NFData OrganizationAggregationSource where
instance ToJSON OrganizationAggregationSource where
toJSON OrganizationAggregationSource'{..}
= object
(catMaybes
[("AwsRegions" .=) <$> _oasAWSRegions,
("AllAwsRegions" .=) <$> _oasAllAWSRegions,
Just ("RoleArn" .= _oasRoleARN)])
data PendingAggregationRequest = PendingAggregationRequest'
{ _parRequesterAccountId :: !(Maybe Text)
, _parRequesterAWSRegion :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
pendingAggregationRequest
:: PendingAggregationRequest
pendingAggregationRequest =
PendingAggregationRequest'
{_parRequesterAccountId = Nothing, _parRequesterAWSRegion = Nothing}
parRequesterAccountId :: Lens' PendingAggregationRequest (Maybe Text)
parRequesterAccountId = lens _parRequesterAccountId (\ s a -> s{_parRequesterAccountId = a})
parRequesterAWSRegion :: Lens' PendingAggregationRequest (Maybe Text)
parRequesterAWSRegion = lens _parRequesterAWSRegion (\ s a -> s{_parRequesterAWSRegion = a})
instance FromJSON PendingAggregationRequest where
parseJSON
= withObject "PendingAggregationRequest"
(\ x ->
PendingAggregationRequest' <$>
(x .:? "RequesterAccountId") <*>
(x .:? "RequesterAwsRegion"))
instance Hashable PendingAggregationRequest where
instance NFData PendingAggregationRequest where
data RecordingGroup = RecordingGroup'
{ _rgAllSupported :: !(Maybe Bool)
, _rgIncludeGlobalResourceTypes :: !(Maybe Bool)
, _rgResourceTypes :: !(Maybe [ResourceType])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
recordingGroup
:: RecordingGroup
recordingGroup =
RecordingGroup'
{ _rgAllSupported = Nothing
, _rgIncludeGlobalResourceTypes = Nothing
, _rgResourceTypes = Nothing
}
rgAllSupported :: Lens' RecordingGroup (Maybe Bool)
rgAllSupported = lens _rgAllSupported (\ s a -> s{_rgAllSupported = a})
rgIncludeGlobalResourceTypes :: Lens' RecordingGroup (Maybe Bool)
rgIncludeGlobalResourceTypes = lens _rgIncludeGlobalResourceTypes (\ s a -> s{_rgIncludeGlobalResourceTypes = a})
rgResourceTypes :: Lens' RecordingGroup [ResourceType]
rgResourceTypes = lens _rgResourceTypes (\ s a -> s{_rgResourceTypes = a}) . _Default . _Coerce
instance FromJSON RecordingGroup where
parseJSON
= withObject "RecordingGroup"
(\ x ->
RecordingGroup' <$>
(x .:? "allSupported") <*>
(x .:? "includeGlobalResourceTypes")
<*> (x .:? "resourceTypes" .!= mempty))
instance Hashable RecordingGroup where
instance NFData RecordingGroup where
instance ToJSON RecordingGroup where
toJSON RecordingGroup'{..}
= object
(catMaybes
[("allSupported" .=) <$> _rgAllSupported,
("includeGlobalResourceTypes" .=) <$>
_rgIncludeGlobalResourceTypes,
("resourceTypes" .=) <$> _rgResourceTypes])
data Relationship = Relationship'
{ _rResourceId :: !(Maybe Text)
, _rResourceType :: !(Maybe ResourceType)
, _rResourceName :: !(Maybe Text)
, _rRelationshipName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
relationship
:: Relationship
relationship =
Relationship'
{ _rResourceId = Nothing
, _rResourceType = Nothing
, _rResourceName = Nothing
, _rRelationshipName = Nothing
}
rResourceId :: Lens' Relationship (Maybe Text)
rResourceId = lens _rResourceId (\ s a -> s{_rResourceId = a})
rResourceType :: Lens' Relationship (Maybe ResourceType)
rResourceType = lens _rResourceType (\ s a -> s{_rResourceType = a})
rResourceName :: Lens' Relationship (Maybe Text)
rResourceName = lens _rResourceName (\ s a -> s{_rResourceName = a})
rRelationshipName :: Lens' Relationship (Maybe Text)
rRelationshipName = lens _rRelationshipName (\ s a -> s{_rRelationshipName = a})
instance FromJSON Relationship where
parseJSON
= withObject "Relationship"
(\ x ->
Relationship' <$>
(x .:? "resourceId") <*> (x .:? "resourceType") <*>
(x .:? "resourceName")
<*> (x .:? "relationshipName"))
instance Hashable Relationship where
instance NFData Relationship where
data ResourceCount = ResourceCount'
{ _rcResourceType :: !(Maybe ResourceType)
, _rcCount :: !(Maybe Integer)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
resourceCount
:: ResourceCount
resourceCount = ResourceCount' {_rcResourceType = Nothing, _rcCount = Nothing}
rcResourceType :: Lens' ResourceCount (Maybe ResourceType)
rcResourceType = lens _rcResourceType (\ s a -> s{_rcResourceType = a})
rcCount :: Lens' ResourceCount (Maybe Integer)
rcCount = lens _rcCount (\ s a -> s{_rcCount = a})
instance FromJSON ResourceCount where
parseJSON
= withObject "ResourceCount"
(\ x ->
ResourceCount' <$>
(x .:? "resourceType") <*> (x .:? "count"))
instance Hashable ResourceCount where
instance NFData ResourceCount where
data ResourceIdentifier = ResourceIdentifier'
{ _riResourceId :: !(Maybe Text)
, _riResourceType :: !(Maybe ResourceType)
, _riResourceName :: !(Maybe Text)
, _riResourceDeletionTime :: !(Maybe POSIX)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
resourceIdentifier
:: ResourceIdentifier
resourceIdentifier =
ResourceIdentifier'
{ _riResourceId = Nothing
, _riResourceType = Nothing
, _riResourceName = Nothing
, _riResourceDeletionTime = Nothing
}
riResourceId :: Lens' ResourceIdentifier (Maybe Text)
riResourceId = lens _riResourceId (\ s a -> s{_riResourceId = a})
riResourceType :: Lens' ResourceIdentifier (Maybe ResourceType)
riResourceType = lens _riResourceType (\ s a -> s{_riResourceType = a})
riResourceName :: Lens' ResourceIdentifier (Maybe Text)
riResourceName = lens _riResourceName (\ s a -> s{_riResourceName = a})
riResourceDeletionTime :: Lens' ResourceIdentifier (Maybe UTCTime)
riResourceDeletionTime = lens _riResourceDeletionTime (\ s a -> s{_riResourceDeletionTime = a}) . mapping _Time
instance FromJSON ResourceIdentifier where
parseJSON
= withObject "ResourceIdentifier"
(\ x ->
ResourceIdentifier' <$>
(x .:? "resourceId") <*> (x .:? "resourceType") <*>
(x .:? "resourceName")
<*> (x .:? "resourceDeletionTime"))
instance Hashable ResourceIdentifier where
instance NFData ResourceIdentifier where
data ResourceKey = ResourceKey'
{ _rkResourceType :: !ResourceType
, _rkResourceId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
resourceKey
:: ResourceType
-> Text
-> ResourceKey
resourceKey pResourceType_ pResourceId_ =
ResourceKey' {_rkResourceType = pResourceType_, _rkResourceId = pResourceId_}
rkResourceType :: Lens' ResourceKey ResourceType
rkResourceType = lens _rkResourceType (\ s a -> s{_rkResourceType = a})
rkResourceId :: Lens' ResourceKey Text
rkResourceId = lens _rkResourceId (\ s a -> s{_rkResourceId = a})
instance FromJSON ResourceKey where
parseJSON
= withObject "ResourceKey"
(\ x ->
ResourceKey' <$>
(x .: "resourceType") <*> (x .: "resourceId"))
instance Hashable ResourceKey where
instance NFData ResourceKey where
instance ToJSON ResourceKey where
toJSON ResourceKey'{..}
= object
(catMaybes
[Just ("resourceType" .= _rkResourceType),
Just ("resourceId" .= _rkResourceId)])
data Scope = Scope'
{ _sComplianceResourceTypes :: !(Maybe [Text])
, _sComplianceResourceId :: !(Maybe Text)
, _sTagValue :: !(Maybe Text)
, _sTagKey :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
scope
:: Scope
scope =
Scope'
{ _sComplianceResourceTypes = Nothing
, _sComplianceResourceId = Nothing
, _sTagValue = Nothing
, _sTagKey = Nothing
}
sComplianceResourceTypes :: Lens' Scope [Text]
sComplianceResourceTypes = lens _sComplianceResourceTypes (\ s a -> s{_sComplianceResourceTypes = a}) . _Default . _Coerce
sComplianceResourceId :: Lens' Scope (Maybe Text)
sComplianceResourceId = lens _sComplianceResourceId (\ s a -> s{_sComplianceResourceId = a})
sTagValue :: Lens' Scope (Maybe Text)
sTagValue = lens _sTagValue (\ s a -> s{_sTagValue = a})
sTagKey :: Lens' Scope (Maybe Text)
sTagKey = lens _sTagKey (\ s a -> s{_sTagKey = a})
instance FromJSON Scope where
parseJSON
= withObject "Scope"
(\ x ->
Scope' <$>
(x .:? "ComplianceResourceTypes" .!= mempty) <*>
(x .:? "ComplianceResourceId")
<*> (x .:? "TagValue")
<*> (x .:? "TagKey"))
instance Hashable Scope where
instance NFData Scope where
instance ToJSON Scope where
toJSON Scope'{..}
= object
(catMaybes
[("ComplianceResourceTypes" .=) <$>
_sComplianceResourceTypes,
("ComplianceResourceId" .=) <$>
_sComplianceResourceId,
("TagValue" .=) <$> _sTagValue,
("TagKey" .=) <$> _sTagKey])
data Source = Source'
{ _sSourceDetails :: !(Maybe [SourceDetail])
, _sOwner :: !Owner
, _sSourceIdentifier :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
source
:: Owner
-> Text
-> Source
source pOwner_ pSourceIdentifier_ =
Source'
{ _sSourceDetails = Nothing
, _sOwner = pOwner_
, _sSourceIdentifier = pSourceIdentifier_
}
sSourceDetails :: Lens' Source [SourceDetail]
sSourceDetails = lens _sSourceDetails (\ s a -> s{_sSourceDetails = a}) . _Default . _Coerce
sOwner :: Lens' Source Owner
sOwner = lens _sOwner (\ s a -> s{_sOwner = a})
sSourceIdentifier :: Lens' Source Text
sSourceIdentifier = lens _sSourceIdentifier (\ s a -> s{_sSourceIdentifier = a})
instance FromJSON Source where
parseJSON
= withObject "Source"
(\ x ->
Source' <$>
(x .:? "SourceDetails" .!= mempty) <*> (x .: "Owner")
<*> (x .: "SourceIdentifier"))
instance Hashable Source where
instance NFData Source where
instance ToJSON Source where
toJSON Source'{..}
= object
(catMaybes
[("SourceDetails" .=) <$> _sSourceDetails,
Just ("Owner" .= _sOwner),
Just ("SourceIdentifier" .= _sSourceIdentifier)])
data SourceDetail = SourceDetail'
{ _sdMessageType :: !(Maybe MessageType)
, _sdMaximumExecutionFrequency :: !(Maybe MaximumExecutionFrequency)
, _sdEventSource :: !(Maybe EventSource)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
sourceDetail
:: SourceDetail
sourceDetail =
SourceDetail'
{ _sdMessageType = Nothing
, _sdMaximumExecutionFrequency = Nothing
, _sdEventSource = Nothing
}
sdMessageType :: Lens' SourceDetail (Maybe MessageType)
sdMessageType = lens _sdMessageType (\ s a -> s{_sdMessageType = a})
sdMaximumExecutionFrequency :: Lens' SourceDetail (Maybe MaximumExecutionFrequency)
sdMaximumExecutionFrequency = lens _sdMaximumExecutionFrequency (\ s a -> s{_sdMaximumExecutionFrequency = a})
sdEventSource :: Lens' SourceDetail (Maybe EventSource)
sdEventSource = lens _sdEventSource (\ s a -> s{_sdEventSource = a})
instance FromJSON SourceDetail where
parseJSON
= withObject "SourceDetail"
(\ x ->
SourceDetail' <$>
(x .:? "MessageType") <*>
(x .:? "MaximumExecutionFrequency")
<*> (x .:? "EventSource"))
instance Hashable SourceDetail where
instance NFData SourceDetail where
instance ToJSON SourceDetail where
toJSON SourceDetail'{..}
= object
(catMaybes
[("MessageType" .=) <$> _sdMessageType,
("MaximumExecutionFrequency" .=) <$>
_sdMaximumExecutionFrequency,
("EventSource" .=) <$> _sdEventSource])