DATASOURCE::VPC::NatIpCidrs is used to query the CIDR blocks of a NAT gateway.

Syntax

{
  "Type": "DATASOURCE::VPC::NatIpCidrs",
  "Properties": {
    "NatIpCidr": String,
    "NatGatewayId": String
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
NatIpCidrStringNoYesThe CIDR block of the NAT gateway. None.
NatGatewayIdStringYesYesThe ID of the Virtual Private Cloud (VPC) NAT gateway. None.

Return values

Fn::GetAtt

  • NatIpCidrIds: the IDs of the CIDR blocks of the NAT gateway.
  • NatIpCidrs: details of the CIDR blocks of the NAT gateway.
PropertyTypeDescriptionConstraint
NatIpCidrIdsListThe IDs of the CIDR blocks of the NAT gateway. None.
NatIpCidrsListDetails of the CIDR blocks of the NAT gateway. None.
StatusStringThe state of the CIDR block of the NAT gateway.

The value Available is returned for this property.

NatIpCidrStringThe CIDR block of the NAT gateway. None.
NatGatewayIdStringThe ID of the VPC NAT gateway. None.
NatIpCidrIdStringThe ID of the CIDR block of the NAT gateway. None.
NatIpCidrDescriptionStringThe description of the CIDR block of the NAT gateway. None.
CreateTimeStringThe time when the CIDR block of the NAT gateway was created. None.
IsDefaultBooleanIndicates whether the CIDR block is the default CIDR block of the NAT gateway. Valid values:
  • true
  • false
DryRunBooleanSpecifies whether to only precheck the request. Default value: false. Valid values:
  • true: only prechecks the request. The CIDR blocks of the NAT gateway are not queried. The system checks your AccessKey pair, the permissions of RAM users, and the required parameters. If the request fails to pass the precheck, an error is returned. If the request passes the precheck, DryRunOperation is returned.
  • false: prechecks the request. If the request passes the precheck, an HTTP 2XX status code and the CIDR blocks of the NAT gateway are queried.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters: {}
    Resources:
      ExtensionDataSource:
        Type: DATASOURCE::VPC::NatIpCidrs
        Properties:
          NatIpCidr: 172.16.0.0/24
          NatGatewayId: ngw-gw8v16wgvtq26vh59****
    Outputs:
      NatIpCidrIds:
        Description: The list of nat ip cidr IDs.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - NatIpCidrIds
      NatIpCidrs:
        Description: The list of nat ip cidrs.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - NatIpCidrs
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
      },
      "Resources": {
        "ExtensionDataSource": {
          "Type": "DATASOURCE::VPC::NatIpCidrs",
          "Properties": {
            "NatIpCidr": "172.16.0.0/24",
            "NatGatewayId": "ngw-gw8v16wgvtq26vh59****"
          }
        }
      },
      "Outputs": {
        "NatIpCidrIds": {
          "Description": "The list of nat ip cidr IDs.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "NatIpCidrIds"
            ]
          }
        },
        "NatIpCidrs": {
          "Description": "The list of nat ip cidrs.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "NatIpCidrs"
            ]
          }
        }
      }
    }