module Network.AWS.RDS.RestoreDBInstanceFromDBSnapshot
(
restoreDBInstanceFromDBSnapshot
, RestoreDBInstanceFromDBSnapshot
, rdifdsDBSecurityGroups
, rdifdsAutoMinorVersionUpgrade
, rdifdsPubliclyAccessible
, rdifdsDBSubnetGroupName
, rdifdsIOPS
, rdifdsDomain
, rdifdsEngine
, rdifdsTDECredentialPassword
, rdifdsDBInstanceClass
, rdifdsLicenseModel
, rdifdsAvailabilityZone
, rdifdsVPCSecurityGroupIds
, rdifdsMultiAZ
, rdifdsTDECredentialARN
, rdifdsOptionGroupName
, rdifdsCopyTagsToSnapshot
, rdifdsDBName
, rdifdsTags
, rdifdsPort
, rdifdsStorageType
, rdifdsDBInstanceIdentifier
, rdifdsDBSnapshotIdentifier
, restoreDBInstanceFromDBSnapshotResponse
, RestoreDBInstanceFromDBSnapshotResponse
, rdifdsrsDBInstance
, rdifdsrsStatus
) 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 RestoreDBInstanceFromDBSnapshot = RestoreDBInstanceFromDBSnapshot'
{ _rdifdsDBSecurityGroups :: !(Maybe [Text])
, _rdifdsAutoMinorVersionUpgrade :: !(Maybe Bool)
, _rdifdsPubliclyAccessible :: !(Maybe Bool)
, _rdifdsDBSubnetGroupName :: !(Maybe Text)
, _rdifdsIOPS :: !(Maybe Int)
, _rdifdsDomain :: !(Maybe Text)
, _rdifdsEngine :: !(Maybe Text)
, _rdifdsTDECredentialPassword :: !(Maybe Text)
, _rdifdsDBInstanceClass :: !(Maybe Text)
, _rdifdsLicenseModel :: !(Maybe Text)
, _rdifdsAvailabilityZone :: !(Maybe Text)
, _rdifdsVPCSecurityGroupIds :: !(Maybe [Text])
, _rdifdsMultiAZ :: !(Maybe Bool)
, _rdifdsTDECredentialARN :: !(Maybe Text)
, _rdifdsOptionGroupName :: !(Maybe Text)
, _rdifdsCopyTagsToSnapshot :: !(Maybe Bool)
, _rdifdsDBName :: !(Maybe Text)
, _rdifdsTags :: !(Maybe [Tag])
, _rdifdsPort :: !(Maybe Int)
, _rdifdsStorageType :: !(Maybe Text)
, _rdifdsDBInstanceIdentifier :: !Text
, _rdifdsDBSnapshotIdentifier :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
restoreDBInstanceFromDBSnapshot
:: Text
-> Text
-> RestoreDBInstanceFromDBSnapshot
restoreDBInstanceFromDBSnapshot pDBInstanceIdentifier_ pDBSnapshotIdentifier_ =
RestoreDBInstanceFromDBSnapshot'
{ _rdifdsDBSecurityGroups = Nothing
, _rdifdsAutoMinorVersionUpgrade = Nothing
, _rdifdsPubliclyAccessible = Nothing
, _rdifdsDBSubnetGroupName = Nothing
, _rdifdsIOPS = Nothing
, _rdifdsDomain = Nothing
, _rdifdsEngine = Nothing
, _rdifdsTDECredentialPassword = Nothing
, _rdifdsDBInstanceClass = Nothing
, _rdifdsLicenseModel = Nothing
, _rdifdsAvailabilityZone = Nothing
, _rdifdsVPCSecurityGroupIds = Nothing
, _rdifdsMultiAZ = Nothing
, _rdifdsTDECredentialARN = Nothing
, _rdifdsOptionGroupName = Nothing
, _rdifdsCopyTagsToSnapshot = Nothing
, _rdifdsDBName = Nothing
, _rdifdsTags = Nothing
, _rdifdsPort = Nothing
, _rdifdsStorageType = Nothing
, _rdifdsDBInstanceIdentifier = pDBInstanceIdentifier_
, _rdifdsDBSnapshotIdentifier = pDBSnapshotIdentifier_
}
rdifdsDBSecurityGroups :: Lens' RestoreDBInstanceFromDBSnapshot [Text]
rdifdsDBSecurityGroups = lens _rdifdsDBSecurityGroups (\ s a -> s{_rdifdsDBSecurityGroups = a}) . _Default . _Coerce;
rdifdsAutoMinorVersionUpgrade :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Bool)
rdifdsAutoMinorVersionUpgrade = lens _rdifdsAutoMinorVersionUpgrade (\ s a -> s{_rdifdsAutoMinorVersionUpgrade = a});
rdifdsPubliclyAccessible :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Bool)
rdifdsPubliclyAccessible = lens _rdifdsPubliclyAccessible (\ s a -> s{_rdifdsPubliclyAccessible = a});
rdifdsDBSubnetGroupName :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Text)
rdifdsDBSubnetGroupName = lens _rdifdsDBSubnetGroupName (\ s a -> s{_rdifdsDBSubnetGroupName = a});
rdifdsIOPS :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Int)
rdifdsIOPS = lens _rdifdsIOPS (\ s a -> s{_rdifdsIOPS = a});
rdifdsDomain :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Text)
rdifdsDomain = lens _rdifdsDomain (\ s a -> s{_rdifdsDomain = a});
rdifdsEngine :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Text)
rdifdsEngine = lens _rdifdsEngine (\ s a -> s{_rdifdsEngine = a});
rdifdsTDECredentialPassword :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Text)
rdifdsTDECredentialPassword = lens _rdifdsTDECredentialPassword (\ s a -> s{_rdifdsTDECredentialPassword = a});
rdifdsDBInstanceClass :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Text)
rdifdsDBInstanceClass = lens _rdifdsDBInstanceClass (\ s a -> s{_rdifdsDBInstanceClass = a});
rdifdsLicenseModel :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Text)
rdifdsLicenseModel = lens _rdifdsLicenseModel (\ s a -> s{_rdifdsLicenseModel = a});
rdifdsAvailabilityZone :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Text)
rdifdsAvailabilityZone = lens _rdifdsAvailabilityZone (\ s a -> s{_rdifdsAvailabilityZone = a});
rdifdsVPCSecurityGroupIds :: Lens' RestoreDBInstanceFromDBSnapshot [Text]
rdifdsVPCSecurityGroupIds = lens _rdifdsVPCSecurityGroupIds (\ s a -> s{_rdifdsVPCSecurityGroupIds = a}) . _Default . _Coerce;
rdifdsMultiAZ :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Bool)
rdifdsMultiAZ = lens _rdifdsMultiAZ (\ s a -> s{_rdifdsMultiAZ = a});
rdifdsTDECredentialARN :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Text)
rdifdsTDECredentialARN = lens _rdifdsTDECredentialARN (\ s a -> s{_rdifdsTDECredentialARN = a});
rdifdsOptionGroupName :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Text)
rdifdsOptionGroupName = lens _rdifdsOptionGroupName (\ s a -> s{_rdifdsOptionGroupName = a});
rdifdsCopyTagsToSnapshot :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Bool)
rdifdsCopyTagsToSnapshot = lens _rdifdsCopyTagsToSnapshot (\ s a -> s{_rdifdsCopyTagsToSnapshot = a});
rdifdsDBName :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Text)
rdifdsDBName = lens _rdifdsDBName (\ s a -> s{_rdifdsDBName = a});
rdifdsTags :: Lens' RestoreDBInstanceFromDBSnapshot [Tag]
rdifdsTags = lens _rdifdsTags (\ s a -> s{_rdifdsTags = a}) . _Default . _Coerce;
rdifdsPort :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Int)
rdifdsPort = lens _rdifdsPort (\ s a -> s{_rdifdsPort = a});
rdifdsStorageType :: Lens' RestoreDBInstanceFromDBSnapshot (Maybe Text)
rdifdsStorageType = lens _rdifdsStorageType (\ s a -> s{_rdifdsStorageType = a});
rdifdsDBInstanceIdentifier :: Lens' RestoreDBInstanceFromDBSnapshot Text
rdifdsDBInstanceIdentifier = lens _rdifdsDBInstanceIdentifier (\ s a -> s{_rdifdsDBInstanceIdentifier = a});
rdifdsDBSnapshotIdentifier :: Lens' RestoreDBInstanceFromDBSnapshot Text
rdifdsDBSnapshotIdentifier = lens _rdifdsDBSnapshotIdentifier (\ s a -> s{_rdifdsDBSnapshotIdentifier = a});
instance AWSRequest RestoreDBInstanceFromDBSnapshot
where
type Sv RestoreDBInstanceFromDBSnapshot = RDS
type Rs RestoreDBInstanceFromDBSnapshot =
RestoreDBInstanceFromDBSnapshotResponse
request = postQuery
response
= receiveXMLWrapper
"RestoreDBInstanceFromDBSnapshotResult"
(\ s h x ->
RestoreDBInstanceFromDBSnapshotResponse' <$>
(x .@? "DBInstance") <*> (pure (fromEnum s)))
instance ToHeaders RestoreDBInstanceFromDBSnapshot
where
toHeaders = const mempty
instance ToPath RestoreDBInstanceFromDBSnapshot where
toPath = const "/"
instance ToQuery RestoreDBInstanceFromDBSnapshot
where
toQuery RestoreDBInstanceFromDBSnapshot'{..}
= mconcat
["Action" =:
("RestoreDBInstanceFromDBSnapshot" :: ByteString),
"Version" =: ("2014-10-31" :: ByteString),
"DBSecurityGroups" =:
toQuery
(toQueryList "DBSecurityGroupName" <$>
_rdifdsDBSecurityGroups),
"AutoMinorVersionUpgrade" =:
_rdifdsAutoMinorVersionUpgrade,
"PubliclyAccessible" =: _rdifdsPubliclyAccessible,
"DBSubnetGroupName" =: _rdifdsDBSubnetGroupName,
"Iops" =: _rdifdsIOPS, "Domain" =: _rdifdsDomain,
"Engine" =: _rdifdsEngine,
"TdeCredentialPassword" =:
_rdifdsTDECredentialPassword,
"DBInstanceClass" =: _rdifdsDBInstanceClass,
"LicenseModel" =: _rdifdsLicenseModel,
"AvailabilityZone" =: _rdifdsAvailabilityZone,
"VpcSecurityGroupIds" =:
toQuery
(toQueryList "VpcSecurityGroupId" <$>
_rdifdsVPCSecurityGroupIds),
"MultiAZ" =: _rdifdsMultiAZ,
"TdeCredentialArn" =: _rdifdsTDECredentialARN,
"OptionGroupName" =: _rdifdsOptionGroupName,
"CopyTagsToSnapshot" =: _rdifdsCopyTagsToSnapshot,
"DBName" =: _rdifdsDBName,
"Tags" =:
toQuery (toQueryList "Tag" <$> _rdifdsTags),
"Port" =: _rdifdsPort,
"StorageType" =: _rdifdsStorageType,
"DBInstanceIdentifier" =:
_rdifdsDBInstanceIdentifier,
"DBSnapshotIdentifier" =:
_rdifdsDBSnapshotIdentifier]
data RestoreDBInstanceFromDBSnapshotResponse = RestoreDBInstanceFromDBSnapshotResponse'
{ _rdifdsrsDBInstance :: !(Maybe DBInstance)
, _rdifdsrsStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
restoreDBInstanceFromDBSnapshotResponse
:: Int
-> RestoreDBInstanceFromDBSnapshotResponse
restoreDBInstanceFromDBSnapshotResponse pStatus_ =
RestoreDBInstanceFromDBSnapshotResponse'
{ _rdifdsrsDBInstance = Nothing
, _rdifdsrsStatus = pStatus_
}
rdifdsrsDBInstance :: Lens' RestoreDBInstanceFromDBSnapshotResponse (Maybe DBInstance)
rdifdsrsDBInstance = lens _rdifdsrsDBInstance (\ s a -> s{_rdifdsrsDBInstance = a});
rdifdsrsStatus :: Lens' RestoreDBInstanceFromDBSnapshotResponse Int
rdifdsrsStatus = lens _rdifdsrsStatus (\ s a -> s{_rdifdsrsStatus = a});