Adds or updates a hostname synchronization task.

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 parameters

Parameter Type Required Example Description
Action String Yes UpdateSyncEcsHostTask

The operation that you want to perform. Set the value to UpdateSyncEcsHostTask.

Lang String Yes en

The language.

ZoneId String Yes test79afafec***********1d28f7889c

The ID of the zone.

Status String Yes ON

The status of the task.

  • ON
  • OFF
Region.N.UserId Long No 1234567890

The ID of the user that corresponds to the region. This parameter is used in cross-account synchronization scenarios.

Region.N.RegionId String No cn-beijing

The ID of the region.

Response parameters

Parameter Type Example Description
RequestId String test-FC9A-4595-8D96-089D73D7A63D

The ID of the request.

Success Boolean true

Indicates whether the call was successful.

  • true: The call was successful.
  • false: The call failed.

Examples

Sample requests

http(s)://pvtz.aliyuncs.com/?Action=UpdateSyncEcsHostTask
&Lang=en
&ZoneId=test79afafec***********1d28f7889c
&Status=ON
&Region=[{"UserId":1234567890,"RegionId":"cn-beijing"}]
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<UpdateSyncEcsHostTaskResponse>
    <RequestId>test-FC9A-4595-8D96-089D73D7A63D</RequestId>
    <Success>true</Success>
</UpdateSyncEcsHostTaskResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "test-FC9A-4595-8D96-089D73D7A63D",
  "Success" : true
}

Error codes

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