You can call this operation to configure the status of a Domain Name System (DNS) record.

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 SetZoneRecordStatus

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

RecordId Long Yes 5809

The ID of the DNS record.

Status String Yes DISABLE

Specifies whether to enable or disable the DNS record. Valid values:

  • ENABLE: enables the DNS record.
  • DISABLE: disables the DNS record.
Lang String No en

The language of the specific content returned in the response.

UserClientIp String No 1.1.1.1

The IP address of the client.

Response parameters

Parameter Type Example Description
RecordId Long 5809

The ID of the DNS record.

RequestId String 39CB16E5-4180-49F2-A060-23C0ECEB80D9

The ID of the request.

Status String DISABLE

The status of the DNS record.

Examples

Sample requests

      
  1. http://pvtz.aliyuncs.com/?Action=SetZoneRecordStatus&RecordId=5809&Status=DISABLE&<Common request parameters>

Sample success responses

XML format

      
  1. <SetZoneRecordStatusResponse> <Status>DISABLE</Status> <RequestId>39CB16E5-4180-49F2-A060-23C0ECEB80D9</RequestId> <RecordId>5809</RecordId></SetZoneRecordStatusResponse>

JSON format

      
  1. {“Status”:”DISABLE”,“RecordId”:5809,“RequestId”:”8952D275-70D6-4634-B78E-200A3E78C28A”}

Error codes

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