{-# 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.DirectConnect.UntagResource -- Copyright : (c) 2013-2018 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- -- Removes one or more tags from the specified Direct Connect resource. -- -- module Network.AWS.DirectConnect.UntagResource ( -- * Creating a Request untagResource , UntagResource -- * Request Lenses , urResourceARN , urTagKeys -- * Destructuring the Response , untagResourceResponse , UntagResourceResponse -- * Response Lenses , urrsResponseStatus ) where import Network.AWS.DirectConnect.Types import Network.AWS.DirectConnect.Types.Product import Network.AWS.Lens import Network.AWS.Prelude import Network.AWS.Request import Network.AWS.Response -- | Container for the parameters to the UntagResource operation. -- -- -- -- /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 Amazon Resource Name (ARN) of the Direct Connect resource. -- -- * 'urTagKeys' - The list of tag keys to remove. untagResource :: Text -- ^ 'urResourceARN' -> UntagResource untagResource pResourceARN_ = UntagResource' {_urResourceARN = pResourceARN_, _urTagKeys = mempty} -- | The Amazon Resource Name (ARN) of the Direct Connect resource. urResourceARN :: Lens' UntagResource Text urResourceARN = lens _urResourceARN (\ s a -> s{_urResourceARN = a}) -- | The list of tag keys to remove. urTagKeys :: Lens' UntagResource [Text] urTagKeys = lens _urTagKeys (\ s a -> s{_urTagKeys = a}) . _Coerce instance AWSRequest UntagResource where type Rs UntagResource = UntagResourceResponse request = postJSON directConnect response = receiveEmpty (\ s h x -> UntagResourceResponse' <$> (pure (fromEnum s))) instance Hashable UntagResource where instance NFData UntagResource where instance ToHeaders UntagResource where toHeaders = const (mconcat ["X-Amz-Target" =# ("OvertureService.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 -- | The response received when UntagResource is called. -- -- -- -- /See:/ 'untagResourceResponse' smart constructor. newtype UntagResourceResponse = UntagResourceResponse' { _urrsResponseStatus :: Int } deriving (Eq, Read, Show, Data, Typeable, Generic) -- | Creates a value of 'UntagResourceResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'urrsResponseStatus' - -- | The response status code. untagResourceResponse :: Int -- ^ 'urrsResponseStatus' -> UntagResourceResponse untagResourceResponse pResponseStatus_ = UntagResourceResponse' {_urrsResponseStatus = pResponseStatus_} -- | -- | The response status code. urrsResponseStatus :: Lens' UntagResourceResponse Int urrsResponseStatus = lens _urrsResponseStatus (\ s a -> s{_urrsResponseStatus = a}) instance NFData UntagResourceResponse where