AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Describes a NAT gateway.

Inheritance Hierarchy

System.Object
  Amazon.EC2.Model.NatGateway

Namespace: Amazon.EC2.Model
Assembly: AWSSDK.EC2.dll
Version: 3.x.y.z

Syntax

C#
public class NatGateway

The NatGateway type exposes the following members

Constructors

NameDescription
Public Method NatGateway()

Properties

NameTypeDescription
Public Property ConnectivityType Amazon.EC2.ConnectivityType

Gets and sets the property ConnectivityType.

Indicates whether the NAT gateway supports public or private connectivity.

Public Property CreateTime System.DateTime

Gets and sets the property CreateTime.

The date and time the NAT gateway was created.

Public Property DeleteTime System.DateTime

Gets and sets the property DeleteTime.

The date and time the NAT gateway was deleted, if applicable.

Public Property FailureCode System.String

Gets and sets the property FailureCode.

If the NAT gateway could not be created, specifies the error code for the failure. (InsufficientFreeAddressesInSubnet | Gateway.NotAttached | InvalidAllocationID.NotFound | Resource.AlreadyAssociated | InternalError | InvalidSubnetID.NotFound)

Public Property FailureMessage System.String

Gets and sets the property FailureMessage.

If the NAT gateway could not be created, specifies the error message for the failure, that corresponds to the error code.

  • For InsufficientFreeAddressesInSubnet: "Subnet has insufficient free addresses to create this NAT gateway"

  • For Gateway.NotAttached: "Network vpc-xxxxxxxx has no Internet gateway attached"

  • For InvalidAllocationID.NotFound: "Elastic IP address eipalloc-xxxxxxxx could not be associated with this NAT gateway"

  • For Resource.AlreadyAssociated: "Elastic IP address eipalloc-xxxxxxxx is already associated"

  • For InternalError: "Network interface eni-xxxxxxxx, created and used internally by this NAT gateway is in an invalid state. Please try again."

  • For InvalidSubnetID.NotFound: "The specified subnet subnet-xxxxxxxx does not exist or could not be found."

Public Property NatGatewayAddresses System.Collections.Generic.List<Amazon.EC2.Model.NatGatewayAddress>

Gets and sets the property NatGatewayAddresses.

Information about the IP addresses and network interface associated with the NAT gateway.

Public Property NatGatewayId System.String

Gets and sets the property NatGatewayId.

The ID of the NAT gateway.

Public Property ProvisionedBandwidth Amazon.EC2.Model.ProvisionedBandwidth

Gets and sets the property ProvisionedBandwidth.

Reserved. If you need to sustain traffic greater than the documented limits, contact Amazon Web Services Support.

Public Property State Amazon.EC2.NatGatewayState

Gets and sets the property State.

The state of the NAT gateway.

  • pending: The NAT gateway is being created and is not ready to process traffic.

  • failed: The NAT gateway could not be created. Check the failureCode and failureMessage fields for the reason.

  • available: The NAT gateway is able to process traffic. This status remains until you delete the NAT gateway, and does not indicate the health of the NAT gateway.

  • deleting: The NAT gateway is in the process of being terminated and may still be processing traffic.

  • deleted: The NAT gateway has been terminated and is no longer processing traffic.

Public Property SubnetId System.String

Gets and sets the property SubnetId.

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

Public Property Tags System.Collections.Generic.List<Amazon.EC2.Model.Tag>

Gets and sets the property Tags.

The tags for the NAT gateway.

Public Property VpcId System.String

Gets and sets the property VpcId.

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

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5 and newer, 3.5