module Network.AWS.CloudWatch.DeleteDashboards
(
deleteDashboards
, DeleteDashboards
, ddDashboardNames
, deleteDashboardsResponse
, DeleteDashboardsResponse
, ddrsResponseStatus
) where
import Network.AWS.CloudWatch.Types
import Network.AWS.CloudWatch.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteDashboards = DeleteDashboards'
{ _ddDashboardNames :: Maybe [Text]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteDashboards
:: DeleteDashboards
deleteDashboards = DeleteDashboards' {_ddDashboardNames = Nothing}
ddDashboardNames :: Lens' DeleteDashboards [Text]
ddDashboardNames = lens _ddDashboardNames (\ s a -> s{_ddDashboardNames = a}) . _Default . _Coerce;
instance AWSRequest DeleteDashboards where
type Rs DeleteDashboards = DeleteDashboardsResponse
request = postQuery cloudWatch
response
= receiveXMLWrapper "DeleteDashboardsResult"
(\ s h x ->
DeleteDashboardsResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteDashboards where
instance NFData DeleteDashboards where
instance ToHeaders DeleteDashboards where
toHeaders = const mempty
instance ToPath DeleteDashboards where
toPath = const "/"
instance ToQuery DeleteDashboards where
toQuery DeleteDashboards'{..}
= mconcat
["Action" =: ("DeleteDashboards" :: ByteString),
"Version" =: ("2010-08-01" :: ByteString),
"DashboardNames" =:
toQuery (toQueryList "member" <$> _ddDashboardNames)]
newtype DeleteDashboardsResponse = DeleteDashboardsResponse'
{ _ddrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteDashboardsResponse
:: Int
-> DeleteDashboardsResponse
deleteDashboardsResponse pResponseStatus_ =
DeleteDashboardsResponse' {_ddrsResponseStatus = pResponseStatus_}
ddrsResponseStatus :: Lens' DeleteDashboardsResponse Int
ddrsResponseStatus = lens _ddrsResponseStatus (\ s a -> s{_ddrsResponseStatus = a});
instance NFData DeleteDashboardsResponse where