{-# 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.EFS.CreateTags
(
createTags
, CreateTags
, ctFileSystemId
, ctTags
, createTagsResponse
, CreateTagsResponse
) where
import Network.AWS.EFS.Types
import Network.AWS.EFS.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data CreateTags = CreateTags'
{ _ctFileSystemId :: !Text
, _ctTags :: ![Tag]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
createTags
:: Text
-> CreateTags
createTags pFileSystemId_ =
CreateTags' {_ctFileSystemId = pFileSystemId_, _ctTags = mempty}
ctFileSystemId :: Lens' CreateTags Text
ctFileSystemId = lens _ctFileSystemId (\ s a -> s{_ctFileSystemId = a})
ctTags :: Lens' CreateTags [Tag]
ctTags = lens _ctTags (\ s a -> s{_ctTags = a}) . _Coerce
instance AWSRequest CreateTags where
type Rs CreateTags = CreateTagsResponse
request = postJSON efs
response = receiveNull CreateTagsResponse'
instance Hashable CreateTags where
instance NFData CreateTags where
instance ToHeaders CreateTags where
toHeaders = const mempty
instance ToJSON CreateTags where
toJSON CreateTags'{..}
= object (catMaybes [Just ("Tags" .= _ctTags)])
instance ToPath CreateTags where
toPath CreateTags'{..}
= mconcat
["/2015-02-01/create-tags/", toBS _ctFileSystemId]
instance ToQuery CreateTags where
toQuery = const mempty
data CreateTagsResponse =
CreateTagsResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
createTagsResponse
:: CreateTagsResponse
createTagsResponse = CreateTagsResponse'
instance NFData CreateTagsResponse where