Home > Article > Operation and Maintenance > How to query custom data of an ECS instance using Base64 encoding
The content of this article is about how to query the custom data of an ECS instance using Base64 encoding. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you. .
DescribeUserdata
Query the custom data of an ECS instance.
Description
The returned instance custom data will be displayed in Base64 encoding.
If no custom data exists for the instance, a null value is returned.
Request parameters
##Return parameters
Example
Request Example
https://ecs.aliyuncs.com/?Action= DescribeUserdata &RegionId=cn-shenzhen &InstanceId=i-instance1 &<公共请求参数>
https://ecs.example.com/?Action= DescribeUserdata &RegionId=cn-shenzhen &InstanceId=i-instance1 &<公共请求参数>
Return example
XML format
<DescribeUserdataResponse> <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId> <UserData>userdata1</UserData> <InstanceId> i-instance1</InstanceId> <RegionId> cn-shenzhen </RegionId> </DescribeUserdataResponse>
JSON format
{ "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E" " UserData ": " userdata1" " InstanceId ": " i-instance1" " RegionId": "cn-shenzhen" }
Error code
The following are error codes unique to this interface. For more error codes, please visit the API Error Center.The above is the detailed content of How to query custom data of an ECS instance using Base64 encoding. For more information, please follow other related articles on the PHP Chinese website!