All Products
Search
Document Center

:DescribeDemands

Last Updated:Sep 27, 2023

Queries the delivery and usage states of filed resources.

You can call this operation to query the details of resources that you filed with Alibaba Cloud, including the types, delivery status, and consumption details of the resources.

By default, the demands for I/O optimized instances of the Virtual Private Cloud (VPC) type are queried.

For information about how to create (CreateDemand), modify (ModifyDemand), and delete (DeleteDemand) demands for ECS resources, contact your account manager.

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

Action

String

Yes

DescribeDemands

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

RegionId

String

Yes

cn-hangzhou

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

PageNumber

Integer

No

1

The page number. Pages start from page 1.

Default value: 1.

PageSize

Integer

No

10

The number of entries per page. Valid values: 1 to 100.

Default value: 10.

DryRun

Boolean

No

false

Specifies whether to perform only a dry run, without performing the actual request. Valid values:

  • true: performs only a dry run. The system checks whether your AccessKey pair is valid, whether RAM users are granted required permissions, and whether the required parameters are specified. If the request fails the dry run, an error message is returned. Otherwise, an error message is returned.

  • false (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.

Tag.N.Key

String

No

TestKey

Note

This parameter is not publicly available.

Tag.N.Value

String

No

TestValue

Note

This parameter is not publicly available.

ZoneId

String

No

cn-hangzhou-g

The zone ID of the resource. You can call the DescribeZones operation to query the most recent zone list.

DemandId

String

No

ed-bp11n21kq00sl71p****

The ID of the demand. If this parameter is specified, other optional request parameters are ignored.

InstanceTypeFamily

String

No

ecs.g6

The instance family of the instance.

InstanceType

String

No

ecs.g6.xlarge

The instance type of the instance.

InstanceChargeType

String

No

PostPaid

The billing method of the instance. Valid values:

  • PostPaid: pay-as-you-go

  • PrePaid: subscription

DemandType

String

No

Custom

The source of the instance. Valid values:

  • Custom: filed on your own.

  • System (default): filed by Alibaba Cloud.

DemandStatus.N

String

No

Active

The status of the demand or filed resources. Valid values:

  • Creating: The demand is being created.

  • Active: The filed resources are being supplied.

  • Expired: The demand has expired.

  • Finished: The filed resources are consumed.

  • Refused: The demand is rejected. To view the reason for rejection, see the Comment parameter in the response.

  • Cancelled: The demand is canceled.

Response parameters

Parameter

Type

Example

Description

PageSize

Integer

10

The number of entries per page.

PageNumber

Integer

1

The page number.

RequestId

String

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request.

TotalCount

Integer

6

The number of queried demands.

RegionId

String

cn-hangzhou

The ID of the region.

Demands

Array of Demand

The demands in the region.

Demand

Comment

String

test-for-comment

The feedback on the rejected demands.

DemandDescription

String

test-DemandDescription

The description of the demand.

DemandId

String

ed-bp11n21kq00sl71p****

The ID of the demand.

DemandTime

String

2019-02-26T12:00:00Z

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

InstanceType

String

ecs.g6.xlarge

The instance type of the filed instance.

DemandName

String

k8s-node-demand

The name of the demand.

Period

Integer

3

The usage duration of the filed resources.

InstanceChargeType

String

Prepaid

The billing method of the filed resources. Valid values:

  • Prepaid: subscription

  • Postpaid: pay-as-you-go

AvailableAmount

Integer

10

The number of available instances.

EndTime

String

2019-03-03T15:00: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.

StartTime

String

2019-02-27T12:00: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.

PeriodUnit

String

Month

The unit of the usage duration of the filed resources. Valid values:

  • Hour

  • Day

  • Month

ZoneId

String

cn-hangzhou-g

The ID of the zone where the filed resource resides.

UsedAmount

Integer

20

The number of consumed instances.

TotalAmount

Integer

50

The number of filed instances.

DeliveringAmount

Integer

20

The number of instances to be delivered.

InstanceTypeFamily

String

ecs.g6

The instance family of the filed instance.

DemandStatus

String

Active

The status of the demand or filed resources. Valid values:

  • Creating: The demand is being created.

  • Active: The filed resources are being supplied.

  • Expired: The demand has expired.

  • Finished: The filed resources are consumed.

  • Refused: The demand is rejected. To view the reason for rejection, see the Comment parameter.

  • Cancelled: The demand is canceled. After the demand is canceled, the delivery status of the resources becomes invalid.

SupplyInfos

Array of SupplyInfo

The delivery status of the filed resources.

SupplyInfo

Amount

Integer

30

The number of delivered instances.

SupplyStatus

String

Delivering

The delivery status of the filed resource. Valid values:

  • Delivered: The filed resource is delivered.

  • Delivering: The filed resource is being delivered.

SupplyStartTime

String

2019-03-01T14:00:00Z

The beginning of the time range during which 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.

SupplyEndTime

String

2019-03-03T15:00:00Z

The end of the time range during which 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.

PrivatePoolId

String

crp-bp1fv8sbhelbzjwx****

The ID of the private pool that corresponds to the demand.

Examples

Sample requests

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

Sample success responses

XML format

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

<DescribeDemandsResponse>
    <PageSize>10</PageSize>
    <PageNumber>1</PageNumber>
    <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
    <TotalCount>6</TotalCount>
    <RegionId>cn-hangzhou</RegionId>
    <Demands>
        <Comment>test-for-comment</Comment>
        <DemandDescription>test-DemandDescription</DemandDescription>
        <DemandId>ed-bp11n21kq00sl71p****</DemandId>
        <DemandTime>2019-02-26T12:00:00Z</DemandTime>
        <InstanceType>ecs.g6.xlarge</InstanceType>
        <DemandName>k8s-node-demand</DemandName>
        <Period>3</Period>
        <InstanceChargeType>Prepaid</InstanceChargeType>
        <AvailableAmount>10</AvailableAmount>
        <EndTime>2019-03-03T15:00:00Z</EndTime>
        <StartTime>2019-02-27T12:00:00Z</StartTime>
        <PeriodUnit>Month</PeriodUnit>
        <ZoneId>cn-hangzhou-g</ZoneId>
        <UsedAmount>20</UsedAmount>
        <TotalAmount>50</TotalAmount>
        <DeliveringAmount>20</DeliveringAmount>
        <InstanceTypeFamily>ecs.g6</InstanceTypeFamily>
        <DemandStatus>Active</DemandStatus>
        <SupplyInfos>
            <Amount>30</Amount>
            <SupplyStatus>Delivering</SupplyStatus>
            <SupplyStartTime>2019-03-01T14:00:00Z</SupplyStartTime>
            <SupplyEndTime>2019-03-03T15:00:00Z</SupplyEndTime>
            <PrivatePoolId>crp-bp1fv8sbhelbzjwx****</PrivatePoolId>
        </SupplyInfos>
    </Demands>
</DescribeDemandsResponse>

JSON format

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

{
  "PageSize" : 10,
  "PageNumber" : 1,
  "RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "TotalCount" : 6,
  "RegionId" : "cn-hangzhou",
  "Demands" : [ {
    "Comment" : "test-for-comment",
    "DemandDescription" : "test-DemandDescription",
    "DemandId" : "ed-bp11n21kq00sl71p****",
    "DemandTime" : "2019-02-26T12:00:00Z",
    "InstanceType" : "ecs.g6.xlarge",
    "DemandName" : "k8s-node-demand",
    "Period" : 3,
    "InstanceChargeType" : "Prepaid",
    "AvailableAmount" : 10,
    "EndTime" : "2019-03-03T15:00:00Z",
    "StartTime" : "2019-02-27T12:00:00Z",
    "PeriodUnit" : "Month",
    "ZoneId" : "cn-hangzhou-g",
    "UsedAmount" : 20,
    "TotalAmount" : 50,
    "DeliveringAmount" : 20,
    "InstanceTypeFamily" : "ecs.g6",
    "DemandStatus" : "Active",
    "SupplyInfos" : [ {
      "Amount" : 30,
      "SupplyStatus" : "Delivering",
      "SupplyStartTime" : "2019-03-01T14:00:00Z",
      "SupplyEndTime" : "2019-03-03T15:00:00Z",
      "PrivatePoolId" : "crp-bp1fv8sbhelbzjwx****"
    } ]
  } ]
}

Error codes

HTTP status code

Error code

Error message

Description

400

MissingParamter.RegionId

The regionId should not be null.

RegionId is required.

404

InvalidInstanceChargeType.NotFound

The InstanceChargeType does not exist in our records.

The instance billing method is not found.

404

InvalidZone.NotFound

The ZoneId provided does not exist in our records.

The specified zone ID is not found.

404

InvalidDemandId.NotFound

The specified DemandId is not found.

The specified demand ID is not found.

For a list of error codes, see Service error codes.