調用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。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。