ALIYUN::ECS::BandwidthPackage is used to create a service plan for a NAT gateway.

Syntax

{
  "Type": "ALIYUN::ECS::BandwidthPackage",
  "Properties": {
    "Description": String,
    "NatGatewayId": String,
    "ZoneId": String,
    "BandwidthPackageName": String,
    "Bandwidth": Integer,
    "InternetChargeType": String,
    "IpCount": Integer
  }
}

Properties

Property Type Required Editable Description Constraint
NatGatewayId String Yes No The ID of the NAT gateway to which you want to bind the service plan. None
Bandwidth Integer Yes No The bandwidth.

Valid values: 5 to 5000

Unit: Mbit/s

Default value: 5

IpCount Integer Yes No The number of public IP addresses assigned to the NAT gateway. Valid values: 1 to 5
Description String No No The description of the service plan. The description must be 2 to 256 characters in length.
ZoneId String No No The ID of the zone where the NAT gateway resides. None
BandwidthPackageName String No No The name of the service plan. The name must be 2 to 128 characters in length and can contain letters, digits, underscores (_), hyphens (-), and periods (.). It must start with a letter.
InternetChargeType String No No The billing method for network usage. Default value: PayByTraffic. Valid values:
  • PayByBandwidth
  • PayByTraffic

Response parameters

Fn::GetAtt

  • BandwidthPackageId: the ID of the service plan.
  • BandwidthPackageIps: all IP addresses included in the service plan.

Examples

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "BandwidthPackage": {
      "Type": "ALIYUN::ECS::BandwidthPackage",
      "Properties": {
        "BandwidthPackageName": "pkg_2",
        "Description": "my_bandwidth",
        "NatGatewayId": "ngw-h1xox****",
        "IpCount": 2,
        "Bandwidth": 5,
        "ZoneId": "cn-beijing-c"
      }
    }
  },
  "Outputs": {
    "BandwidthPackageId": {
         "Value": {"Fn::GetAttr": ["BandwidthPackage","BandwidthPackageId"]}
    },
    "BandwidthPackageIps": {
         "Value": {"Fn::GetAttr": ["BandwidthPackage","BandwidthPackageIps"]}
    }
  }
}