All Products
Search
Document Center

Elastic Compute Service:DescribeUserData

Last Updated:Mar 19, 2024

Queries the user data of an Elastic Compute Service (ECS) instance.

Operation description

Description

  • The returned user data is encoded in Base64.
  • If the instance does not have user data configured, an empty result is returned.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
InstanceIdstringYes

The ID of the instance.

i-bp14bnftyqhxg9ij****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
InstanceIdstring

The ID of the instance.

i-bp14bnftyqhxg9ij****
UserDatastring

The user data of the instance.

ZWNobyBoZWxsbyBlY321ABC
RegionIdstring

The region ID of the instance.

cn-hangzhou

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "InstanceId": "i-bp14bnftyqhxg9ij****",
  "UserData": "ZWNobyBoZWxsbyBlY321ABC",
  "RegionId": "cn-hangzhou"
}

Error codes

HTTP status codeError codeError messageDescription
404InvalidInstanceId.NotFoundThe specified InstanceId does not exist.The specified instance does not exist.

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