Elastic Compute Service (ECS) örneklerinde Cloud Assistant komutlarının çalıştırma sonuçlarını sorgular.
Kullanım notları
Bir komutu çalıştırdıktan sonra komut başarısız olabilir veya beklenmeyen sonuçlar döndürebilir. Gerçek çalıştırma sonuçlarını sorgulamak için bu işlemi çağırabilirsiniz.
Son dört hafta içindeki komut görevlerine ilişkin bilgileri sorgulayabilirsiniz. En fazla 100.000 görev bilgisi saklanabilir.
Hata ayıklama
İstek parametreleri
|
Parameter |
Type |
Required |
Example |
Description |
| Action | String | Yes | DescribeInvocationResults | Gerçekleştirmek istediğiniz işlem. Değeri DescribeInvocationResults olarak ayarlayın. |
| RegionId | String | Yes | cn-hangzhou | Komutun bölge kimliği. En güncel bölge listesini sorgulamak için DescribeRegions işlemini çağırabilirsiniz. |
| ResourceGroupId | String | No | rg-bp67acfmxazb4p**** | Kaynak grubu kimliği. Bu parametreyi ayarladığınızda belirtilen kaynak grubundaki komut çalıştırma sonuçları sorgulanır. |
| InvokeId | String | No | t-hz0jdfwd9f**** | Komut görevi kimliği. Tüm komut görevlerinin kimliklerini sorgulamak için DescribeInvocations işlemini çağırabilirsiniz. |
| InstanceId | String | No | i-bp1i7gg30r52z2em**** | Örnek kimliği. |
| CommandId | String | No | c-hz0jdfwcsr**** | Komut kimliği. |
| InvokeRecordStatus | String | No | Running | Komut görevinin çalıştırma durumu. Geçerli değerler:
|
| IncludeHistory | Boolean | No | false | Geçmiş zamanlanmış çalıştırmaların sonuçlarının döndürülüp döndürülmeyeceğini belirtir. Geçerli değerler:
Varsayılan değer: false. |
| ContentEncoding | String | No | PlainText | Yanıttaki
Varsayılan değer: Base64. |
| PageNumber | Long | No | 1 | Sayfa numarası. Sayfalar 1. sayfadan başlar. Varsayılan değer: 1. |
| PageSize | Long | No | 1 | Sayfa başına giriş sayısı. Geçerli değerler: 1 ila 50. Varsayılan değer: 10. |
| Tag.N.Key | String | No | TestKey | N. komut görevi etiketinin anahtarı. N için geçerli değerler: 1 ila 20. Etiket anahtarı boş bir dize olamaz. Kaynakları sorgulamak için tek bir etiket belirtilirse yanıtta bu etiketin eklendiği en fazla 1.000 kaynak görüntülenebilir. Kaynakları sorgulamak için birden çok etiket belirtilirse yanıtta bu etiketlerin tümünün eklendiği en fazla 1.000 kaynak görüntülenebilir. Belirtilen etiketlere sahip 1.000'den fazla kaynağı sorgulamak için ListTagResources işlemini çağırın. Etiket anahtarının uzunluğu en fazla 128 karakter olabilir ve |
| Tag.N.Value | String | No | TestValue | N. komut görevi etiketinin değeri. N için geçerli değerler: 1 ila 20. Etiket değeri boş bir dize olabilir. Etiket değerinin uzunluğu en fazla 128 karakter olabilir ve |
Yanıt parametreleri
Parameter |
Type |
Example |
Description |
| RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE***** | İstek kimliği. |
| Invocation | Object | Çalıştırma sonuçlarıyla ilgili ayrıntılar. |
|
| PageSize | Long | 1 | Sayfa başına giriş sayısı. |
| PageNumber | Long | 1 | Sayfa numarası. |
| TotalCount | Long | 1 | Toplam komut sayısı. |
| InvocationResults | Array of InvocationResult | Çalıştırma sonuçları. |
|
| InvocationResult | |||
| InvocationStatus | String | Success | Tek bir örnekteki çalıştırma durumu. Geçerli değerler:
|
| Repeats | Integer | 0 | Komutun örnekte kaç kez çalıştırıldığı.
|
| CommandId | String | c-hz0jdfwcsr**** | Komut kimliği. |
| InstanceId | String | i-bp1i7gg30r52z2em**** | Örnek kimliği. |
| Output | String | MTU6MzA6MDEK | Komut çıktısı.
|
| Dropped | Integer | 0 |
|
| StopTime | String | 2020-01-19T09:15:47Z | Komut görevinin durdurulduğu saat. Komut görevini durdurmak için |
| ExitCode | Long | 0 | Komut görevinin çıkış kodu.
|
| StartTime | String | 2019-12-20T06:15:55Z | Komutun örnekte çalıştırılmaya başladığı saat. |
| ErrorInfo | String | the specified instance does not exists | Komutun gönderilememesinin veya çalıştırılamamasının nedeni. Geçerli değerler:
|
| ErrorCode | String | InstanceNotExists | Komutun gönderilememesi veya çalıştırılamaması durumunda döndürülen hata kodu. Geçerli değerler:
|
| FinishedTime | String | 2019-12-20T06:15:56Z | Komut görevinin tamamlanma saati. Komut görevi zaman aşımına uğrarsa bitiş saati |
| InvokeId | String | t-hz0jdfwd9f**** | Komut görevi kimliği. |
| InvokeRecordStatus | String | Running | Komut görevinin çalıştırma durumu. Geçerli değerler:
|
| Username | String | test | Komutu örnekte çalıştırmak için kullanılan kullanıcı adı. |
| ContainerId | String | ab141ddfbacfe02d9dbc25966ed971536124527097398d419a6746873fea**** | Konteyner kimliği. |
| ContainerName | String | test-container | Konteyner adı. |
| Tags | Array of Tag | Komut görevinin etiketleri. |
|
| Tag | |||
| TagKey | String | owner | Komut görevinin etiket anahtarı. |
| TagValue | String | zhangsan | Komut görevinin etiket değeri. |
Örnekler
Örnek istekler
http(s)://ecs.aliyuncs.com/?Action=DescribeInvocationResults
&RegionId=cn-hangzhou
&InstanceId=i-bp1i7gg30r52z2em****
&PageNumber=1
&PageSize=1
&<Common request parameters>
Örnek başarılı yanıtlar
XML biçimi
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeInvocationResultsResponse>
<RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE*****</RequestId>
<Invocation>
<InvocationResults>
<InvocationResult>
<Dropped>0</Dropped>
<InvocationStatus>Success</InvocationStatus>
<InstanceId>i-bp1i7gg30r52z2em****</InstanceId>
<ExitCode>0</ExitCode>
<ErrorInfo>the specified instance does not exists</ErrorInfo>
<StartTime>2019-12-20T06:15:55Z</StartTime>
<Repeats>0</Repeats>
<InvokeRecordStatus>Running</InvokeRecordStatus>
<FinishedTime>2019-12-20T06:15:56Z</FinishedTime>
<Output>MTU6MzA6MDEK</Output>
<CommandId>c-hz0jdfwcsr****</CommandId>
<ErrorCode>InstanceNotExists</ErrorCode>
<InvokeId>t-hz0jdfwd9f****</InvokeId>
<StopTime>2020-01-19T09:15:47Z</StopTime>
<Username>test</Username>
<ContainerId>ab141ddfbacfe02d9dbc25966ed971536124527097398d419a6746873fea****</ContainerId>
<ContainerName>test-container</ContainerName>
<Tags>
<TagKey>owner</TagKey>
<TagValue>zhangsan</TagValue>
</Tags>
</InvocationResult>
</InvocationResults>
<TotalCount>1</TotalCount>
<PageSize>1</PageSize>
<PageNumber>1</PageNumber>
</Invocation>
</DescribeInvocationResultsResponse>
JSON biçimi
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE*****",
"Invocation" : {
"InvocationResults" : {
"InvocationResult" : [ {
"Dropped" : 0,
"InvocationStatus" : "Success",
"InstanceId" : "i-bp1i7gg30r52z2em****",
"ExitCode" : 0,
"ErrorInfo" : "the specified instance does not exists",
"StartTime" : "2019-12-20T06:15:55Z",
"Repeats" : 0,
"InvokeRecordStatus" : "Running",
"FinishedTime" : "2019-12-20T06:15:56Z",
"Output" : "MTU6MzA6MDEK",
"CommandId" : "c-hz0jdfwcsr****",
"ErrorCode" : "InstanceNotExists",
"InvokeId" : "t-hz0jdfwd9f****",
"StopTime" : "2020-01-19T09:15:47Z",
"Username" : "test",
"ContainerId" : "ab141ddfbacfe02d9dbc25966ed971536124527097398d419a6746873fea****",
"ContainerName" : "test-container",
"Tags" : [ {
"TagKey" : "owner",
"TagValue" : "zhangsan"
} ]
} ]
},
"TotalCount" : 1,
"PageSize" : 1,
"PageNumber" : 1
}
}
Hata kodları
|
HTTP status code |
Error code |
Error message |
Description |
|
400 |
RegionId.ApiNotSupported |
The api is not supported in this region. |
Bu işlem belirtilen bölgede gerçekleştirilemez. RegionId parametresinin değerinin geçerli olup olmadığını kontrol edin. |
|
400 |
Duplicate.TagKey |
The Tag.N.Key contain duplicate key. |
Etiket anahtarı zaten mevcut. Etiket anahtarları benzersiz olmalıdır. |
|
400 |
InvalidTagKey.Malformed |
The specified Tag.n.Key is not valid. |
Geçersiz Tag.N.Key değeri. |
|
400 |
InvalidTagValue.Malformed |
The specified Tag.n.Value is not valid. |
Geçersiz Tag.N.Value değeri. |
|
400 |
MissingParameter.TagKey |
You must specify Tag.N.Key. |
Tag.N.Key gereklidir. |
|
400 |
InvalidParam.PageNumber |
The specified parameter is invalid. |
Geçersiz PageNumber değeri. |
|
400 |
InvalidParam.PageSize |
The specified parameter is invalid. |
Geçersiz PageSize değeri. |
|
403 |
Operation.Forbidden |
The operation is not permitted. |
İşlem desteklenmiyor. |
|
500 |
InternalError.Dispatch |
An error occurred when you dispatched the request. |
İstek gönderilirken bir hata oluştu. Daha sonra tekrar deneyin. |
|
500 |
ServiceUnavailable |
The request has failed due to a temporary failure of the server. |
Arka uç sunucusunun geçici olarak başarısız olması nedeniyle istek başarısız oldu. |
|
500 |
InternalError |
The request processing has failed due to some unknown error. |
Dahili bir hata oluştu. Daha sonra tekrar deneyin. |
Hata kodlarının listesi için bkz. Service error codes.