All Products
Search
Document Center

Elastic Compute Service:DescribeAutoProvisioningGroupInstances

Last Updated:Aug 28, 2024

You can call this operation to query 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.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ecs:DescribeAutoProvisioningGroupInstancesget
  • AutoProvisioningGroup
    acs:ecs:{#regionId}:{#accountId}:autoprovisioninggroup/{#autoprovisioninggroupId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

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

cn-hangzhou
PageNumberintegerNo

The number of the page to return.

Pages start from page 1.

Default value: 1.

1
PageSizeintegerNo

The number of entries to return on each page.

Maximum value: 100.

Default value: 10.

10
AutoProvisioningGroupIdstringYes

The ID of the auto provisioning group.

apg-uf6jel2bbl62wh13****

Response parameters

ParameterTypeDescriptionExample
object
PageSizeinteger

The number of entries returned per page.

10
RequestIdstring

The ID of the request.

B48A12CD-1295-4A38-A8F0-0E92C937****
PageNumberinteger

The page number of the returned page.

1
TotalCountinteger

The number of queried instances in the auto provisioning group.

2
Instancesarray<object>

An array consisting of Instance data.

object
Statusstring

The status of the instance.

Running
CreationTimestring

The time when the instance was created.

2017-12-10T04:04Z
IsSpotboolean

Indicates whether the instance is a preemptible instance.

true
CPUinteger

The number of vCPUs.

2
InstanceIdstring

The ID of the instance.

i-bp67acfmxazb4p****
NetworkTypestring

The network type of the instance. Valid values:

  • vpc
  • classic
vpc
InstanceTypestring

The instance type of the ECS instance.

ecs.g5.large
RegionIdstring

The region ID of the instance.

cn-hangzhou
IoOptimizedboolean

Indicates whether the instance is I/O optimized.

true
OsTypestring

The operating system type of the instance. Valid values:

  • windows
  • linux
linux
ZoneIdstring

The zone ID of the instance.

cn-hangzhou-g
Memoryinteger

The memory size of the instance. Unit: MiB.

1024

Examples

Sample success responses

JSONformat

{
  "PageSize": 10,
  "RequestId": "B48A12CD-1295-4A38-A8F0-0E92C937****",
  "PageNumber": 1,
  "TotalCount": 2,
  "Instances": {
    "Instance": [
      {
        "Status": "Running",
        "CreationTime": "2017-12-10T04:04Z",
        "IsSpot": true,
        "CPU": 2,
        "InstanceId": "i-bp67acfmxazb4p****",
        "NetworkType": "vpc",
        "InstanceType": "ecs.g5.large",
        "RegionId": "cn-hangzhou",
        "IoOptimized": true,
        "OsType": "linux",
        "ZoneId": "cn-hangzhou-g",
        "Memory": 1024
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400MissingParameterThe specified parameter "AutoProvisioningGroupId" should not be null.-
400MissingParamter.RegionIdThe regionId should not be null.The RegionId parameter is required.
403Forbidden.RAMUser not authorized to operate on the specified resource, or this API doesn't support RAM.-
404InvalidAutoProvisioningGroupId.NotFoundThe specified AutoProvisioningGroupId does not exist.-

For a list of error codes, visit the Service error codes.