All Products
Search
Document Center

CDN:SetCdnFullDomainsBlockIP

Last Updated:Nov 17, 2024

Blocks or unblocks IP addresses from accessing domain names.

Operation description

Note
  • To use this operation, submit a ticket.

  • This operation is suitable for blocking or unblocking a maximum of 1,000 IP addresses or CIDR blocks at a time.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
cdn:SetCdnFullDomainsBlockIPupdate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
IPListstringYes

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
OperationTypestringYes

The type of the operation.

  • block
  • unblock
block
BlockIntervalintegerNo

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
UpdateTypestringNo

The type of the blocking duration. This parameter is available only if you set OperationType to block. Valid values:

  • cover: The blocking duration that is specified in the request takes effect.
  • uncover: The longer one of the blocking duration that is specified in the request and the remaining blocking duration takes effect.
  • Default value: cover.
cover

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

Codeinteger

The status code. The status code 0 indicates that the call is successful. If another status code is returned, the call fails.

0
Messagestring

The additional information returned. If the request was successful, OK is returned. If the request failed, an error message is returned.

OK
RequestIdstring

The request ID.

23ACE7E2-2302-42E3-98F8-E5E697FD86C3

Examples

Sample success responses

JSONformat

{
  "Code": 0,
  "Message": "OK",
  "RequestId": "23ACE7E2-2302-42E3-98F8-E5E697FD86C3"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameterThe specified parameter is invalid.-
400QuotaExceededThe quota is exceeded.The quota is exhausted.
403OperationDeniedYou do not have access to this operation.You are not authorized to operate the specified resource; please check your authorization using RAM.

For a list of error codes, visit the Service error codes.