module Network.AWS.RDS.DescribeDBClusterSnapshots
(
describeDBClusterSnapshots
, DescribeDBClusterSnapshots
, ddbcsDBClusterIdentifier
, ddbcsDBClusterSnapshotIdentifier
, ddbcsFilters
, ddbcsSnapshotType
, ddbcsMaxRecords
, ddbcsMarker
, describeDBClusterSnapshotsResponse
, DescribeDBClusterSnapshotsResponse
, ddbcsrsMarker
, ddbcsrsDBClusterSnapshots
, ddbcsrsStatus
) 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 DescribeDBClusterSnapshots = DescribeDBClusterSnapshots'
{ _ddbcsDBClusterIdentifier :: !(Maybe Text)
, _ddbcsDBClusterSnapshotIdentifier :: !(Maybe Text)
, _ddbcsFilters :: !(Maybe [Filter])
, _ddbcsSnapshotType :: !(Maybe Text)
, _ddbcsMaxRecords :: !(Maybe Int)
, _ddbcsMarker :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeDBClusterSnapshots
:: DescribeDBClusterSnapshots
describeDBClusterSnapshots =
DescribeDBClusterSnapshots'
{ _ddbcsDBClusterIdentifier = Nothing
, _ddbcsDBClusterSnapshotIdentifier = Nothing
, _ddbcsFilters = Nothing
, _ddbcsSnapshotType = Nothing
, _ddbcsMaxRecords = Nothing
, _ddbcsMarker = Nothing
}
ddbcsDBClusterIdentifier :: Lens' DescribeDBClusterSnapshots (Maybe Text)
ddbcsDBClusterIdentifier = lens _ddbcsDBClusterIdentifier (\ s a -> s{_ddbcsDBClusterIdentifier = a});
ddbcsDBClusterSnapshotIdentifier :: Lens' DescribeDBClusterSnapshots (Maybe Text)
ddbcsDBClusterSnapshotIdentifier = lens _ddbcsDBClusterSnapshotIdentifier (\ s a -> s{_ddbcsDBClusterSnapshotIdentifier = a});
ddbcsFilters :: Lens' DescribeDBClusterSnapshots [Filter]
ddbcsFilters = lens _ddbcsFilters (\ s a -> s{_ddbcsFilters = a}) . _Default . _Coerce;
ddbcsSnapshotType :: Lens' DescribeDBClusterSnapshots (Maybe Text)
ddbcsSnapshotType = lens _ddbcsSnapshotType (\ s a -> s{_ddbcsSnapshotType = a});
ddbcsMaxRecords :: Lens' DescribeDBClusterSnapshots (Maybe Int)
ddbcsMaxRecords = lens _ddbcsMaxRecords (\ s a -> s{_ddbcsMaxRecords = a});
ddbcsMarker :: Lens' DescribeDBClusterSnapshots (Maybe Text)
ddbcsMarker = lens _ddbcsMarker (\ s a -> s{_ddbcsMarker = a});
instance AWSRequest DescribeDBClusterSnapshots where
type Sv DescribeDBClusterSnapshots = RDS
type Rs DescribeDBClusterSnapshots =
DescribeDBClusterSnapshotsResponse
request = postQuery
response
= receiveXMLWrapper
"DescribeDBClusterSnapshotsResult"
(\ s h x ->
DescribeDBClusterSnapshotsResponse' <$>
(x .@? "Marker") <*>
(x .@? "DBClusterSnapshots" .!@ mempty >>=
may (parseXMLList "DBClusterSnapshot"))
<*> (pure (fromEnum s)))
instance ToHeaders DescribeDBClusterSnapshots where
toHeaders = const mempty
instance ToPath DescribeDBClusterSnapshots where
toPath = const "/"
instance ToQuery DescribeDBClusterSnapshots where
toQuery DescribeDBClusterSnapshots'{..}
= mconcat
["Action" =:
("DescribeDBClusterSnapshots" :: ByteString),
"Version" =: ("2014-10-31" :: ByteString),
"DBClusterIdentifier" =: _ddbcsDBClusterIdentifier,
"DBClusterSnapshotIdentifier" =:
_ddbcsDBClusterSnapshotIdentifier,
"Filters" =:
toQuery (toQueryList "Filter" <$> _ddbcsFilters),
"SnapshotType" =: _ddbcsSnapshotType,
"MaxRecords" =: _ddbcsMaxRecords,
"Marker" =: _ddbcsMarker]
data DescribeDBClusterSnapshotsResponse = DescribeDBClusterSnapshotsResponse'
{ _ddbcsrsMarker :: !(Maybe Text)
, _ddbcsrsDBClusterSnapshots :: !(Maybe [DBClusterSnapshot])
, _ddbcsrsStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeDBClusterSnapshotsResponse
:: Int
-> DescribeDBClusterSnapshotsResponse
describeDBClusterSnapshotsResponse pStatus_ =
DescribeDBClusterSnapshotsResponse'
{ _ddbcsrsMarker = Nothing
, _ddbcsrsDBClusterSnapshots = Nothing
, _ddbcsrsStatus = pStatus_
}
ddbcsrsMarker :: Lens' DescribeDBClusterSnapshotsResponse (Maybe Text)
ddbcsrsMarker = lens _ddbcsrsMarker (\ s a -> s{_ddbcsrsMarker = a});
ddbcsrsDBClusterSnapshots :: Lens' DescribeDBClusterSnapshotsResponse [DBClusterSnapshot]
ddbcsrsDBClusterSnapshots = lens _ddbcsrsDBClusterSnapshots (\ s a -> s{_ddbcsrsDBClusterSnapshots = a}) . _Default . _Coerce;
ddbcsrsStatus :: Lens' DescribeDBClusterSnapshotsResponse Int
ddbcsrsStatus = lens _ddbcsrsStatus (\ s a -> s{_ddbcsrsStatus = a});