Queries the user data of an Elastic Compute Service (ECS) instance.
Operation description
If no user data is configured for the ECS instance, an empty string is returned.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DescribeUserData |
get |
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list. |
cn-hangzhou |
| InstanceId |
string |
Yes |
The ID of the instance. |
i-bp14bnftyqhxg9ij**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| InstanceId |
string |
The instance ID. |
i-bp14bnftyqhxg9ij**** |
| UserData |
string |
The user data of the instance. Note
If no user data is configured for the instance, an empty string is returned. |
ZWNobyBoZWxsbyBlY321ABC |
| RegionId |
string |
The region ID of the instance. |
cn-hangzhou |
Examples
Success response
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"InstanceId": "i-bp14bnftyqhxg9ij****",
"UserData": "ZWNobyBoZWxsbyBlY321ABC",
"RegionId": "cn-hangzhou"
}
Error response
JSON format
{
"RequestId": "540CFF28-407A-40B5-B6A5-74Bxxxxxxxxx",
"HostId": "ecs.aliyuncs.com",
"Code": "IncompleteSignature",
"Message": "The request signature does not conform to Aliyun standards."
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | The specified instanceId is invalid. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.