Show / Hide Table of Contents

Class CfnNatGateway

A CloudFormation AWS::EC2::NatGateway.

Inheritance
System.Object
Construct
CfnElement
CfnRefElement
CfnResource
CfnNatGateway
Implements
IConstruct
Constructs.IConstruct
IDependable
IInspectable
Inherited Members
CfnResource.IsCfnResource(IConstruct)
CfnResource.AddDeletionOverride(String)
CfnResource.AddDependsOn(CfnResource)
CfnResource.AddMetadata(String, Object)
CfnResource.AddOverride(String, Object)
CfnResource.AddPropertyDeletionOverride(String)
CfnResource.AddPropertyOverride(String, Object)
CfnResource.ApplyRemovalPolicy(Nullable<RemovalPolicy>, IRemovalPolicyOptions)
CfnResource.GetAtt(String)
CfnResource.GetMetadata(String)
CfnResource.ShouldSynthesize()
CfnResource.ToString()
CfnResource.ValidateProperties(Object)
CfnResource.CfnOptions
CfnResource.CfnResourceType
CfnResource.UpdatedProperites
CfnRefElement.Ref
CfnElement.IsCfnElement(Object)
CfnElement.OverrideLogicalId(String)
CfnElement.CreationStack
CfnElement.LogicalId
CfnElement.Stack
Construct.IsConstruct(Object)
Construct.OnPrepare()
Construct.OnSynthesize(ISynthesisSession)
Construct.OnValidate()
Construct.Prepare()
Construct.Synthesize(ISynthesisSession)
Construct.Validate()
Construct.Node
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public class CfnNatGateway : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnNatGateway
    Inherits CfnResource
    Implements IConstruct, IDependable, IInspectable
Remarks

Specifies a network address translation (NAT) gateway in the specified subnet. You can create either a public NAT gateway or a private NAT gateway. The default is a public NAT gateway. If you create a public NAT gateway, you must specify an elastic IP address.

With a NAT gateway, instances in a private subnet can connect to the internet, other AWS services, or an on-premises network using the IP address of the NAT gateway.

If you add a default route ( AWS::EC2::Route resource) that points to a NAT gateway, specify the NAT gateway ID for the route's NatGatewayId property.

For more information, see NAT Gateways in the Amazon VPC User Guide .

CloudformationResource: AWS::EC2::NatGateway

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;

var cfnNatGateway = new CfnNatGateway(this, "MyCfnNatGateway", new CfnNatGatewayProps {
    SubnetId = "subnetId",

    // the properties below are optional
    AllocationId = "allocationId",
    ConnectivityType = "connectivityType",
    MaxDrainDurationSeconds = 123,
    PrivateIpAddress = "privateIpAddress",
    SecondaryAllocationIds = new [] { "secondaryAllocationIds" },
    SecondaryPrivateIpAddressCount = 123,
    SecondaryPrivateIpAddresses = new [] { "secondaryPrivateIpAddresses" },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
});

Synopsis

Constructors

CfnNatGateway(Construct, String, ICfnNatGatewayProps)

Create a new AWS::EC2::NatGateway.

