クラスターノードで対話型コマンドを実行します。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
ehpc:InvokeShellCommand |
create |
*All Resource
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| ClusterId |
string |
必須 |
クラスターの ID。 ListClusters 操作を呼び出して、クラスターの ID を照会できます。 |
ehpc-hz-FYUr32**** |
| Command |
string |
必須 |
コマンドの内容。内容は 2~2,048 文字である必要があります。 |
echo "hello world" |
| WorkingDir |
string |
任意 |
コマンドの作業ディレクトリ。デフォルト値: |
/home |
| Timeout |
integer |
任意 |
タイムアウト期間。コマンドがタイムアウトすると、コマンドプロセスは終了します。単位:秒。 デフォルト値:60。 |
3600 |
| Instance |
array<object> |
任意 |
コマンドが実行されるノードの情報。 |
|
|
object |
任意 |
|||
| Id |
string |
任意 |
コマンドが実行される N 番目のノードインスタンスの ID。 説明
このパラメーターは、コマンドが実行されるノードを指定します。指定しない場合、コマンドはクラスターのすべてのノードで実行されます。 |
i-bp1in9hmw3ur52x0**** |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| CommandId |
string |
コマンドの ID。コマンドの実行ステータスを照会するために使用されます。 |
c-hz01v8vudql**** |
| RequestId |
string |
リクエストの ID。 |
04F0F334-1335-436C-A1D7-6C044FE73368 |
| InstanceIds |
object |
||
| InstanceId |
array |
コマンドを実行するインスタンスの ID のリスト。 |
|
|
string |
コマンドを実行するインスタンスの ID のリスト。 |
[ "i-uf68t1zu3jkhs8w****", "i-uf6abz34m2714bp****", "i-uf65bh2113hlqvyx****", "i-uf68t1zu3jkhs8wx****", "i-uf6b0mtpx166fxxi****", "i-uf6faknz4dy1bit7****" ] |
例
成功レスポンス
JSONJSON
{
"CommandId": "c-hz01v8vudql****",
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
"InstanceIds": {
"InstanceId": [
"[ \"i-uf68t1zu3jkhs8w****\", \"i-uf6abz34m2714bp****\", \"i-uf65bh2113hlqvyx****\", \"i-uf68t1zu3jkhs8wx****\", \"i-uf6b0mtpx166fxxi****\", \"i-uf6faknz4dy1bit7****\" ]"
]
}
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | InvalidParams | The specified parameter %s is invalid. | |
| 400 | NotEnabled | You have not enabled this service | |
| 400 | InDebt | Your account has overdue payments. | |
| 500 | UnknownError | An unknown error occurred. | |
| 403 | InvalidClusterStatus | The operation failed due to invalid cluster status. | |
| 403 | ConflictOpt | A conflicting operation is running. | |
| 404 | ClusterNotFound | The specified cluster does not exist. | |
| 404 | ObjectNotFound | The specified object is not found. | |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | |
| 406 | EcsError | An error occurred while calling the ECS API operation. | |
| 406 | AgentError | The agent service request failed. | |
| 406 | AliyunError | An Alibaba Cloud product error occurred. | |
| 407 | NotAuthorized | You are not authorized by RAM for this request. | |
| 409 | PartFailure | Part of the batch operation failed. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。