All Products
Search
Document Center

Enterprise Distributed Application Service:SynchronizeResource

Last Updated:Mar 01, 2024

Synchronizes the basic Alibaba Cloud resources that belong to your account to Enterprise Distributed Application Service (EDAS). This operation is applicable to Elastic Compute Service (ECS) clusters.

Operation description

If you call this operation to synchronize ECS resource information, all instance data is synchronized from ECS. If you have more than 100 ECS instances, we recommend that you do not frequently call this operation.

Debugging

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

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

GET /pop/v5/resource/pop_sync_resource

Request parameters

ParameterTypeRequiredDescriptionExample
TypestringYes

The type of the resource to be synchronized. Valid values: ecs, slb, vpc, and all. These values are case-sensitive.

ecs
ResourceIdsstringNo

The ID of the resource. This parameter is required only when you set the Type parameter to ecs. If you specify multiple IDs, separate them with commas (,). You can synchronize up to 50 resources at a time.

i-bp17c***5q8x,i-bp1**5q8x

Response parameters

ParameterTypeDescriptionExample
object
Codeinteger

The HTTP status code that is returned.

200
Messagestring

The message that is returned.

success
Datastring

The data returned for the request.

PopSyncResource success
RequestIdstring

The ID of the request.

F8DFGED-K98***************
Successboolean

Indicates whether the resources are synchronized. Valid values:

  • true: The resources are synchronized.
  • false: The resources fail to be synchronized.
true

Examples

Sample success responses

JSONformat

{
  "Code": 200,
  "Message": "success",
  "Data": "PopSyncResource success",
  "RequestId": "F8DFGED-K98***************",
  "Success": true
}

Error codes

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

Change history

Change timeSummary of changesOperation
No change history

Usage notes

When you call this operation, you may encounter the timeout issue when you connect to the OpenAPI Developer Portal 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 OpenAPI Developer Portal. We recommend that you set the timeout period to 30 seconds. This is because the time limit for service processing between the 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:
SynchronizeResourceRequest request = new SynchronizeResourceRequest();
request.setSysReadTimeout(30000); // The timeout period for the client to wait for OpenAPI Developer Portal to return data. Unit: milliseconds. 
request.setType("ecs");
........
  • 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 = SynchronizeResourceRequest()
request.set_read_timeout(30000)
request.set_Type('ecs')