Creating Agent maintenance Tasks in Batches
Function
This API is used to create Agent maintenance tasks in batches.
Constraints
This API is not supported at the following regions: LA-Buenos Aires1, and LA-Lima1.
URI
POST /v3/{project_id}/agent-invocations/batch-create
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Specifies the project ID. Minimum: 1 Maximum: 64 Regex Pattern: ^[a-z0-9]+$ |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
Specifies the MIME type of a request body. The default type is application/json; charset=UTF-8. Default: application/json; charset=UTF-8 Minimum: 1 Maximum: 64 |
X-Auth-Token |
Yes |
String |
Specifies the user token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. The value of X-Subject-Token in the response header is the token. Minimum: 1 Maximum: 16384 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
instance_ids |
No |
Array of strings |
Specifies the server ID list. (This parameter is mandatory when the task type is INSTALL or UPDATE.) Array Length: 1 - 100 |
invocation_type |
Yes |
String |
Specifies the task type, which can be INSTALL, UPDATE, ROLLBACK, or RETRY. Enumeration values:
|
invocation_target |
No |
String |
Specifies the task object. Only telescope is supported. Default: telescope Enumeration values:
|
invocation_ids |
No |
Array of strings |
Specifies the task ID list. This parameter is mandatory when the task type is ROLLBACK or RETRY. Array Length: 1 - 100 |
version_type |
No |
String |
Specifies the version the Agent will be upgraded to. The value can be BASIC_VERSION or ADVANCE_VERSION. Enumeration values:
|
origin |
No |
String |
Specifies the source that calls the Agent maintenance task APIs. CES indicates the Cloud Eye console, APICOM_BMS indicates Bare Metal Server (BMS), and ADMIN_SERVER indicates the O&M platform. Enumeration values:
|
version |
No |
String |
Version Number Minimum: 0 Maximum: 64 Regex Pattern: ^([0-9A-Za-z]|_|-|\.)+$ |
Response Parameters
Status code: 201
Parameter |
Type |
Description |
---|---|---|
invocations |
Array of BatchCreateInvocationInfo objects |
Specifies the information list of the created task. Array Length: 0 - 100 |
Parameter |
Type |
Description |
---|---|---|
instance_id |
String |
Specifies the server ID. Regex Pattern: ^[a-zA-Z0-9-]{1,64}$ |
ret_status |
String |
Specifies the task result. The value can be successful or error. Enumeration values:
|
error_msg |
String |
Specifies the error message. Minimum: 1 Maximum: 128 |
invocation_id |
String |
Specifies the task ID. Regex Pattern: ^[a-zA-Z0-9-]{1,64}$ |
error_code |
String |
Specifies the error code. Regex Pattern: ^(invocationmgr\.[0-9]{4})$ |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Specifies the error code. Regex Pattern: ^(taskmgr\.[0-9]{4})$ |
error_msg |
String |
Specifies the error message. Minimum: 1 Maximum: 256 |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Specifies the error code. Regex Pattern: ^(taskmgr\.[0-9]{4})$ |
error_msg |
String |
Specifies the error message. Minimum: 1 Maximum: 256 |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Specifies the error code. Regex Pattern: ^(taskmgr\.[0-9]{4})$ |
error_msg |
String |
Specifies the error message. Minimum: 1 Maximum: 256 |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Specifies the error code. Regex Pattern: ^(taskmgr\.[0-9]{4})$ |
error_msg |
String |
Specifies the error message. Minimum: 1 Maximum: 256 |
Example Requests
{ "instance_ids" : [ "instancexxx001", "instancexxx002" ], "invocation_type" : "INSTALL", "invocation_target" : "telescope" }
Example Responses
Status code: 201
Created
[ { "instance_id" : "instancexxx001", "ret_status" : "successful" }, { "instance_id" : "instancexxx002", "ret_status" : "error", "error_msg" : "do not meet the installation conditions" } ]
Status Codes
Status Code |
Description |
---|---|
201 |
Created |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
500 |
Internal Server Error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.