{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
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 :: [Text]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteDashboards
:: DeleteDashboards
deleteDashboards = DeleteDashboards' {_ddDashboardNames = mempty}
ddDashboardNames :: Lens' DeleteDashboards [Text]
ddDashboardNames = lens _ddDashboardNames (\ s a -> s{_ddDashboardNames = a}) . _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" =:
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