Blocks or unblocks IP addresses or CIDR blocks.
Operation description
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
dcdn:SetDcdnFullDomainsBlockIP | Write |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
IPList | string | Yes | The IP addresses that you want to block or unblock. Separate multiple IP addresses with commas (,). You can specify up to 1,000 IP addresses. | 1.XXX.XXX.1,2.XXX.XXX.2 |
OperationType | string | Yes | The action that you want to perform. Valid values:
| block |
BlockInterval | integer | No | The duration for which IP addresses or CIDR blocks are blocked. Unit: seconds. The value 0 specifies that IP addresses or CIDR blocks are permanently blocked. This parameter is available only if you set OperationType to block. | 3000 |
UpdateType | string | No | The type of the blocking duration. This parameter is available only if you set OperationType to block. Valid values:
| cover |
Response parameters
Examples
Sample success responses
JSON
format
{
"Code": 0,
"Message": "OK",
"RequestId": "CB1A380B-09F0-41BB-802B-72F8FD6DA2FE"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvaildParameter | The specified parameters are invalid. | A parameter is set to an invalid value. Specify a valid value and try again. |
403 | OperationDeniedAccount | You are not authorized to perform this operation. | You are not authorized to perform this operation. |
406 | InvalidKey.QuotaFull | The maximum number of keys is exceeded. | The number of keys has reached the upper limit. |
For a list of error codes, visit the Service error codes.