El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Updating a CC Attack Protection Rule

Updated on 2022-02-22 GMT+08:00

Function Description

This API is used to update a CC attack protection rule.

URI

  • URI format

    PUT /v1/{project_id}/waf/policy/{policy_id}/cc/{ccrule_id}

  • Parameter description
    Table 1 Path parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Specifies the project ID.

    policy_id

    Yes

    String

    Specifies the policy ID.

    ccrule_id

    Yes

    String

    Specifies the ID of a CC attack protection rule.

Request

Request parameters
Table 2 Parameter description

Parameter

Mandatory

Type

Description

path

Yes

String

Specifies the URL to which the rule applies, excluding a domain name.

limit_num

Yes

Integer

Specifies the number of requests allowed from a web visitor in a rate limiting period. The value ranges from 0 to 232.

limit_period

Yes

Integer

Specifies the rate limiting period. The value ranges from 0 seconds to 232 seconds.

lock_time

No

Integer

Specifies the lock duration. The value ranges from 0 seconds to 232 seconds.

tag_type

Yes

String

Specifies the rate limit mode.

  • ip: A web visitor is identified by the IP address.
  • cookie: A web visitor is identified by the cookie key value.
  • other: A web visitor is identified by the Referer field (user-defined request source).

tag_index

No

String

If tag_type is set to cookie, this parameter indicates cookie name.

tag_condition

No

Table 3

Specifies the Referer (customized request source) field. This field is mandatory when tag_type is set to other.

action

Yes

Table 4

Specifies the action taken when the number of requests reaches the upper limit.

Table 3 tag_condition

Parameter

Mandatory

Type

Description

category

Yes

String

Specifies the category. The value is Referer.

This parameter is mandatory when the tag_condition field is transferred.

contents

Yes

List

Specifies the category content.

The format is as follows: http://www.example.com/path.

This parameter is mandatory when the tag_condition field is transferred. Currently, only one value is accepted.

Table 4 action

Parameter

Mandatory

Type

Description

category

Yes

String

Specifies the action. The default value is block.

  • block: block the requests.
  • captcha: Verification code. The user needs to enter the correct verification code after blocking to restore the correct access page.

The default value is block.

If tag_type is set to other, this parameter value can only be block.

detail

No

Table 5

Specifies the action details. If detail is null, the default block page is displayed by default.

This parameter is not required if category is set to captcha.

This parameter is required if category is set to block.

Table 5 detail

Parameter

Mandatory

Type

Description

response

Yes

Table 6

Specifies the returned page.

Table 6 response

Parameter

Mandatory

Type

Description

content_type

Yes

String

Specifies the type of the returned page.

The options are application/json, text/html, and text/xml.

The default value is application/json.

content

Yes

String

Specifies the content of the returned page.

GET /v1/{project_id}/waf/policy/{policy_id}/custom?offset={offset}&limit={limit}

Response

Response parameters
Table 7 Parameter description

Parameter

Type

Description

id

String

Specifies the ID of a CC attack protection rule.

policy_id

String

Specifies the policy ID.

path

String

Specifies the URL to which the rule applies, excluding a domain name.

limit_num

Integer

Specifies the number of requests allowed from a web visitor in a rate limiting period.

limit_period

Integer

Specifies the rate limiting period.

lock_time

Integer

Specifies the lock duration. The value ranges from 0 seconds to 232 seconds.

tag_type

String

Specifies the tag object type. The value can be cookie, ip, or other.

tag_index

String

If tag_type is set to cookie, index indicates cookie name.

tag_condition

Table 8

This field is valid only when tag_type is set to other.

action

Table 9

Specifies the action taken when the number of requests reaches the upper limit.

timestamp

Long

Specifies the time when a CC attack protection rule is added.

default

Boolean

Specifies whether the rule is the default CC attack protection rule.

  • true: The rule is the default CC attack protection rule created by the system when creating a domain name.
  • false: The rule is created by users.
Table 8 tag_condition

Parameter

Type

Description

category

String

Specifies the category. The value is Referer.

contents

List

Specifies the category content.

Table 9 action

Parameter

Type

Description

category

String

Specifies the action. The default value is block.

  • block: block the requests.
  • captcha: Verification code. The user needs to enter the correct verification code after blocking to restore the correct access page.

The default value is block.

If tag_type is set to other, this parameter value can only be block.

detail

Table 10

Specifies the action details. If detail is null, the default block page is displayed by default.

Table 10 detail

Parameter

Mandatory

Type

Description

response

Yes

Table 11

Specifies the returned page.

Table 11 response

Parameter

Type

Description

content_type

String

Specifies the type of the returned page.

The options are application/json, text/html, and text/xml.

content

String

Specifies the content of the returned page.

Examples

  • Request example
    {
      "path": "/abc1",
      "limit_num": 10,
      "limit_period": 60,
      "lock_time": "",
      "tag_type": "cookie",
      "tag_index": "sesssionid",
      "action": {
        "category": "block",
        "detail": {
          "response": {
            "content_type": "application/json",
            "content": "{\'error\':\'forbidden\}"
          }
        }
      }
    }
  • Response example
    {
      "id": "3a9b5c0f96784ec8abd8ba61a98064ef",
      "policy_id": "9tre832yf96784ec8abd8ba61a98064ef",
      "path": "/abc1",
      "limit_num": 10,
      "limit_period": 60,
      "lock_time": "",
      "tag_type": "cookie",
      "tag_index": "sesssionid",
      "action": {
        "category": "block",
        "detail": {
          "response": {
            "content_type": "application/json",
            "content": "{\"error\":\"forbidden\"}"
          }
        }
      },
      "timestamp": 1499817600,
       "default": false
    }

Status Code

Table 12 describes the normal status code returned by the API.
Table 12 Status code

Status Code

Description

Meaning

200

OK

The request has succeeded.

For details about error status codes, see Status Codes.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback