module Network.AWS.CloudWatchLogs.DeleteLogStream
(
DeleteLogStream
, deleteLogStream
, dlsLogGroupName
, dlsLogStreamName
, DeleteLogStreamResponse
, deleteLogStreamResponse
) where
import Network.AWS.Prelude
import Network.AWS.Request.JSON
import Network.AWS.CloudWatchLogs.Types
import qualified GHC.Exts
data DeleteLogStream = DeleteLogStream
{ _dlsLogGroupName :: Text
, _dlsLogStreamName :: Text
} deriving (Eq, Ord, Show)
deleteLogStream :: Text
-> Text
-> DeleteLogStream
deleteLogStream p1 p2 = DeleteLogStream
{ _dlsLogGroupName = p1
, _dlsLogStreamName = p2
}
dlsLogGroupName :: Lens' DeleteLogStream Text
dlsLogGroupName = lens _dlsLogGroupName (\s a -> s { _dlsLogGroupName = a })
dlsLogStreamName :: Lens' DeleteLogStream Text
dlsLogStreamName = lens _dlsLogStreamName (\s a -> s { _dlsLogStreamName = a })
data DeleteLogStreamResponse = DeleteLogStreamResponse
deriving (Eq, Ord, Show, Generic)
deleteLogStreamResponse :: DeleteLogStreamResponse
deleteLogStreamResponse = DeleteLogStreamResponse
instance ToPath DeleteLogStream where
toPath = const "/"
instance ToQuery DeleteLogStream where
toQuery = const mempty
instance ToHeaders DeleteLogStream
instance ToJSON DeleteLogStream where
toJSON DeleteLogStream{..} = object
[ "logGroupName" .= _dlsLogGroupName
, "logStreamName" .= _dlsLogStreamName
]
instance AWSRequest DeleteLogStream where
type Sv DeleteLogStream = CloudWatchLogs
type Rs DeleteLogStream = DeleteLogStreamResponse
request = post "DeleteLogStream"
response = nullResponse DeleteLogStreamResponse