Creating a URL Blocking or Unblocking Task
Function
This API is used to create a URL blocking or unblocking task. To use this API, submit a service ticket.
-
A single tenant can call this API 10 times per second.
Calling Method
For details, see Calling APIs.
URI
POST /v1.0/cdn/content/access-control-urls/{action}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
action |
Yes |
String |
Definition Operation type. Constraints N/A Range
Default Value N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
access_control_urls |
Yes |
AccessControlUrls object |
Information about the URLs to be unblocked or blocked. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
task_id |
String |
Task ID. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error |
ErrMsg object |
Error code and error message. |
Example Requests
POST https://cdn.myhuaweicloud.com/v1.0/cdn/content/access-control-urls/ban
{
"access_control_urls" : {
"urls" : [ "https://www.example.com/1.txt", "http://www.example.com/2.txt" ],
"ban_duration" : 1
}
}
Example Responses
Status code: 200
Successful response.
{
"task_id" : "71xxxxxxxxxxxxxxxxxxxxxxxxxxxxff"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Successful response. |
|
400 |
Error response. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot