All Products
Search
Document Center

Platform For AI:GetIdleInstanceCuller

Last Updated:Apr 24, 2025

Queries the information about an auto stop policy for a specific idle instance.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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
paidsw:GetIdleInstanceCullerget
*All Resources
*
    none
none

Request syntax

GET /api/v2/instances/{InstanceId}/idleinstanceculler HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The instance ID. You can call ListInstances to obtain the instance ID.

dsw-730xxxxxxxxxx

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

E7D55162-4489-1619-AAF5-3F97D5FCA948
Successboolean

Indicates whether the request was successful.

  • true
  • false
true
Messagestring

The error message.

"XXX"
Codestring

The status code. Valid values:

  • InternalError: an internal error. All errors, except for parameter validation errors, are classified as internal errors.
  • ValidationError: a parameter validation error.
ValidationError
InstanceIdstring

The instance ID.

dsw-730xxxxxxxxxx
CpuPercentThresholdinteger

The CPU utilization threshold. Unit: percentage. Valid values: 1 to 100. If the CPU utilization of the instance is lower than this threshold, the instance is considered idle.

20
GpuPercentThresholdinteger

The GPU utilization threshold. Unit: percentage. Valid values: 1 to 100. This parameter takes effect only if the instance is of the GPU instance type. If both CPU and GPU utilization is lower than the thresholds, the instance is considered idle.

10
MaxIdleTimeInMinutesinteger

The maximum time duration for which the instance is idle. Unit: minutes. If the time duration for which the instance is idle exceeds this value, the system automatically stops the instance.

60
IdleTimeInMinutesinteger

The time duration for which the instance is idle. Unit: minutes.

30

Examples

Sample success responses

JSONformat

{
  "RequestId": "E7D55162-4489-1619-AAF5-3F97D5FCA948",
  "Success": true,
  "Message": "XXX",
  "Code": "ValidationError",
  "InstanceId": "dsw-730xxxxxxxxxx",
  "CpuPercentThreshold": 20,
  "GpuPercentThreshold": 10,
  "MaxIdleTimeInMinutes": 60,
  "IdleTimeInMinutes": 30
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-10-12The internal configuration of the API is changed, but the call is not affectedView Change Details