{-# 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 #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.OpsWorks.UntagResource -- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- -- Removes tags from a specified stack or layer. -- -- module Network.AWS.OpsWorks.UntagResource ( -- * Creating a Request untagResource , UntagResource -- * Request Lenses , urResourceARN , urTagKeys -- * Destructuring the Response , untagResourceResponse , UntagResourceResponse ) where import Network.AWS.Lens import Network.AWS.OpsWorks.Types import Network.AWS.OpsWorks.Types.Product import Network.AWS.Prelude import Network.AWS.Request import Network.AWS.Response -- | /See:/ 'untagResource' smart constructor. data UntagResource = UntagResource' { _urResourceARN :: !Text , _urTagKeys :: ![Text] } deriving (Eq, Read, Show, Data, Typeable, Generic) -- | Creates a value of 'UntagResource' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'urResourceARN' - The stack or layer's Amazon Resource Number (ARN). -- -- * 'urTagKeys' - A list of the keys of tags to be removed from a stack or layer. untagResource :: Text -- ^ 'urResourceARN' -> UntagResource untagResource pResourceARN_ = UntagResource' {_urResourceARN = pResourceARN_, _urTagKeys = mempty} -- | The stack or layer's Amazon Resource Number (ARN). urResourceARN :: Lens' UntagResource Text urResourceARN = lens _urResourceARN (\ s a -> s{_urResourceARN = a}); -- | A list of the keys of tags to be removed from a stack or layer. urTagKeys :: Lens' UntagResource [Text] urTagKeys = lens _urTagKeys (\ s a -> s{_urTagKeys = a}) . _Coerce; instance AWSRequest UntagResource where type Rs UntagResource = UntagResourceResponse request = postJSON opsWorks response = receiveNull UntagResourceResponse' instance Hashable UntagResource where instance NFData UntagResource where instance ToHeaders UntagResource where toHeaders = const (mconcat ["X-Amz-Target" =# ("OpsWorks_20130218.UntagResource" :: ByteString), "Content-Type" =# ("application/x-amz-json-1.1" :: ByteString)]) instance ToJSON UntagResource where toJSON UntagResource'{..} = object (catMaybes [Just ("ResourceArn" .= _urResourceARN), Just ("TagKeys" .= _urTagKeys)]) instance ToPath UntagResource where toPath = const "/" instance ToQuery UntagResource where toQuery = const mempty -- | /See:/ 'untagResourceResponse' smart constructor. data UntagResourceResponse = UntagResourceResponse' deriving (Eq, Read, Show, Data, Typeable, Generic) -- | Creates a value of 'UntagResourceResponse' with the minimum fields required to make a request. -- untagResourceResponse :: UntagResourceResponse untagResourceResponse = UntagResourceResponse' instance NFData UntagResourceResponse where