All Products
Search
Document Center

Enterprise Distributed Application Service:InstallAgent

Last Updated:Mar 01, 2024

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

Operation description

If you call this operation to import an ECS instance into EDAS, the operating system of the ECS instance is not reinstalled. We recommend that you call this operation to import ECS instances into EDAS.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
edas:ManageClusterWrite
  • Cluster
    acs:edas:{#regionId}:{#accountId}:namespace/{#NameSpaceId}/cluster/{#ClusterId}
    none
none

Request syntax

POST /pop/v5/ecss/install_agent

Request parameters

ParameterTypeRequiredDescriptionExample
ClusterIdstringYes

The ID of the cluster.

b3e3f77b-462e-****-****-bec8727a4dc8
InstanceIdsstringYes

The ID of the ECS instance. Separate multiple IDs with commas (,). Example: instanceId1,instanceId2.

2ze7s2v0b789k60pk1af
DoAsyncbooleanNo

This parameter is discontinued.

true

Response parameters

ParameterTypeDescriptionExample
object
Codeinteger

The HTTP status code that is returned.

200
Messagestring

The message that is returned.

success
RequestIdstring

The ID of the request.

b197-40ab-9155-7ca7
ExecutionResultListobject []

The execution result.

Statusstring

The state of the installation command.

OK
FinishedTimestring

The time when the installation was complete.

20**-11-10T07:02:17Z
InstanceIdstring

The ID of the instance.

i-2ze7s2v0b789k*******
InvokeRecordStatusstring

The state of the installation.

Finished
Successboolean

Indicates whether the installation was successful.

true

Examples

Sample success responses

JSONformat

{
  "Code": 200,
  "Message": "success",
  "RequestId": "b197-40ab-9155-7ca7",
  "ExecutionResultList": {
    "ExecutionResult": [
      {
        "Status": "OK",
        "FinishedTime": "20**-11-10T07:02:17Z",
        "InstanceId": "i-2ze7s2v0b789k*******",
        "InvokeRecordStatus": "Finished",
        "Success": true
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Additional considerations

To call this operation, you may encounter a timeout issue when you connect to OpenAPI Developer Portal from a client. The default timeout period is 10 seconds. To resolve this issue, before you call this operation, you must set the timeout period for reading the data returned by OpenAPI Developer Portal. We recommend that you set the timeout period to 30 seconds. This is because the time limit for service processing between OpenAPI Developer Portal and the server is 30 seconds.

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