Help Center/ Edge Security/ API Reference/ API/ WAF Domain Name Management/ Updating a Protected Domain Name
Updated on 2023-08-24 GMT+08:00

Updating a Protected Domain Name

Function

This API is used to update a protected domain name.

URI

PUT /v1/edgewaf/domains/{domainid}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

domainid

Yes

String

Domain name.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. It can be obtained by calling the IAM API (value of X-Subject-Token in the response header).

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

protect_status

No

Integer

Protection status

Minimum: 0

Maximum: 1

access_status

No

Integer

Access status

Minimum: 0

Maximum: 1

web_tag

No

String

Domain name

description

No

String

Domain name description

certificate_id

No

String

Certificate ID, which is obtained through the ListCertificates API.

  • This parameter is not required if the client protocol is HTTP.

  • This parameter is mandatory if the client protocol is HTTPS.

  • If the API for querying the certificate list is unavailable, log in to the EdgeSec console, and obtain the certificate ID from the certificate management page of Edge WAF.

enterprise_project_id

No

String

Obtain the enterprise project ID by calling the ListEnterpriseProject API of Enterprise Project Management Service (EPS).

tls

No

String

Minimum TLS version (TLS v1.0, TLS v1.1, or TLS v1.2). The default value is TLS v1.0. The TLS parameter is configured only if the client protocol is HTTPS.

Enumeration values:

  • TLS v1.0

  • TLS v1.1

  • TLS v1.2

cipher

No

String

The cipher parameter is available only if the client protocol is HTTPS. Its values are as follows, each representing a cryptographic algorithm:

  • cipher_1: ECDHE-ECDSA-AES256-GCM-SHA384:HIGH:!MEDIUM:!LOW:!aNULL:!eNULL:!DES:!MD5:!PSK:!RC4:!kRSA:!SRP:!3DES:!DSS:!EXP:!CAMELLIA:@STRENGTH

  • cipher_2: EECDH+AESGCM:EDH+AESGCM

  • cipher_3: ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:RC4:HIGH:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH

  • cipher_4: ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!eNULL:!NULL:!EDH

  • cipher_default: ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!AESGCM

Enumeration values:

  • cipher_1

  • cipher_2

  • cipher_3

  • cipher_4

  • cipher_default

block_page

No

WafBlockPage object

Blocking page configuration

traffic_mark

No

WafTrafficMark object

Traffic identifier (used for known attack source rules)

flag

No

Flag object

Special identifier, which is used by the frontend.

extend

No

Map<String,String>

Extensible field of the domain name.

Table 4 WafBlockPage

Parameter

Mandatory

Type

Description

template

Yes

String

Blocking template name

custom_page

No

WafCustomPage object

User-defined blocking page

redirect_url

No

String

Redirection URL

Table 5 WafCustomPage

Parameter

Mandatory

Type

Description

status_code

Yes

String

Status code

content_type

Yes

String

Content type of alarm page

content

Yes

String

Page content

Minimum: 1

Maximum: 4096

Table 6 WafTrafficMark

Parameter

Mandatory

Type

Description

sip

No

Array of strings

IP address in the known attack source rule

cookie

No

String

cookie

Minimum: 1

Maximum: 4096

params

No

String

Parameter

Minimum: 1

Maximum: 4096

Table 7 Flag

Parameter

Mandatory

Type

Description

pci_3ds

No

String

Whether to enable PCI 3DS compliance certification.

  • true: yes

  • false: no

Enumeration values:

  • true

  • false

pci_dss

No

String

Whether to enable PCI DSS compliance certification.

  • true: yes

  • false: no

Enumeration values:

  • true

  • false

cname

No

String

old: The old CNAME record is used. new: new CNAME record is used.

Enumeration values:

  • old

  • new

is_dual_az

No

String

Whether IPv6 is enabled for the domain name.

  • true: yes

  • false: no

Enumeration values:

  • true

  • false

ipv6

No

String

Whether IPv6 is enabled for the domain name.

  • true: yes

  • false: no

Enumeration values:

  • true

  • false

Response Parameters

Status code: 400

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 401

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

Updating the WAF protection status of a domain name.

PUT https://{Endpoint}/v1/edgewaf/domains/1771a426afcc4e16b8636cb72c2d53e4

{
  "protect_status" : 1,
  "enterprise_project_id" : 0
}

Example Responses

None

Status Codes

Status Code

Description

200

Request succeeded.

400

Request failed.

401

The token does not have required permissions.

500

Internal server error.

Error Codes

See Error Codes.