Modifie les paramètres d'une commande Cloud Assistant.
Testez maintenant
Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.
Test
Autorisation RAM
|
ecs:ModifyCommand |
update |
*Command
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| RegionId |
string |
Oui |
L'identifiant de la région de la commande. Vous pouvez appeler l'opération DescribeRegions pour obtenir la liste des régions la plus récente. |
cn-hangzhou |
| CommandId |
string |
Oui |
L'identifiant de la région de la commande. Vous pouvez appeler l'opération DescribeRegions pour obtenir la liste des régions la plus récente. |
cn-hangzhou |
| Name |
string |
Non |
L'identifiant de la commande. Vous pouvez appeler l'opération DescribeCommands pour obtenir tous les identifiants de commande disponibles. |
c-hz01272yr52**** |
| Description |
string |
Non |
Le nom de la commande. Le nom prend en charge tous les jeux de caractères et peut contenir jusqu'à 128 caractères. |
test-CommandName |
| CommandContent |
string |
Non |
La description de la commande. La description prend en charge tous les jeux de caractères et peut contenir jusqu'à 512 caractères. |
Ceci est une description |
| WorkingDir |
string |
Non |
Remarque
Ce paramètre n'est plus utilisé et n'a aucun effet. |
echo |
| Timeout |
integer |
Non |
Le répertoire de travail de la commande. La valeur peut contenir jusqu'à 200 caractères. |
/home/ |
| Launcher |
string |
Non |
Le délai d'expiration maximal pour l'exécution de la commande sur l'instance. Unité : secondes. Si une commande ne peut pas s'exécuter dans le délai imparti, elle expire. Le processus de la commande est alors interrompu de force en annulant l'identifiant de processus (PID) de la commande. |
120 |
|
Non |
Le lanceur pour l'exécution de scripts. La valeur ne peut pas dépasser 1 Ko. |
python3 -u {{ACS::ScriptFileName|Ext(".py")}} |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
L'identifiant de la requête. |
||
| RequestId |
string |
L'identifiant de la requête. |
0DE9B41E-EF0D-40A0-BB43-37749C5BDA9C |
Exemples
JSON format
{
"RequestId": "0DE9B41E-EF0D-40A0-BB43-37749C5BDA9C"
}
Codes d'erreur
|
Code de statut HTTP |
Code d'erreur |
Message d'erreur |
Description |
|---|---|---|---|
| 400 | RegionId.ApiNotSupported | The api is not supported in this region. | The API operation cannot be called in the specified region. Check whether the specified RegionId parameter is valid. |
| 400 | InvalidParameter.WorkingDir | The specified parameter WorkingDir is not valid. | The specified WorkingDir parameter is invalid. |
| 500 | InternalError.Dispatch | An error occurred when you dispatched the request. | An error occurred while the request is being sent. Try again later. |
| 403 | CmdName.Readonly | The command name is readonly after publishing. | The command is published and cannot have its name changed. |
| 403 | CmdName.ExceedLimit | The length of the command name exceeds the upper limit. | The length of the command name exceeds the upper limit. |
| 403 | CmdContent.ExceedLimit | The length of the command content exceeds the upper limit. | The length of command content exceeds the upper limit. |
| 403 | CmdDesc.ExceedLimit | The length of the command description exceeds the upperlimit. | The length of the command description exceeds the upper limit. |
| 403 | Operation.Forbidden | The operation is not permitted. | The operation is not supported. |
| 403 | InvalidParameterCharacter.CommandName | The command Name contains illegal characters. | The command Name contains illegal characters. |
| 403 | InvalidParameterCharacter.CommandDescription | The command Description contains illegal characters. | The command Description contains illegal characters. |
| 403 | InvalidParameterCharacter.CommandWorkingDir | The command WorkingDir contains illegal characters. | The command WorkingDir contains illegal characters. |
| 403 | InvalidLauncher.LengthLimitExceeded | The length of the parameter Launcher exceeds the limit of 1 KB characters. | The length of the argument Launcher exceeds the limit of 1 KB characters. |
| 403 | InvalidTimeout.ExceedLimit | The specified parameter Timeout exceeds the upper limit. | |
| 404 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | Region information error |
| 404 | InvalidCmdId.NotFound | The specified command ID does not exist. | The specified CommandId parameter is invalid. Check the parameter value. You can call the DescribeCommands operation to query all available command IDs. |
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.