CfnNatGateway(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

CfnNatGateway(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

Properties

AllocationId

[Public NAT gateway only] The allocation ID of the Elastic IP address that's associated with the NAT gateway.

AttrNatGatewayId

The ID of the NAT gateway.

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

CfnProperties
ConnectivityType

Indicates whether the NAT gateway supports public or private connectivity.

MaxDrainDurationSeconds

The maximum amount of time to wait (in seconds) before forcibly releasing the IP addresses if connections are still in progress.

PrivateIpAddress

The private IPv4 address to assign to the NAT gateway.

SecondaryAllocationIds

Secondary EIP allocation IDs.

SecondaryPrivateIpAddressCount

[Private NAT gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT gateway.

SecondaryPrivateIpAddresses

Secondary private IPv4 addresses.

SubnetId

The ID of the subnet in which the NAT gateway is located.

Tags

The tags for the NAT gateway.

Methods

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

RenderProperties(IDictionary<String, Object>)

Constructors

CfnNatGateway(Construct, String, ICfnNatGatewayProps)

Create a new AWS::EC2::NatGateway.

public CfnNatGateway(Construct scope, string id, ICfnNatGatewayProps props)
Parameters
scope Construct
  • scope in which this resource is defined.
id System.String
  • scoped id of the resource.
props ICfnNatGatewayProps
  • resource properties.

CfnNatGateway(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

protected CfnNatGateway(ByRefValue reference)
Parameters
reference Amazon.JSII.Runtime.Deputy.ByRefValue

The Javascript-owned object reference

CfnNatGateway(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

protected CfnNatGateway(DeputyBase.DeputyProps props)
Parameters
props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps

The deputy props

Properties

AllocationId

[Public NAT gateway only] The allocation ID of the Elastic IP address that's associated with the NAT gateway.

public virtual string AllocationId { get; set; }
Property Value

System.String

Remarks

This property is required for a public NAT gateway and cannot be specified with a private NAT gateway.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html#cfn-ec2-natgateway-allocationid

AttrNatGatewayId

The ID of the NAT gateway.

public virtual string AttrNatGatewayId { get; }
Property Value

System.String

Remarks

CloudformationAttribute: NatGatewayId

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value

System.String

CfnProperties

protected override IDictionary<string, object> CfnProperties { get; }
Property Value

System.Collections.Generic.IDictionary<System.String, System.Object>

Overrides
CfnResource.CfnProperties

ConnectivityType

Indicates whether the NAT gateway supports public or private connectivity.

public virtual string ConnectivityType { get; set; }
Property Value

System.String

Remarks

The default is public connectivity.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html#cfn-ec2-natgateway-connectivitytype

MaxDrainDurationSeconds

The maximum amount of time to wait (in seconds) before forcibly releasing the IP addresses if connections are still in progress.

public virtual Nullable<double> MaxDrainDurationSeconds { get; set; }
Property Value

System.Nullable<System.Double>

Remarks

Default value is 350 seconds.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html#cfn-ec2-natgateway-maxdraindurationseconds

PrivateIpAddress

The private IPv4 address to assign to the NAT gateway.

public virtual string PrivateIpAddress { get; set; }
Property Value

System.String

Remarks

If you don't provide an address, a private IPv4 address will be automatically assigned.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html#cfn-ec2-natgateway-privateipaddress

SecondaryAllocationIds

Secondary EIP allocation IDs.

public virtual string[] SecondaryAllocationIds { get; set; }
Property Value

System.String[]

Remarks

For more information, see Create a NAT gateway in the Amazon VPC User Guide .

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html#cfn-ec2-natgateway-secondaryallocationids

SecondaryPrivateIpAddressCount

[Private NAT gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT gateway.

public virtual Nullable<double> SecondaryPrivateIpAddressCount { get; set; }
Property Value

System.Nullable<System.Double>

Remarks

For more information about secondary addresses, see Create a NAT gateway in the Amazon Virtual Private Cloud User Guide .

SecondaryPrivateIpAddressCount and SecondaryPrivateIpAddresses cannot be set at the same time.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html#cfn-ec2-natgateway-secondaryprivateipaddresscount

SecondaryPrivateIpAddresses

Secondary private IPv4 addresses.

public virtual string[] SecondaryPrivateIpAddresses { get; set; }
Property Value

System.String[]

Remarks

For more information about secondary addresses, see Create a NAT gateway in the Amazon Virtual Private Cloud User Guide .

SecondaryPrivateIpAddressCount and SecondaryPrivateIpAddresses cannot be set at the same time.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html#cfn-ec2-natgateway-secondaryprivateipaddresses

SubnetId

The ID of the subnet in which the NAT gateway is located.

public virtual string SubnetId { get; set; }
Property Value

System.String

Remarks

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html#cfn-ec2-natgateway-subnetid

Tags

The tags for the NAT gateway.

public virtual TagManager Tags { get; }
Property Value

TagManager

Remarks

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html#cfn-ec2-natgateway-tags

Methods

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

public virtual void Inspect(TreeInspector inspector)
Parameters
inspector TreeInspector
  • tree inspector to collect and process attributes.

RenderProperties(IDictionary<String, Object>)

protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns

System.Collections.Generic.IDictionary<System.String, System.Object>

Overrides
CfnResource.RenderProperties(IDictionary<String, Object>)

Implements

IConstruct
Constructs.IConstruct
IDependable
IInspectable
Back to top Generated by DocFX