调用ModifyCommand修改一条云助手命令相关参数。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ecs:ModifyCommand |
update |
*Command
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。 |
cn-hangzhou |
| RegionId |
string |
是 |
地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。 |
cn-hangzhou |
| CommandId |
string |
是 |
命令 ID。您可以通过接口 DescribeCommands 查询所有可用的 CommandId。 |
c-hz01272yr52**** |
| Name |
string |
否 |
命令名称。支持全字符集,长度不得超过 128 个字符。 |
test-CommandName |
| Description |
string |
否 |
命令描述。支持全字符集,长度不得超过 512 个字符。 |
This is description. |
| CommandContent |
string |
否 |
说明
该参数已废弃,传入该参数不会生效。 |
echo |
| WorkingDir |
string |
否 |
执行路径。长度不得超过 200 个字符。 |
/home/ |
| Timeout |
integer |
否 |
您创建的命令在 ECS 实例中执行时最大的超时时间,单位为秒。当无法在配置的时间内运行并完成您创建的命令时,会出现超时现象。超时后,会强制终止命令进程,即取消命令的 PID。 |
120 |
| Launcher |
string |
否 |
脚本执行的引导程序。长度不能超过 1 KB。 |
python3 -u {{ACS::ScriptFileName|Ext(".py")}} |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
0DE9B41E-EF0D-40A0-BB43-37749C5BDA9C |
示例
正常返回示例
JSON格式
{
"RequestId": "0DE9B41E-EF0D-40A0-BB43-37749C5BDA9C"
}
异常返回示例
JSON格式
{
"RequestId":"E69EF3CC-94CD-42E7-8926-F133B86387C0",
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | RegionId.ApiNotSupported | The api is not supported in this region. | 指定地域下不支持调用 API。请检查 RegionId 参数取值是否正确。 |
| 400 | InvalidParameter.WorkingDir | The specified parameter WorkingDir is not valid. | 指定的参数WorkingDir不合法。 |
| 500 | InternalError.Dispatch | An error occurred when you dispatched the request. | 发送请求时发生错误,请稍后重试。 |
| 403 | CmdName.Readonly | The command name is readonly after publishing. | 命令已经发布,禁止修改。 |
| 403 | CmdName.ExceedLimit | The length of the command name exceeds the upper limit. | 命令名称长度超过上限。 |
| 403 | CmdContent.ExceedLimit | The length of the command content exceeds the upper limit. | 命令内容长度超过上限。 |
| 403 | CmdDesc.ExceedLimit | The length of the command description exceeds the upperlimit. | 命令描述长度超过上限。 |
| 403 | Operation.Forbidden | The operation is not permitted. | 该操作是不被允许的。 |
| 403 | InvalidParameterCharacter.CommandName | The command Name contains illegal characters. | 命令名称包含非法字符。 |
| 403 | InvalidParameterCharacter.CommandDescription | The command Description contains illegal characters. | 命令描述包含非法字符。 |
| 403 | InvalidParameterCharacter.CommandWorkingDir | The command WorkingDir contains illegal characters. | 命令执行路径包含非法字符。 |
| 403 | InvalidLauncher.LengthLimitExceeded | The length of the parameter Launcher exceeds the limit of 1 KB characters. | 参数Launcher的长度超过了 1 KB个字符的限制。 |
| 403 | InvalidTimeout.ExceedLimit | The specified parameter Timeout exceeds the upper limit. | |
| 404 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | 地域信息错误 |
| 404 | InvalidCmdId.NotFound | The specified command ID does not exist. | 指定的 CommandId 参数有误,请检查参数值是否正确。您可以通过接口 DescribeCommands 查询所有可用的 CommandId。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。