Queries the resource usage of a cluster.

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

ParameterTypeRequiredExampleDescription
ActionStringYesDescribeClusterUsedUtilization

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

DedicatedClusterIdStringYesnodeid

The ID of the cluster. If MetricType is set to CLUSTER, enter the ID of the dedicated cluster. Otherwise, set this parameter to a node ID.

EnvStringNoALIYUN

The environment of the cluster. Default value: ALIYUN.

MetricTypeStringNoNODE

Specifies whether to query the metrics of the cluster or a node. Valid values:

  • CLUSTER (default): queries the metrics of the cluster.
  • NODE: queries the metrics of a node.
RegionIdStringNocn-hangzhou

The ID of the region in which the Data Transmission Service (DTS) instance resides.

DtsJobIdStringNok2gm967v16f****

The ID of the data migration or synchronization task.

ClientTokenStringNo0c593ea1-3bea-11e9-b96b-88e9fe63****

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

AccountIdStringNo12323344****

The ID of the Alibaba Cloud account. You do not need to specify this parameter because this parameter will be removed in the future.

Response parameters

ParameterTypeExampleDescription
DedicatedClusterIdStringdtscluster_h3fl1cs217sx952

The ID of the cluster.

CpuTotalFloat50

The CPU utilization of the cluster. Unit: %.

MemoryUsedFloat0

The used memory size of the cluster. A value of 0 is temporarily returned.

MemoryTotalFloat0

The total memory size of the cluster. A value of 0 is temporarily returned.

DiskTotalFloat1024

The total disk size of the cluster. Unit: GB.

DiskUsedFloat96

The used disk size of the cluster. Unit: GB.

DuTotalInteger30

The total number of DTS units (DUs).

DuUsedInteger2

The number of used DUs.

TaskRunningInteger3

The number of tasks that are in progress.

SuccessBooleantrue

Indicates whether the request was successful.

CodeString200

The error code returned by the backend service. The number is incremented.

ErrCodeStringInternalError

The error code returned if the request failed.

ErrMessageStringThe Value of Input Parameter %s is not valid.

The error message returned if the request failed.

DynamicMessageStringType

The dynamic part in the error message. This parameter is used to replace the %s variable in the value of ErrMessage.

HttpStatusCodeInteger200

The HTTP status code.

RequestIdString621BB4F8-3016-4FAA-8D5A-5D3163CC****

The ID of the request.

MemoryUsedPercentageFloat1.0

The memory usage. Unit: %.

Examples

Sample requests

http(s)://dts.aliyuncs.com/?Action=DescribeClusterUsedUtilization
&DedicatedClusterId=nodeid
&Env=ALIYUN
&MetricType=NODE
&RegionId=cn-hangzhou
&DtsJobId=k2gm967v16f****
&ClientToken=0c593ea1-3bea-11e9-b96b-88e9fe63****
&AccountId=12323344****
&Common request parameters

Sample success responses

XML format

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

<DescribeClusterUsedUtilizationResponse>
    <code>200</code>
    <data>
        <DedicatedClusterId>dtscluster_****</DedicatedClusterId>
        <RequestId>E2E2AD3E-B7A4-106C-9063-****</RequestId>
        <DuUsed>14</DuUsed>
        <Success>true</Success>
        <DuTotal>30</DuTotal>
        <DiskTotal>982.3013</DiskTotal>
        <HttpStatusCode>200</HttpStatusCode>
        <MemoryUsedPercentage>5.5200005</MemoryUsedPercentage>
        <MemoryUsed>0</MemoryUsed>
        <TaskRunning>3</TaskRunning>
        <DiskUsed>92.0647</DiskUsed>
        <MemoryTotal>0</MemoryTotal>
        <CpuTotal>1.7</CpuTotal>
    </data>
    <httpStatusCode>200</httpStatusCode>
    <requestId>E2E2AD3E-B7A4-106C-9063-****</requestId>
    <successResponse>true</successResponse>
</DescribeClusterUsedUtilizationResponse>

JSON format

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

{
  "code" : "200",
  "data" : {
    "DedicatedClusterId" : "dtscluster_****",
    "RequestId" : "E2E2AD3E-B7A4-106C-9063-****",
    "DuUsed" : 14,
    "Success" : true,
    "DuTotal" : 30,
    "DiskTotal" : 982.3013,
    "HttpStatusCode" : 200,
    "MemoryUsedPercentage" : 5.5200005,
    "MemoryUsed" : 0.0,
    "TaskRunning" : 3,
    "DiskUsed" : 92.0647,
    "MemoryTotal" : 0.0,
    "CpuTotal" : 1.7
  },
  "httpStatusCode" : "200",
  "requestId" : "E2E2AD3E-B7A4-106C-9063-****",
  "successResponse" : true
}

Error codes

HTTP status codeError codeError messageDescription
400Throttling.UserRequest was denied due to user flow control.The number of requests reached the limit and the request was rejected. Try again later.
500ServiceUnavailableThe request has failed due to a temporary failure of the server.The response of the server timed out or the server was unavailable. Try again. If the error persists, contact technical support.
403InvalidSecurityToken.ExpiredSpecified SecurityToken is expired.The signature expired. Use a new signature.

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