Use the Cloud Assistant that comes with ECS to install EDAS Agent (import the ECS instance to EDAS).

When you use this API to import ECS instances to EDAS, no system is reinstalled. We recommend that you use this API to import ECS instances to EDAS.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request header

Request syntax

POST /pop/v5/ecss/install_agent HTTPS|HTTP

Request parameters

Parameter Type Required Example Description
ClusterId String Yes B3f3e77 b-462e-****-****-bec8727a4dc8

The ID of the cluster from which you want to delete an ECS instance.

InstanceIds String Yes 2ze7s2v0b789k60p****

Instance ID, such as instanceId1 and instanceid2.

DoAsync Boolean No true

No longer used

Response parameters

Parameter Type Example Description
Code Integer 200

Code

ExecutionResultList Array

Results

ExecutionResult
FinishedTime String 2019-11-10T07:02:17Z

Installation end time

InstanceId String i-2ze7s2v0b789k60p****

The ID of the instance.

InvokeRecordStatus String Finished

Installation status

Status String OK

Command execution status information

Success Boolean true

Indicates whether the installation was successful.

Message String success

The returned message.

RequestId String b197-40ab-9155-7ca7

The ID of the request.

Examples

Sample requests

POST /pop/v5/ecss/install_agent HTTP/1.1
Common request header
{
  "ClusterId": "b3e3f77b-462e-****-****-bec8727a4dc8"
  "InstanceIds": "2ze7s2v0b789k60pk1af"
}

Sample success responses

XML format

<ExecutionResultList>
    <ExecutionResult>
        <InvokeRecordStatus>Finished</InvokeRecordStatus>
        <Status>OK</Status>
        <FinishedTime>2019-11-10T07:02:17Z</FinishedTime>
        <InstanceId>i-2ze7s2v0b789k60p****</InstanceId>
        <Success>true</Success>
    </ExecutionResult>
</ExecutionResultList>
<Message>success</Message>
<Code>200</Code>

JSON format

{
    "ExecutionResultList": {
        "ExecutionResult": [
            {
                "InvokeRecordStatus": "Finished",
                "Status": "OK",
                "FinishedTime": "2019-11-10T07:02:17Z",
                "InstanceId": "i-2ze7s2v0b789k60p****",
                "Success": true
            }
        ]
    },
    "Message": "success",
    "Code": 200
}

Error codes

For a list of error codes, visit the API Error Center.

Precautions

During the actual running of this API, a connection timeout (10 seconds by default) will occur API Gateway the Client of this API. You must manually set the timeout period for reading the data returned by the POP API Gateway when calling this API. We recommend that you set this parameter to 30 seconds, because the longest service processing period between the POP API Gateway and the API Server is 30 seconds.

  • You can set the read timeout value when calling this operation in Client code when using the Java SDK.
    java
    InstallAgentRequest request = new InstallAgentRequest()
    request.setSysReadTimeout(30000); // indicates the timeout period (in milliseconds) for client APIs to wait for data from POP API Gateway.
    request.setClusterId(clusterId);
    ........
    
  • You can set the read timeout value when calling this API in Client code when using Python SDK.
    Python
    request = InstallAgentRequest()
    request.set_read_timeout(30000)
    request.set_ClusterId(clusterId)