Creating Agent maintenance Tasks in Batches
Function
This API is used to create Agent maintenance tasks in batches.
Constraints
Currently, this API is not supported in the LA-Buenos Aires1 and LA-Lima1 regions.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
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 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
No |
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 |
No |
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 |
Task type. The options are INSTALL, UPDATE, ROLLBACK, RETRY, SET_REMOTE_INSTALL_HOST, and REMOTE_INSTALL. 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]|_|-|\.)+$ |
remote_install_meta |
No |
Array of RemoteInstallHostInfo objects |
Information about the server for remotely installing the Agent when a remote installation task is created. Array Length: 0 - 100 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
instance_name |
No |
String |
Name of the server for remotely installing the Agent. Minimum: 1 Maximum: 128 |
remote_ip |
No |
String |
IP address of the server for remotely installing the Agent. Regex Pattern: ^(([0-9]|\.){1,15})$ |
user_name |
No |
String |
Username for logging in to the server for remotely installing the Agent. Minimum: 1 Maximum: 16 |
port |
No |
String |
Port for logging in to the server for remotely installing the Agent. Minimum: 1 Maximum: 5 |
password |
No |
String |
Password for logging in to the server for remotely installing the Agent. Minimum: 1 Maximum: 3000 |
remote_use_pem |
No |
Boolean |
Whether a key pair is used to connect to the server for remotely installing the Agent. If the value is false, a password is used. Default: false |
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 |
Server ID. Regex Pattern: ^[a-zA-Z0-9-]{1,64}$ |
invocation_id |
String |
Specifies the task 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_code |
String |
Specifies the error code. Regex Pattern: ^(invocationmgr\.[0-9]{4})$ |
error_msg |
String |
Specifies the error message. Minimum: 1 Maximum: 128 |
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot