Creates an AI task to generate or repair infrastructure templates.
Operation description
Creates an AI task of the specified type, covering capabilities from natural language understanding to resource stack deployment. Returns a unique TaskId to track task status and results.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ros:CreateAITask |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TaskType |
string |
No |
AI task type. Valid values:
Valid values:
|
GenerateTemplate |
| Prompt |
string |
No |
Input for the AI task.
|
Create an ECS instance and deploy an NGINX service |
| Template |
string |
No |
Original template to fix or modify. Used when TaskType is FixTemplate. |
{"ROSTemplateFormatVersion": "2015-09-01"} |
| TemplateType |
string |
No |
Template type to generate or repair. Default: ROS. Valid values:
|
ROS |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
Request ID. |
B288A0BE-D927-4888-B0F7-B35EF84B6E6F |
| TaskId |
string |
AI task ID. |
t-asas***** |
| Code |
string |
Error code. |
Forbidden |
| Message |
string |
Error message. |
You are not authorized to complete this action. |
| Success |
string |
Whether the request succeeded. Valid values:
|
true |
| HttpStatusCode |
integer |
HTTP status code. |
200 |
Examples
Success response
JSON format
{
"RequestId": "B288A0BE-D927-4888-B0F7-B35EF84B6E6F",
"TaskId": "t-asas*****",
"Code": "Forbidden",
"Message": "You are not authorized to complete this action.",
"Success": "true",
"HttpStatusCode": 200
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.