You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
Instances
DescribeUserData - Queries instance custom data
Copy page
Download PDF
DescribeUserData - Queries instance custom data
Call the DescribeUserData operation to query the custom data of an ECS instance.​
Usage notes​
  • The returned custom data of the instance is in Base64-encoded format.​
  • If no custom data is specified for the instance, an empty value is returned.​
Debugging​
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
​
Request parameters​
Only the request parameters specific to this operation and some common parameters are listed below. For more information, refer to Common parameters.​
Action string required Sample value: DescribeUserData​
The operation that you want to perform. Valid value: DescribeUserData.​
​
Version stringrequired Sample value: 2020-04-01​
The API version. Value: 2020-04-01.​
​
ScheduledInstanceId string Optional Sample value: esi-ycvye5a380l8j1ld****​
ESI order ID.​
​
InstanceId string required Sample value: i-l8j0j2jynelea7nu****​
The ID of the instance that you want to query.​
​
​
​
Response parameters​
Only the response parameters specific to this operation are listed below. For more information, refer to the response structure.​
InstanceId string Sample value: i-l8j0j2jynelea7nu****​
The instance ID.​
​
ScheduledInstanceId string Sample value: esi-ycvye5a380l8j1ld****​
ESI order ID.​
​
UserData string Sample value: IyEvYmluL2Jhc2gKdG91Y2ggL3RtcC91c2VyZG******​
The custom data of the instance.​
​
​
​
Sample request​
​
GET /?Action=DescribeUserData&Version=2020-04-01&InstanceId=i-l8j0j2jynelea7nu**** HTTP/1.1​
Host: ecs.cn-beijing.volcengineapi.com​
Region: cn-beijing​
Service: ecs​
​
Sample response​
​
{​
"ResponseMetadata": {​
"RequestId": "2021110417394001022514606307D7****",​
"Action": "DescribeUserData",​
"Version": "2020-04-01",​
"Service": "ecs",​
"Region": "cn-beijing"​
},​
"Result":{​
"InstanceId":"i-l8j0j2jynelea7nu****",​
"UserData":"IyEvYmluL2Jhc2gKdG91Y2ggL3RtcC91c2VyZG******"​
}​
}​
​
Error codes​
The table below lists the business-related error codes of the operation. For more information, refer to Common error codes.​
​
Status code​
Error codes​
Error message​
Description​
400​
MissingParameter.InstanceId​
The required parameter InstanceId is not supplied.​
The instance ID cannot be left empty.​
404​
InvalidInstance.NotFound​
The specified instance does not exist.​
The specified instance does not exist.​
500​
InternalError​
An internal error has occurred.​
An internal error occurred. Try again. If multiple attempts fail, submit a ticket.​
​
​
Last updated: 2026.06.18 17:48:24