All Products
Search
Document Center

:DescribeAutoProvisioningGroupInstances

更新時間:Dec 14, 2023

Queries instances in an auto provisioning group.

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 DescribeAutoProvisioningGroupInstances

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

RegionId String Yes cn-hangzhou

The region ID of the auto provisioning group. 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.

AutoProvisioningGroupId String Yes apg-uf6jel2bbl62wh13****

The ID of the auto provisioning group.

Response parameters

Parameter

Type

Example

Description

PageSize Integer 10

The number of entries per page.

RequestId String B48A12CD-1295-4A38-A8F0-0E92C937****

The ID of the request.

PageNumber Integer 1

The page number.

TotalCount Integer 2

The number of queried instances in the auto provisioning group.

Instances Array of Instance

The information about the instances in the auto provisioning group.

Instance
Status String Running

The instance status.

CreationTime String 2017-12-10T04:04Z

The time when the instance was created.

IsSpot Boolean true

Indicates whether the instance is a preemptible instance.

CPU Integer 2

The number of vCPUs.

InstanceId String i-bp67acfmxazb4p****

The instance ID.

NetworkType String vpc

The network type of the instance. Valid values:

  • vpc
  • classic
InstanceType String ecs.g5.large

The instance type.

RegionId String cn-hangzhou

The region ID of the instance.

IoOptimized Boolean true

Indicates whether the instance is I/O optimized.

OsType String linux

The operating system type of the instance. Valid values:

  • windows
  • linux
ZoneId String cn-hangzhou-g

The zone ID of the instance.

Memory Integer 1024

The memory size of the instance. Unit: MiB.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=DescribeAutoProvisioningGroupInstances
&AutoProvisioningGroupId=apg-uf6jel2bbl62wh13****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

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

<DescribeAutoProvisioningGroupInstancesResponse>
    <PageNumber>1</PageNumber>
    <TotalCount>2</TotalCount>
    <PageSize>2</PageSize>
    <RequestId>A43735F7-30BD-4D89-AB8A-030EB24B****</RequestId>
    <Instances>
        <Instance>
            <CreationTime>2019-06-17T15:25Z</CreationTime>
            <IoOptimized>true</IoOptimized>
            <OsType>linux</OsType>
            <NetworkType>vpc</NetworkType>
            <Status>Running</Status>
            <Memory>8192</Memory>
            <RegionId>cn-shanghai</RegionId>
            <InstanceId>i-bp67acfmxazb4p****</InstanceId>
            <CPU>2</CPU>
            <ZoneId>cn-shanghai-a</ZoneId>
            <InstanceType>ecs.g5.large</InstanceType>
        </Instance>
        <Instance>
            <CreationTime>2019-06-17T15:25Z</CreationTime>
            <IoOptimized>true</IoOptimized>
            <OsType>linux</OsType>
            <NetworkType>vpc</NetworkType>
            <Status>Running</Status>
            <Memory>8192</Memory>
            <RegionId>cn-shanghai</RegionId>
            <InstanceId>i-bp67acfmxazb5p****</InstanceId>
            <CPU>2</CPU>
            <ZoneId>cn-shanghai-a</ZoneId>
            <InstanceType>ecs.g5.large</InstanceType>
        </Instance>
    </Instances>
</DescribeAutoProvisioningGroupInstancesResponse>

JSON format

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

{
  "PageNumber" : 1,
  "TotalCount" : 2,
  "PageSize" : 2,
  "RequestId" : "A43735F7-30BD-4D89-AB8A-030EB24B****",
  "Instances" : {
    "Instance" : [ {
      "CreationTime" : "2019-06-17T15:25Z",
      "IoOptimized" : true,
      "OsType" : "linux",
      "NetworkType" : "vpc",
      "Status" : "Running",
      "Memory" : 8192,
      "RegionId" : "cn-shanghai",
      "InstanceId" : "i-bp67acfmxazb4p****",
      "CPU" : 2,
      "ZoneId" : "cn-shanghai-a",
      "InstanceType" : "ecs.g5.large"
    }, {
      "CreationTime" : "2019-06-17T15:25Z",
      "IoOptimized" : true,
      "OsType" : "linux",
      "NetworkType" : "vpc",
      "Status" : "Running",
      "Memory" : 8192,
      "RegionId" : "cn-shanghai",
      "InstanceId" : "i-bp67acfmxazb5p****",
      "CPU" : 2,
      "ZoneId" : "cn-shanghai-a",
      "InstanceType" : "ecs.g5.large"
    } ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 MissingParamter.RegionId The regionId should not be null. RegionId is required.

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