调用InstallCloudAssistant为一台或多台ECS实例安装云助手Agent。需要重启实例来完成安装云助手Agent的操作。

接口说明

调用InstallCloudAssistant接口后再调用RebootInstance,安装云助手Agent的操作即可生效。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String InstallCloudAssistant

系统规定参数。取值:InstallCloudAssistant

RegionId String cn-hangzhou

实例所在地域ID。您可以调用DescribeRegions查看最新的阿里云地域列表。

InstanceId.N String i-bp1iudwa5b1tqa****

实例ID。

返回数据

名称 类型 示例值 描述
RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

请求ID。

示例

请求示例

https://ecs.aliyuncs.com/?Action=InstallCloudAssistant
&InstanceId.1=i-bp11f7trr4hbi1****
&InstanceId.2=i-bp1iudwa5b1tqa****
&RegionId=cn-hangzhou
&<公共请求参数>

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<InstallCloudAssistantResponse>
    <RequestId>928E2273-5715-46B9-A730-238DC996A533</RequestId>
</InstallCloudAssistantResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "928E2273-5715-46B9-A730-238DC996A533"
}

错误码

HttpCode 错误码 错误信息 描述
400 RegionId.ApiNotSupported The api is not supported in this region. 指定地域下不支持调用 API。请检查 RegionId 参数取值是否正确。
400 MissingParam.InstanceId The parameter instanceId is missing or empty. 实例ID为空。
403 InstanceIds.ExceedLimit The number of instance IDs exceeds the upper limit. 目标实例数量超过上限。
403 Operation.Forbidden The operation is not permitted. 该操作是不被允许的。
404 InvalidInstance.NotFound The specified instance does not exist. 指定的实例不存在。
500 InternalError.Dispatch An error occurred when you dispatched the request. 发送请求时发生错误,请稍后重试。

访问错误中心查看更多错误码。