Queries one or more NAT bandwidth packages in a region.

This API can be called only if you purchased a NAT bandwidth package before January 26, 2018. If your account does not have a NAT bandwidth package purchased before January 26, 2018, you can associate an Elastic IP Address (EIP).

For more information, see AssociateEipAddress.

Make the API call

You can use OpenAPI Explorer to make API calls, search for API calls, perform debugging, and generate SDK example code.

Request parameters

Parameter Type Required? Example value Description
Action String Yes DescribeBandwidthPackages

The name of this action. Value: DescribeBandwidthPackages

RegionId String Yes cn-hangzhou

The ID of the region to which the NAT Gateway belongs. To query the region ID, call DescribeRegions.

BandwidthPackageId String No bwp-bp1xea10o8qxwdfs****

The ID of the NAT bandwidth package.

NatGatewayId String No ngw-bp1uewa15k4iydfre****

The ID of the NAT Gateway.

PageNumber Integer No 10

The page number. Default value: 1

PageSize Integer No 10

The number of entries per page in the case of a paged query result. Maximum value: 50. Default value: 10

Response parameters

Parameter Type Example value Description 
BandwidthPackages

A list of NAT bandwidth packages.

BandwidthPackage

The details of the NAT bandwidth package.

Bandwidth String 5

The bandwidth value of the NAT bandwidth package. Value range: 5 to 5000. Unit: Mbit/s

BandwidthPackageId String bwp-xxoo123sfwr****

The ID of the NAT bandwidth package.

BusinessStatus String Normal

The status of the NAT bandwidth package.

  • Normal: The NAT bandwidth package is normal.
  • FinancialLocked: The NAT bandwidth package is locked because of an overdue bill.
  • SecurityLocked: The NAT bandwidth package is locked due to security reasons.
CreationTime String 2017-06-08T12:20:55

The time when the NAT bandwidth package was created.

This parameter uses the ISO 8601 format and the output is UTC+8.

Format: YYYY-MM-DDThh:mmZ.

Description String test123

The description of the NAT bandwidth package.

The description is 2 to 256 characters in length. The description is displayed in the console. If this parameter is not specified, it is null. The default value is null. The description cannot start with http:// or https://.

ISP String BGP

The service provider type. Currently, only BGP is supported.

InstanceChargeType String PostPaid

The billing method of the NAT bandwidth package. Currently, only PostPaid (pay-as-you-go) is supported.

InternetChargeType String PayByBandwidth

The billing method of the Internet traffic.

  • PayByTraffic: billed according to the traffic consumed.
IpCount String 1

The number of public IP addresses in the NAT bandwidth package.

Value range: 1 to 50

Name String abc

The name of the NAT bandwidth package.

NatGatewayId String ngw-xxoo123ggtf****

The ID of the NAT Gateway.

PublicIpAddresses

A list of IP addresses in the NAT bandwidth package.

PublicIpAddresse

The details of the IP address in the NAT bandwidth package.

AllocationId String eip-2zeerraiwb7ujdeds****

The ID of the IP address.

IpAddress String 116.xx.xx.28

The IP address.

UsingStatus String Available

The status of the IP address.

RegionId String cn-hangzhou

The ID of the region to which the NAT bandwidth package belongs.

Status String Available

The status of the NAT bandwidth package.

ZoneId String cn-shanghai-a

The zone to which the NAT bandwidth package belongs.

TotalCount Integer 10

The total number of entries.

PageNumber Integer 10

The current page number.

PageSize Integer 10

The number of entries per page.

RequestId String 4EC47282-1B74-4534-BD0E-403F3EE64CAF"

The ID of the request.

Examples

Request example


https://vpc.aliyuncs.com/?Action=DescribeBandwidthPackages
&RegionId=cn-hangzhou
&<CommonParameters>

Response example

XML format

<DescribeBandwidthPackagesResponse>
	  <PageNumber>1</PageNumber>
	  <TotalCount>1</TotalCount>
	  <BandwidthPackages>
		    <BandwidthPackage>
			      <Description></Description>
			      <IpCount>2</IpCount>
			      <ISP>BGP</ISP>
			      <ZoneId>cn-hangzhou-b</ZoneId>
			      <InternetChargeType>PayByTraffic</InternetChargeType>
			      <NatGatewayId>ngw-bp1uewa15k4iyaszaasza****</NatGatewayId>
			      <Name></Name>
			      <CreationTime>2018-03-06T07:33:51Z</CreationTime>
			      <Status>Available</Status>
			      <BandwidthPackageId>bwp-bp1xea10o8qxwaswq****</BandwidthPackageId>
			      <BusinessStatus>Normal</BusinessStatus>
			      <RegionId>cn-hangzhou</RegionId>
			      <InstanceChargeType>PostPaid</InstanceChargeType>
			      <PublicIpAddresses>
				        <PublicIpAddresse>
					          <IpAddress>118.31.xx.xx</IpAddress>
					          <AllocationId>nateip-bp1jb1uijvm9oaqaqaqaq****</AllocationId>
					          <UsingStatus>Idle</UsingStatus>
				        </PublicIpAddresse>
				        <PublicIpAddresse>
					          <IpAddress>118.31.xx.xx</IpAddress>
					          <AllocationId>nateip-bp1dt4hpe8847aceb****</AllocationId>
					          <UsingStatus>UsedBySnatTable</UsingStatus>
				        </PublicIpAddresse>
			      </PublicIpAddresses>
			      <Bandwidth>5</Bandwidth>
		    </BandwidthPackage>
	  </BandwidthPackages>
	  <PageSize>10</PageSize>
	  <RequestId>8909013D-4A64-41A6-93E6-E3FD08A3EAFE</RequestId>
</DescribeBandwidthPackagesResponse>

JSON format

{
	"PageNumber":1,
	"TotalCount":1,
	"BandwidthPackages":{
		"BandwidthPackage":[
			{
				"Description":"",
				"IpCount":"2",
				"ISP":"BGP",
				"ZoneId":"cn-hangzhou-b",
				"InternetChargeType":"PayByTraffic",
				"NatGatewayId":"ngw-bp1uewa15k4iyaszaasza****",
				"Name":"",
				"CreationTime":"2018-03-06T07:33:51Z",
				"Status":"Available",
				"BandwidthPackageId":"bwp-bp1xea10o8qxwaswq****",
				"BusinessStatus":"Normal",
				"RegionId":"cn-hangzhou",
				"InstanceChargeType":"PostPaid",
				"PublicIpAddresses":{
					"PublicIpAddresse":[
						{
							"IpAddress":"118.31.xx.xx",
							"AllocationId":"nateip-bp1jb1uijvm9oaqaqaqaq****",
							"UsingStatus":"Idle"
						},
						{
							"IpAddress":"118.31.xx.xx",
							"AllocationId":"nateip-bp1dt4hpe8847aceb****",
							"UsingStatus":"UsedBySnatTable"
						}
					]
				},
				"Bandwidth":"5"
			}
		]
	},
	"PageSize":10,
	"RequestId":"8909013D-4A64-41A6-93E6-E3FD08A3EAFE"
}

Errors

HTTP status code Error code Error message Error message
404 InvalidRegionId.NotFound The specified RegionId does not exist in our records. The specified region ID does not exist.

For a list of error codes, visit the API Error Center.