{-# 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.EC2.ModifyVPCTenancy
(
modifyVPCTenancy
, ModifyVPCTenancy
, mvtDryRun
, mvtVPCId
, mvtInstanceTenancy
, modifyVPCTenancyResponse
, ModifyVPCTenancyResponse
, mvtrsReturnValue
, mvtrsResponseStatus
) where
import Network.AWS.EC2.Types
import Network.AWS.EC2.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data ModifyVPCTenancy = ModifyVPCTenancy'
{ _mvtDryRun :: !(Maybe Bool)
, _mvtVPCId :: !Text
, _mvtInstanceTenancy :: !VPCTenancy
} deriving (Eq, Read, Show, Data, Typeable, Generic)
modifyVPCTenancy
:: Text
-> VPCTenancy
-> ModifyVPCTenancy
modifyVPCTenancy pVPCId_ pInstanceTenancy_ =
ModifyVPCTenancy'
{ _mvtDryRun = Nothing
, _mvtVPCId = pVPCId_
, _mvtInstanceTenancy = pInstanceTenancy_
}
mvtDryRun :: Lens' ModifyVPCTenancy (Maybe Bool)
mvtDryRun = lens _mvtDryRun (\ s a -> s{_mvtDryRun = a})
mvtVPCId :: Lens' ModifyVPCTenancy Text
mvtVPCId = lens _mvtVPCId (\ s a -> s{_mvtVPCId = a})
mvtInstanceTenancy :: Lens' ModifyVPCTenancy VPCTenancy
mvtInstanceTenancy = lens _mvtInstanceTenancy (\ s a -> s{_mvtInstanceTenancy = a})
instance AWSRequest ModifyVPCTenancy where
type Rs ModifyVPCTenancy = ModifyVPCTenancyResponse
request = postQuery ec2
response
= receiveXML
(\ s h x ->
ModifyVPCTenancyResponse' <$>
(x .@? "return") <*> (pure (fromEnum s)))
instance Hashable ModifyVPCTenancy where
instance NFData ModifyVPCTenancy where
instance ToHeaders ModifyVPCTenancy where
toHeaders = const mempty
instance ToPath ModifyVPCTenancy where
toPath = const "/"
instance ToQuery ModifyVPCTenancy where
toQuery ModifyVPCTenancy'{..}
= mconcat
["Action" =: ("ModifyVpcTenancy" :: ByteString),
"Version" =: ("2016-11-15" :: ByteString),
"DryRun" =: _mvtDryRun, "VpcId" =: _mvtVPCId,
"InstanceTenancy" =: _mvtInstanceTenancy]
data ModifyVPCTenancyResponse = ModifyVPCTenancyResponse'
{ _mvtrsReturnValue :: !(Maybe Bool)
, _mvtrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
modifyVPCTenancyResponse
:: Int
-> ModifyVPCTenancyResponse
modifyVPCTenancyResponse pResponseStatus_ =
ModifyVPCTenancyResponse'
{_mvtrsReturnValue = Nothing, _mvtrsResponseStatus = pResponseStatus_}
mvtrsReturnValue :: Lens' ModifyVPCTenancyResponse (Maybe Bool)
mvtrsReturnValue = lens _mvtrsReturnValue (\ s a -> s{_mvtrsReturnValue = a})
mvtrsResponseStatus :: Lens' ModifyVPCTenancyResponse Int
mvtrsResponseStatus = lens _mvtrsResponseStatus (\ s a -> s{_mvtrsResponseStatus = a})
instance NFData ModifyVPCTenancyResponse where