{-# 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.Route53.UpdateHostedZoneComment -- Copyright : (c) 2013-2016 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- -- Updates the hosted zone comment. Send a 'POST' request to the '\/2013-04-01\/hostedzone\/hosted zone ID ' resource. module Network.AWS.Route53.UpdateHostedZoneComment ( -- * Creating a Request updateHostedZoneComment , UpdateHostedZoneComment -- * Request Lenses , uhzcComment , uhzcId -- * Destructuring the Response , updateHostedZoneCommentResponse , UpdateHostedZoneCommentResponse -- * Response Lenses , uhzcrsResponseStatus , uhzcrsHostedZone ) where import Network.AWS.Lens import Network.AWS.Prelude import Network.AWS.Request import Network.AWS.Response import Network.AWS.Route53.Types import Network.AWS.Route53.Types.Product -- | A complex type that contains the hosted zone request information. -- -- /See:/ 'updateHostedZoneComment' smart constructor. data UpdateHostedZoneComment = UpdateHostedZoneComment' { _uhzcComment :: !(Maybe Text) , _uhzcId :: !Text } deriving (Eq,Read,Show,Data,Typeable,Generic) -- | Creates a value of 'UpdateHostedZoneComment' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'uhzcComment' -- -- * 'uhzcId' updateHostedZoneComment :: Text -- ^ 'uhzcId' -> UpdateHostedZoneComment updateHostedZoneComment pId_ = UpdateHostedZoneComment' { _uhzcComment = Nothing , _uhzcId = pId_ } -- | The new comment for the hosted zone. If you don\'t specify a value for 'Comment', Amazon Route 53 deletes the existing value of the 'Comment' element, if any. uhzcComment :: Lens' UpdateHostedZoneComment (Maybe Text) uhzcComment = lens _uhzcComment (\ s a -> s{_uhzcComment = a}); -- | The ID for the hosted zone for which you want to update the comment. uhzcId :: Lens' UpdateHostedZoneComment Text uhzcId = lens _uhzcId (\ s a -> s{_uhzcId = a}); instance AWSRequest UpdateHostedZoneComment where type Rs UpdateHostedZoneComment = UpdateHostedZoneCommentResponse request = postXML route53 response = receiveXML (\ s h x -> UpdateHostedZoneCommentResponse' <$> (pure (fromEnum s)) <*> (x .@ "HostedZone")) instance Hashable UpdateHostedZoneComment instance NFData UpdateHostedZoneComment instance ToElement UpdateHostedZoneComment where toElement = mkElement "{https://route53.amazonaws.com/doc/2013-04-01/}UpdateHostedZoneCommentRequest" instance ToHeaders UpdateHostedZoneComment where toHeaders = const mempty instance ToPath UpdateHostedZoneComment where toPath UpdateHostedZoneComment'{..} = mconcat ["/2013-04-01/hostedzone/", toBS _uhzcId] instance ToQuery UpdateHostedZoneComment where toQuery = const mempty instance ToXML UpdateHostedZoneComment where toXML UpdateHostedZoneComment'{..} = mconcat ["Comment" @= _uhzcComment] -- | A complex type that contains the response to the UpdateHostedZoneCommentRequest. -- -- /See:/ 'updateHostedZoneCommentResponse' smart constructor. data UpdateHostedZoneCommentResponse = UpdateHostedZoneCommentResponse' { _uhzcrsResponseStatus :: !Int , _uhzcrsHostedZone :: !HostedZone } deriving (Eq,Read,Show,Data,Typeable,Generic) -- | Creates a value of 'UpdateHostedZoneCommentResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'uhzcrsResponseStatus' -- -- * 'uhzcrsHostedZone' updateHostedZoneCommentResponse :: Int -- ^ 'uhzcrsResponseStatus' -> HostedZone -- ^ 'uhzcrsHostedZone' -> UpdateHostedZoneCommentResponse updateHostedZoneCommentResponse pResponseStatus_ pHostedZone_ = UpdateHostedZoneCommentResponse' { _uhzcrsResponseStatus = pResponseStatus_ , _uhzcrsHostedZone = pHostedZone_ } -- | The response status code. uhzcrsResponseStatus :: Lens' UpdateHostedZoneCommentResponse Int uhzcrsResponseStatus = lens _uhzcrsResponseStatus (\ s a -> s{_uhzcrsResponseStatus = a}); -- | Undocumented member. uhzcrsHostedZone :: Lens' UpdateHostedZoneCommentResponse HostedZone uhzcrsHostedZone = lens _uhzcrsHostedZone (\ s a -> s{_uhzcrsHostedZone = a}); instance NFData UpdateHostedZoneCommentResponse