You can call this operation to query the delivery and usage status of resources filed by the account manager, including the types, delivery status, and consumption status of the resources.

Description

Only I/O optimized instances and instances in VPCs can be filed. By default, the filing tickets of I/O optimized instances and instances in VPCs are queried.

Note This operation is under internal preview and has not been officially released. We recommend that you avoid using this operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
RegionId String Yes cn-hangzhou

The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list.

Action String Yes DescribeDemands

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

DemandStatus.N RepeatList No Active

The status of the filing ticket. Valid values:

  • Creating: The filing ticket is being created.
  • Active: The filed resources are being supplied.
  • Expired: The expected purchase time of the filed resources specified in the filing ticket has expired.
  • Finished: The filed resources have been consumed.
  • Cancelled: The filed resources have been canceled.
DryRun Boolean No false

Specifies whether to check this request only. Valid values:

  • true: sends a check request, without querying the status of the filing ticket. The system checks whether your AccessKey is valid, whether RAM users are authorized, and whether the required parameters are set. If the check fails, the corresponding error message is returned. If the check succeeds, the DryRunOperation error code is returned.
  • false: sends an API request. After the request succeeds, the 2XX HTTP status code is returned and the status of the filing ticket is queried. Default value: false.
InstanceChargeType String No PostPaid

The billing methods of the instances. Valid values:

  • PostPaid: pay-as-you-go
  • PrePaid: subscription
InstanceType String No ecs.g5.large

The types of the filed instances.

InstanceTypeFamily String No ecs.g5

The instance families of the filed instances.

PageNumber Integer No 1

The number of the page to return. Pages start from page 1.

Default value: 1.

PageSize Integer No 10

The number of entries to return on each page. Maximum value: 100.

Default value: 10.

ZoneId String No cn-hangzhou-g

The ID of the zone.

Response parameters

Parameter Type Example Description
Demands

Indicates the filing tickets whose regions meet the filter criteria.

AvailableAmount Integer 10

The number of instances currently available for the filed resources.

DeliveringAmount Integer 20

The number of instances to be delivered in the filed resources.

DemandStatus String Active

The status of the filing ticket. Valid values:

  • Creating: The filed resources are being created.
  • Active: The filed resources are being supplied.
  • Finished: The filed resources have been consumed.
  • Expired: The expected purchase time of the filed resources specified in the filing ticket has expired. After the expected purchase time expires, the filed resources are released and the delivery status of the resources becomes invalid.
  • Cancelled: The filed resources have been canceled. The delivery status of the resources becomes invalid.
DemandTime String 2019-02-26T12:00Z

The time when the filing ticket was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

EndTime String 2019-03-03T15:00Z

The expected end time for the purchase of the filed resources. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

InstanceChargeType String Prepaid: subscription

The billing methods of the filed resources. Valid values:

  • Prepaid: subscription
  • Postpaid: pay-as-you-go
InstanceType String ecs.g5.xlarge

The types of the filed instances.

InstanceTypeFamily String ecs.g5

The instance families of the filed instances.

Period Integer 3

The use duration of the filed resources.

PeriodUnit String Month

The unit of the use duration of the filed resources.

  • Hour
  • Day
  • Month
StartTime String 2019-02-27T12:00Z

The expected start time for the purchase of the filed resources. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

SupplyInfos

The delivery status of the filed resources.

Amount Integer 30

The number of instances delivered this time.

SupplyEndTime String 2019-03-03T15:00Z

The end time when the filed resources are delivered and available. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

SupplyStartTime String 2019-03-01T14:00Z

The start time when the filed resources are delivered and available. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

SupplyStatus String Delivering

The delivery status of the filed resources.

  • Delivered: The filed resources have been delivered.
  • Delivering: The filed resources are being delivered.
TotalAmount Integer 50

The number of the filed instances.

UsedAmount Integer 20

The number of consumed instances.

ZoneId String cn-hangzhou-g

The zones of the filed resources.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 10

The number of entries returned per page.

RegionId String cn-hangzhou

The region ID of the query.

RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request.

TotalCount Integer 6

The number of queried filing tickets.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=DescribeDemands
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<DescribeDemandsResponse>
    <Demands>
        <AvailableAmount>0</AvailableAmount>
        <DeliveringAmount>50</DeliveringAmount>
        <DemandStatus>Expired</DemandStatus>
        <DemandTime>2019-02-26T12:00Z</DemandTime>
        <EndTime>2019-03-03T15:00Z</EndTime>
        <InstanceChargeType>PrePaid</InstanceChargeType>
        <InstanceType>ecs.g5.4xlarge</InstanceType>
        <InstanceTypeFamily>ecs.g5</InstanceTypeFamily>
        <Period>3</Period>
        <PeriodUnit>Month</PeriodUnit>
        <StartTime>2019-02-27T12:00Z</StartTime>
        <SupplyInfos>
            <Amount>50</Amount>
            <SupplyEndTime>2019-03-03T15:00Z</SupplyEndTime>
            <SupplyStartTime>2019-03-01T14:00Z</SupplyStartTime>
            <SupplyStatus>Delivering</SupplyStatus>
        </SupplyInfos>
        <TotalAmount>50</TotalAmount>
        <UsedAmount>0</UsedAmount>
        <ZoneId>cn-hangzhou-g</ZoneId>
    </Demands>
    <PageNumber>1</PageNumber>
    <PageSize>10</PageSize>
    <RegionId>cn-hangzhou</RegionId>
    <RequestId>04066112-BF3A-4FCD-ABBD-B4B5EDAE9DXX</RequestId>
    <TotalCount>1</TotalCount>
</DescribeDemandsResponse>

JSON format

{
	"PageNumber":1,
	"TotalCount":1,
	"PageSize":10,
	"Demands":[
		{
			"Period":3,
			"DemandTime":"2019-02-26T12:00Z",
			"InstanceTypeFamily":"ecs.g5",
			"AvailableAmount":0,
			"ZoneId":"cn-hangzhou-g",
			"UsedAmount":0,
			"DeliveringAmount":50,
			"InstanceType":"ecs.g5.4xlarge",
			"DemandStatus":"Expired",
			"EndTime":"2019-03-03T15:00Z",
			"TotalAmount":50,
			"StartTime":"2019-02-27T12:00Z",
			"SupplyInfos":[
				{
					"Amount":"50",
					"SupplyStartTime":"2019-03-01T14:00Z",
					"SupplyEndTime":"2019-03-03T15:00Z",
					"SupplyStatus":"Delivering"
				}
			],
			"InstanceChargeType":"PrePaid",
			"PeriodUnit":"Month"
		}
	],
	"RequestId":"04066112-BF3A-4FCD-ABBD-B4B5EDAE9DXX",
	"RegionId":"cn-hangzhou"
}

Error codes

HTTP status code Error code Error message Description
400 MissingParamter.RegionId The regionId should not be null. The error message returned because the RegionId parameter is not specified.
404 InvalidInstanceChargeType.NotFound The InstanceChargeType does not exist in our records The error message returned because the specified instance type does not exist.

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