DescribeComputeEnv

Last updated: 2019-07-08 20:38:15

1. API Description

API request domain name: batch.tencentcloudapi.com.

Used to query compute environment details

Default API request frequency limit: 2 times/second.

2. Input Parameters

The following list of request parameters lists only the API request parameters and some common parameters. For the complete list of common parameters, see Common Request Parameters.

Parameter name Required Type Description
Action Yes String Common parameter; the value for this API: DescribeComputeEnv
Version Yes String Common parameter; the value for this API: 2017-03-12
Region Yes String Common parameters; for details, see the Region List supported by the product.
EnvId Yes String Compute environment ID

3. Output Parameters

Parameter name Type Description
EnvId String Compute environment ID
EnvName String Compute environment name
Placement Placement Location information
CreateTime String Compute environment creation time
ComputeNodeSet Array of ComputeNode List of compute node information
ComputeNodeMetrics ComputeNodeMetrics Compute node statistical metrics
DesiredComputeNodeCount Integer Number of desired compute nodes
EnvType String Compute environment type
RequestId String The unique request ID which is returned for each request. The RequestId for the current request needs to be provided when troubleshooting.

4. Examples

Example 1. Viewing Compute Environment Details

Input

https://batch.tencentcloudapi.com/?Action=DescribeComputeEnv
&EnvId=env-lcpcej85
&<Common request parameter>

Output

{
  "Response": {
    "ComputeNodeMetrics": {
      "AbnormalCount": 1,
      "CreatedCount": 0,
      "CreatingCount": 0,
      "CreationFailedCount": 0,
      "DeletingCount": 0,
      "RunningCount": 1,
      "SubmittedCount": 0
    },
    "ComputeNodeSet": [
      {
        "AgentVersion": "1.1.9",
        "ComputeNodeId": "node-noa8vefu",
        "ComputeNodeInstanceId": "ins-0kj3gz6s",
        "ComputeNodeState": "ABNORMAL",
        "Cpu": 1,
        "Mem": 2,
        "ResourceCreatedTime": "2018-03-08T11:49:17Z",
        "TaskInstanceNumAvailable": 1
      },
      {
        "AgentVersion": "1.1.9",
        "ComputeNodeId": "node-9yzd5jei",
        "ComputeNodeInstanceId": "ins-jyafz2sk",
        "ComputeNodeState": "RUNNING",
        "Cpu": 1,
        "Mem": 2,
        "ResourceCreatedTime": "2018-03-09T13:15:44Z",
        "TaskInstanceNumAvailable": 1
      }
    ],
    "CreateTime": "2018-03-08T11:48:43Z",
    "DesiredComputeNodeCount": 2,
    "EnvId": "env-lcpcej85",
    "EnvName": "test compute env",
    "EnvType": "MANAGED",
    "Placement": {
      "Zone": "ap-guangzhou-2"
    },
    "RequestId": "274cbd4f-77d2-4bf6-9984-643318ed3ef8"
  }
}

5. Developer Resources

It is recommended to use API 3.0 Explorer. This tool provides various capabilities such as online debugging, signature verification, SDK code generation and quick API retrieval that significantly reduce the difficulty of using cloud APIs.

Cloud API 3.0 comes with a set of complementary development tools that make it easier to call the API.

6. Error Codes

Only the error codes related to this API are listed below. For other error codes, see Common Error Codes.

Error Code Description
InternalError Internal error
InvalidParameter.EnvIdMalformed Invalid compute environment ID format.
ResourceNotFound.ComputeEnv The specified compute environment does not exist.