amazonka-ec2-1.6.0: Amazon Elastic Compute Cloud SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.EC2.CreateNatGateway

Contents

Description

Creates a NAT gateway in the specified public subnet. This action creates a network interface in the specified subnet with a private IP address from the IP address range of the subnet. Internet-bound traffic from a private subnet can be routed to the NAT gateway, therefore enabling instances in the private subnet to connect to the internet. For more information, see NAT Gateways in the Amazon Virtual Private Cloud User Guide .

Synopsis

Creating a Request

createNatGateway Source #

Creates a value of CreateNatGateway with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • cngClientToken - Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency . Constraint: Maximum 64 ASCII characters.
  • cngAllocationId - The allocation ID of an Elastic IP address to associate with the NAT gateway. If the Elastic IP address is associated with another resource, you must first disassociate it.
  • cngSubnetId - The subnet in which to create the NAT gateway.

data CreateNatGateway Source #

Contains the parameters for CreateNatGateway.

See: createNatGateway smart constructor.

Instances

Eq CreateNatGateway Source # 
Data CreateNatGateway Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateNatGateway -> c CreateNatGateway #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateNatGateway #

toConstr :: CreateNatGateway -> Constr #

dataTypeOf :: CreateNatGateway -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateNatGateway) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateNatGateway) #

gmapT :: (forall b. Data b => b -> b) -> CreateNatGateway -> CreateNatGateway #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateNatGateway -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateNatGateway -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateNatGateway -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateNatGateway -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateNatGateway -> m CreateNatGateway #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateNatGateway -> m CreateNatGateway #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateNatGateway -> m CreateNatGateway #

Read CreateNatGateway Source # 
Show CreateNatGateway Source # 
Generic CreateNatGateway Source # 
Hashable CreateNatGateway Source # 
NFData CreateNatGateway Source # 

Methods

rnf :: CreateNatGateway -> () #

AWSRequest CreateNatGateway Source # 
ToHeaders CreateNatGateway Source # 
ToPath CreateNatGateway Source # 
ToQuery CreateNatGateway Source # 
type Rep CreateNatGateway Source # 
type Rep CreateNatGateway = D1 * (MetaData "CreateNatGateway" "Network.AWS.EC2.CreateNatGateway" "amazonka-ec2-1.6.0-Kkew7Kpgof6EYi20Z0WOzs" False) (C1 * (MetaCons "CreateNatGateway'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_cngClientToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "_cngAllocationId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_cngSubnetId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)))))
type Rs CreateNatGateway Source # 

Request Lenses

cngClientToken :: Lens' CreateNatGateway (Maybe Text) Source #

Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency . Constraint: Maximum 64 ASCII characters.

cngAllocationId :: Lens' CreateNatGateway Text Source #

The allocation ID of an Elastic IP address to associate with the NAT gateway. If the Elastic IP address is associated with another resource, you must first disassociate it.

cngSubnetId :: Lens' CreateNatGateway Text Source #

The subnet in which to create the NAT gateway.

Destructuring the Response

createNatGatewayResponse Source #

Creates a value of CreateNatGatewayResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • cngrsClientToken - Unique, case-sensitive identifier to ensure the idempotency of the request. Only returned if a client token was provided in the request.
  • cngrsNatGateway - Information about the NAT gateway.
  • cngrsResponseStatus - -- | The response status code.

data CreateNatGatewayResponse Source #

Contains the output of CreateNatGateway.

See: createNatGatewayResponse smart constructor.

Instances

Eq CreateNatGatewayResponse Source # 
Data CreateNatGatewayResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateNatGatewayResponse -> c CreateNatGatewayResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateNatGatewayResponse #

toConstr :: CreateNatGatewayResponse -> Constr #

dataTypeOf :: CreateNatGatewayResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateNatGatewayResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateNatGatewayResponse) #

gmapT :: (forall b. Data b => b -> b) -> CreateNatGatewayResponse -> CreateNatGatewayResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateNatGatewayResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateNatGatewayResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateNatGatewayResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateNatGatewayResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateNatGatewayResponse -> m CreateNatGatewayResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateNatGatewayResponse -> m CreateNatGatewayResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateNatGatewayResponse -> m CreateNatGatewayResponse #

Read CreateNatGatewayResponse Source # 
Show CreateNatGatewayResponse Source # 
Generic CreateNatGatewayResponse Source # 
NFData CreateNatGatewayResponse Source # 
type Rep CreateNatGatewayResponse Source # 
type Rep CreateNatGatewayResponse = D1 * (MetaData "CreateNatGatewayResponse" "Network.AWS.EC2.CreateNatGateway" "amazonka-ec2-1.6.0-Kkew7Kpgof6EYi20Z0WOzs" False) (C1 * (MetaCons "CreateNatGatewayResponse'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_cngrsClientToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "_cngrsNatGateway") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe NatGateway))) (S1 * (MetaSel (Just Symbol "_cngrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int)))))

Response Lenses

cngrsClientToken :: Lens' CreateNatGatewayResponse (Maybe Text) Source #

Unique, case-sensitive identifier to ensure the idempotency of the request. Only returned if a client token was provided in the request.

cngrsNatGateway :: Lens' CreateNatGatewayResponse (Maybe NatGateway) Source #

Information about the NAT gateway.