Use SynchronizeResource to synchronize the Alibaba Cloud resources under your account to EDAS. This operation applies to ECS cluster.

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

This operation only uses common request headers. For more information, see the Common request parameters topic.

Request syntax

GET /pop/v5/resource/pop_sync_resource HTTPS|HTTP

Request parameters

Parameter Type Required Example Description
Type String Yes ecs

The type of the resource to be synchronized. The optional parameter values are ecs, slb, vpc, ram, and all.

Response parameters

Parameter Type Example Description
Code Integer 200

The status code returned by the API request.

Data String PopSyncResource success

The data returned by the API request.

Message String success

The message returned from the API request.

RequestId String F8DFGED-K98****

Interface request unique identifier

Success Boolean true

Interface request result

Examples

Sample requests

GET /pop/v5/resource/pop\_sync\_resource HTTP/1.1
Common request header
{
  "Type": ""
}

Sample success responses

XML format

<Message>success</Message>
<Data>PopSyncResource success</Data>
<Code>200</Code>
<Success>true</Success>

JSON format

{
    "Message": "success",
    "Data": "PopSyncResource success",
    "Code": 200,
    "Success": true
}

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. The timeout period for reading the data returned by the POP API Gateway when this API is called must be set manually. 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.
    
    SynchronizeResourceRequest request = new SynchronizeResourceRequest()
    request.setSysReadTimeout(30000); // indicates the timeout period (in milliseconds) for client APIs to wait for data from POP API Gateway.
    request.setType("ecs");
    ........
    					
  • You can set the read timeout value when calling this API in Client code when using Python SDK.
    
    request = SynchronizeResourceRequest()
    request.set_read_timeout(30000)
    request.set_Type('ecs')