Cloud Assistant zamanlanmış görevinin komut içeriği, zamanlanmış çalıştırma modu ve göreve ECS örnekleri veya yönetilen örnekler eklenmesi gibi çalıştırma bilgilerini değiştirir.
Operation description
- Aşağıdaki çalıştırma modlarına sahip görevleri değiştirebilirsiniz (DescribeInvocations tarafından döndürülen RepeatMode değerine bakın):
Period: periyodik çalıştırma.
NextRebootOnly: komutu örneğin bir sonraki başlatılışında otomatik olarak çalıştırır.
EveryReboot: komutu örnek her başlatıldığında otomatik olarak çalıştırır.
- Aşağıdaki durumlarda olan görevleri değiştirebilirsiniz (DescribeInvocations tarafından döndürülen InvocationStatus değerine bakın):
Pending: Sistem komutu doğruluyor veya gönderiyor. En az bir örnekteki komut çalıştırma durumu Pending ise genel çalıştırma durumu Pending olur.
Running: Komut örnekte çalışıyor. En az bir örnekteki komut çalıştırma durumu Running ise genel çalıştırma durumu Running olur.
Scheduled: Zamanlanmış komut gönderildi ve çalışmayı bekliyor. En az bir örnekteki komut çalıştırma durumu Scheduled ise genel çalıştırma durumu Scheduled olur.
Stopping: Görev durduruluyor. En az bir örnekteki komut çalıştırma durumu Stopping ise genel çalıştırma durumu Stopping olur.
- Zamanlanmış görev çalıştırma bilgilerini (komut içeriği, özel parametreler ve çalıştırma sıklığı dahil) değiştirmeden önce, görevi zaten çalıştırmış olan ECS örnekleri veya yönetilen örneklerdeki Cloud Assistant Agent sürümünün aşağıdaki sürümlerden daha yeni olması gerekir:
Linux: 2.2.3.541
Windows: 2.1.3.541
Çağrı sonucu
InvalidOperation.CloudAssistantVersionUnsupportedhata kodunu döndürürse Cloud Assistant Agent'ı en son sürüme güncelleyin.
Bir Cloud Assistant genel komutu çalıştırdığınızda, CommandContent komut içeriğini değiştiremezsiniz.
CommandContent komut içeriğini değiştirdiğinizde ve görev KeepCommand
trueolarak ayarlanmış şekilde InvokeCommand veya RunCommand çağrılarak oluşturulmuşsa, kalıcı olarak saklanan yeni bir komut oluşturulur ve bu durum Cloud Assistant komut kotanızdan düşülür. Bir bölgede 500 ila 50.000 arası Cloud Assistant komutu saklayabilirsiniz. Kota artışı da talep edebilirsiniz. Kotaları sorgulama ve artırma hakkında bilgi için Kota yönetimi konusuna bakın.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:ModifyInvocationAttribute |
update |
*Invocation
Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
Bölge kimliği. |
cn-hangzhou |
| InstanceId |
array |
No |
Göreve eklenecek ECS örneğinin veya yönetilen örneğin örnek kimliği. |
|
|
string |
No |
Göreve eklenecek ECS örneğinin veya yönetilen örneğin örnek kimliği. Eklenecek örneklerin ve görevi zaten çalıştırmış olan örneklerin toplam sayısı 100'ü aşamaz. |
i-bp1i7gg30r52z2em**** |
|
| InvokeId |
string |
Yes |
Değiştirilecek görevin çalıştırma kimliği. |
t-hz0jdfwd9f**** |
| CommandContent |
string |
No |
Değiştirilen komut içeriği. Komut içeriği düz metin veya Base64 ile kodlanmış olabilir. Aşağıdaki hususlara dikkat edin:
|
ZWNobyAxMjM= |
| EnableParameter |
boolean |
No |
Komutun özel parametreler içerip içermediğini belirtir.
|
false |
| Parameters |
object |
No |
Komut özel parametreler içerdiğinde değiştirilecek özel parametrelerin anahtar-değer çiftleri. Özel parametre sayısı 0 ile 10 arasındadır. Aşağıdaki hususlara dikkat edin:
Varsayılan değer: boş, bu durum hiçbir özel parametre anahtar-değer çiftinin değiştirilmediğini gösterir. |
{"name":"Jack", "accessKey":"LTAI*************"} |
| Frequency |
string |
No |
Değiştirilen zamanlanmış çalıştırma sıklığı. Bu parametre yalnızca RepeatMode Period olarak ayarlandığında geçerli olur. Üç tür zamanlanmış çalıştırma desteklenir: sabit aralıklarla çalıştırma (Rate ifadesine dayalı), belirtilen zamanda tek seferlik çalıştırma ve saat tabanlı zamanlanmış çalıştırma (Cron ifadesine dayalı).
|
0 */20 * * * * |
| ContentEncoding |
string |
No |
Komut içeriğinin (CommandContent) kodlama türü. Geçerli değerler (büyük/küçük harfe duyarlı değildir):
Varsayılan değer: PlainText. Geçersiz bir değer belirtilirse, PlainText olarak kabul edilir. |
PlainText |
| ClientToken |
string |
No |
İsteğin idempotent olmasını sağlamak için kullanılan istemci belirteci. Belirteci oluşturmak için istemciyi kullanabilirsiniz, ancak belirtecin farklı istekler arasında benzersiz olduğundan emin olun. ClientToken yalnızca ASCII karakterleri içerebilir ve uzunluğu 64 karakteri aşamaz. Daha fazla bilgi için İdempotans nasıl sağlanır konusuna bakın. |
123e4567-e89b-12d3-a456-426655440000 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| CommandId |
string |
Komut kimliği.
|
c-hz01272yr52**** |
| RequestId |
string |
İstek kimliği. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
Examples
Success response
JSON format
{
"CommandId": "c-hz01272yr52****",
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter.Frequency | The specified parameter Frequency is not valid. | |
| 400 | InvalidParameters.KeyDuplicate | The key in the parameter Parameters cannot be duplicated. | |
| 400 | InvalidParameters.KeyNotMatch | The key in the parameter Parameters do not match those defined when creating the command. | |
| 400 | InvalidParameters.KeyMalformed | The key in the parameter Parameters is not valid. | |
| 400 | InvalidParameters.KeyEmpty | The key in the parameter Parameters cannot be empty. | |
| 400 | InvalidCommandContent.DecodeError | The specified parameter CommandContent can not be Base64 decoded. | |
| 400 | InvalidClientToken.Malformed | The specified parameter clientToken is not valid. | |
| 500 | InternalError | An error occurred when you dispatched the request. | |
| 403 | InvalidParameterCharacter | The specified parameter %s contains illegal characters. | |
| 403 | InvalidInstanceId.OSTypeUnsupported | The OS type of the instance corresponding to the parameter InstanceId does not support the specified command type. | |
| 403 | InvalidOperation.RepeatModeUnsupported | The operation is not supported for current repeat mode of invocation. | |
| 403 | InvalidOperation.InvokeAlreadyFinished | The operation is not supported for finished invocation. | |
| 403 | InvalidOperation.CloudAssistantVersionUnsupported | The operation is not supported for current CloudAssistant version of instance. | |
| 403 | InvalidOperation.ModifyPublicCommandUnsupported | Modification of the content of Public Command is not supported. | |
| 403 | InvalidCommandContent.LengthLimitExceeded | The length of the parameter CommandContent exceeds the limit of %s KB characters. | |
| 403 | Operation.Forbidden | The operation is not permitted. | |
| 403 | InvalidParameters.CountLimitExceeded | The count of the parameter Parameters exceeds the limit of 10. | |
| 403 | InvalidParameters.KeyLengthLimitExceeded | The length of the key in the parameter Parameters exceeds the limit of 64 characters. | |
| 403 | InvalidInstanceId.CountLimitExceeded | The count of the parameter InstanceId exceeds the limit of %s. | |
| 403 | CommandLimitExceeded | The count of command in current region exceeds the limit of %s. | |
| 403 | InvalidParameters.ValueTypeUnsupported | The type of the value in the parameter Parameters is not supported. | |
| 403 | IdempotentParameterMismatch | The specified parameter has changed while using an already used clientToken. | |
| 403 | IdempotentProcessing | The previous idempotent request(s) is still processing. | |
| 404 | InvalidInvokeId.NotFound | The specified parameter InvokeId does not exist. | |
| 404 | InvalidInstanceId.NotFound | The specified parameter InstanceId does not exist. | |
| 404 | InvalidRegionId.NotFound | The specified parameter RegionId does not exist. | |
| 404 | InvalidCommandId.NotFound | The specified CommandId does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.