Source code for jdcloud_sdk.services.ipanti.models.CCProtectionRuleSpec

# coding=utf8

# Copyright 2018 JDCLOUD.COM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# NOTE: This class is auto generated by the jdcloud code generator program.


[docs]class CCProtectionRuleSpec(object): def __init__(self, name, uri, matchType, detectPeriod, singleIpLimit, blockType, blockTime, pageId=None, pageName=None): """ :param name: CC 防护规则名称, 不允许为空, 长度不超过 32 个字符, 支持中文, 大小写字母, 数字及字符'-'、'/'、'.'、'_' :param uri: uri, 不允许为空, 以 / 开头, 长度不超过 2048 个字符 :param matchType: 匹配 uri 类型, 0: 精确匹配, 1: 前缀匹配 :param detectPeriod: 检测周期, 单位为秒, 取值范围[5, 10800] :param singleIpLimit: ip 访问次数, 取值范围[2, 2000] :param blockType: 阻断类型, 1: 封禁并返回自定义页面, 2: 人机交互 :param blockTime: 阻断持续时间, 单位为秒, 取值范围[10, 86400] :param pageId: (Optional) 关联的自定义页面id, 阻断类型为封禁时有效, 为空时封禁并返回默认页面 :param pageName: (Optional) 关联的自定义页面名称 """ self.name = name self.uri = uri self.matchType = matchType self.detectPeriod = detectPeriod self.singleIpLimit = singleIpLimit self.blockType = blockType self.blockTime = blockTime self.pageId = pageId self.pageName = pageName