module Network.AWS.Route53.CreateReusableDelegationSet
(
createReusableDelegationSet
, CreateReusableDelegationSet
, crdsHostedZoneId
, crdsCallerReference
, createReusableDelegationSetResponse
, CreateReusableDelegationSetResponse
, crdsrsResponseStatus
, crdsrsDelegationSet
, crdsrsLocation
) where
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.Route53.Types
import Network.AWS.Route53.Types.Product
data CreateReusableDelegationSet = CreateReusableDelegationSet'
{ _crdsHostedZoneId :: !(Maybe Text)
, _crdsCallerReference :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
createReusableDelegationSet
:: Text
-> CreateReusableDelegationSet
createReusableDelegationSet pCallerReference_ =
CreateReusableDelegationSet'
{ _crdsHostedZoneId = Nothing
, _crdsCallerReference = pCallerReference_
}
crdsHostedZoneId :: Lens' CreateReusableDelegationSet (Maybe Text)
crdsHostedZoneId = lens _crdsHostedZoneId (\ s a -> s{_crdsHostedZoneId = a});
crdsCallerReference :: Lens' CreateReusableDelegationSet Text
crdsCallerReference = lens _crdsCallerReference (\ s a -> s{_crdsCallerReference = a});
instance AWSRequest CreateReusableDelegationSet where
type Rs CreateReusableDelegationSet =
CreateReusableDelegationSetResponse
request = postXML route53
response
= receiveXML
(\ s h x ->
CreateReusableDelegationSetResponse' <$>
(pure (fromEnum s)) <*> (x .@ "DelegationSet") <*>
(h .# "Location"))
instance ToElement CreateReusableDelegationSet where
toElement
= mkElement
"{https://route53.amazonaws.com/doc/2013-04-01/}CreateReusableDelegationSetRequest"
instance ToHeaders CreateReusableDelegationSet where
toHeaders = const mempty
instance ToPath CreateReusableDelegationSet where
toPath = const "/2013-04-01/delegationset"
instance ToQuery CreateReusableDelegationSet where
toQuery = const mempty
instance ToXML CreateReusableDelegationSet where
toXML CreateReusableDelegationSet'{..}
= mconcat
["HostedZoneId" @= _crdsHostedZoneId,
"CallerReference" @= _crdsCallerReference]
data CreateReusableDelegationSetResponse = CreateReusableDelegationSetResponse'
{ _crdsrsResponseStatus :: !Int
, _crdsrsDelegationSet :: !DelegationSet
, _crdsrsLocation :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
createReusableDelegationSetResponse
:: Int
-> DelegationSet
-> Text
-> CreateReusableDelegationSetResponse
createReusableDelegationSetResponse pResponseStatus_ pDelegationSet_ pLocation_ =
CreateReusableDelegationSetResponse'
{ _crdsrsResponseStatus = pResponseStatus_
, _crdsrsDelegationSet = pDelegationSet_
, _crdsrsLocation = pLocation_
}
crdsrsResponseStatus :: Lens' CreateReusableDelegationSetResponse Int
crdsrsResponseStatus = lens _crdsrsResponseStatus (\ s a -> s{_crdsrsResponseStatus = a});
crdsrsDelegationSet :: Lens' CreateReusableDelegationSetResponse DelegationSet
crdsrsDelegationSet = lens _crdsrsDelegationSet (\ s a -> s{_crdsrsDelegationSet = a});
crdsrsLocation :: Lens' CreateReusableDelegationSetResponse Text
crdsrsLocation = lens _crdsrsLocation (\ s a -> s{_crdsrsLocation = a});