Uses the Cloud Assistant provided by Elastic Compute Service (ECS) to install Enterprise Distributed Application Service (EDAS) Agent and imports ECS instances to EDAS.

If you call this operation to import ECS instances to EDAS, the system is not reinstalled. We recommend that you call this operation 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 headers

Request syntax

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

Request parameters

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

The ID of the cluster.

InstanceIds String Yes 2ze7s2v0b789k60pk1af

The ID of the instance to import. You can specify multiple instance IDs and separate them with commas (,). For example, you can set this parameter to instanceId1,instanceId2.

DoAsync Boolean No true

This parameter is obsolete.

Response parameters

Parameter Type Example Description
Code Integer 200

The HTTP status code.

ExecutionResultList Array

The execution result.

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

The time when the installation was complete.

InstanceId String i-2ze7s2v0b789k60pk1af

The ID of the instance.

InvokeRecordStatus String Finished

The installation status.

Status String OK

The execution status of the command task.

Success Boolean true

Indicates whether the installation is successful.

Message String success

The additional information.

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 parameters
{
  "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-2ze7s2v0b789k60pk1af</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-2ze7s2v0b789k60pk1af",
				"Success": true
			}
		]
	},
	"Message": "success",
	"Code": 200
}

Error codes

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

Notes

In real scenarios of calling this operation, you may encounter the timeout issue when you connect to the Point of Presence (POP) API gateway from a client. The default timeout period is 10 seconds. To resolve this issue, before you call this operation, you must manually set the timeout period for reading the data returned by the POP API gateway. We recommend that you set the timeout period to 30 seconds. This is because the time limit for service processing between the POP API gateway and the server is 30 seconds.

  • If you use Alibaba Cloud EDAS SDK for Java and call this operation in the client code, you can set the read timeout period in the following way:
    java
    InstallAgentRequest request = new InstallAgentRequest();
    request.setSysReadTimeout(30000);  // The timeout period for the API client to wait for the POP API gateway to return data. Unit: milliseconds.
    request.setClusterId(clusterId);
    ........
    
  • If you use Alibaba Cloud EDAS SDK for Python and call this operation in the client code, you can set the read timeout period in the following way:
    python
    request = InstallAgentRequest()
    request.set_read_timeout(30000)
    request.set_ClusterId(clusterId)