module Network.AWS.RDS.RestoreDBInstanceFromDBSnapshot
(
RestoreDBInstanceFromDBSnapshot
, restoreDBInstanceFromDBSnapshot
, rdbifdbsAutoMinorVersionUpgrade
, rdbifdbsAvailabilityZone
, rdbifdbsDBInstanceClass
, rdbifdbsDBInstanceIdentifier
, rdbifdbsDBName
, rdbifdbsDBSnapshotIdentifier
, rdbifdbsDBSubnetGroupName
, rdbifdbsEngine
, rdbifdbsIops
, rdbifdbsLicenseModel
, rdbifdbsMultiAZ
, rdbifdbsOptionGroupName
, rdbifdbsPort
, rdbifdbsPubliclyAccessible
, rdbifdbsStorageType
, rdbifdbsTags
, rdbifdbsTdeCredentialArn
, rdbifdbsTdeCredentialPassword
, RestoreDBInstanceFromDBSnapshotResponse
, restoreDBInstanceFromDBSnapshotResponse
, rdbifdbsrDBInstance
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.RDS.Types
import qualified GHC.Exts
data RestoreDBInstanceFromDBSnapshot = RestoreDBInstanceFromDBSnapshot
{ _rdbifdbsAutoMinorVersionUpgrade :: Maybe Bool
, _rdbifdbsAvailabilityZone :: Maybe Text
, _rdbifdbsDBInstanceClass :: Maybe Text
, _rdbifdbsDBInstanceIdentifier :: Text
, _rdbifdbsDBName :: Maybe Text
, _rdbifdbsDBSnapshotIdentifier :: Text
, _rdbifdbsDBSubnetGroupName :: Maybe Text
, _rdbifdbsEngine :: Maybe Text
, _rdbifdbsIops :: Maybe Int
, _rdbifdbsLicenseModel :: Maybe Text
, _rdbifdbsMultiAZ :: Maybe Bool
, _rdbifdbsOptionGroupName :: Maybe Text
, _rdbifdbsPort :: Maybe Int
, _rdbifdbsPubliclyAccessible :: Maybe Bool
, _rdbifdbsStorageType :: Maybe Text
, _rdbifdbsTags :: List "member" Tag
, _rdbifdbsTdeCredentialArn :: Maybe Text
, _rdbifdbsTdeCredentialPassword :: Maybe Text
} deriving (Eq, Show)
restoreDBInstanceFromDBSnapshot :: Text
-> Text
-> RestoreDBInstanceFromDBSnapshot
restoreDBInstanceFromDBSnapshot p1 p2 = RestoreDBInstanceFromDBSnapshot
{ _rdbifdbsDBInstanceIdentifier = p1
, _rdbifdbsDBSnapshotIdentifier = p2
, _rdbifdbsDBInstanceClass = Nothing
, _rdbifdbsPort = Nothing
, _rdbifdbsAvailabilityZone = Nothing
, _rdbifdbsDBSubnetGroupName = Nothing
, _rdbifdbsMultiAZ = Nothing
, _rdbifdbsPubliclyAccessible = Nothing
, _rdbifdbsAutoMinorVersionUpgrade = Nothing
, _rdbifdbsLicenseModel = Nothing
, _rdbifdbsDBName = Nothing
, _rdbifdbsEngine = Nothing
, _rdbifdbsIops = Nothing
, _rdbifdbsOptionGroupName = Nothing
, _rdbifdbsTags = mempty
, _rdbifdbsStorageType = Nothing
, _rdbifdbsTdeCredentialArn = Nothing
, _rdbifdbsTdeCredentialPassword = Nothing
}
rdbifdbsAutoMinorVersionUpgrade :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Bool)
rdbifdbsAutoMinorVersionUpgrade =
lens _rdbifdbsAutoMinorVersionUpgrade
(\s a -> s { _rdbifdbsAutoMinorVersionUpgrade = a })
rdbifdbsAvailabilityZone :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Text)
rdbifdbsAvailabilityZone =
lens _rdbifdbsAvailabilityZone
(\s a -> s { _rdbifdbsAvailabilityZone = a })
rdbifdbsDBInstanceClass :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Text)
rdbifdbsDBInstanceClass =
lens _rdbifdbsDBInstanceClass (\s a -> s { _rdbifdbsDBInstanceClass = a })
rdbifdbsDBInstanceIdentifier :: Lens' RestoreDBInstanceFromDBSnapshot Text
rdbifdbsDBInstanceIdentifier =
lens _rdbifdbsDBInstanceIdentifier
(\s a -> s { _rdbifdbsDBInstanceIdentifier = a })
rdbifdbsDBName :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Text)
rdbifdbsDBName = lens _rdbifdbsDBName (\s a -> s { _rdbifdbsDBName = a })
rdbifdbsDBSnapshotIdentifier :: Lens' RestoreDBInstanceFromDBSnapshot Text
rdbifdbsDBSnapshotIdentifier =
lens _rdbifdbsDBSnapshotIdentifier
(\s a -> s { _rdbifdbsDBSnapshotIdentifier = a })
rdbifdbsDBSubnetGroupName :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Text)
rdbifdbsDBSubnetGroupName =
lens _rdbifdbsDBSubnetGroupName
(\s a -> s { _rdbifdbsDBSubnetGroupName = a })
rdbifdbsEngine :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Text)
rdbifdbsEngine = lens _rdbifdbsEngine (\s a -> s { _rdbifdbsEngine = a })
rdbifdbsIops :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Int)
rdbifdbsIops = lens _rdbifdbsIops (\s a -> s { _rdbifdbsIops = a })
rdbifdbsLicenseModel :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Text)
rdbifdbsLicenseModel =
lens _rdbifdbsLicenseModel (\s a -> s { _rdbifdbsLicenseModel = a })
rdbifdbsMultiAZ :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Bool)
rdbifdbsMultiAZ = lens _rdbifdbsMultiAZ (\s a -> s { _rdbifdbsMultiAZ = a })
rdbifdbsOptionGroupName :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Text)
rdbifdbsOptionGroupName =
lens _rdbifdbsOptionGroupName (\s a -> s { _rdbifdbsOptionGroupName = a })
rdbifdbsPort :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Int)
rdbifdbsPort = lens _rdbifdbsPort (\s a -> s { _rdbifdbsPort = a })
rdbifdbsPubliclyAccessible :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Bool)
rdbifdbsPubliclyAccessible =
lens _rdbifdbsPubliclyAccessible
(\s a -> s { _rdbifdbsPubliclyAccessible = a })
rdbifdbsStorageType :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Text)
rdbifdbsStorageType =
lens _rdbifdbsStorageType (\s a -> s { _rdbifdbsStorageType = a })
rdbifdbsTags :: Lens' RestoreDBInstanceFromDBSnapshot [Tag]
rdbifdbsTags = lens _rdbifdbsTags (\s a -> s { _rdbifdbsTags = a }) . _List
rdbifdbsTdeCredentialArn :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Text)
rdbifdbsTdeCredentialArn =
lens _rdbifdbsTdeCredentialArn
(\s a -> s { _rdbifdbsTdeCredentialArn = a })
rdbifdbsTdeCredentialPassword :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Text)
rdbifdbsTdeCredentialPassword =
lens _rdbifdbsTdeCredentialPassword
(\s a -> s { _rdbifdbsTdeCredentialPassword = a })
newtype RestoreDBInstanceFromDBSnapshotResponse = RestoreDBInstanceFromDBSnapshotResponse
{ _rdbifdbsrDBInstance :: Maybe DBInstance
} deriving (Eq, Show)
restoreDBInstanceFromDBSnapshotResponse :: RestoreDBInstanceFromDBSnapshotResponse
restoreDBInstanceFromDBSnapshotResponse = RestoreDBInstanceFromDBSnapshotResponse
{ _rdbifdbsrDBInstance = Nothing
}
rdbifdbsrDBInstance :: Lens' RestoreDBInstanceFromDBSnapshotResponse (Maybe DBInstance)
rdbifdbsrDBInstance =
lens _rdbifdbsrDBInstance (\s a -> s { _rdbifdbsrDBInstance = a })
instance ToPath RestoreDBInstanceFromDBSnapshot where
toPath = const "/"
instance ToQuery RestoreDBInstanceFromDBSnapshot where
toQuery RestoreDBInstanceFromDBSnapshot{..} = mconcat
[ "AutoMinorVersionUpgrade" =? _rdbifdbsAutoMinorVersionUpgrade
, "AvailabilityZone" =? _rdbifdbsAvailabilityZone
, "DBInstanceClass" =? _rdbifdbsDBInstanceClass
, "DBInstanceIdentifier" =? _rdbifdbsDBInstanceIdentifier
, "DBName" =? _rdbifdbsDBName
, "DBSnapshotIdentifier" =? _rdbifdbsDBSnapshotIdentifier
, "DBSubnetGroupName" =? _rdbifdbsDBSubnetGroupName
, "Engine" =? _rdbifdbsEngine
, "Iops" =? _rdbifdbsIops
, "LicenseModel" =? _rdbifdbsLicenseModel
, "MultiAZ" =? _rdbifdbsMultiAZ
, "OptionGroupName" =? _rdbifdbsOptionGroupName
, "Port" =? _rdbifdbsPort
, "PubliclyAccessible" =? _rdbifdbsPubliclyAccessible
, "StorageType" =? _rdbifdbsStorageType
, "Tags" =? _rdbifdbsTags
, "TdeCredentialArn" =? _rdbifdbsTdeCredentialArn
, "TdeCredentialPassword" =? _rdbifdbsTdeCredentialPassword
]
instance ToHeaders RestoreDBInstanceFromDBSnapshot
instance AWSRequest RestoreDBInstanceFromDBSnapshot where
type Sv RestoreDBInstanceFromDBSnapshot = RDS
type Rs RestoreDBInstanceFromDBSnapshot = RestoreDBInstanceFromDBSnapshotResponse
request = post "RestoreDBInstanceFromDBSnapshot"
response = xmlResponse
instance FromXML RestoreDBInstanceFromDBSnapshotResponse where
parseXML = withElement "RestoreDBInstanceFromDBSnapshotResult" $ \x -> RestoreDBInstanceFromDBSnapshotResponse
<$> x .@? "DBInstance"