module Network.AWS.RDS.RestoreDBInstanceToPointInTime
(
RestoreDBInstanceToPointInTime
, restoreDBInstanceToPointInTime
, rdbitpitAutoMinorVersionUpgrade
, rdbitpitAvailabilityZone
, rdbitpitDBInstanceClass
, rdbitpitDBName
, rdbitpitDBSubnetGroupName
, rdbitpitEngine
, rdbitpitIops
, rdbitpitLicenseModel
, rdbitpitMultiAZ
, rdbitpitOptionGroupName
, rdbitpitPort
, rdbitpitPubliclyAccessible
, rdbitpitRestoreTime
, rdbitpitSourceDBInstanceIdentifier
, rdbitpitStorageType
, rdbitpitTags
, rdbitpitTargetDBInstanceIdentifier
, rdbitpitTdeCredentialArn
, rdbitpitTdeCredentialPassword
, rdbitpitUseLatestRestorableTime
, RestoreDBInstanceToPointInTimeResponse
, restoreDBInstanceToPointInTimeResponse
, rdbitpitrDBInstance
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.RDS.Types
import qualified GHC.Exts
data RestoreDBInstanceToPointInTime = RestoreDBInstanceToPointInTime
{ _rdbitpitAutoMinorVersionUpgrade :: Maybe Bool
, _rdbitpitAvailabilityZone :: Maybe Text
, _rdbitpitDBInstanceClass :: Maybe Text
, _rdbitpitDBName :: Maybe Text
, _rdbitpitDBSubnetGroupName :: Maybe Text
, _rdbitpitEngine :: Maybe Text
, _rdbitpitIops :: Maybe Int
, _rdbitpitLicenseModel :: Maybe Text
, _rdbitpitMultiAZ :: Maybe Bool
, _rdbitpitOptionGroupName :: Maybe Text
, _rdbitpitPort :: Maybe Int
, _rdbitpitPubliclyAccessible :: Maybe Bool
, _rdbitpitRestoreTime :: Maybe ISO8601
, _rdbitpitSourceDBInstanceIdentifier :: Text
, _rdbitpitStorageType :: Maybe Text
, _rdbitpitTags :: List "Tag" Tag
, _rdbitpitTargetDBInstanceIdentifier :: Text
, _rdbitpitTdeCredentialArn :: Maybe Text
, _rdbitpitTdeCredentialPassword :: Maybe Text
, _rdbitpitUseLatestRestorableTime :: Maybe Bool
} deriving (Eq, Show)
restoreDBInstanceToPointInTime :: Text
-> Text
-> RestoreDBInstanceToPointInTime
restoreDBInstanceToPointInTime p1 p2 = RestoreDBInstanceToPointInTime
{ _rdbitpitSourceDBInstanceIdentifier = p1
, _rdbitpitTargetDBInstanceIdentifier = p2
, _rdbitpitRestoreTime = Nothing
, _rdbitpitUseLatestRestorableTime = Nothing
, _rdbitpitDBInstanceClass = Nothing
, _rdbitpitPort = Nothing
, _rdbitpitAvailabilityZone = Nothing
, _rdbitpitDBSubnetGroupName = Nothing
, _rdbitpitMultiAZ = Nothing
, _rdbitpitPubliclyAccessible = Nothing
, _rdbitpitAutoMinorVersionUpgrade = Nothing
, _rdbitpitLicenseModel = Nothing
, _rdbitpitDBName = Nothing
, _rdbitpitEngine = Nothing
, _rdbitpitIops = Nothing
, _rdbitpitOptionGroupName = Nothing
, _rdbitpitTags = mempty
, _rdbitpitStorageType = Nothing
, _rdbitpitTdeCredentialArn = Nothing
, _rdbitpitTdeCredentialPassword = Nothing
}
rdbitpitAutoMinorVersionUpgrade :: Lens' RestoreDBInstanceToPointInTime (Maybe Bool)
rdbitpitAutoMinorVersionUpgrade =
lens _rdbitpitAutoMinorVersionUpgrade
(\s a -> s { _rdbitpitAutoMinorVersionUpgrade = a })
rdbitpitAvailabilityZone :: Lens' RestoreDBInstanceToPointInTime (Maybe Text)
rdbitpitAvailabilityZone =
lens _rdbitpitAvailabilityZone
(\s a -> s { _rdbitpitAvailabilityZone = a })
rdbitpitDBInstanceClass :: Lens' RestoreDBInstanceToPointInTime (Maybe Text)
rdbitpitDBInstanceClass =
lens _rdbitpitDBInstanceClass (\s a -> s { _rdbitpitDBInstanceClass = a })
rdbitpitDBName :: Lens' RestoreDBInstanceToPointInTime (Maybe Text)
rdbitpitDBName = lens _rdbitpitDBName (\s a -> s { _rdbitpitDBName = a })
rdbitpitDBSubnetGroupName :: Lens' RestoreDBInstanceToPointInTime (Maybe Text)
rdbitpitDBSubnetGroupName =
lens _rdbitpitDBSubnetGroupName
(\s a -> s { _rdbitpitDBSubnetGroupName = a })
rdbitpitEngine :: Lens' RestoreDBInstanceToPointInTime (Maybe Text)
rdbitpitEngine = lens _rdbitpitEngine (\s a -> s { _rdbitpitEngine = a })
rdbitpitIops :: Lens' RestoreDBInstanceToPointInTime (Maybe Int)
rdbitpitIops = lens _rdbitpitIops (\s a -> s { _rdbitpitIops = a })
rdbitpitLicenseModel :: Lens' RestoreDBInstanceToPointInTime (Maybe Text)
rdbitpitLicenseModel =
lens _rdbitpitLicenseModel (\s a -> s { _rdbitpitLicenseModel = a })
rdbitpitMultiAZ :: Lens' RestoreDBInstanceToPointInTime (Maybe Bool)
rdbitpitMultiAZ = lens _rdbitpitMultiAZ (\s a -> s { _rdbitpitMultiAZ = a })
rdbitpitOptionGroupName :: Lens' RestoreDBInstanceToPointInTime (Maybe Text)
rdbitpitOptionGroupName =
lens _rdbitpitOptionGroupName (\s a -> s { _rdbitpitOptionGroupName = a })
rdbitpitPort :: Lens' RestoreDBInstanceToPointInTime (Maybe Int)
rdbitpitPort = lens _rdbitpitPort (\s a -> s { _rdbitpitPort = a })
rdbitpitPubliclyAccessible :: Lens' RestoreDBInstanceToPointInTime (Maybe Bool)
rdbitpitPubliclyAccessible =
lens _rdbitpitPubliclyAccessible
(\s a -> s { _rdbitpitPubliclyAccessible = a })
rdbitpitRestoreTime :: Lens' RestoreDBInstanceToPointInTime (Maybe UTCTime)
rdbitpitRestoreTime =
lens _rdbitpitRestoreTime (\s a -> s { _rdbitpitRestoreTime = a })
. mapping _Time
rdbitpitSourceDBInstanceIdentifier :: Lens' RestoreDBInstanceToPointInTime Text
rdbitpitSourceDBInstanceIdentifier =
lens _rdbitpitSourceDBInstanceIdentifier
(\s a -> s { _rdbitpitSourceDBInstanceIdentifier = a })
rdbitpitStorageType :: Lens' RestoreDBInstanceToPointInTime (Maybe Text)
rdbitpitStorageType =
lens _rdbitpitStorageType (\s a -> s { _rdbitpitStorageType = a })
rdbitpitTags :: Lens' RestoreDBInstanceToPointInTime [Tag]
rdbitpitTags = lens _rdbitpitTags (\s a -> s { _rdbitpitTags = a }) . _List
rdbitpitTargetDBInstanceIdentifier :: Lens' RestoreDBInstanceToPointInTime Text
rdbitpitTargetDBInstanceIdentifier =
lens _rdbitpitTargetDBInstanceIdentifier
(\s a -> s { _rdbitpitTargetDBInstanceIdentifier = a })
rdbitpitTdeCredentialArn :: Lens' RestoreDBInstanceToPointInTime (Maybe Text)
rdbitpitTdeCredentialArn =
lens _rdbitpitTdeCredentialArn
(\s a -> s { _rdbitpitTdeCredentialArn = a })
rdbitpitTdeCredentialPassword :: Lens' RestoreDBInstanceToPointInTime (Maybe Text)
rdbitpitTdeCredentialPassword =
lens _rdbitpitTdeCredentialPassword
(\s a -> s { _rdbitpitTdeCredentialPassword = a })
rdbitpitUseLatestRestorableTime :: Lens' RestoreDBInstanceToPointInTime (Maybe Bool)
rdbitpitUseLatestRestorableTime =
lens _rdbitpitUseLatestRestorableTime
(\s a -> s { _rdbitpitUseLatestRestorableTime = a })
newtype RestoreDBInstanceToPointInTimeResponse = RestoreDBInstanceToPointInTimeResponse
{ _rdbitpitrDBInstance :: Maybe DBInstance
} deriving (Eq, Show)
restoreDBInstanceToPointInTimeResponse :: RestoreDBInstanceToPointInTimeResponse
restoreDBInstanceToPointInTimeResponse = RestoreDBInstanceToPointInTimeResponse
{ _rdbitpitrDBInstance = Nothing
}
rdbitpitrDBInstance :: Lens' RestoreDBInstanceToPointInTimeResponse (Maybe DBInstance)
rdbitpitrDBInstance =
lens _rdbitpitrDBInstance (\s a -> s { _rdbitpitrDBInstance = a })
instance ToPath RestoreDBInstanceToPointInTime where
toPath = const "/"
instance ToQuery RestoreDBInstanceToPointInTime where
toQuery RestoreDBInstanceToPointInTime{..} = mconcat
[ "AutoMinorVersionUpgrade" =? _rdbitpitAutoMinorVersionUpgrade
, "AvailabilityZone" =? _rdbitpitAvailabilityZone
, "DBInstanceClass" =? _rdbitpitDBInstanceClass
, "DBName" =? _rdbitpitDBName
, "DBSubnetGroupName" =? _rdbitpitDBSubnetGroupName
, "Engine" =? _rdbitpitEngine
, "Iops" =? _rdbitpitIops
, "LicenseModel" =? _rdbitpitLicenseModel
, "MultiAZ" =? _rdbitpitMultiAZ
, "OptionGroupName" =? _rdbitpitOptionGroupName
, "Port" =? _rdbitpitPort
, "PubliclyAccessible" =? _rdbitpitPubliclyAccessible
, "RestoreTime" =? _rdbitpitRestoreTime
, "SourceDBInstanceIdentifier" =? _rdbitpitSourceDBInstanceIdentifier
, "StorageType" =? _rdbitpitStorageType
, "Tags" =? _rdbitpitTags
, "TargetDBInstanceIdentifier" =? _rdbitpitTargetDBInstanceIdentifier
, "TdeCredentialArn" =? _rdbitpitTdeCredentialArn
, "TdeCredentialPassword" =? _rdbitpitTdeCredentialPassword
, "UseLatestRestorableTime" =? _rdbitpitUseLatestRestorableTime
]
instance ToHeaders RestoreDBInstanceToPointInTime
instance AWSRequest RestoreDBInstanceToPointInTime where
type Sv RestoreDBInstanceToPointInTime = RDS
type Rs RestoreDBInstanceToPointInTime = RestoreDBInstanceToPointInTimeResponse
request = post "RestoreDBInstanceToPointInTime"
response = xmlResponse
instance FromXML RestoreDBInstanceToPointInTimeResponse where
parseXML = withElement "RestoreDBInstanceToPointInTimeResult" $ \x -> RestoreDBInstanceToPointInTimeResponse
<$> x .@? "DBInstance"