All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

DescribeInstances

Last updated:2021-05-27 17:52:41

DescribeInstances

You can call this operation to query the detailed information of instances.

Request parameters

For more information about the common request parameters, see Call methods.

Parameter Type Required Description
Action String Yes The operation that you want to perform. Set the value to DescribeInstances.
Version String Yes The version number of the API operation. Set the value to 2020-01-14.
InstanceIds String Yes The ID of the instance. You can specify up to 100 instance IDs. Separate multiple instance IDs with commas (,).

Response parameters

Parameter Type Description
billType Int The billing type.
instanceId String The ID of the instance.
instanceType Int The type of the instance. Valid values:
1: formal instance
2: trial instance
status Int The status of the instance. Valid values:
1: The instance is being created.
2: The instance is activated.
5: The instance is reclaimed.
6: You have unsubscribed from the instance.
7: The instance is deleted.
serviceBeginTime String The start time of the service.
serviveDeleteTime String The time when the service was deleted.
createTime String The time when the instance was created.

Sample requests

curl -X POST \
'http://trade.api.ksyun.com/?Action=DescribeInstances&Version=2020-01-14' \
-H 'authorization: xxx, SignedHeaders=content-type;host;x-amz-date, Signature=xxx' \
-H 'cache-control: no-cache' \
-H 'content-type: application/x-www-form-urlencoded' \
-H 'host: trade.api.ksyun.com' \
-H 'x-amz-date: 20170720T022802Z'
-D 'instanceIds=xxx'

Sample responses

  • Sample success response

{
    "RequestId":"29791235-068f-4ca5-adda-fllqooxq451",
    "data":[
        {
            "billType":1,
            "createTime":"2019-11-11 19:21:11",
            "instanceId":"d33e1678-5427-4fd7-bbcc-41bc5fbdca01",
            "instanceType":1,
            "serviceBeginTime":"2019-11-11 19:21:36",
            "status":2,
            "serviveDeleteTime":"2019-11-12 23:59:59"
        },
        {
            "billType":1,
            "createTime":"2019-11-11 19:21:11",
            "instanceId":"98dc11678-5427-4fd7-bbcc-41bc5fbdcdqd",
            "instanceType":1,
            "serviceBeginTime":"2019-11-11 19:21:36",
            "status":2,
            "serviveDeleteTime":"2019-11-12 23:59:59"
        }
    ]
}
  • Sample error response
    
    {
    "RequestId": "81d89f5e-7dbf-4dfb-8ffc-42b0e9421e52",
    "Error": {
        "Code": "ServiceInnerError",
        "Message": "Service inner error occurs."
    }
    }
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback