module Network.AWS.RDS.RestoreDBInstanceToPointInTime
(
restoreDBInstanceToPointInTime
, RestoreDBInstanceToPointInTime
, rditpitDBSecurityGroups
, rditpitUseLatestRestorableTime
, rditpitAutoMinorVersionUpgrade
, rditpitPubliclyAccessible
, rditpitDBSubnetGroupName
, rditpitRestoreTime
, rditpitIOPS
, rditpitDomain
, rditpitEngine
, rditpitTDECredentialPassword
, rditpitDBInstanceClass
, rditpitLicenseModel
, rditpitAvailabilityZone
, rditpitVPCSecurityGroupIds
, rditpitMultiAZ
, rditpitTDECredentialARN
, rditpitOptionGroupName
, rditpitCopyTagsToSnapshot
, rditpitDBName
, rditpitTags
, rditpitPort
, rditpitStorageType
, rditpitSourceDBInstanceIdentifier
, rditpitTargetDBInstanceIdentifier
, restoreDBInstanceToPointInTimeResponse
, RestoreDBInstanceToPointInTimeResponse
, rditpitrsDBInstance
, rditpitrsStatus
) where
import Network.AWS.Prelude
import Network.AWS.RDS.Types
import Network.AWS.RDS.Types.Product
import Network.AWS.Request
import Network.AWS.Response
data RestoreDBInstanceToPointInTime = RestoreDBInstanceToPointInTime'
{ _rditpitDBSecurityGroups :: !(Maybe [Text])
, _rditpitUseLatestRestorableTime :: !(Maybe Bool)
, _rditpitAutoMinorVersionUpgrade :: !(Maybe Bool)
, _rditpitPubliclyAccessible :: !(Maybe Bool)
, _rditpitDBSubnetGroupName :: !(Maybe Text)
, _rditpitRestoreTime :: !(Maybe ISO8601)
, _rditpitIOPS :: !(Maybe Int)
, _rditpitDomain :: !(Maybe Text)
, _rditpitEngine :: !(Maybe Text)
, _rditpitTDECredentialPassword :: !(Maybe Text)
, _rditpitDBInstanceClass :: !(Maybe Text)
, _rditpitLicenseModel :: !(Maybe Text)
, _rditpitAvailabilityZone :: !(Maybe Text)
, _rditpitVPCSecurityGroupIds :: !(Maybe [Text])
, _rditpitMultiAZ :: !(Maybe Bool)
, _rditpitTDECredentialARN :: !(Maybe Text)
, _rditpitOptionGroupName :: !(Maybe Text)
, _rditpitCopyTagsToSnapshot :: !(Maybe Bool)
, _rditpitDBName :: !(Maybe Text)
, _rditpitTags :: !(Maybe [Tag])
, _rditpitPort :: !(Maybe Int)
, _rditpitStorageType :: !(Maybe Text)
, _rditpitSourceDBInstanceIdentifier :: !Text
, _rditpitTargetDBInstanceIdentifier :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
restoreDBInstanceToPointInTime
:: Text
-> Text
-> RestoreDBInstanceToPointInTime
restoreDBInstanceToPointInTime pSourceDBInstanceIdentifier_ pTargetDBInstanceIdentifier_ =
RestoreDBInstanceToPointInTime'
{ _rditpitDBSecurityGroups = Nothing
, _rditpitUseLatestRestorableTime = Nothing
, _rditpitAutoMinorVersionUpgrade = Nothing
, _rditpitPubliclyAccessible = Nothing
, _rditpitDBSubnetGroupName = Nothing
, _rditpitRestoreTime = Nothing
, _rditpitIOPS = Nothing
, _rditpitDomain = Nothing
, _rditpitEngine = Nothing
, _rditpitTDECredentialPassword = Nothing
, _rditpitDBInstanceClass = Nothing
, _rditpitLicenseModel = Nothing
, _rditpitAvailabilityZone = Nothing
, _rditpitVPCSecurityGroupIds = Nothing
, _rditpitMultiAZ = Nothing
, _rditpitTDECredentialARN = Nothing
, _rditpitOptionGroupName = Nothing
, _rditpitCopyTagsToSnapshot = Nothing
, _rditpitDBName = Nothing
, _rditpitTags = Nothing
, _rditpitPort = Nothing
, _rditpitStorageType = Nothing
, _rditpitSourceDBInstanceIdentifier = pSourceDBInstanceIdentifier_
, _rditpitTargetDBInstanceIdentifier = pTargetDBInstanceIdentifier_
}
rditpitDBSecurityGroups :: Lens' RestoreDBInstanceToPointInTime [Text]
rditpitDBSecurityGroups = lens _rditpitDBSecurityGroups (\ s a -> s{_rditpitDBSecurityGroups = a}) . _Default . _Coerce;
rditpitUseLatestRestorableTime :: Lens' RestoreDBInstanceToPointInTime (Maybe Bool)
rditpitUseLatestRestorableTime = lens _rditpitUseLatestRestorableTime (\ s a -> s{_rditpitUseLatestRestorableTime = a});
rditpitAutoMinorVersionUpgrade :: Lens' RestoreDBInstanceToPointInTime (Maybe Bool)
rditpitAutoMinorVersionUpgrade = lens _rditpitAutoMinorVersionUpgrade (\ s a -> s{_rditpitAutoMinorVersionUpgrade = a});
rditpitPubliclyAccessible :: Lens' RestoreDBInstanceToPointInTime (Maybe Bool)
rditpitPubliclyAccessible = lens _rditpitPubliclyAccessible (\ s a -> s{_rditpitPubliclyAccessible = a});
rditpitDBSubnetGroupName :: Lens' RestoreDBInstanceToPointInTime (Maybe Text)
rditpitDBSubnetGroupName = lens _rditpitDBSubnetGroupName (\ s a -> s{_rditpitDBSubnetGroupName = a});
rditpitRestoreTime :: Lens' RestoreDBInstanceToPointInTime (Maybe UTCTime)
rditpitRestoreTime = lens _rditpitRestoreTime (\ s a -> s{_rditpitRestoreTime = a}) . mapping _Time;
rditpitIOPS :: Lens' RestoreDBInstanceToPointInTime (Maybe Int)
rditpitIOPS = lens _rditpitIOPS (\ s a -> s{_rditpitIOPS = a});
rditpitDomain :: Lens' RestoreDBInstanceToPointInTime (Maybe Text)
rditpitDomain = lens _rditpitDomain (\ s a -> s{_rditpitDomain = a});
rditpitEngine :: Lens' RestoreDBInstanceToPointInTime (Maybe Text)
rditpitEngine = lens _rditpitEngine (\ s a -> s{_rditpitEngine = a});
rditpitTDECredentialPassword :: Lens' RestoreDBInstanceToPointInTime (Maybe Text)
rditpitTDECredentialPassword = lens _rditpitTDECredentialPassword (\ s a -> s{_rditpitTDECredentialPassword = a});
rditpitDBInstanceClass :: Lens' RestoreDBInstanceToPointInTime (Maybe Text)
rditpitDBInstanceClass = lens _rditpitDBInstanceClass (\ s a -> s{_rditpitDBInstanceClass = a});
rditpitLicenseModel :: Lens' RestoreDBInstanceToPointInTime (Maybe Text)
rditpitLicenseModel = lens _rditpitLicenseModel (\ s a -> s{_rditpitLicenseModel = a});
rditpitAvailabilityZone :: Lens' RestoreDBInstanceToPointInTime (Maybe Text)
rditpitAvailabilityZone = lens _rditpitAvailabilityZone (\ s a -> s{_rditpitAvailabilityZone = a});
rditpitVPCSecurityGroupIds :: Lens' RestoreDBInstanceToPointInTime [Text]
rditpitVPCSecurityGroupIds = lens _rditpitVPCSecurityGroupIds (\ s a -> s{_rditpitVPCSecurityGroupIds = a}) . _Default . _Coerce;
rditpitMultiAZ :: Lens' RestoreDBInstanceToPointInTime (Maybe Bool)
rditpitMultiAZ = lens _rditpitMultiAZ (\ s a -> s{_rditpitMultiAZ = a});
rditpitTDECredentialARN :: Lens' RestoreDBInstanceToPointInTime (Maybe Text)
rditpitTDECredentialARN = lens _rditpitTDECredentialARN (\ s a -> s{_rditpitTDECredentialARN = a});
rditpitOptionGroupName :: Lens' RestoreDBInstanceToPointInTime (Maybe Text)
rditpitOptionGroupName = lens _rditpitOptionGroupName (\ s a -> s{_rditpitOptionGroupName = a});
rditpitCopyTagsToSnapshot :: Lens' RestoreDBInstanceToPointInTime (Maybe Bool)
rditpitCopyTagsToSnapshot = lens _rditpitCopyTagsToSnapshot (\ s a -> s{_rditpitCopyTagsToSnapshot = a});
rditpitDBName :: Lens' RestoreDBInstanceToPointInTime (Maybe Text)
rditpitDBName = lens _rditpitDBName (\ s a -> s{_rditpitDBName = a});
rditpitTags :: Lens' RestoreDBInstanceToPointInTime [Tag]
rditpitTags = lens _rditpitTags (\ s a -> s{_rditpitTags = a}) . _Default . _Coerce;
rditpitPort :: Lens' RestoreDBInstanceToPointInTime (Maybe Int)
rditpitPort = lens _rditpitPort (\ s a -> s{_rditpitPort = a});
rditpitStorageType :: Lens' RestoreDBInstanceToPointInTime (Maybe Text)
rditpitStorageType = lens _rditpitStorageType (\ s a -> s{_rditpitStorageType = a});
rditpitSourceDBInstanceIdentifier :: Lens' RestoreDBInstanceToPointInTime Text
rditpitSourceDBInstanceIdentifier = lens _rditpitSourceDBInstanceIdentifier (\ s a -> s{_rditpitSourceDBInstanceIdentifier = a});
rditpitTargetDBInstanceIdentifier :: Lens' RestoreDBInstanceToPointInTime Text
rditpitTargetDBInstanceIdentifier = lens _rditpitTargetDBInstanceIdentifier (\ s a -> s{_rditpitTargetDBInstanceIdentifier = a});
instance AWSRequest RestoreDBInstanceToPointInTime
where
type Sv RestoreDBInstanceToPointInTime = RDS
type Rs RestoreDBInstanceToPointInTime =
RestoreDBInstanceToPointInTimeResponse
request = postQuery
response
= receiveXMLWrapper
"RestoreDBInstanceToPointInTimeResult"
(\ s h x ->
RestoreDBInstanceToPointInTimeResponse' <$>
(x .@? "DBInstance") <*> (pure (fromEnum s)))
instance ToHeaders RestoreDBInstanceToPointInTime
where
toHeaders = const mempty
instance ToPath RestoreDBInstanceToPointInTime where
toPath = const "/"
instance ToQuery RestoreDBInstanceToPointInTime where
toQuery RestoreDBInstanceToPointInTime'{..}
= mconcat
["Action" =:
("RestoreDBInstanceToPointInTime" :: ByteString),
"Version" =: ("2014-10-31" :: ByteString),
"DBSecurityGroups" =:
toQuery
(toQueryList "DBSecurityGroupName" <$>
_rditpitDBSecurityGroups),
"UseLatestRestorableTime" =:
_rditpitUseLatestRestorableTime,
"AutoMinorVersionUpgrade" =:
_rditpitAutoMinorVersionUpgrade,
"PubliclyAccessible" =: _rditpitPubliclyAccessible,
"DBSubnetGroupName" =: _rditpitDBSubnetGroupName,
"RestoreTime" =: _rditpitRestoreTime,
"Iops" =: _rditpitIOPS, "Domain" =: _rditpitDomain,
"Engine" =: _rditpitEngine,
"TdeCredentialPassword" =:
_rditpitTDECredentialPassword,
"DBInstanceClass" =: _rditpitDBInstanceClass,
"LicenseModel" =: _rditpitLicenseModel,
"AvailabilityZone" =: _rditpitAvailabilityZone,
"VpcSecurityGroupIds" =:
toQuery
(toQueryList "VpcSecurityGroupId" <$>
_rditpitVPCSecurityGroupIds),
"MultiAZ" =: _rditpitMultiAZ,
"TdeCredentialArn" =: _rditpitTDECredentialARN,
"OptionGroupName" =: _rditpitOptionGroupName,
"CopyTagsToSnapshot" =: _rditpitCopyTagsToSnapshot,
"DBName" =: _rditpitDBName,
"Tags" =:
toQuery (toQueryList "Tag" <$> _rditpitTags),
"Port" =: _rditpitPort,
"StorageType" =: _rditpitStorageType,
"SourceDBInstanceIdentifier" =:
_rditpitSourceDBInstanceIdentifier,
"TargetDBInstanceIdentifier" =:
_rditpitTargetDBInstanceIdentifier]
data RestoreDBInstanceToPointInTimeResponse = RestoreDBInstanceToPointInTimeResponse'
{ _rditpitrsDBInstance :: !(Maybe DBInstance)
, _rditpitrsStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
restoreDBInstanceToPointInTimeResponse
:: Int
-> RestoreDBInstanceToPointInTimeResponse
restoreDBInstanceToPointInTimeResponse pStatus_ =
RestoreDBInstanceToPointInTimeResponse'
{ _rditpitrsDBInstance = Nothing
, _rditpitrsStatus = pStatus_
}
rditpitrsDBInstance :: Lens' RestoreDBInstanceToPointInTimeResponse (Maybe DBInstance)
rditpitrsDBInstance = lens _rditpitrsDBInstance (\ s a -> s{_rditpitrsDBInstance = a});
rditpitrsStatus :: Lens' RestoreDBInstanceToPointInTimeResponse Int
rditpitrsStatus = lens _rditpitrsStatus (\ s a -> s{_rditpitrsStatus = a});