Queries a list of AI tasks.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ros:ListAITasks |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| NextToken |
string |
No |
The pagination token for the next request. You do not need to specify this parameter for the first request. Set this to the NextToken value returned by the previous call. |
U12WEI6Ro2ol3wA54rBNS3Cltv2VJyA+7hP4GqbIOhmWU5mWU9ZE3cXLgDaH4KSMRfIYcIVrvtHaAzCoyfo7VQ== |
| MaxResults |
integer |
No |
The maximum number of entries to return. |
50 |
| TaskType |
string |
No |
The type of the AI task.
If you do not specify this parameter, all task types are returned. |
GenerateTemplate |
| TaskId |
string |
No |
The ID of the AI task. |
t-asasas***** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
B288A0BE-D927-4888-B0F7-B35EF84**** |
| NextToken |
string |
A pagination token for retrieving the next page of results. If this parameter is empty, no more pages exist. |
U12WEI6Ro2ol3wA54rBNS3Cltv2VJyA+7hP4GqbIOhmWU5mWU9ZE3cXLgDaH4KSMRfIYcIVrvtHaAzCoyfo7VQ== |
| Tasks |
array<object> |
The AI tasks. |
|
|
object |
The AI task. |
||
| TaskId |
string |
The ID of the AI task. |
t-asasas***** |
| TaskType |
string |
The type of the AI task.
Valid values:
|
GenerateTemplate |
| Status |
string |
The state of the AI task.
Valid values:
|
RUNNING |
| StatusReason |
string |
The reason for the current task state. |
Handler execution unexpected failure |
| CreateTime |
string |
The time when the AI task was created, in UTC. The time is in the ISO 8601 format of YYYY-MM-DDThh:mm:ssZ. |
2023-03-15T03:15:53 |
| UpdateTime |
string |
The time when the AI task was last updated, in UTC. The time is in the ISO 8601 format of YYYY-MM-DDThh:mm:ss. |
2023-11-20T22:00:50 |
| Prompt |
string |
The description of the AI task. |
Create an ECS instance and deploy the Nginx service. |
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| Message |
string |
The error message. |
You are not authorized to complete this action. |
| Success |
string |
Indicates whether the request was successful. Valid values:
|
true |
Examples
Success response
JSON format
{
"RequestId": "B288A0BE-D927-4888-B0F7-B35EF84****",
"NextToken": "U12WEI6Ro2ol3wA54rBNS3Cltv2VJyA+7hP4GqbIOhmWU5mWU9ZE3cXLgDaH4KSMRfIYcIVrvtHaAzCoyfo7VQ==",
"Tasks": [
{
"TaskId": "t-asasas*****\n",
"TaskType": "GenerateTemplate",
"Status": "RUNNING",
"StatusReason": "Handler execution unexpected failure\n",
"CreateTime": "2023-03-15T03:15:53",
"UpdateTime": "2023-11-20T22:00:50",
"Prompt": "Create an ECS instance and deploy an NGINX service\n"
}
],
"HttpStatusCode": 200,
"Message": "You are not authorized to complete this action.",
"Success": "true"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.