DATASOURCE::VPC::NatGateways is used to query NAT gateways.

Syntax

{
  "Type": "DATASOURCE::VPC::NatGateways",
  "Properties": {
    "Status": String,
    "VpcId": String,
    "ZoneId": String,
    "ResourceGroupId": String,
    "InstanceChargeType": String,
    "NetworkType": String,
    "NatType": String,
    "NatGatewayId": String,
    "Name": String
  }
}

Properties

Property Type Required Editable Description Constraint
Status String No Yes The state of the NAT gateway. Valid values:
  • Creating: The NAT gateway is being created. The operation to create a NAT gateway is asynchronous. The NAT gateway remains in the Creating state until it is created.
  • Available: The NAT gateway is available. An NAT gateway enters the Available state after it is created.
  • Modifying: The NAT gateway is being modified. The operation to modify a NAT gateway is asynchronous. The NAT gateway remains in the Modifying state until it is modified.
  • Deleting: The NAT gateway is being deleted. The operation to delete a NAT gateway is asynchronous. The NAT gateway remains in the Deleting state until it is deleted.
  • Converting: The NAT gateway is being converted. The operation to convert a standard NAT gateway to an enhanced NAT gateway is asynchronous. The NAT gateway remains in the Converting state until it is converted.
VpcId String No Yes The ID of the virtual private cloud (VPC) where the NAT gateway is deployed. None.
ZoneId String No Yes The ID of the zone to which the NAT gateway belongs. None.
ResourceGroupId String No Yes The ID of the resource group to which the NAT gateway belongs. None.
InstanceChargeType String No Yes The billing method of the NAT gateway. Valid values:
  • PostPaid: pay-as-you-go
  • PrePaid: subscription
    Note You cannot purchase subscription NAT gateways.
NetworkType String No Yes The network type of the NAT gateway. Valid values:
  • internet
  • intranet
NatType String No Yes The type of the NAT gateway. Set the value to Enhanced, which specifies an enhanced NAT gateway.
NatGatewayId String No Yes The ID of the NAT gateway. None.
Name String No Yes The name of the NAT gateway. None.

Return values (Fn::GetAtt)

  • NatGatewayIds: the IDs of the NAT gateways.
  • NatGateways: details of the NAT gateways.
Property Type Description Constraint
NatGatewayIds List The IDs of the NAT gateways. Example: ["ngw-2ze9v06hwq9h3jxw****", "ngw-2zadhak06hwq9h3jxw****"].
NatGateways List Details of the NAT gateways. None.
Status String The state of the NAT gateway. Valid values:
  • Creating: The NAT gateway is being created. The operation to create a NAT gateway is asynchronous. The NAT gateway remains in the Creating state until it is created.
  • Available: The NAT gateway is available. An NAT gateway enters the Available state after it is created.
  • Modifying: The NAT gateway is being modified. The operation to modify a NAT gateway is asynchronous. The NAT gateway remains in the Modifying state until it is modified.
  • Deleting: The NAT gateway is being deleted. The operation to delete a NAT gateway is asynchronous. The NAT gateway remains in the Deleting state until it is deleted.
  • Converting: The NAT gateway is being converted. The operation to convert a standard NAT gateway to an enhanced NAT gateway is asynchronous. The NAT gateway remains in the Converting state until it is converted.
CreationTime String The time when the NAT gateway was created. Example: 2021-06-08T12:20:20Z.
VpcId String The ID of the VPC where the NAT gateway is deployed. Example: vpc-bp15zckdt37pq72z****.
NatType String The type of the NAT gateway. Valid value: Enhanced. Only enhanced NAT gateways are supported.
Spec String The specification of the Internet NAT gateway. This property takes effect if you set the InstanceChargeType property to PrePaid. Valid values:
  • Small: small-sized NAT gateway
  • Middle: medium-sized NAT gateway
  • Large: large-sized NAT gateway
