-
-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerating amazonka-ec2 from latest service definition
- Loading branch information
1 parent
582c047
commit 4117a08
Showing
223 changed files
with
1,179 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
164 changes: 164 additions & 0 deletions
164
amazonka-ec2/gen/Network/AWS/EC2/AcceptReservedInstancesExchangeQuote.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
{-# 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.EC2.AcceptReservedInstancesExchangeQuote | ||
-- Copyright : (c) 2013-2016 Brendan Hay | ||
-- License : Mozilla Public License, v. 2.0. | ||
-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> | ||
-- Stability : auto-generated | ||
-- Portability : non-portable (GHC extensions) | ||
-- | ||
-- Purchases Convertible Reserved Instance offerings described in the 'GetReservedInstancesExchangeQuote' call. | ||
-- | ||
-- | ||
module Network.AWS.EC2.AcceptReservedInstancesExchangeQuote | ||
( | ||
-- * Creating a Request | ||
acceptReservedInstancesExchangeQuote | ||
, AcceptReservedInstancesExchangeQuote | ||
-- * Request Lenses | ||
, arieqTargetConfigurations | ||
, arieqDryRun | ||
, arieqReservedInstanceIds | ||
|
||
-- * Destructuring the Response | ||
, acceptReservedInstancesExchangeQuoteResponse | ||
, AcceptReservedInstancesExchangeQuoteResponse | ||
-- * Response Lenses | ||
, arieqrsExchangeId | ||
, arieqrsResponseStatus | ||
) 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 | ||
|
||
-- | Contains the parameters for accepting the quote. | ||
-- | ||
-- | ||
-- | ||
-- /See:/ 'acceptReservedInstancesExchangeQuote' smart constructor. | ||
data AcceptReservedInstancesExchangeQuote = AcceptReservedInstancesExchangeQuote' | ||
{ _arieqTargetConfigurations :: !(Maybe [TargetConfigurationRequest]) | ||
, _arieqDryRun :: !(Maybe Bool) | ||
, _arieqReservedInstanceIds :: ![Text] | ||
} deriving (Eq,Read,Show,Data,Typeable,Generic) | ||
|
||
-- | Creates a value of 'AcceptReservedInstancesExchangeQuote' with the minimum fields required to make a request. | ||
-- | ||
-- Use one of the following lenses to modify other fields as desired: | ||
-- | ||
-- * 'arieqTargetConfigurations' - The configurations of the Convertible Reserved Instance offerings you are purchasing in this exchange. | ||
-- | ||
-- * 'arieqDryRun' - Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is @DryRunOperation@ . Otherwise, it is @UnauthorizedOperation@ . | ||
-- | ||
-- * 'arieqReservedInstanceIds' - The IDs of the Convertible Reserved Instances that you want to exchange for other Convertible Reserved Instances of the same or higher value. | ||
acceptReservedInstancesExchangeQuote | ||
:: AcceptReservedInstancesExchangeQuote | ||
acceptReservedInstancesExchangeQuote = | ||
AcceptReservedInstancesExchangeQuote' | ||
{ _arieqTargetConfigurations = Nothing | ||
, _arieqDryRun = Nothing | ||
, _arieqReservedInstanceIds = mempty | ||
} | ||
|
||
-- | The configurations of the Convertible Reserved Instance offerings you are purchasing in this exchange. | ||
arieqTargetConfigurations :: Lens' AcceptReservedInstancesExchangeQuote [TargetConfigurationRequest] | ||
arieqTargetConfigurations = lens _arieqTargetConfigurations (\ s a -> s{_arieqTargetConfigurations = a}) . _Default . _Coerce; | ||
|
||
-- | Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is @DryRunOperation@ . Otherwise, it is @UnauthorizedOperation@ . | ||
arieqDryRun :: Lens' AcceptReservedInstancesExchangeQuote (Maybe Bool) | ||
arieqDryRun = lens _arieqDryRun (\ s a -> s{_arieqDryRun = a}); | ||
|
||
-- | The IDs of the Convertible Reserved Instances that you want to exchange for other Convertible Reserved Instances of the same or higher value. | ||
arieqReservedInstanceIds :: Lens' AcceptReservedInstancesExchangeQuote [Text] | ||
arieqReservedInstanceIds = lens _arieqReservedInstanceIds (\ s a -> s{_arieqReservedInstanceIds = a}) . _Coerce; | ||
|
||
instance AWSRequest | ||
AcceptReservedInstancesExchangeQuote where | ||
type Rs AcceptReservedInstancesExchangeQuote = | ||
AcceptReservedInstancesExchangeQuoteResponse | ||
request = postQuery ec2 | ||
response | ||
= receiveXML | ||
(\ s h x -> | ||
AcceptReservedInstancesExchangeQuoteResponse' <$> | ||
(x .@? "exchangeId") <*> (pure (fromEnum s))) | ||
|
||
instance Hashable | ||
AcceptReservedInstancesExchangeQuote | ||
|
||
instance NFData AcceptReservedInstancesExchangeQuote | ||
|
||
instance ToHeaders | ||
AcceptReservedInstancesExchangeQuote where | ||
toHeaders = const mempty | ||
|
||
instance ToPath AcceptReservedInstancesExchangeQuote | ||
where | ||
toPath = const "/" | ||
|
||
instance ToQuery AcceptReservedInstancesExchangeQuote | ||
where | ||
toQuery AcceptReservedInstancesExchangeQuote'{..} | ||
= mconcat | ||
["Action" =: | ||
("AcceptReservedInstancesExchangeQuote" :: | ||
ByteString), | ||
"Version" =: ("2016-09-15" :: ByteString), | ||
toQuery | ||
(toQueryList "TargetConfiguration" <$> | ||
_arieqTargetConfigurations), | ||
"DryRun" =: _arieqDryRun, | ||
toQueryList "ReservedInstanceId" | ||
_arieqReservedInstanceIds] | ||
|
||
-- | The result of the exchange and whether it was @successful@ . | ||
-- | ||
-- | ||
-- | ||
-- /See:/ 'acceptReservedInstancesExchangeQuoteResponse' smart constructor. | ||
data AcceptReservedInstancesExchangeQuoteResponse = AcceptReservedInstancesExchangeQuoteResponse' | ||
{ _arieqrsExchangeId :: !(Maybe Text) | ||
, _arieqrsResponseStatus :: !Int | ||
} deriving (Eq,Read,Show,Data,Typeable,Generic) | ||
|
||
-- | Creates a value of 'AcceptReservedInstancesExchangeQuoteResponse' with the minimum fields required to make a request. | ||
-- | ||
-- Use one of the following lenses to modify other fields as desired: | ||
-- | ||
-- * 'arieqrsExchangeId' - The ID of the successful exchange. | ||
-- | ||
-- * 'arieqrsResponseStatus' - -- | The response status code. | ||
acceptReservedInstancesExchangeQuoteResponse | ||
:: Int -- ^ 'arieqrsResponseStatus' | ||
-> AcceptReservedInstancesExchangeQuoteResponse | ||
acceptReservedInstancesExchangeQuoteResponse pResponseStatus_ = | ||
AcceptReservedInstancesExchangeQuoteResponse' | ||
{ _arieqrsExchangeId = Nothing | ||
, _arieqrsResponseStatus = pResponseStatus_ | ||
} | ||
|
||
-- | The ID of the successful exchange. | ||
arieqrsExchangeId :: Lens' AcceptReservedInstancesExchangeQuoteResponse (Maybe Text) | ||
arieqrsExchangeId = lens _arieqrsExchangeId (\ s a -> s{_arieqrsExchangeId = a}); | ||
|
||
-- | -- | The response status code. | ||
arieqrsResponseStatus :: Lens' AcceptReservedInstancesExchangeQuoteResponse Int | ||
arieqrsResponseStatus = lens _arieqrsResponseStatus (\ s a -> s{_arieqrsResponseStatus = a}); | ||
|
||
instance NFData | ||
AcceptReservedInstancesExchangeQuoteResponse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.