tencentcloud-sdk-nodejs-intl-en
Version:
1,901 lines (1,598 loc) • 377 kB
JavaScript
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* 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.
*/
const AbstractModel = require("../../common/abstract_model");
/**
* ModifyDDoSPolicyCase request structure.
* @class
*/
class ModifyDDoSPolicyCaseRequest extends AbstractModel {
constructor(){
super();
/**
* Anti-DDoS service type. `bgpip`: Anti-DDoS Advanced; `bgp`: Anti-DDoS Pro (single IP); `bgp-multip`: Anti-DDoS Pro (multi-IP), `net`: Anti-DDoS Ultimate
* @type {string || null}
*/
this.Business = null;
/**
* Policy scenario ID
* @type {string || null}
*/
this.SceneId = null;
/**
* Development platform. Valid values: [PC (PC client), MOBILE (mobile device), TV (TV), SERVER (server)]
* @type {Array.<string> || null}
*/
this.PlatformTypes = null;
/**
* Category. Valid values: [WEB (website), GAME (game), APP (application), OTHER (other)]
* @type {string || null}
*/
this.AppType = null;
/**
* Application protocol. Valid values: [tcp (TCP protocol), udp (UDP protocol), icmp (ICMP protocol), all (other protocols)]
* @type {Array.<string> || null}
*/
this.AppProtocols = null;
/**
* TCP start port. Value range: (0, 65535]
* @type {string || null}
*/
this.TcpSportStart = null;
/**
* TCP end port. Value range: (0, 65535). It must be greater than or equal to the TCP start port
* @type {string || null}
*/
this.TcpSportEnd = null;
/**
* UDP start port. Value range: (0, 65535]
* @type {string || null}
*/
this.UdpSportStart = null;
/**
* End UDP business port. Value range: (0, 65535). It must be greater than or equal to the start UDP business port
* @type {string || null}
*/
this.UdpSportEnd = null;
/**
* Whether there are customers outside Mainland China. Valid values: [no, yes]
* @type {string || null}
*/
this.HasAbroad = null;
/**
* Whether to actively initiate outbound TCP requests. Valid values: [no, yes]
* @type {string || null}
*/
this.HasInitiateTcp = null;
/**
* Whether to actively initiate outbound UDP requests. Valid values: [no, yes]
* @type {string || null}
*/
this.HasInitiateUdp = null;
/**
* Port that actively initiates TCP requests. Value range: (0, 65535]
* @type {string || null}
*/
this.PeerTcpPort = null;
/**
* Port that actively initiates UDP requests. Value range: (0, 65535]
* @type {string || null}
*/
this.PeerUdpPort = null;
/**
* Fixed feature code of TCP payload. String length limit: 512
* @type {string || null}
*/
this.TcpFootprint = null;
/**
* Fixed feature code of UDP payload. String length limit: 512
* @type {string || null}
*/
this.UdpFootprint = null;
/**
* Web business API URL
* @type {Array.<string> || null}
*/
this.WebApiUrl = null;
/**
* Minimum length of TCP business packet. Value range: (0, 1500)
* @type {string || null}
*/
this.MinTcpPackageLen = null;
/**
* Maximum length of TCP business packet. Value range: (0, 1500). It must be greater than or equal to the minimum length of TCP business packet
* @type {string || null}
*/
this.MaxTcpPackageLen = null;
/**
* Minimum length of UDP business packet. Value range: (0, 1500)
* @type {string || null}
*/
this.MinUdpPackageLen = null;
/**
* Maximum length of UDP business packet. Value range: (0, 1500). It must be greater than or equal to the minimum length of UDP business packet
* @type {string || null}
*/
this.MaxUdpPackageLen = null;
/**
* Whether there are VPN businesses. Valid values: [no, yes]
* @type {string || null}
*/
this.HasVPN = null;
/**
* TCP business port list. Individual ports and port ranges are supported, which should be in string type, such as 80,443,700-800,53,1000-3000
* @type {string || null}
*/
this.TcpPortList = null;
/**
* UDP business port list. Individual ports and port ranges are supported, which should be in string type, such as 80,443,700-800,53,1000-3000
* @type {string || null}
*/
this.UdpPortList = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Business = 'Business' in params ? params.Business : null;
this.SceneId = 'SceneId' in params ? params.SceneId : null;
this.PlatformTypes = 'PlatformTypes' in params ? params.PlatformTypes : null;
this.AppType = 'AppType' in params ? params.AppType : null;
this.AppProtocols = 'AppProtocols' in params ? params.AppProtocols : null;
this.TcpSportStart = 'TcpSportStart' in params ? params.TcpSportStart : null;
this.TcpSportEnd = 'TcpSportEnd' in params ? params.TcpSportEnd : null;
this.UdpSportStart = 'UdpSportStart' in params ? params.UdpSportStart : null;
this.UdpSportEnd = 'UdpSportEnd' in params ? params.UdpSportEnd : null;
this.HasAbroad = 'HasAbroad' in params ? params.HasAbroad : null;
this.HasInitiateTcp = 'HasInitiateTcp' in params ? params.HasInitiateTcp : null;
this.HasInitiateUdp = 'HasInitiateUdp' in params ? params.HasInitiateUdp : null;
this.PeerTcpPort = 'PeerTcpPort' in params ? params.PeerTcpPort : null;
this.PeerUdpPort = 'PeerUdpPort' in params ? params.PeerUdpPort : null;
this.TcpFootprint = 'TcpFootprint' in params ? params.TcpFootprint : null;
this.UdpFootprint = 'UdpFootprint' in params ? params.UdpFootprint : null;
this.WebApiUrl = 'WebApiUrl' in params ? params.WebApiUrl : null;
this.MinTcpPackageLen = 'MinTcpPackageLen' in params ? params.MinTcpPackageLen : null;
this.MaxTcpPackageLen = 'MaxTcpPackageLen' in params ? params.MaxTcpPackageLen : null;
this.MinUdpPackageLen = 'MinUdpPackageLen' in params ? params.MinUdpPackageLen : null;
this.MaxUdpPackageLen = 'MaxUdpPackageLen' in params ? params.MaxUdpPackageLen : null;
this.HasVPN = 'HasVPN' in params ? params.HasVPN : null;
this.TcpPortList = 'TcpPortList' in params ? params.TcpPortList : null;
this.UdpPortList = 'UdpPortList' in params ? params.UdpPortList : null;
}
}
/**
* DescribeIpUnBlockList request structure.
* @class
*/
class DescribeIpUnBlockListRequest extends AbstractModel {
constructor(){
super();
/**
* Start time
* @type {string || null}
*/
this.BeginTime = null;
/**
* End time
* @type {string || null}
*/
this.EndTime = null;
/**
* IP (if this field is not empty, IP filtering will be performed)
* @type {string || null}
*/
this.Ip = null;
/**
* Pagination parameter (paginated query will be performed if this field is not empty). This field will be disused in the future. Please use the `Limit` and `Offset` fields instead;
* @type {Paging || null}
*/
this.Paging = null;
/**
* Number of entries per page. A value of 0 means no pagination
* @type {number || null}
*/
this.Limit = null;
/**
* Page start offset, whose value is (page number - 1) * number of entries per page
* @type {number || null}
*/
this.Offset = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.BeginTime = 'BeginTime' in params ? params.BeginTime : null;
this.EndTime = 'EndTime' in params ? params.EndTime : null;
this.Ip = 'Ip' in params ? params.Ip : null;
if (params.Paging) {
let obj = new Paging();
obj.deserialize(params.Paging)
this.Paging = obj;
}
this.Limit = 'Limit' in params ? params.Limit : null;
this.Offset = 'Offset' in params ? params.Offset : null;
}
}
/**
* DeleteDDoSPolicyCase request structure.
* @class
*/
class DeleteDDoSPolicyCaseRequest extends AbstractModel {
constructor(){
super();
/**
* Anti-DDoS service type. `bgpip`: Anti-DDoS Advanced; `bgp`: Anti-DDoS Pro (single IP); `bgp-multip`: Anti-DDoS Pro (multi-IP), `net`: Anti-DDoS Ultimate
* @type {string || null}
*/
this.Business = null;
/**
* Policy scenario ID
* @type {string || null}
*/
this.SceneId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Business = 'Business' in params ? params.Business : null;
this.SceneId = 'SceneId' in params ? params.SceneId : null;
}
}
/**
* CreateDDoSPolicy response structure.
* @class
*/
class CreateDDoSPolicyResponse extends AbstractModel {
constructor(){
super();
/**
* Policy ID
* @type {string || null}
*/
this.PolicyId = null;
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.PolicyId = 'PolicyId' in params ? params.PolicyId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DeleteL7Rules request structure.
* @class
*/
class DeleteL7RulesRequest extends AbstractModel {
constructor(){
super();
/**
* Anti-DDoS service type. `bgpip`: Anti-DDoS Advanced; `bgp`: Anti-DDoS Pro (single IP); `bgp-multip`: Anti-DDoS Pro (multi-IP), `net`: Anti-DDoS Ultimate
* @type {string || null}
*/
this.Business = null;
/**
* Anti-DDoS instance ID
* @type {string || null}
*/
this.Id = null;
/**
* Rule ID list
* @type {Array.<string> || null}
*/
this.RuleIdList = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Business = 'Business' in params ? params.Business : null;
this.Id = 'Id' in params ? params.Id : null;
this.RuleIdList = 'RuleIdList' in params ? params.RuleIdList : null;
}
}
/**
* CreateBoundIP request structure.
* @class
*/
class CreateBoundIPRequest extends AbstractModel {
constructor(){
super();
/**
* Anti-DDoS service type. `bgp`: Anti-DDoS Pro (Single IP); `bgp-multip`: Anti-DDoS Pro (Multi-IP)
* @type {string || null}
*/
this.Business = null;
/**
* Anti-DDoS instance ID
* @type {string || null}
*/
this.Id = null;
/**
* Array of IPs to be bound to the Anti-DDoS instance. For Anti-DDoS Pro Single IP instance, this array can contain only one IP. If there are no IPs to bind, it can be empty; however, either `BoundDevList` or `UnBoundDevList` must not be empty;
* @type {Array.<BoundIpInfo> || null}
*/
this.BoundDevList = null;
/**
* Array of IPs to be unbound from Anti-DDoS instance. For Anti-DDoS Pro Single IP instance, this array can contain only one IP; if there are no IPs to unbind, it can be empty; however, either `BoundDevList` or `UnBoundDevList` must not be empty;
* @type {Array.<BoundIpInfo> || null}
*/
this.UnBoundDevList = null;
/**
* [Disused]
* @type {string || null}
*/
this.CopyPolicy = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Business = 'Business' in params ? params.Business : null;
this.Id = 'Id' in params ? params.Id : null;
if (params.BoundDevList) {
this.BoundDevList = new Array();
for (let z in params.BoundDevList) {
let obj = new BoundIpInfo();
obj.deserialize(params.BoundDevList[z]);
this.BoundDevList.push(obj);
}
}
if (params.UnBoundDevList) {
this.UnBoundDevList = new Array();
for (let z in params.UnBoundDevList) {
let obj = new BoundIpInfo();
obj.deserialize(params.UnBoundDevList[z]);
this.UnBoundDevList.push(obj);
}
}
this.CopyPolicy = 'CopyPolicy' in params ? params.CopyPolicy : null;
}
}
/**
* DescribeCCEvList request structure.
* @class
*/
class DescribeCCEvListRequest extends AbstractModel {
constructor(){
super();
/**
* Anti-DDoS service type. `bgpip`: Anti-DDoS Advanced; `bgp`: Anti-DDoS Pro (Single IP); `bgp-multip`: Anti-DDoS Pro (Multi-IP); `net`: Anti-DDoS Ultimate; `basic`: Anti-DDoS Basic
* @type {string || null}
*/
this.Business = null;
/**
* Start time
* @type {string || null}
*/
this.StartTime = null;
/**
* End time
* @type {string || null}
*/
this.EndTime = null;
/**
* Anti-DDoS instance ID
* @type {string || null}
*/
this.Id = null;
/**
* Resource instance IP. When `business` is not `basic`, if `IpList` is not empty, `Id` must not be empty;
* @type {Array.<string> || null}
*/
this.IpList = null;
/**
* Number of entries per page. A value of 0 means no pagination
* @type {number || null}
*/
this.Limit = null;
/**
* Page start offset, whose value is (page number - 1) * number of entries per page
* @type {number || null}
*/
this.Offset = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Business = 'Business' in params ? params.Business : null;
this.StartTime = 'StartTime' in params ? params.StartTime : null;
this.EndTime = 'EndTime' in params ? params.EndTime : null;
this.Id = 'Id' in params ? params.Id : null;
this.IpList = 'IpList' in params ? params.IpList : null;
this.Limit = 'Limit' in params ? params.Limit : null;
this.Offset = 'Offset' in params ? params.Offset : null;
}
}
/**
* DescribeTransmitStatis response structure.
* @class
*/
class DescribeTransmitStatisResponse extends AbstractModel {
constructor(){
super();
/**
* If `MetricName` is `traffic`, this field indicates the inbound traffic bandwidth in bps;
If `MetricName` is `pkg`, this field indicates the inbound packet rate in pps;
* @type {Array.<number> || null}
*/
this.InDataList = null;
/**
* If `MetricName` is `traffic`, this field indicates the outbound traffic bandwidth in bps;
If `MetricName` is `pkg`, this field indicates the outbound packet rate in pps;
* @type {Array.<number> || null}
*/
this.OutDataList = null;
/**
* Metric name:
traffic: traffic bandwidth;
pkg: packet rate;
* @type {string || null}
*/
this.MetricName = null;
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InDataList = 'InDataList' in params ? params.InDataList : null;
this.OutDataList = 'OutDataList' in params ? params.OutDataList : null;
this.MetricName = 'MetricName' in params ? params.MetricName : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Advanced DDoS policy
* @class
*/
class DDosPolicy extends AbstractModel {
constructor(){
super();
/**
* Resource bound to policy
* @type {Array.<ResourceIp> || null}
*/
this.Resources = null;
/**
* Disabled protocol
* @type {DDoSPolicyDropOption || null}
*/
this.DropOptions = null;
/**
* Disabled port
* @type {Array.<DDoSPolicyPortLimit> || null}
*/
this.PortLimits = null;
/**
* Packet filter
* @type {Array.<DDoSPolicyPacketFilter> || null}
*/
this.PacketFilters = null;
/**
* IP blocklist/allowlist
* @type {Array.<IpBlackWhite> || null}
*/
this.IpBlackWhiteLists = null;
/**
* Policy ID
* @type {string || null}
*/
this.PolicyId = null;
/**
* Policy name
* @type {string || null}
*/
this.PolicyName = null;
/**
* Policy creation time
* @type {string || null}
*/
this.CreateTime = null;
/**
* Watermarking policy parameter. There can be only one policy. If there are no policies, the array is empty
* @type {Array.<WaterPrintPolicy> || null}
*/
this.WaterPrint = null;
/**
* Watermark key. There can be up to two keys. If there are no policies, the array is empty
* @type {Array.<WaterPrintKey> || null}
*/
this.WaterKey = null;
/**
* Resource instance bound to policy
Note: this field may return null, indicating that no valid values can be obtained.
* @type {Array.<string> || null}
*/
this.BoundResources = null;
/**
* Policy scenario
Note: this field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.SceneId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.Resources) {
this.Resources = new Array();
for (let z in params.Resources) {
let obj = new ResourceIp();
obj.deserialize(params.Resources[z]);
this.Resources.push(obj);
}
}
if (params.DropOptions) {
let obj = new DDoSPolicyDropOption();
obj.deserialize(params.DropOptions)
this.DropOptions = obj;
}
if (params.PortLimits) {
this.PortLimits = new Array();
for (let z in params.PortLimits) {
let obj = new DDoSPolicyPortLimit();
obj.deserialize(params.PortLimits[z]);
this.PortLimits.push(obj);
}
}
if (params.PacketFilters) {
this.PacketFilters = new Array();
for (let z in params.PacketFilters) {
let obj = new DDoSPolicyPacketFilter();
obj.deserialize(params.PacketFilters[z]);
this.PacketFilters.push(obj);
}
}
if (params.IpBlackWhiteLists) {
this.IpBlackWhiteLists = new Array();
for (let z in params.IpBlackWhiteLists) {
let obj = new IpBlackWhite();
obj.deserialize(params.IpBlackWhiteLists[z]);
this.IpBlackWhiteLists.push(obj);
}
}
this.PolicyId = 'PolicyId' in params ? params.PolicyId : null;
this.PolicyName = 'PolicyName' in params ? params.PolicyName : null;
this.CreateTime = 'CreateTime' in params ? params.CreateTime : null;
if (params.WaterPrint) {
this.WaterPrint = new Array();
for (let z in params.WaterPrint) {
let obj = new WaterPrintPolicy();
obj.deserialize(params.WaterPrint[z]);
this.WaterPrint.push(obj);
}
}
if (params.WaterKey) {
this.WaterKey = new Array();
for (let z in params.WaterKey) {
let obj = new WaterPrintKey();
obj.deserialize(params.WaterKey[z]);
this.WaterKey.push(obj);
}
}
this.BoundResources = 'BoundResources' in params ? params.BoundResources : null;
this.SceneId = 'SceneId' in params ? params.SceneId : null;
}
}
/**
* Protocol and port parameters
* @class
*/
class ProtocolPort extends AbstractModel {
constructor(){
super();
/**
* Protocol (TCP, UDP)
* @type {string || null}
*/
this.Protocol = null;
/**
* Port
* @type {number || null}
*/
this.Port = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Protocol = 'Protocol' in params ? params.Protocol : null;
this.Port = 'Port' in params ? params.Port : null;
}
}
/**
* DescribeDDoSNetTrend request structure.
* @class
*/
class DescribeDDoSNetTrendRequest extends AbstractModel {
constructor(){
super();
/**
* Anti-DDoS service type (`net`: Anti-DDoS Ultimate)
* @type {string || null}
*/
this.Business = null;
/**
* Anti-DDoS instance ID
* @type {string || null}
*/
this.Id = null;
/**
* Metric. Valid values: [bps (attack traffic bandwidth), pps (attack packet rate)]
* @type {string || null}
*/
this.MetricName = null;
/**
* Statistical granularity. Valid values: [300 (5-minute), 3600 (hourly), 86400 (daily)]
* @type {number || null}
*/
this.Period = null;
/**
* Statistics start time
* @type {string || null}
*/
this.StartTime = null;
/**
* Statistics end time
* @type {string || null}
*/
this.EndTime = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Business = 'Business' in params ? params.Business : null;
this.Id = 'Id' in params ? params.Id : null;
this.MetricName = 'MetricName' in params ? params.MetricName : null;
this.Period = 'Period' in params ? params.Period : null;
this.StartTime = 'StartTime' in params ? params.StartTime : null;
this.EndTime = 'EndTime' in params ? params.EndTime : null;
}
}
/**
* DescribeUnBlockStatis request structure.
* @class
*/
class DescribeUnBlockStatisRequest extends AbstractModel {
constructor(){
super();
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
}
}
/**
* ModifyCCUrlAllow response structure.
* @class
*/
class ModifyCCUrlAllowResponse extends AbstractModel {
constructor(){
super();
/**
* Success code
* @type {SuccessCode || null}
*/
this.Success = null;
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.Success) {
let obj = new SuccessCode();
obj.deserialize(params.Success)
this.Success = obj;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeBasicDeviceThreshold response structure.
* @class
*/
class DescribeBasicDeviceThresholdResponse extends AbstractModel {
constructor(){
super();
/**
* Blackhole blocking value
* @type {number || null}
*/
this.Threshold = null;
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Threshold = 'Threshold' in params ? params.Threshold : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeCCAlarmThreshold response structure.
* @class
*/
class DescribeCCAlarmThresholdResponse extends AbstractModel {
constructor(){
super();
/**
* CC alarm threshold
* @type {CCAlarmThreshold || null}
*/
this.CCAlarmThreshold = null;
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.CCAlarmThreshold) {
let obj = new CCAlarmThreshold();
obj.deserialize(params.CCAlarmThreshold)
this.CCAlarmThreshold = obj;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeDDoSNetEvList request structure.
* @class
*/
class DescribeDDoSNetEvListRequest extends AbstractModel {
constructor(){
super();
/**
* Anti-DDoS service type (`net`: Anti-DDoS Ultimate)
* @type {string || null}
*/
this.Business = null;
/**
* Anti-DDoS instance ID
* @type {string || null}
*/
this.Id = null;
/**
* Start time
* @type {string || null}
*/
this.StartTime = null;
/**
* End time
* @type {string || null}
*/
this.EndTime = null;
/**
* Number of entries per page. A value of 0 means no pagination
* @type {number || null}
*/
this.Limit = null;
/**
* Page start offset, whose value is (page number - 1) * number of entries per page
* @type {number || null}
*/
this.Offset = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Business = 'Business' in params ? params.Business : null;
this.Id = 'Id' in params ? params.Id : null;
this.StartTime = 'StartTime' in params ? params.StartTime : null;
this.EndTime = 'EndTime' in params ? params.EndTime : null;
this.Limit = 'Limit' in params ? params.Limit : null;
this.Offset = 'Offset' in params ? params.Offset : null;
}
}
/**
* DeleteL4Rules response structure.
* @class
*/
class DeleteL4RulesResponse extends AbstractModel {
constructor(){
super();
/**
* Success code
* @type {SuccessCode || null}
*/
this.Success = null;
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.Success) {
let obj = new SuccessCode();
obj.deserialize(params.Success)
this.Success = obj;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ModifyNewDomainRules request structure.
* @class
*/
class ModifyNewDomainRulesRequest extends AbstractModel {
constructor(){
super();
/**
* Anti-DDoS service type (`bgpip`: Anti-DDoS Advanced).
* @type {string || null}
*/
this.Business = null;
/**
* Anti-DDoS instance ID.
* @type {string || null}
*/
this.Id = null;
/**
* Domain name forwarding rule.
* @type {NewL7RuleEntry || null}
*/
this.Rule = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Business = 'Business' in params ? params.Business : null;
this.Id = 'Id' in params ? params.Id : null;
if (params.Rule) {
let obj = new NewL7RuleEntry();
obj.deserialize(params.Rule)
this.Rule = obj;
}
}
}
/**
* DDoS alarm threshold
* @class
*/
class DDoSAlarmThreshold extends AbstractModel {
constructor(){
super();
/**
* Alarm threshold type. 1: inbound traffic, 2: cleansed traffic
* @type {number || null}
*/
this.AlarmType = null;
/**
* Alarm threshold, which should be greater than 0 (currently scheduled value)
* @type {number || null}
*/
this.AlarmThreshold = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.AlarmType = 'AlarmType' in params ? params.AlarmType : null;
this.AlarmThreshold = 'AlarmThreshold' in params ? params.AlarmThreshold : null;
}
}
/**
* DescribePolicyCase response structure.
* @class
*/
class DescribePolicyCaseResponse extends AbstractModel {
constructor(){
super();
/**
* Policy scenario list
* @type {Array.<KeyValueRecord> || null}
*/
this.CaseList = null;
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.CaseList) {
this.CaseList = new Array();
for (let z in params.CaseList) {
let obj = new KeyValueRecord();
obj.deserialize(params.CaseList[z]);
this.CaseList.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeResIpList request structure.
* @class
*/
class DescribeResIpListRequest extends AbstractModel {
constructor(){
super();
/**
* Anti-DDoS service type. `bgpip`: Anti-DDoS Advanced; `bgp`: Anti-DDoS Pro (single IP); `bgp-multip`: Anti-DDoS Pro (multi-IP), `net`: Anti-DDoS Ultimate
* @type {string || null}
*/
this.Business = null;
/**
* Resource ID. If this field is left empty, it means to get all resources IP of the current user
* @type {Array.<string> || null}
*/
this.IdList = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Business = 'Business' in params ? params.Business : null;
this.IdList = 'IdList' in params ? params.IdList : null;
}
}
/**
* ModifyCCLevel request structure.
* @class
*/
class ModifyCCLevelRequest extends AbstractModel {
constructor(){
super();
/**
* Anti-DDoS service type. `bgpip`: Anti-DDoS Advanced; `net`: Anti-DDoS Ultimate
* @type {string || null}
*/
this.Business = null;
/**
* Anti-DDoS instance ID
* @type {string || null}
*/
this.Id = null;
/**
* CC protection level. Valid values: [default (normal), loose (loose), strict (strict)];
* @type {string || null}
*/
this.Level = null;
/**
* CC protection type, which is optional. Valid values: [http (HTTP CC protection), https (HTTPS CC protection)]; if this field is left empty, HTTPS CC protection will be used by default; if `https` is entered, the `RuleId` field is required;
* @type {string || null}
*/
this.Protocol = null;
/**
* Layer-7 forwarding rule ID (which can be obtained from the layer-7 forwarding rule API);
* @type {string || null}
*/
this.RuleId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Business = 'Business' in params ? params.Business : null;
this.Id = 'Id' in params ? params.Id : null;
this.Level = 'Level' in params ? params.Level : null;
this.Protocol = 'Protocol' in params ? params.Protocol : null;
this.RuleId = 'RuleId' in params ? params.RuleId : null;
}
}
/**
* DeleteCCSelfDefinePolicy request structure.
* @class
*/
class DeleteCCSelfDefinePolicyRequest extends AbstractModel {
constructor(){
super();
/**
* Anti-DDoS service type. `bgpip`: Anti-DDoS Advanced; `bgp`: Anti-DDoS Pro (single IP); `bgp-multip`: Anti-DDoS Pro (multi-IP), `net`: Anti-DDoS Ultimate
* @type {string || null}
*/
this.Business = null;
/**
* Anti-DDoS instance ID
* @type {string || null}
*/
this.Id = null;
/**
* Policy ID
* @type {string || null}
*/
this.SetId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Business = 'Business' in params ? params.Business : null;
this.Id = 'Id' in params ? params.Id : null;
this.SetId = 'SetId' in params ? params.SetId : null;
}
}
/**
* DescribeCCUrlAllow request structure.
* @class
*/
class DescribeCCUrlAllowRequest extends AbstractModel {
constructor(){
super();
/**
* Anti-DDoS service type. `bgpip`: Anti-DDoS Advanced; `bgp`: Anti-DDoS Pro (single IP); `bgp-multip`: Anti-DDoS Pro (multi-IP), `net`: Anti-DDoS Ultimate
* @type {string || null}
*/
this.Business = null;
/**
* Anti-DDoS instance ID
* @type {string || null}
*/
this.Id = null;
/**
* Blocklist or allowlist. Valid value: [white (allowlist)]. Currently, only allowlist is supported.
Note: this array can only have one value which can only be `white`
* @type {Array.<string> || null}
*/
this.Type = null;
/**
* Pagination parameter
* @type {number || null}
*/
this.Limit = null;
/**
* Pagination parameter
* @type {number || null}
*/
this.Offset = null;
/**
* HTTP or HTTPS CC protection, which is optional. Valid values: [http (HTTP CC protection), https (HTTPS CC protection)];
* @type {string || null}
*/
this.Protocol = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Business = 'Business' in params ? params.Business : null;
this.Id = 'Id' in params ? params.Id : null;
this.Type = 'Type' in params ? params.Type : null;
this.Limit = 'Limit' in params ? params.Limit : null;
this.Offset = 'Offset' in params ? params.Offset : null;
this.Protocol = 'Protocol' in params ? params.Protocol : null;
}
}
/**
* Field value in K-V format
* @class
*/
class KeyValue extends AbstractModel {
constructor(){
super();
/**
* Field name
* @type {string || null}
*/
this.Key = null;
/**
* Field value
* @type {string || null}
*/
this.Value = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Key = 'Key' in params ? params.Key : null;
this.Value = 'Value' in params ? params.Value : null;
}
}
/**
* IP blocklist/allowlist
* @class
*/
class IpBlackWhite extends AbstractModel {
constructor(){
super();
/**
* IP address
* @type {string || null}
*/
this.Ip = null;
/**
* Blocklist/allowlist type. Valid values: [black, white]
* @type {string || null}
*/
this.Type = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Ip = 'Ip' in params ? params.Ip : null;
this.Type = 'Type' in params ? params.Type : null;
}
}
/**
* ModifyDDoSAlarmThreshold request structure.
* @class
*/
class ModifyDDoSAlarmThresholdRequest extends AbstractModel {
constructor(){
super();
/**
* Anti-DDoS service type (`shield`: Chess Shield, `bgpip`: Anti-DDoS Advanced, `bgp`: Anti-DDoS Pro (single IP), `bgp-multip`: Anti-DDoS Pro (multi-IP), `net`: Anti-DDoS Ultimate)
* @type {string || null}
*/
this.Business = null;
/**
* Anti-DDoS instance ID
* @type {string || null}
*/
this.RsId = null;
/**
* Alarm threshold type. 0: not set, 1: inbound traffic, 2: cleansed traffic
* @type {number || null}
*/
this.AlarmType = null;
/**
* Alarm threshold, which should be greater than 0 (currently scheduled value)
* @type {number || null}
*/
this.AlarmThreshold = null;
/**
* List of IPs associated with resource. If no Anti-DDoS Pro instance is bound, pass in an empty array. For Anti-DDoS Ultimate, pass in multiple IPs
* @type {Array.<string> || null}
*/
this.IpList = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Business = 'Business' in params ? params.Business : null;
this.RsId = 'RsId' in params ? params.RsId : null;
this.AlarmType = 'AlarmType' in params ? params.AlarmType : null;
this.AlarmThreshold = 'AlarmThreshold' in params ? params.AlarmThreshold : null;
this.IpList = 'IpList' in params ? params.IpList : null;
}
}
/**
* CreateDDoSPolicy request structure.
* @class
*/
class CreateDDoSPolicyRequest extends AbstractModel {
constructor(){
super();
/**
* Anti-DDoS service type. `bgpip`: Anti-DDoS Advanced; `bgp`: Anti-DDoS Pro (single IP); `bgp-multip`: Anti-DDoS Pro (multi-IP), `net`: Anti-DDoS Ultimate
* @type {string || null}
*/
this.Business = null;
/**
* Protocol disablement, which must be entered, and the array length must be 1
* @type {Array.<DDoSPolicyDropOption> || null}
*/
this.DropOptions = null;
/**
* Policy name
* @type {string || null}
*/
this.Name = null;
/**
* Ports to be closed. If no ports are to be closed, enter an empty array
* @type {Array.<DDoSPolicyPortLimit> || null}
*/
this.PortLimits = null;
/**
* Request source IP blocklist/allowlist, which should be an empty array if there are no blocked or allowed IPs.
* @type {Array.<IpBlackWhite> || null}
*/
this.IpAllowDenys = null;
/**
* Packet filter. Enter an empty array if there are no packets to filter
* @type {Array.<DDoSPolicyPacketFilter> || null}
*/
this.PacketFilters = null;
/**
* Watermarking policy parameters. Enter an empty array if the watermarking feature is not enabled. Only one watermarking policy can be passed in (that is, the size of the array cannot exceed 1)
* @type {Array.<WaterPrintPolicy> || null}
*/
this.WaterPrint = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Business = 'Business' in params ? params.Business : null;
if (params.DropOptions) {
this.DropOptions = new Array();
for (let z in params.DropOptions) {
let obj = new DDoSPolicyDropOption();
obj.deserialize(params.DropOptions[z]);
this.DropOptions.push(obj);
}
}
this.Name = 'Name' in params ? params.Name : null;
if (params.PortLimits) {
this.PortLimits = new Array();
for (let z in params.PortLimits) {
let obj = new DDoSPolicyPortLimit();
obj.deserialize(params.PortLimits[z]);
this.PortLimits.push(obj);
}
}
if (params.IpAllowDenys) {
this.IpAllowDenys = new Array();
for (let z in params.IpAllowDenys) {
let obj = new IpBlackWhite();
obj.deserialize(params.IpAllowDenys[z]);
this.IpAllowDenys.push(obj);
}
}
if (params.PacketFilters) {
this.PacketFilters = new Array();
for (let z in params.PacketFilters) {
let obj = new DDoSPolicyPacketFilter();
obj.deserialize(params.PacketFilters[z]);
this.PacketFilters.push(obj);
}
}
if (params.WaterPrint) {
this.WaterPrint = new Array();
for (let z in params.WaterPrint) {
let obj = new WaterPrintPolicy();
obj.deserialize(params.WaterPrint[z]);
this.WaterPrint.push(obj);
}
}
}
}
/**
* ModifyCCThreshold response structure.
* @class
*/
class ModifyCCThresholdResponse extends AbstractModel {
constructor(){
super();
/**
* Success code
* @type {SuccessCode || null}
*/
this.Success = null;
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.Success) {
let obj = new SuccessCode();
obj.deserialize(params.Success)
this.Success = obj;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ModifyNetReturnSwitch response structure.
* @class
*/
class ModifyNetReturnSwitchResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeActionLog request structure.
* @class
*/
class DescribeActionLogRequest extends AbstractModel {
constructor(){
super();
/**
* Start time
* @type {string || null}
*/
this.StartTime = null;
/**
* End time
* @type {string || null}
*/
this.EndTime = null;
/**
* Anti-DDoS service type. `bgpip`: Anti-DDoS Advanced; `bgp`: Anti-DDoS Pro (single IP); `bgp-multip`: Anti-DDoS Pro (multi-IP), `net`: Anti-DDoS Ultimate
* @type {string || null}
*/
this.Business = null;
/**
* Search value, which can only be resource ID or user `UIN`
* @type {string || null}
*/
this.Filter = null;
/**
* Number of entries per page. A value of 0 means no pagination
* @type {number || null}
*/
this.Limit = null;
/**
* Page start offset, whose value is (page number - 1) * number of entries per page
* @type {number || null}
*/
this.Offset = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.StartTime = 'StartTime' in params ? params.StartTime : null;
this.EndTime = 'EndTime' in params ? params.EndTime : null;
this.Business = 'Business' in params ? params.Business : null;
this.Filter = 'Filter' in params ? params.Filter : null;
this.Limit = 'Limit' in params ? params.Limit : null;
this.Offset = 'Offset' in params ? params.Offset : null;
}
}
/**
* CreateL7RuleCert request structure.
* @class
*/
class CreateL7RuleCertRequest extends AbstractModel {
constructor(){
super();
/**
* Anti-DDoS service type. `bgpip`: Anti-DDoS Advanced; `net`: Anti-DDoS Ultimate
* @type {string || null}
*/
this.Business = null;
/**
* The resource instance ID, such as the ID of an Anti-DDoS Advanced instance or the ID of an Anti-DDoS Ultimate instance.
* @type {string || null}
*/
this.Id = null;
/**
* Rule ID
* @type {string || null}
*/
this.RuleId = null;
/**
* Certificate type, which is required if the protocol is HTTPS. Valid value: [2 (Tencent Cloud-hosted certificate)]
* @type {number || null}
*/
this.CertType = null;
/**
* If the certificate is a Tencent Cloud-hosted certificate, this field must be entered with the hosted certificate ID.
* @type {string || null}
*/
this.SSLId = null;
/**
* [Disused] If the certificate is an external certificate, this field must be entered with the certificate content.
* @type {string || null}
*/
this.Cert = null;
/**
* [Disused] If the certificate is an external certificate, this field must be entered with the certificate key.
* @type {string || null}
*/
this.PrivateKey = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Business = 'Business' in params ? params.Business : null;
this.Id = 'Id' in params ? params.Id : null;
this.RuleId = 'RuleId' in params ? params.RuleId : null;
this.CertType = 'CertType' in params ? params.CertType : null;
this.SSLId = 'SSLId' in params ? params.SSLId : null;
this.Cert = 'Cert' in params ? params.Cert : null;
this.PrivateKey = 'PrivateKey' in params ? params.PrivateKey : null;
}
}
/**
* DescribeBGPIPL7RuleMaxCnt response structure.
* @class
*/
class DescribeBGPIPL7RuleMaxCntResponse extends AbstractModel {
constructor(){
super();
/**
* Maximum number of layer-7 rules that can be added for Anti-DDoS Advanced
* @type {number || null}
*/
this.Count = null;
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Count = 'Count' in params ? params.Count : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribePcap response structure.
* @class
*/
class DescribePcapResponse extends AbstractModel {
constructor(){
super();
/**
* PCAP packet download link list, which is an empty array if there are no PCAP packets;
* @type {Array.<string> || null}
*/
this.PcapUrlList = null;
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {