module Network.AWS.IAM.Types.Product where
import Network.AWS.IAM.Types.Sum
import Network.AWS.Prelude
data AccessKey = AccessKey'
{ _akCreateDate :: !(Maybe ISO8601)
, _akUserName :: !Text
, _akAccessKeyId :: !Text
, _akStatus :: !StatusType
, _akSecretAccessKey :: !(Sensitive Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
accessKey
:: Text
-> Text
-> StatusType
-> Text
-> AccessKey
accessKey pUserName_ pAccessKeyId_ pStatus_ pSecretAccessKey_ =
AccessKey'
{ _akCreateDate = Nothing
, _akUserName = pUserName_
, _akAccessKeyId = pAccessKeyId_
, _akStatus = pStatus_
, _akSecretAccessKey = _Sensitive # pSecretAccessKey_
}
akCreateDate :: Lens' AccessKey (Maybe UTCTime)
akCreateDate = lens _akCreateDate (\ s a -> s{_akCreateDate = a}) . mapping _Time;
akUserName :: Lens' AccessKey Text
akUserName = lens _akUserName (\ s a -> s{_akUserName = a});
akAccessKeyId :: Lens' AccessKey Text
akAccessKeyId = lens _akAccessKeyId (\ s a -> s{_akAccessKeyId = a});
akStatus :: Lens' AccessKey StatusType
akStatus = lens _akStatus (\ s a -> s{_akStatus = a});
akSecretAccessKey :: Lens' AccessKey Text
akSecretAccessKey = lens _akSecretAccessKey (\ s a -> s{_akSecretAccessKey = a}) . _Sensitive;
instance FromXML AccessKey where
parseXML x
= AccessKey' <$>
(x .@? "CreateDate") <*> (x .@ "UserName") <*>
(x .@ "AccessKeyId")
<*> (x .@ "Status")
<*> (x .@ "SecretAccessKey")
data AccessKeyLastUsed = AccessKeyLastUsed'
{ _akluLastUsedDate :: !ISO8601
, _akluServiceName :: !Text
, _akluRegion :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
accessKeyLastUsed
:: UTCTime
-> Text
-> Text
-> AccessKeyLastUsed
accessKeyLastUsed pLastUsedDate_ pServiceName_ pRegion_ =
AccessKeyLastUsed'
{ _akluLastUsedDate = _Time # pLastUsedDate_
, _akluServiceName = pServiceName_
, _akluRegion = pRegion_
}
akluLastUsedDate :: Lens' AccessKeyLastUsed UTCTime
akluLastUsedDate = lens _akluLastUsedDate (\ s a -> s{_akluLastUsedDate = a}) . _Time;
akluServiceName :: Lens' AccessKeyLastUsed Text
akluServiceName = lens _akluServiceName (\ s a -> s{_akluServiceName = a});
akluRegion :: Lens' AccessKeyLastUsed Text
akluRegion = lens _akluRegion (\ s a -> s{_akluRegion = a});
instance FromXML AccessKeyLastUsed where
parseXML x
= AccessKeyLastUsed' <$>
(x .@ "LastUsedDate") <*> (x .@ "ServiceName") <*>
(x .@ "Region")
data AccessKeyMetadata = AccessKeyMetadata'
{ _akmStatus :: !(Maybe StatusType)
, _akmCreateDate :: !(Maybe ISO8601)
, _akmUserName :: !(Maybe Text)
, _akmAccessKeyId :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
accessKeyMetadata
:: AccessKeyMetadata
accessKeyMetadata =
AccessKeyMetadata'
{ _akmStatus = Nothing
, _akmCreateDate = Nothing
, _akmUserName = Nothing
, _akmAccessKeyId = Nothing
}
akmStatus :: Lens' AccessKeyMetadata (Maybe StatusType)
akmStatus = lens _akmStatus (\ s a -> s{_akmStatus = a});
akmCreateDate :: Lens' AccessKeyMetadata (Maybe UTCTime)
akmCreateDate = lens _akmCreateDate (\ s a -> s{_akmCreateDate = a}) . mapping _Time;
akmUserName :: Lens' AccessKeyMetadata (Maybe Text)
akmUserName = lens _akmUserName (\ s a -> s{_akmUserName = a});
akmAccessKeyId :: Lens' AccessKeyMetadata (Maybe Text)
akmAccessKeyId = lens _akmAccessKeyId (\ s a -> s{_akmAccessKeyId = a});
instance FromXML AccessKeyMetadata where
parseXML x
= AccessKeyMetadata' <$>
(x .@? "Status") <*> (x .@? "CreateDate") <*>
(x .@? "UserName")
<*> (x .@? "AccessKeyId")
data AttachedPolicy = AttachedPolicy'
{ _apPolicyName :: !(Maybe Text)
, _apPolicyARN :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
attachedPolicy
:: AttachedPolicy
attachedPolicy =
AttachedPolicy'
{ _apPolicyName = Nothing
, _apPolicyARN = Nothing
}
apPolicyName :: Lens' AttachedPolicy (Maybe Text)
apPolicyName = lens _apPolicyName (\ s a -> s{_apPolicyName = a});
apPolicyARN :: Lens' AttachedPolicy (Maybe Text)
apPolicyARN = lens _apPolicyARN (\ s a -> s{_apPolicyARN = a});
instance FromXML AttachedPolicy where
parseXML x
= AttachedPolicy' <$>
(x .@? "PolicyName") <*> (x .@? "PolicyArn")
data ContextEntry = ContextEntry'
{ _ceContextKeyValues :: !(Maybe [Text])
, _ceContextKeyName :: !(Maybe Text)
, _ceContextKeyType :: !(Maybe ContextKeyTypeEnum)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
contextEntry
:: ContextEntry
contextEntry =
ContextEntry'
{ _ceContextKeyValues = Nothing
, _ceContextKeyName = Nothing
, _ceContextKeyType = Nothing
}
ceContextKeyValues :: Lens' ContextEntry [Text]
ceContextKeyValues = lens _ceContextKeyValues (\ s a -> s{_ceContextKeyValues = a}) . _Default . _Coerce;
ceContextKeyName :: Lens' ContextEntry (Maybe Text)
ceContextKeyName = lens _ceContextKeyName (\ s a -> s{_ceContextKeyName = a});
ceContextKeyType :: Lens' ContextEntry (Maybe ContextKeyTypeEnum)
ceContextKeyType = lens _ceContextKeyType (\ s a -> s{_ceContextKeyType = a});
instance ToQuery ContextEntry where
toQuery ContextEntry'{..}
= mconcat
["ContextKeyValues" =:
toQuery
(toQueryList "member" <$> _ceContextKeyValues),
"ContextKeyName" =: _ceContextKeyName,
"ContextKeyType" =: _ceContextKeyType]
data EvaluationResult = EvaluationResult'
{ _erMatchedStatements :: !(Maybe [Statement])
, _erMissingContextValues :: !(Maybe [Text])
, _erEvalActionName :: !Text
, _erEvalResourceName :: !Text
, _erEvalDecision :: !PolicyEvaluationDecisionType
} deriving (Eq,Read,Show,Data,Typeable,Generic)
evaluationResult
:: Text
-> Text
-> PolicyEvaluationDecisionType
-> EvaluationResult
evaluationResult pEvalActionName_ pEvalResourceName_ pEvalDecision_ =
EvaluationResult'
{ _erMatchedStatements = Nothing
, _erMissingContextValues = Nothing
, _erEvalActionName = pEvalActionName_
, _erEvalResourceName = pEvalResourceName_
, _erEvalDecision = pEvalDecision_
}
erMatchedStatements :: Lens' EvaluationResult [Statement]
erMatchedStatements = lens _erMatchedStatements (\ s a -> s{_erMatchedStatements = a}) . _Default . _Coerce;
erMissingContextValues :: Lens' EvaluationResult [Text]
erMissingContextValues = lens _erMissingContextValues (\ s a -> s{_erMissingContextValues = a}) . _Default . _Coerce;
erEvalActionName :: Lens' EvaluationResult Text
erEvalActionName = lens _erEvalActionName (\ s a -> s{_erEvalActionName = a});
erEvalResourceName :: Lens' EvaluationResult Text
erEvalResourceName = lens _erEvalResourceName (\ s a -> s{_erEvalResourceName = a});
erEvalDecision :: Lens' EvaluationResult PolicyEvaluationDecisionType
erEvalDecision = lens _erEvalDecision (\ s a -> s{_erEvalDecision = a});
instance FromXML EvaluationResult where
parseXML x
= EvaluationResult' <$>
(x .@? "MatchedStatements" .!@ mempty >>=
may (parseXMLList "member"))
<*>
(x .@? "MissingContextValues" .!@ mempty >>=
may (parseXMLList "member"))
<*> (x .@ "EvalActionName")
<*> (x .@ "EvalResourceName")
<*> (x .@ "EvalDecision")
newtype GetContextKeysForPolicyResponse = GetContextKeysForPolicyResponse'
{ _gckfpContextKeyNames :: Maybe [Text]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getContextKeysForPolicyResponse
:: GetContextKeysForPolicyResponse
getContextKeysForPolicyResponse =
GetContextKeysForPolicyResponse'
{ _gckfpContextKeyNames = Nothing
}
gckfpContextKeyNames :: Lens' GetContextKeysForPolicyResponse [Text]
gckfpContextKeyNames = lens _gckfpContextKeyNames (\ s a -> s{_gckfpContextKeyNames = a}) . _Default . _Coerce;
instance FromXML GetContextKeysForPolicyResponse
where
parseXML x
= GetContextKeysForPolicyResponse' <$>
(x .@? "ContextKeyNames" .!@ mempty >>=
may (parseXMLList "member"))
data Group = Group'
{ _gPath :: !Text
, _gGroupName :: !Text
, _gGroupId :: !Text
, _gARN :: !Text
, _gCreateDate :: !ISO8601
} deriving (Eq,Read,Show,Data,Typeable,Generic)
group'
:: Text
-> Text
-> Text
-> Text
-> UTCTime
-> Group
group' pPath_ pGroupName_ pGroupId_ pARN_ pCreateDate_ =
Group'
{ _gPath = pPath_
, _gGroupName = pGroupName_
, _gGroupId = pGroupId_
, _gARN = pARN_
, _gCreateDate = _Time # pCreateDate_
}
gPath :: Lens' Group Text
gPath = lens _gPath (\ s a -> s{_gPath = a});
gGroupName :: Lens' Group Text
gGroupName = lens _gGroupName (\ s a -> s{_gGroupName = a});
gGroupId :: Lens' Group Text
gGroupId = lens _gGroupId (\ s a -> s{_gGroupId = a});
gARN :: Lens' Group Text
gARN = lens _gARN (\ s a -> s{_gARN = a});
gCreateDate :: Lens' Group UTCTime
gCreateDate = lens _gCreateDate (\ s a -> s{_gCreateDate = a}) . _Time;
instance FromXML Group where
parseXML x
= Group' <$>
(x .@ "Path") <*> (x .@ "GroupName") <*>
(x .@ "GroupId")
<*> (x .@ "Arn")
<*> (x .@ "CreateDate")
data GroupDetail = GroupDetail'
{ _gdARN :: !(Maybe Text)
, _gdPath :: !(Maybe Text)
, _gdCreateDate :: !(Maybe ISO8601)
, _gdGroupId :: !(Maybe Text)
, _gdGroupPolicyList :: !(Maybe [PolicyDetail])
, _gdGroupName :: !(Maybe Text)
, _gdAttachedManagedPolicies :: !(Maybe [AttachedPolicy])
} deriving (Eq,Read,Show,Data,Typeable,Generic)
groupDetail
:: GroupDetail
groupDetail =
GroupDetail'
{ _gdARN = Nothing
, _gdPath = Nothing
, _gdCreateDate = Nothing
, _gdGroupId = Nothing
, _gdGroupPolicyList = Nothing
, _gdGroupName = Nothing
, _gdAttachedManagedPolicies = Nothing
}
gdARN :: Lens' GroupDetail (Maybe Text)
gdARN = lens _gdARN (\ s a -> s{_gdARN = a});
gdPath :: Lens' GroupDetail (Maybe Text)
gdPath = lens _gdPath (\ s a -> s{_gdPath = a});
gdCreateDate :: Lens' GroupDetail (Maybe UTCTime)
gdCreateDate = lens _gdCreateDate (\ s a -> s{_gdCreateDate = a}) . mapping _Time;
gdGroupId :: Lens' GroupDetail (Maybe Text)
gdGroupId = lens _gdGroupId (\ s a -> s{_gdGroupId = a});
gdGroupPolicyList :: Lens' GroupDetail [PolicyDetail]
gdGroupPolicyList = lens _gdGroupPolicyList (\ s a -> s{_gdGroupPolicyList = a}) . _Default . _Coerce;
gdGroupName :: Lens' GroupDetail (Maybe Text)
gdGroupName = lens _gdGroupName (\ s a -> s{_gdGroupName = a});
gdAttachedManagedPolicies :: Lens' GroupDetail [AttachedPolicy]
gdAttachedManagedPolicies = lens _gdAttachedManagedPolicies (\ s a -> s{_gdAttachedManagedPolicies = a}) . _Default . _Coerce;
instance FromXML GroupDetail where
parseXML x
= GroupDetail' <$>
(x .@? "Arn") <*> (x .@? "Path") <*>
(x .@? "CreateDate")
<*> (x .@? "GroupId")
<*>
(x .@? "GroupPolicyList" .!@ mempty >>=
may (parseXMLList "member"))
<*> (x .@? "GroupName")
<*>
(x .@? "AttachedManagedPolicies" .!@ mempty >>=
may (parseXMLList "member"))
data InstanceProfile = InstanceProfile'
{ _ipPath :: !Text
, _ipInstanceProfileName :: !Text
, _ipInstanceProfileId :: !Text
, _ipARN :: !Text
, _ipCreateDate :: !ISO8601
, _ipRoles :: ![Role]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
instanceProfile
:: Text
-> Text
-> Text
-> Text
-> UTCTime
-> InstanceProfile
instanceProfile pPath_ pInstanceProfileName_ pInstanceProfileId_ pARN_ pCreateDate_ =
InstanceProfile'
{ _ipPath = pPath_
, _ipInstanceProfileName = pInstanceProfileName_
, _ipInstanceProfileId = pInstanceProfileId_
, _ipARN = pARN_
, _ipCreateDate = _Time # pCreateDate_
, _ipRoles = mempty
}
ipPath :: Lens' InstanceProfile Text
ipPath = lens _ipPath (\ s a -> s{_ipPath = a});
ipInstanceProfileName :: Lens' InstanceProfile Text
ipInstanceProfileName = lens _ipInstanceProfileName (\ s a -> s{_ipInstanceProfileName = a});
ipInstanceProfileId :: Lens' InstanceProfile Text
ipInstanceProfileId = lens _ipInstanceProfileId (\ s a -> s{_ipInstanceProfileId = a});
ipARN :: Lens' InstanceProfile Text
ipARN = lens _ipARN (\ s a -> s{_ipARN = a});
ipCreateDate :: Lens' InstanceProfile UTCTime
ipCreateDate = lens _ipCreateDate (\ s a -> s{_ipCreateDate = a}) . _Time;
ipRoles :: Lens' InstanceProfile [Role]
ipRoles = lens _ipRoles (\ s a -> s{_ipRoles = a}) . _Coerce;
instance FromXML InstanceProfile where
parseXML x
= InstanceProfile' <$>
(x .@ "Path") <*> (x .@ "InstanceProfileName") <*>
(x .@ "InstanceProfileId")
<*> (x .@ "Arn")
<*> (x .@ "CreateDate")
<*>
(x .@? "Roles" .!@ mempty >>= parseXMLList "member")
data LoginProfile = LoginProfile'
{ _lpPasswordResetRequired :: !(Maybe Bool)
, _lpUserName :: !Text
, _lpCreateDate :: !ISO8601
} deriving (Eq,Read,Show,Data,Typeable,Generic)
loginProfile
:: Text
-> UTCTime
-> LoginProfile
loginProfile pUserName_ pCreateDate_ =
LoginProfile'
{ _lpPasswordResetRequired = Nothing
, _lpUserName = pUserName_
, _lpCreateDate = _Time # pCreateDate_
}
lpPasswordResetRequired :: Lens' LoginProfile (Maybe Bool)
lpPasswordResetRequired = lens _lpPasswordResetRequired (\ s a -> s{_lpPasswordResetRequired = a});
lpUserName :: Lens' LoginProfile Text
lpUserName = lens _lpUserName (\ s a -> s{_lpUserName = a});
lpCreateDate :: Lens' LoginProfile UTCTime
lpCreateDate = lens _lpCreateDate (\ s a -> s{_lpCreateDate = a}) . _Time;
instance FromXML LoginProfile where
parseXML x
= LoginProfile' <$>
(x .@? "PasswordResetRequired") <*> (x .@ "UserName")
<*> (x .@ "CreateDate")
data MFADevice = MFADevice'
{ _mdUserName :: !Text
, _mdSerialNumber :: !Text
, _mdEnableDate :: !ISO8601
} deriving (Eq,Read,Show,Data,Typeable,Generic)
mfaDevice
:: Text
-> Text
-> UTCTime
-> MFADevice
mfaDevice pUserName_ pSerialNumber_ pEnableDate_ =
MFADevice'
{ _mdUserName = pUserName_
, _mdSerialNumber = pSerialNumber_
, _mdEnableDate = _Time # pEnableDate_
}
mdUserName :: Lens' MFADevice Text
mdUserName = lens _mdUserName (\ s a -> s{_mdUserName = a});
mdSerialNumber :: Lens' MFADevice Text
mdSerialNumber = lens _mdSerialNumber (\ s a -> s{_mdSerialNumber = a});
mdEnableDate :: Lens' MFADevice UTCTime
mdEnableDate = lens _mdEnableDate (\ s a -> s{_mdEnableDate = a}) . _Time;
instance FromXML MFADevice where
parseXML x
= MFADevice' <$>
(x .@ "UserName") <*> (x .@ "SerialNumber") <*>
(x .@ "EnableDate")
data ManagedPolicyDetail = ManagedPolicyDetail'
{ _mpdPolicyName :: !(Maybe Text)
, _mpdARN :: !(Maybe Text)
, _mpdUpdateDate :: !(Maybe ISO8601)
, _mpdPolicyId :: !(Maybe Text)
, _mpdPath :: !(Maybe Text)
, _mpdPolicyVersionList :: !(Maybe [PolicyVersion])
, _mpdCreateDate :: !(Maybe ISO8601)
, _mpdIsAttachable :: !(Maybe Bool)
, _mpdDefaultVersionId :: !(Maybe Text)
, _mpdAttachmentCount :: !(Maybe Int)
, _mpdDescription :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
managedPolicyDetail
:: ManagedPolicyDetail
managedPolicyDetail =
ManagedPolicyDetail'
{ _mpdPolicyName = Nothing
, _mpdARN = Nothing
, _mpdUpdateDate = Nothing
, _mpdPolicyId = Nothing
, _mpdPath = Nothing
, _mpdPolicyVersionList = Nothing
, _mpdCreateDate = Nothing
, _mpdIsAttachable = Nothing
, _mpdDefaultVersionId = Nothing
, _mpdAttachmentCount = Nothing
, _mpdDescription = Nothing
}
mpdPolicyName :: Lens' ManagedPolicyDetail (Maybe Text)
mpdPolicyName = lens _mpdPolicyName (\ s a -> s{_mpdPolicyName = a});
mpdARN :: Lens' ManagedPolicyDetail (Maybe Text)
mpdARN = lens _mpdARN (\ s a -> s{_mpdARN = a});
mpdUpdateDate :: Lens' ManagedPolicyDetail (Maybe UTCTime)
mpdUpdateDate = lens _mpdUpdateDate (\ s a -> s{_mpdUpdateDate = a}) . mapping _Time;
mpdPolicyId :: Lens' ManagedPolicyDetail (Maybe Text)
mpdPolicyId = lens _mpdPolicyId (\ s a -> s{_mpdPolicyId = a});
mpdPath :: Lens' ManagedPolicyDetail (Maybe Text)
mpdPath = lens _mpdPath (\ s a -> s{_mpdPath = a});
mpdPolicyVersionList :: Lens' ManagedPolicyDetail [PolicyVersion]
mpdPolicyVersionList = lens _mpdPolicyVersionList (\ s a -> s{_mpdPolicyVersionList = a}) . _Default . _Coerce;
mpdCreateDate :: Lens' ManagedPolicyDetail (Maybe UTCTime)
mpdCreateDate = lens _mpdCreateDate (\ s a -> s{_mpdCreateDate = a}) . mapping _Time;
mpdIsAttachable :: Lens' ManagedPolicyDetail (Maybe Bool)
mpdIsAttachable = lens _mpdIsAttachable (\ s a -> s{_mpdIsAttachable = a});
mpdDefaultVersionId :: Lens' ManagedPolicyDetail (Maybe Text)
mpdDefaultVersionId = lens _mpdDefaultVersionId (\ s a -> s{_mpdDefaultVersionId = a});
mpdAttachmentCount :: Lens' ManagedPolicyDetail (Maybe Int)
mpdAttachmentCount = lens _mpdAttachmentCount (\ s a -> s{_mpdAttachmentCount = a});
mpdDescription :: Lens' ManagedPolicyDetail (Maybe Text)
mpdDescription = lens _mpdDescription (\ s a -> s{_mpdDescription = a});
instance FromXML ManagedPolicyDetail where
parseXML x
= ManagedPolicyDetail' <$>
(x .@? "PolicyName") <*> (x .@? "Arn") <*>
(x .@? "UpdateDate")
<*> (x .@? "PolicyId")
<*> (x .@? "Path")
<*>
(x .@? "PolicyVersionList" .!@ mempty >>=
may (parseXMLList "member"))
<*> (x .@? "CreateDate")
<*> (x .@? "IsAttachable")
<*> (x .@? "DefaultVersionId")
<*> (x .@? "AttachmentCount")
<*> (x .@? "Description")
newtype OpenIdConnectProviderListEntry = OpenIdConnectProviderListEntry'
{ _oicpleARN :: Maybe Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
openIdConnectProviderListEntry
:: OpenIdConnectProviderListEntry
openIdConnectProviderListEntry =
OpenIdConnectProviderListEntry'
{ _oicpleARN = Nothing
}
oicpleARN :: Lens' OpenIdConnectProviderListEntry (Maybe Text)
oicpleARN = lens _oicpleARN (\ s a -> s{_oicpleARN = a});
instance FromXML OpenIdConnectProviderListEntry where
parseXML x
= OpenIdConnectProviderListEntry' <$> (x .@? "Arn")
data PasswordPolicy = PasswordPolicy'
{ _ppExpirePasswords :: !(Maybe Bool)
, _ppMinimumPasswordLength :: !(Maybe Nat)
, _ppRequireNumbers :: !(Maybe Bool)
, _ppPasswordReusePrevention :: !(Maybe Nat)
, _ppRequireLowercaseCharacters :: !(Maybe Bool)
, _ppMaxPasswordAge :: !(Maybe Nat)
, _ppHardExpiry :: !(Maybe Bool)
, _ppRequireSymbols :: !(Maybe Bool)
, _ppRequireUppercaseCharacters :: !(Maybe Bool)
, _ppAllowUsersToChangePassword :: !(Maybe Bool)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
passwordPolicy
:: PasswordPolicy
passwordPolicy =
PasswordPolicy'
{ _ppExpirePasswords = Nothing
, _ppMinimumPasswordLength = Nothing
, _ppRequireNumbers = Nothing
, _ppPasswordReusePrevention = Nothing
, _ppRequireLowercaseCharacters = Nothing
, _ppMaxPasswordAge = Nothing
, _ppHardExpiry = Nothing
, _ppRequireSymbols = Nothing
, _ppRequireUppercaseCharacters = Nothing
, _ppAllowUsersToChangePassword = Nothing
}
ppExpirePasswords :: Lens' PasswordPolicy (Maybe Bool)
ppExpirePasswords = lens _ppExpirePasswords (\ s a -> s{_ppExpirePasswords = a});
ppMinimumPasswordLength :: Lens' PasswordPolicy (Maybe Natural)
ppMinimumPasswordLength = lens _ppMinimumPasswordLength (\ s a -> s{_ppMinimumPasswordLength = a}) . mapping _Nat;
ppRequireNumbers :: Lens' PasswordPolicy (Maybe Bool)
ppRequireNumbers = lens _ppRequireNumbers (\ s a -> s{_ppRequireNumbers = a});
ppPasswordReusePrevention :: Lens' PasswordPolicy (Maybe Natural)
ppPasswordReusePrevention = lens _ppPasswordReusePrevention (\ s a -> s{_ppPasswordReusePrevention = a}) . mapping _Nat;
ppRequireLowercaseCharacters :: Lens' PasswordPolicy (Maybe Bool)
ppRequireLowercaseCharacters = lens _ppRequireLowercaseCharacters (\ s a -> s{_ppRequireLowercaseCharacters = a});
ppMaxPasswordAge :: Lens' PasswordPolicy (Maybe Natural)
ppMaxPasswordAge = lens _ppMaxPasswordAge (\ s a -> s{_ppMaxPasswordAge = a}) . mapping _Nat;
ppHardExpiry :: Lens' PasswordPolicy (Maybe Bool)
ppHardExpiry = lens _ppHardExpiry (\ s a -> s{_ppHardExpiry = a});
ppRequireSymbols :: Lens' PasswordPolicy (Maybe Bool)
ppRequireSymbols = lens _ppRequireSymbols (\ s a -> s{_ppRequireSymbols = a});
ppRequireUppercaseCharacters :: Lens' PasswordPolicy (Maybe Bool)
ppRequireUppercaseCharacters = lens _ppRequireUppercaseCharacters (\ s a -> s{_ppRequireUppercaseCharacters = a});
ppAllowUsersToChangePassword :: Lens' PasswordPolicy (Maybe Bool)
ppAllowUsersToChangePassword = lens _ppAllowUsersToChangePassword (\ s a -> s{_ppAllowUsersToChangePassword = a});
instance FromXML PasswordPolicy where
parseXML x
= PasswordPolicy' <$>
(x .@? "ExpirePasswords") <*>
(x .@? "MinimumPasswordLength")
<*> (x .@? "RequireNumbers")
<*> (x .@? "PasswordReusePrevention")
<*> (x .@? "RequireLowercaseCharacters")
<*> (x .@? "MaxPasswordAge")
<*> (x .@? "HardExpiry")
<*> (x .@? "RequireSymbols")
<*> (x .@? "RequireUppercaseCharacters")
<*> (x .@? "AllowUsersToChangePassword")
data Policy = Policy'
{ _pPolicyName :: !(Maybe Text)
, _pARN :: !(Maybe Text)
, _pUpdateDate :: !(Maybe ISO8601)
, _pPolicyId :: !(Maybe Text)
, _pPath :: !(Maybe Text)
, _pCreateDate :: !(Maybe ISO8601)
, _pIsAttachable :: !(Maybe Bool)
, _pDefaultVersionId :: !(Maybe Text)
, _pAttachmentCount :: !(Maybe Int)
, _pDescription :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
policy
:: Policy
policy =
Policy'
{ _pPolicyName = Nothing
, _pARN = Nothing
, _pUpdateDate = Nothing
, _pPolicyId = Nothing
, _pPath = Nothing
, _pCreateDate = Nothing
, _pIsAttachable = Nothing
, _pDefaultVersionId = Nothing
, _pAttachmentCount = Nothing
, _pDescription = Nothing
}
pPolicyName :: Lens' Policy (Maybe Text)
pPolicyName = lens _pPolicyName (\ s a -> s{_pPolicyName = a});
pARN :: Lens' Policy (Maybe Text)
pARN = lens _pARN (\ s a -> s{_pARN = a});
pUpdateDate :: Lens' Policy (Maybe UTCTime)
pUpdateDate = lens _pUpdateDate (\ s a -> s{_pUpdateDate = a}) . mapping _Time;
pPolicyId :: Lens' Policy (Maybe Text)
pPolicyId = lens _pPolicyId (\ s a -> s{_pPolicyId = a});
pPath :: Lens' Policy (Maybe Text)
pPath = lens _pPath (\ s a -> s{_pPath = a});
pCreateDate :: Lens' Policy (Maybe UTCTime)
pCreateDate = lens _pCreateDate (\ s a -> s{_pCreateDate = a}) . mapping _Time;
pIsAttachable :: Lens' Policy (Maybe Bool)
pIsAttachable = lens _pIsAttachable (\ s a -> s{_pIsAttachable = a});
pDefaultVersionId :: Lens' Policy (Maybe Text)
pDefaultVersionId = lens _pDefaultVersionId (\ s a -> s{_pDefaultVersionId = a});
pAttachmentCount :: Lens' Policy (Maybe Int)
pAttachmentCount = lens _pAttachmentCount (\ s a -> s{_pAttachmentCount = a});
pDescription :: Lens' Policy (Maybe Text)
pDescription = lens _pDescription (\ s a -> s{_pDescription = a});
instance FromXML Policy where
parseXML x
= Policy' <$>
(x .@? "PolicyName") <*> (x .@? "Arn") <*>
(x .@? "UpdateDate")
<*> (x .@? "PolicyId")
<*> (x .@? "Path")
<*> (x .@? "CreateDate")
<*> (x .@? "IsAttachable")
<*> (x .@? "DefaultVersionId")
<*> (x .@? "AttachmentCount")
<*> (x .@? "Description")
data PolicyDetail = PolicyDetail'
{ _pdPolicyDocument :: !(Maybe Text)
, _pdPolicyName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
policyDetail
:: PolicyDetail
policyDetail =
PolicyDetail'
{ _pdPolicyDocument = Nothing
, _pdPolicyName = Nothing
}
pdPolicyDocument :: Lens' PolicyDetail (Maybe Text)
pdPolicyDocument = lens _pdPolicyDocument (\ s a -> s{_pdPolicyDocument = a});
pdPolicyName :: Lens' PolicyDetail (Maybe Text)
pdPolicyName = lens _pdPolicyName (\ s a -> s{_pdPolicyName = a});
instance FromXML PolicyDetail where
parseXML x
= PolicyDetail' <$>
(x .@? "PolicyDocument") <*> (x .@? "PolicyName")
newtype PolicyGroup = PolicyGroup'
{ _pgGroupName :: Maybe Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
policyGroup
:: PolicyGroup
policyGroup =
PolicyGroup'
{ _pgGroupName = Nothing
}
pgGroupName :: Lens' PolicyGroup (Maybe Text)
pgGroupName = lens _pgGroupName (\ s a -> s{_pgGroupName = a});
instance FromXML PolicyGroup where
parseXML x = PolicyGroup' <$> (x .@? "GroupName")
newtype PolicyRole = PolicyRole'
{ _prRoleName :: Maybe Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
policyRole
:: PolicyRole
policyRole =
PolicyRole'
{ _prRoleName = Nothing
}
prRoleName :: Lens' PolicyRole (Maybe Text)
prRoleName = lens _prRoleName (\ s a -> s{_prRoleName = a});
instance FromXML PolicyRole where
parseXML x = PolicyRole' <$> (x .@? "RoleName")
newtype PolicyUser = PolicyUser'
{ _puUserName :: Maybe Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
policyUser
:: PolicyUser
policyUser =
PolicyUser'
{ _puUserName = Nothing
}
puUserName :: Lens' PolicyUser (Maybe Text)
puUserName = lens _puUserName (\ s a -> s{_puUserName = a});
instance FromXML PolicyUser where
parseXML x = PolicyUser' <$> (x .@? "UserName")
data PolicyVersion = PolicyVersion'
{ _pvVersionId :: !(Maybe Text)
, _pvCreateDate :: !(Maybe ISO8601)
, _pvDocument :: !(Maybe Text)
, _pvIsDefaultVersion :: !(Maybe Bool)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
policyVersion
:: PolicyVersion
policyVersion =
PolicyVersion'
{ _pvVersionId = Nothing
, _pvCreateDate = Nothing
, _pvDocument = Nothing
, _pvIsDefaultVersion = Nothing
}
pvVersionId :: Lens' PolicyVersion (Maybe Text)
pvVersionId = lens _pvVersionId (\ s a -> s{_pvVersionId = a});
pvCreateDate :: Lens' PolicyVersion (Maybe UTCTime)
pvCreateDate = lens _pvCreateDate (\ s a -> s{_pvCreateDate = a}) . mapping _Time;
pvDocument :: Lens' PolicyVersion (Maybe Text)
pvDocument = lens _pvDocument (\ s a -> s{_pvDocument = a});
pvIsDefaultVersion :: Lens' PolicyVersion (Maybe Bool)
pvIsDefaultVersion = lens _pvIsDefaultVersion (\ s a -> s{_pvIsDefaultVersion = a});
instance FromXML PolicyVersion where
parseXML x
= PolicyVersion' <$>
(x .@? "VersionId") <*> (x .@? "CreateDate") <*>
(x .@? "Document")
<*> (x .@? "IsDefaultVersion")
data Position = Position'
{ _pLine :: !(Maybe Int)
, _pColumn :: !(Maybe Int)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
position
:: Position
position =
Position'
{ _pLine = Nothing
, _pColumn = Nothing
}
pLine :: Lens' Position (Maybe Int)
pLine = lens _pLine (\ s a -> s{_pLine = a});
pColumn :: Lens' Position (Maybe Int)
pColumn = lens _pColumn (\ s a -> s{_pColumn = a});
instance FromXML Position where
parseXML x
= Position' <$> (x .@? "Line") <*> (x .@? "Column")
data Role = Role'
{ _rAssumeRolePolicyDocument :: !(Maybe Text)
, _rPath :: !Text
, _rRoleName :: !Text
, _rRoleId :: !Text
, _rARN :: !Text
, _rCreateDate :: !ISO8601
} deriving (Eq,Read,Show,Data,Typeable,Generic)
role
:: Text
-> Text
-> Text
-> Text
-> UTCTime
-> Role
role pPath_ pRoleName_ pRoleId_ pARN_ pCreateDate_ =
Role'
{ _rAssumeRolePolicyDocument = Nothing
, _rPath = pPath_
, _rRoleName = pRoleName_
, _rRoleId = pRoleId_
, _rARN = pARN_
, _rCreateDate = _Time # pCreateDate_
}
rAssumeRolePolicyDocument :: Lens' Role (Maybe Text)
rAssumeRolePolicyDocument = lens _rAssumeRolePolicyDocument (\ s a -> s{_rAssumeRolePolicyDocument = a});
rPath :: Lens' Role Text
rPath = lens _rPath (\ s a -> s{_rPath = a});
rRoleName :: Lens' Role Text
rRoleName = lens _rRoleName (\ s a -> s{_rRoleName = a});
rRoleId :: Lens' Role Text
rRoleId = lens _rRoleId (\ s a -> s{_rRoleId = a});
rARN :: Lens' Role Text
rARN = lens _rARN (\ s a -> s{_rARN = a});
rCreateDate :: Lens' Role UTCTime
rCreateDate = lens _rCreateDate (\ s a -> s{_rCreateDate = a}) . _Time;
instance FromXML Role where
parseXML x
= Role' <$>
(x .@? "AssumeRolePolicyDocument") <*> (x .@ "Path")
<*> (x .@ "RoleName")
<*> (x .@ "RoleId")
<*> (x .@ "Arn")
<*> (x .@ "CreateDate")
data RoleDetail = RoleDetail'
{ _rdAssumeRolePolicyDocument :: !(Maybe Text)
, _rdARN :: !(Maybe Text)
, _rdPath :: !(Maybe Text)
, _rdInstanceProfileList :: !(Maybe [InstanceProfile])
, _rdCreateDate :: !(Maybe ISO8601)
, _rdRoleName :: !(Maybe Text)
, _rdRoleId :: !(Maybe Text)
, _rdRolePolicyList :: !(Maybe [PolicyDetail])
, _rdAttachedManagedPolicies :: !(Maybe [AttachedPolicy])
} deriving (Eq,Read,Show,Data,Typeable,Generic)
roleDetail
:: RoleDetail
roleDetail =
RoleDetail'
{ _rdAssumeRolePolicyDocument = Nothing
, _rdARN = Nothing
, _rdPath = Nothing
, _rdInstanceProfileList = Nothing
, _rdCreateDate = Nothing
, _rdRoleName = Nothing
, _rdRoleId = Nothing
, _rdRolePolicyList = Nothing
, _rdAttachedManagedPolicies = Nothing
}
rdAssumeRolePolicyDocument :: Lens' RoleDetail (Maybe Text)
rdAssumeRolePolicyDocument = lens _rdAssumeRolePolicyDocument (\ s a -> s{_rdAssumeRolePolicyDocument = a});
rdARN :: Lens' RoleDetail (Maybe Text)
rdARN = lens _rdARN (\ s a -> s{_rdARN = a});
rdPath :: Lens' RoleDetail (Maybe Text)
rdPath = lens _rdPath (\ s a -> s{_rdPath = a});
rdInstanceProfileList :: Lens' RoleDetail [InstanceProfile]
rdInstanceProfileList = lens _rdInstanceProfileList (\ s a -> s{_rdInstanceProfileList = a}) . _Default . _Coerce;
rdCreateDate :: Lens' RoleDetail (Maybe UTCTime)
rdCreateDate = lens _rdCreateDate (\ s a -> s{_rdCreateDate = a}) . mapping _Time;
rdRoleName :: Lens' RoleDetail (Maybe Text)
rdRoleName = lens _rdRoleName (\ s a -> s{_rdRoleName = a});
rdRoleId :: Lens' RoleDetail (Maybe Text)
rdRoleId = lens _rdRoleId (\ s a -> s{_rdRoleId = a});
rdRolePolicyList :: Lens' RoleDetail [PolicyDetail]
rdRolePolicyList = lens _rdRolePolicyList (\ s a -> s{_rdRolePolicyList = a}) . _Default . _Coerce;
rdAttachedManagedPolicies :: Lens' RoleDetail [AttachedPolicy]
rdAttachedManagedPolicies = lens _rdAttachedManagedPolicies (\ s a -> s{_rdAttachedManagedPolicies = a}) . _Default . _Coerce;
instance FromXML RoleDetail where
parseXML x
= RoleDetail' <$>
(x .@? "AssumeRolePolicyDocument") <*> (x .@? "Arn")
<*> (x .@? "Path")
<*>
(x .@? "InstanceProfileList" .!@ mempty >>=
may (parseXMLList "member"))
<*> (x .@? "CreateDate")
<*> (x .@? "RoleName")
<*> (x .@? "RoleId")
<*>
(x .@? "RolePolicyList" .!@ mempty >>=
may (parseXMLList "member"))
<*>
(x .@? "AttachedManagedPolicies" .!@ mempty >>=
may (parseXMLList "member"))
data SAMLProviderListEntry = SAMLProviderListEntry'
{ _samlpleARN :: !(Maybe Text)
, _samlpleCreateDate :: !(Maybe ISO8601)
, _samlpleValidUntil :: !(Maybe ISO8601)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
sAMLProviderListEntry
:: SAMLProviderListEntry
sAMLProviderListEntry =
SAMLProviderListEntry'
{ _samlpleARN = Nothing
, _samlpleCreateDate = Nothing
, _samlpleValidUntil = Nothing
}
samlpleARN :: Lens' SAMLProviderListEntry (Maybe Text)
samlpleARN = lens _samlpleARN (\ s a -> s{_samlpleARN = a});
samlpleCreateDate :: Lens' SAMLProviderListEntry (Maybe UTCTime)
samlpleCreateDate = lens _samlpleCreateDate (\ s a -> s{_samlpleCreateDate = a}) . mapping _Time;
samlpleValidUntil :: Lens' SAMLProviderListEntry (Maybe UTCTime)
samlpleValidUntil = lens _samlpleValidUntil (\ s a -> s{_samlpleValidUntil = a}) . mapping _Time;
instance FromXML SAMLProviderListEntry where
parseXML x
= SAMLProviderListEntry' <$>
(x .@? "Arn") <*> (x .@? "CreateDate") <*>
(x .@? "ValidUntil")
data SSHPublicKey = SSHPublicKey'
{ _spkUploadDate :: !(Maybe ISO8601)
, _spkUserName :: !Text
, _spkSSHPublicKeyId :: !Text
, _spkFingerprint :: !Text
, _spkSSHPublicKeyBody :: !Text
, _spkStatus :: !StatusType
} deriving (Eq,Read,Show,Data,Typeable,Generic)
sshPublicKey
:: Text
-> Text
-> Text
-> Text
-> StatusType
-> SSHPublicKey
sshPublicKey pUserName_ pSSHPublicKeyId_ pFingerprint_ pSSHPublicKeyBody_ pStatus_ =
SSHPublicKey'
{ _spkUploadDate = Nothing
, _spkUserName = pUserName_
, _spkSSHPublicKeyId = pSSHPublicKeyId_
, _spkFingerprint = pFingerprint_
, _spkSSHPublicKeyBody = pSSHPublicKeyBody_
, _spkStatus = pStatus_
}
spkUploadDate :: Lens' SSHPublicKey (Maybe UTCTime)
spkUploadDate = lens _spkUploadDate (\ s a -> s{_spkUploadDate = a}) . mapping _Time;
spkUserName :: Lens' SSHPublicKey Text
spkUserName = lens _spkUserName (\ s a -> s{_spkUserName = a});
spkSSHPublicKeyId :: Lens' SSHPublicKey Text
spkSSHPublicKeyId = lens _spkSSHPublicKeyId (\ s a -> s{_spkSSHPublicKeyId = a});
spkFingerprint :: Lens' SSHPublicKey Text
spkFingerprint = lens _spkFingerprint (\ s a -> s{_spkFingerprint = a});
spkSSHPublicKeyBody :: Lens' SSHPublicKey Text
spkSSHPublicKeyBody = lens _spkSSHPublicKeyBody (\ s a -> s{_spkSSHPublicKeyBody = a});
spkStatus :: Lens' SSHPublicKey StatusType
spkStatus = lens _spkStatus (\ s a -> s{_spkStatus = a});
instance FromXML SSHPublicKey where
parseXML x
= SSHPublicKey' <$>
(x .@? "UploadDate") <*> (x .@ "UserName") <*>
(x .@ "SSHPublicKeyId")
<*> (x .@ "Fingerprint")
<*> (x .@ "SSHPublicKeyBody")
<*> (x .@ "Status")
data SSHPublicKeyMetadata = SSHPublicKeyMetadata'
{ _spkmUserName :: !Text
, _spkmSSHPublicKeyId :: !Text
, _spkmStatus :: !StatusType
, _spkmUploadDate :: !ISO8601
} deriving (Eq,Read,Show,Data,Typeable,Generic)
sshPublicKeyMetadata
:: Text
-> Text
-> StatusType
-> UTCTime
-> SSHPublicKeyMetadata
sshPublicKeyMetadata pUserName_ pSSHPublicKeyId_ pStatus_ pUploadDate_ =
SSHPublicKeyMetadata'
{ _spkmUserName = pUserName_
, _spkmSSHPublicKeyId = pSSHPublicKeyId_
, _spkmStatus = pStatus_
, _spkmUploadDate = _Time # pUploadDate_
}
spkmUserName :: Lens' SSHPublicKeyMetadata Text
spkmUserName = lens _spkmUserName (\ s a -> s{_spkmUserName = a});
spkmSSHPublicKeyId :: Lens' SSHPublicKeyMetadata Text
spkmSSHPublicKeyId = lens _spkmSSHPublicKeyId (\ s a -> s{_spkmSSHPublicKeyId = a});
spkmStatus :: Lens' SSHPublicKeyMetadata StatusType
spkmStatus = lens _spkmStatus (\ s a -> s{_spkmStatus = a});
spkmUploadDate :: Lens' SSHPublicKeyMetadata UTCTime
spkmUploadDate = lens _spkmUploadDate (\ s a -> s{_spkmUploadDate = a}) . _Time;
instance FromXML SSHPublicKeyMetadata where
parseXML x
= SSHPublicKeyMetadata' <$>
(x .@ "UserName") <*> (x .@ "SSHPublicKeyId") <*>
(x .@ "Status")
<*> (x .@ "UploadDate")
data ServerCertificate = ServerCertificate'
{ _sCertificateChain :: !(Maybe Text)
, _sServerCertificateMetadata :: !ServerCertificateMetadata
, _sCertificateBody :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
serverCertificate
:: ServerCertificateMetadata
-> Text
-> ServerCertificate
serverCertificate pServerCertificateMetadata_ pCertificateBody_ =
ServerCertificate'
{ _sCertificateChain = Nothing
, _sServerCertificateMetadata = pServerCertificateMetadata_
, _sCertificateBody = pCertificateBody_
}
sCertificateChain :: Lens' ServerCertificate (Maybe Text)
sCertificateChain = lens _sCertificateChain (\ s a -> s{_sCertificateChain = a});
sServerCertificateMetadata :: Lens' ServerCertificate ServerCertificateMetadata
sServerCertificateMetadata = lens _sServerCertificateMetadata (\ s a -> s{_sServerCertificateMetadata = a});
sCertificateBody :: Lens' ServerCertificate Text
sCertificateBody = lens _sCertificateBody (\ s a -> s{_sCertificateBody = a});
instance FromXML ServerCertificate where
parseXML x
= ServerCertificate' <$>
(x .@? "CertificateChain") <*>
(x .@ "ServerCertificateMetadata")
<*> (x .@ "CertificateBody")
data ServerCertificateMetadata = ServerCertificateMetadata'
{ _scmUploadDate :: !(Maybe ISO8601)
, _scmExpiration :: !(Maybe ISO8601)
, _scmPath :: !Text
, _scmServerCertificateName :: !Text
, _scmServerCertificateId :: !Text
, _scmARN :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
serverCertificateMetadata
:: Text
-> Text
-> Text
-> Text
-> ServerCertificateMetadata
serverCertificateMetadata pPath_ pServerCertificateName_ pServerCertificateId_ pARN_ =
ServerCertificateMetadata'
{ _scmUploadDate = Nothing
, _scmExpiration = Nothing
, _scmPath = pPath_
, _scmServerCertificateName = pServerCertificateName_
, _scmServerCertificateId = pServerCertificateId_
, _scmARN = pARN_
}
scmUploadDate :: Lens' ServerCertificateMetadata (Maybe UTCTime)
scmUploadDate = lens _scmUploadDate (\ s a -> s{_scmUploadDate = a}) . mapping _Time;
scmExpiration :: Lens' ServerCertificateMetadata (Maybe UTCTime)
scmExpiration = lens _scmExpiration (\ s a -> s{_scmExpiration = a}) . mapping _Time;
scmPath :: Lens' ServerCertificateMetadata Text
scmPath = lens _scmPath (\ s a -> s{_scmPath = a});
scmServerCertificateName :: Lens' ServerCertificateMetadata Text
scmServerCertificateName = lens _scmServerCertificateName (\ s a -> s{_scmServerCertificateName = a});
scmServerCertificateId :: Lens' ServerCertificateMetadata Text
scmServerCertificateId = lens _scmServerCertificateId (\ s a -> s{_scmServerCertificateId = a});
scmARN :: Lens' ServerCertificateMetadata Text
scmARN = lens _scmARN (\ s a -> s{_scmARN = a});
instance FromXML ServerCertificateMetadata where
parseXML x
= ServerCertificateMetadata' <$>
(x .@? "UploadDate") <*> (x .@? "Expiration") <*>
(x .@ "Path")
<*> (x .@ "ServerCertificateName")
<*> (x .@ "ServerCertificateId")
<*> (x .@ "Arn")
data SigningCertificate = SigningCertificate'
{ _scUploadDate :: !(Maybe ISO8601)
, _scUserName :: !Text
, _scCertificateId :: !Text
, _scCertificateBody :: !Text
, _scStatus :: !StatusType
} deriving (Eq,Read,Show,Data,Typeable,Generic)
signingCertificate
:: Text
-> Text
-> Text
-> StatusType
-> SigningCertificate
signingCertificate pUserName_ pCertificateId_ pCertificateBody_ pStatus_ =
SigningCertificate'
{ _scUploadDate = Nothing
, _scUserName = pUserName_
, _scCertificateId = pCertificateId_
, _scCertificateBody = pCertificateBody_
, _scStatus = pStatus_
}
scUploadDate :: Lens' SigningCertificate (Maybe UTCTime)
scUploadDate = lens _scUploadDate (\ s a -> s{_scUploadDate = a}) . mapping _Time;
scUserName :: Lens' SigningCertificate Text
scUserName = lens _scUserName (\ s a -> s{_scUserName = a});
scCertificateId :: Lens' SigningCertificate Text
scCertificateId = lens _scCertificateId (\ s a -> s{_scCertificateId = a});
scCertificateBody :: Lens' SigningCertificate Text
scCertificateBody = lens _scCertificateBody (\ s a -> s{_scCertificateBody = a});
scStatus :: Lens' SigningCertificate StatusType
scStatus = lens _scStatus (\ s a -> s{_scStatus = a});
instance FromXML SigningCertificate where
parseXML x
= SigningCertificate' <$>
(x .@? "UploadDate") <*> (x .@ "UserName") <*>
(x .@ "CertificateId")
<*> (x .@ "CertificateBody")
<*> (x .@ "Status")
data SimulatePolicyResponse = SimulatePolicyResponse'
{ _spEvaluationResults :: !(Maybe [EvaluationResult])
, _spMarker :: !(Maybe Text)
, _spIsTruncated :: !(Maybe Bool)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
simulatePolicyResponse
:: SimulatePolicyResponse
simulatePolicyResponse =
SimulatePolicyResponse'
{ _spEvaluationResults = Nothing
, _spMarker = Nothing
, _spIsTruncated = Nothing
}
spEvaluationResults :: Lens' SimulatePolicyResponse [EvaluationResult]
spEvaluationResults = lens _spEvaluationResults (\ s a -> s{_spEvaluationResults = a}) . _Default . _Coerce;
spMarker :: Lens' SimulatePolicyResponse (Maybe Text)
spMarker = lens _spMarker (\ s a -> s{_spMarker = a});
spIsTruncated :: Lens' SimulatePolicyResponse (Maybe Bool)
spIsTruncated = lens _spIsTruncated (\ s a -> s{_spIsTruncated = a});
instance FromXML SimulatePolicyResponse where
parseXML x
= SimulatePolicyResponse' <$>
(x .@? "EvaluationResults" .!@ mempty >>=
may (parseXMLList "member"))
<*> (x .@? "Marker")
<*> (x .@? "IsTruncated")
data Statement = Statement'
{ _sSourcePolicyType :: !(Maybe PolicySourceType)
, _sSourcePolicyId :: !(Maybe Text)
, _sEndPosition :: !(Maybe Position)
, _sStartPosition :: !(Maybe Position)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
statement
:: Statement
statement =
Statement'
{ _sSourcePolicyType = Nothing
, _sSourcePolicyId = Nothing
, _sEndPosition = Nothing
, _sStartPosition = Nothing
}
sSourcePolicyType :: Lens' Statement (Maybe PolicySourceType)
sSourcePolicyType = lens _sSourcePolicyType (\ s a -> s{_sSourcePolicyType = a});
sSourcePolicyId :: Lens' Statement (Maybe Text)
sSourcePolicyId = lens _sSourcePolicyId (\ s a -> s{_sSourcePolicyId = a});
sEndPosition :: Lens' Statement (Maybe Position)
sEndPosition = lens _sEndPosition (\ s a -> s{_sEndPosition = a});
sStartPosition :: Lens' Statement (Maybe Position)
sStartPosition = lens _sStartPosition (\ s a -> s{_sStartPosition = a});
instance FromXML Statement where
parseXML x
= Statement' <$>
(x .@? "SourcePolicyType") <*>
(x .@? "SourcePolicyId")
<*> (x .@? "EndPosition")
<*> (x .@? "StartPosition")
data User = User'
{ _uPasswordLastUsed :: !(Maybe ISO8601)
, _uPath :: !Text
, _uUserName :: !Text
, _uUserId :: !Text
, _uARN :: !Text
, _uCreateDate :: !ISO8601
} deriving (Eq,Read,Show,Data,Typeable,Generic)
user
:: Text
-> Text
-> Text
-> Text
-> UTCTime
-> User
user pPath_ pUserName_ pUserId_ pARN_ pCreateDate_ =
User'
{ _uPasswordLastUsed = Nothing
, _uPath = pPath_
, _uUserName = pUserName_
, _uUserId = pUserId_
, _uARN = pARN_
, _uCreateDate = _Time # pCreateDate_
}
uPasswordLastUsed :: Lens' User (Maybe UTCTime)
uPasswordLastUsed = lens _uPasswordLastUsed (\ s a -> s{_uPasswordLastUsed = a}) . mapping _Time;
uPath :: Lens' User Text
uPath = lens _uPath (\ s a -> s{_uPath = a});
uUserName :: Lens' User Text
uUserName = lens _uUserName (\ s a -> s{_uUserName = a});
uUserId :: Lens' User Text
uUserId = lens _uUserId (\ s a -> s{_uUserId = a});
uARN :: Lens' User Text
uARN = lens _uARN (\ s a -> s{_uARN = a});
uCreateDate :: Lens' User UTCTime
uCreateDate = lens _uCreateDate (\ s a -> s{_uCreateDate = a}) . _Time;
instance FromXML User where
parseXML x
= User' <$>
(x .@? "PasswordLastUsed") <*> (x .@ "Path") <*>
(x .@ "UserName")
<*> (x .@ "UserId")
<*> (x .@ "Arn")
<*> (x .@ "CreateDate")
data UserDetail = UserDetail'
{ _udGroupList :: !(Maybe [Text])
, _udARN :: !(Maybe Text)
, _udPath :: !(Maybe Text)
, _udCreateDate :: !(Maybe ISO8601)
, _udUserName :: !(Maybe Text)
, _udUserId :: !(Maybe Text)
, _udUserPolicyList :: !(Maybe [PolicyDetail])
, _udAttachedManagedPolicies :: !(Maybe [AttachedPolicy])
} deriving (Eq,Read,Show,Data,Typeable,Generic)
userDetail
:: UserDetail
userDetail =
UserDetail'
{ _udGroupList = Nothing
, _udARN = Nothing
, _udPath = Nothing
, _udCreateDate = Nothing
, _udUserName = Nothing
, _udUserId = Nothing
, _udUserPolicyList = Nothing
, _udAttachedManagedPolicies = Nothing
}
udGroupList :: Lens' UserDetail [Text]
udGroupList = lens _udGroupList (\ s a -> s{_udGroupList = a}) . _Default . _Coerce;
udARN :: Lens' UserDetail (Maybe Text)
udARN = lens _udARN (\ s a -> s{_udARN = a});
udPath :: Lens' UserDetail (Maybe Text)
udPath = lens _udPath (\ s a -> s{_udPath = a});
udCreateDate :: Lens' UserDetail (Maybe UTCTime)
udCreateDate = lens _udCreateDate (\ s a -> s{_udCreateDate = a}) . mapping _Time;
udUserName :: Lens' UserDetail (Maybe Text)
udUserName = lens _udUserName (\ s a -> s{_udUserName = a});
udUserId :: Lens' UserDetail (Maybe Text)
udUserId = lens _udUserId (\ s a -> s{_udUserId = a});
udUserPolicyList :: Lens' UserDetail [PolicyDetail]
udUserPolicyList = lens _udUserPolicyList (\ s a -> s{_udUserPolicyList = a}) . _Default . _Coerce;
udAttachedManagedPolicies :: Lens' UserDetail [AttachedPolicy]
udAttachedManagedPolicies = lens _udAttachedManagedPolicies (\ s a -> s{_udAttachedManagedPolicies = a}) . _Default . _Coerce;
instance FromXML UserDetail where
parseXML x
= UserDetail' <$>
(x .@? "GroupList" .!@ mempty >>=
may (parseXMLList "member"))
<*> (x .@? "Arn")
<*> (x .@? "Path")
<*> (x .@? "CreateDate")
<*> (x .@? "UserName")
<*> (x .@? "UserId")
<*>
(x .@? "UserPolicyList" .!@ mempty >>=
may (parseXMLList "member"))
<*>
(x .@? "AttachedManagedPolicies" .!@ mempty >>=
may (parseXMLList "member"))
data VirtualMFADevice = VirtualMFADevice'
{ _vmdQRCodePNG :: !(Maybe (Sensitive Base64))
, _vmdBase32StringSeed :: !(Maybe (Sensitive Base64))
, _vmdUser :: !(Maybe User)
, _vmdEnableDate :: !(Maybe ISO8601)
, _vmdSerialNumber :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
virtualMFADevice
:: Text
-> VirtualMFADevice
virtualMFADevice pSerialNumber_ =
VirtualMFADevice'
{ _vmdQRCodePNG = Nothing
, _vmdBase32StringSeed = Nothing
, _vmdUser = Nothing
, _vmdEnableDate = Nothing
, _vmdSerialNumber = pSerialNumber_
}
vmdQRCodePNG :: Lens' VirtualMFADevice (Maybe ByteString)
vmdQRCodePNG = lens _vmdQRCodePNG (\ s a -> s{_vmdQRCodePNG = a}) . mapping (_Sensitive . _Base64);
vmdBase32StringSeed :: Lens' VirtualMFADevice (Maybe ByteString)
vmdBase32StringSeed = lens _vmdBase32StringSeed (\ s a -> s{_vmdBase32StringSeed = a}) . mapping (_Sensitive . _Base64);
vmdUser :: Lens' VirtualMFADevice (Maybe User)
vmdUser = lens _vmdUser (\ s a -> s{_vmdUser = a});
vmdEnableDate :: Lens' VirtualMFADevice (Maybe UTCTime)
vmdEnableDate = lens _vmdEnableDate (\ s a -> s{_vmdEnableDate = a}) . mapping _Time;
vmdSerialNumber :: Lens' VirtualMFADevice Text
vmdSerialNumber = lens _vmdSerialNumber (\ s a -> s{_vmdSerialNumber = a});
instance FromXML VirtualMFADevice where
parseXML x
= VirtualMFADevice' <$>
(x .@? "QRCodePNG") <*> (x .@? "Base32StringSeed")
<*> (x .@? "User")
<*> (x .@? "EnableDate")
<*> (x .@ "SerialNumber")