DeletionProtection Boolean Indicates whether deletion protection is enabled. Valid values:
  • true
  • false
NetworkType String The network type of the NAT gateway. Valid values:
  • internet
  • intranet
SecurityProtectionEnabled Boolean Indicates whether the security protection feature is enabled. Valid values:
  • true
  • false
InstanceChargeType String The billing method of the NAT gateway. Valid values:
  • PostPaid: pay-as-you-go
  • PrePaid: subscription
    Note You cannot purchase subscription NAT gateways.
EcsMetricEnabled Boolean Indicates whether the traffic monitoring feature is enabled. Valid values:
  • true
  • false
IcmpReplyEnabled Boolean Indicates whether the Internet control message protocol (ICMP) non-retrieval feature is enabled. Valid values:
  • true
  • false
Description String The description of the NAT gateway. None.
ResourceGroupId String The ID of the resource group. Example: rg-bp67acfmxazb4ph****.
NatGatewayId String The ID of the NAT gateway. Example: ngw-bp1047e2d4z7kf2ki****.
InternetChargeType String The billing method of the NAT gateway. Valid values:
  • PayBySpec: The NAT gateway is billed on a pay-by-specification basis.
  • PayByLcu: The NAT gateway is billed on a pay-by-LCU basis.
BusinessStatus String The service status of the NAT gateway. Valid values:
  • Normal: The NAT gateway works as expected.
  • FinancialLocked: The NAT gateway is locked due to overdue payments
Name String The name of the NAT gateway. None.
IpLists List The IP addresses of the NAT gateways. Example: [ { "IpAddress": "192.168.0.0", "AllocationId": "eip-bp1xyg5ipmh3nledx****", "UsingStatus": "UsedBySnatTable" }, { "IpAddress": "172.16.0.0", "AllocationId": "eip-bp19eue77u20cffjc****", "UsingStatus": "UsedByForwardTable" }].
ForwardTableIds List The ID of the Destination Network Address Translation (DNAT) table. Example: ["ftb-bp15o9aylj19vfvgt****"].
SnatTableIds List The ID of the SNAT table. Example: ["stb-bp1tyr0o48w6wymur****"].
BandwidthPackageIds List The ID of the EIP bandwidth plan. Example: ["cbwp-bp1qw2qk55oh42d5s****"].
FullNatTableIds List The ID of the FULLNAT table. Example: ["fulltb-gw88z7hhlv43rmb26****"].
NatGatewayPrivateInfo Object The private network information of the enhanced Internet NAT gateway. Example: { "IzNo": "cn-beijing-k", "PrivateIpAddress": "192.168.0.175", "MaxBandwidth": 5120, "EniInstanceId": "eni-2ze4t2rea05cxcb4****", "EniType": "", "VswitchId": "vsw-2zetuemtyek3io2vp****"}{ "IzNo": "cn-beijing-k", "PrivateIpAddress": "192.168.0.175", "MaxBandwidth": 5120, "EniInstanceId": "eni-2ze4t2rea05cxcb4****", "EniType": "", "VswitchId": "vsw-2zetuemtyek3io2vp****"}.
PrivateLinkEnabled Boolean Indicates whether the NAT gateway supports PrivateLink. Valid values:
  • true
  • false
PrivateLinkMode String The mode that is used by PrivateLink. Valid values:
  • FullNat: FULLNAT mode
  • Geneve: GENEVE mode

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Name": {
      "Type": "String",
      "Description": "The name of the NAT gateway.",
      "Default": "test"
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::VPC::NatGateways",
      "Properties": {
        "Name": {
          "Ref": "Name"
        }
      }
    }
  },
  "Outputs": {
    "NatGatewayIds": {
      "Description": "The list of The nat gateway ids.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "NatGatewayIds"
        ]
      }
    },
    "NatGateways": {
      "Description": "The list of The nat gateways.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "NatGateways"
        ]
      }
    }
  }
}