Queries the details of data transfer plans for one or more simple application servers.

Description

You can query the details of data transfer plans for one or more simple application servers, including the data transfer quota, used data transfer quota, unused data transfer quota, and excess data transfers in the current month.

Simple Application Server provides data transfer quotas in plans. The prices for data transfers within quotas are included in the plans. You are charged for data transfers that exceed the quotas. Take note of the following items:

  • You are charged only for outbound data transfers from simple application servers over the Internet. You are not charged for inbound data transfers to simple application servers over the Internet.
  • Outbound data transfers from simple application servers to other Alibaba Cloud services over the Internet consume the data transfer quotas that are included in plans. If the quotas are exceeded, you are charged for the excess data transfers.
  • You are not charged for data transfers between simple application servers within the same virtual private cloud (VPC).

For more information, see Quotas and billing of data transfers.

QPS limits

The queries per second (QPS) limit for a single user for the API operation is 10 calls per minute. If the number of calls to the API operation per minute exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. For more information, see QPS limit.

Request parameters

Parameter Type Required Example Description
Action String Yes ListInstancesTrafficPackages

The operation that you want to perform. Set the value to ListInstancesTrafficPackages.

RegionId String Yes cn-hangzhou

The region ID of the simple application server. You can call the ListRegions operation to query the most recent region list.

InstanceIds String Yes ["2ad1ae67295445f598017499dc******","2ad1ae67295445f598017499dc******"]

The IDs of the simple application servers. The value can be a JSON array that consists of up to 100 simple application server IDs. Separate the server IDs with commas (,).

Response parameters

Parameter Type Example Description
InstanceTrafficPackageUsages Array of InstanceTrafficPackageUsage

The details of the data transfer plans of the simple application servers.

InstanceId String ccscqwqwqqqw****

The ID of the simple application server.

TrafficUsed Long 10000

The used quota of the data transfer plan in the current month. Unit: KB.

TrafficPackageTotal Long 20000

The quota of the data transfer plan in the current month. Unit: KB.

Note TrafficPackageTotal = TrafficUsed + TrafficPackageRemaining
TrafficPackageRemaining Long 10000

The unused quota of the data transfer plan in the current month. Unit: KB.

TrafficOverflow Long 0

The data transfers that exceeds the quota of the data transfer plan in the current month. Unit: KB.

RequestId String 20758A-585D-4A41-A9B2-28DA8F4F****

The ID of the request.

Examples

Sample requests

https://swas.cn-hangzhou.aliyuncs.com/?Action=ListInstancesTrafficPackages
&RegionId=cn-hangzhou
&InstanceIds=["2ad1ae67295445f598017499dc******","2ad1ae67295445f598017499dc******"]
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListInstancesTrafficPackagesResponse>
    <InstanceTrafficPackageUsages>
        <InstanceId>ccscqwqwqqqw****</InstanceId>
        <TrafficUsed>10000</TrafficUsed>
        <TrafficPackageTotal>20000</TrafficPackageTotal>
        <TrafficPackageRemaining>10000</TrafficPackageRemaining>
        <TrafficOverflow>0</TrafficOverflow>
    </InstanceTrafficPackageUsages>
    <RequestId>20758A-585D-4A41-A9B2-28DA8F4F****</RequestId>
</ListInstancesTrafficPackagesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "InstanceTrafficPackageUsages" : [ {
    "InstanceId" : "ccscqwqwqqqw****",
    "TrafficUsed" : 10000,
    "TrafficPackageTotal" : 20000,
    "TrafficPackageRemaining" : 10000,
    "TrafficOverflow" : 0
  } ],
  "RequestId" : "20758A-585D-4A41-A9B2-28DA8F4F****"
}

Error codes

HTTP status code Error code Error message Description
400 RegionIdNotMatchHost The parameter regionId does not match the endpoint host. The error message returned because the specified RegionId parameter does not match the service address that you selected.
500 InternalError An error occurred while processing your request. The error message returned because an internal error has occurred. Try again later. If the problem persists, submit a ticket.

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