All Products
Search
Document Center

Platform For AI:DescribeResource

Last Updated:Nov 22, 2024

Queries the information about a resource group.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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
eas:DescribeResourceget
*Resource
acs:eas:{#regionId}:{#accountId}:resource/{#ResourceId}
    none
none

Request syntax

GET /api/v2/resources/{ClusterId}/{ResourceId} HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
ClusterIdstringYes

The ID of the cluster to which the resource group belongs.

cn-shanghai
ResourceIdstringYes

The ID of the resource group. For more information about how to query the ID of a resource group, see ListResources .

eas-r-asdasdasd

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

902976F2-6FAF-5404-8A4D-6CC223***
ResourceIdstring

The ID of the Elastic Algorithm Service (EAS) resource.

eas-r-glkfpsxuw57x1h*****
ResourceNamestring

The name of the EAS resource.

my-resouce****
ClusterIdstring

The ID of the cluster to which the resource group belongs.

cn-beijing
CreateTimestring

The time when the resource group was created.

2020-05-19T14:19:42Z
UpdateTimestring

The time when the resource group was last updated.

2021-02-24T11:52:17Z
OwnerUidstring

The ID of the resource group owner.

14401087478****
InstanceCountinteger

The total number of instances in the resource group.

4
PrePaidInstanceCountinteger

The total number of subscription instances in the resource group.

1
PostPaidInstanceCountinteger

The total number of pay-as-you-go instances in the resource group.

3
CpuCountinteger

The total number of CPU cores.

16
GpuCountinteger

The total number of GPUs.

1
Statusstring

The state of the resource group.

ResourceReady
Messagestring

The returned message.

Resource is ready
ExtraDatastring

The additional information, such as the connection status of a virtual private cloud (VPC) and the log status of Log Service.

{"vswitch_id":"vsw-bp17uo6xebcusy****","gpu_share":true,"aux_vswitch_id_list":["vsw-bp13b3pvjap3vxn****","vsw-bp1nls8o5hk8mt8*****"],"security_group_id":"sg-bp1j1z7297hcink*****","vpc_id":"vpc-bp1kjr3rfyhx01*****","destination_cidr":"172.16.0.12/28","role_arn":"acs:ram::1157703270*****:role/AliyunServiceRoleForPaiEas","sls_project":"","sls_logstore":"","sls_status":"ResourceReady","sls_message":"","update_time":""}
ResourceTypestring

The type of the resource group. Valid values:

  • Dedicated: the dedicated resource group.
  • SelfManaged: the self-managed resource group.
Dedicated

Examples

Sample success responses

JSONformat

{
  "RequestId": "902976F2-6FAF-5404-8A4D-6CC223***",
  "ResourceId": "eas-r-glkfpsxuw57x1h*****",
  "ResourceName": "my-resouce****",
  "ClusterId": "cn-beijing",
  "CreateTime": "2020-05-19T14:19:42Z",
  "UpdateTime": "2021-02-24T11:52:17Z",
  "OwnerUid": "14401087478****",
  "InstanceCount": 4,
  "PrePaidInstanceCount": 1,
  "PostPaidInstanceCount": 3,
  "CpuCount": 16,
  "GpuCount": 1,
  "Status": "ResourceReady",
  "Message": "Resource is ready",
  "ExtraData": "{\"vswitch_id\":\"vsw-bp17uo6xebcusy****\",\"gpu_share\":true,\"aux_vswitch_id_list\":[\"vsw-bp13b3pvjap3vxn****\",\"vsw-bp1nls8o5hk8mt8*****\"],\"security_group_id\":\"sg-bp1j1z7297hcink*****\",\"vpc_id\":\"vpc-bp1kjr3rfyhx01*****\",\"destination_cidr\":\"172.16.0.12/28\",\"role_arn\":\"acs:ram::1157703270*****:role/AliyunServiceRoleForPaiEas\",\"sls_project\":\"\",\"sls_logstore\":\"\",\"sls_status\":\"ResourceReady\",\"sls_message\":\"\",\"update_time\":\"\"}",
  "ResourceType": "Dedicated"
}

Error codes

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

Change history

Change timeSummary of changesOperation
2023-08-24The response structure of the API has changedView Change Details
2021-11-12The response structure of the API has changedView Change Details