{-# 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.AutoScaling.CreateOrUpdateTags
(
createOrUpdateTags
, CreateOrUpdateTags
, coutTags
, createOrUpdateTagsResponse
, CreateOrUpdateTagsResponse
) where
import Network.AWS.AutoScaling.Types
import Network.AWS.AutoScaling.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype CreateOrUpdateTags = CreateOrUpdateTags'
{ _coutTags :: [Tag]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
createOrUpdateTags
:: CreateOrUpdateTags
createOrUpdateTags = CreateOrUpdateTags' {_coutTags = mempty}
coutTags :: Lens' CreateOrUpdateTags [Tag]
coutTags = lens _coutTags (\ s a -> s{_coutTags = a}) . _Coerce
instance AWSRequest CreateOrUpdateTags where
type Rs CreateOrUpdateTags =
CreateOrUpdateTagsResponse
request = postQuery autoScaling
response = receiveNull CreateOrUpdateTagsResponse'
instance Hashable CreateOrUpdateTags where
instance NFData CreateOrUpdateTags where
instance ToHeaders CreateOrUpdateTags where
toHeaders = const mempty
instance ToPath CreateOrUpdateTags where
toPath = const "/"
instance ToQuery CreateOrUpdateTags where
toQuery CreateOrUpdateTags'{..}
= mconcat
["Action" =: ("CreateOrUpdateTags" :: ByteString),
"Version" =: ("2011-01-01" :: ByteString),
"Tags" =: toQueryList "member" _coutTags]
data CreateOrUpdateTagsResponse =
CreateOrUpdateTagsResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
createOrUpdateTagsResponse
:: CreateOrUpdateTagsResponse
createOrUpdateTagsResponse = CreateOrUpdateTagsResponse'
instance NFData CreateOrUpdateTagsResponse where