All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

SetIpProtectionConfig

Last updated:2021-03-17 11:06:31

SetIpProtectionConfig

Description

You can call this operation to configure an IP address blacklist or whitelist for a domain name. This feature is disabled by default after a domain name is added.

Request syntax

The API request contains the specified directory /2016-09-01/domain/SetIpProtectionConfig, common request headers, and operation-specific request parameters. For more information, see the sample request.

Request parameters

Parameter Required Type Description
DomainId Yes String The ID of the domain name.
Enable Yes String Specifies whether to enable the IP address blacklist or whitelist feature. Valid values: on and off. Default value: off. If the Enable parameter is set to on, the IpType parameter is required. If the Enable parameter is set to off, the following parameters are ignored.
IpType No String The type of the IP address list. Valid values: block (blacklist) and allow (whitelist). This parameter is required if the Enable parameter is set to on.
IpList No String The IP addresses. Separate multiple IP addresses with commas (,).

Examples

Sample request

POST method:

POST /2016-09-01/domain/SetIpProtectionConfig
Host: cdn.api.ksyun.com
X-Amz-Date: date
Authorization:authorization string
x-action: SetReferProtectionConfig
x-version: 2016-09-01
Content-Type: application/json

{
    "DomainId": "2D08M8V",
    "Enable": "on",
    "IpType": "allow",
    "IpList": "2.1.1.1,3.1.1.1"
}

Sample response

  • Note: If this operation is successfully called, the HTTP status code 200 is returned, without a return value. If this operation fails to be called, the HTTP status code 403 or 400 is returned. For more information about the error codes for the HTTP status code 400, see Usage notes.
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback