tencentcloud-sdk-nodejs-intl-en
Version:
1,686 lines (1,423 loc) • 298 kB
JavaScript
/*
* Copyright (c) 2018 Tencent. 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");
/**
* DescribeNatFwInstance request structure.
* @class
*/
class DescribeNatFwInstanceRequest extends AbstractModel {
constructor(){
super();
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
}
}
/**
* Status monitoring filter condition.
* @class
*/
class CfwStatusMonitorFilter extends AbstractModel {
constructor(){
super();
/**
* Filter field name.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Name = null;
/**
* Filter value list, up to 10.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<string> || null}
*/
this.Values = null;
/**
* Operator type, optional; only supported for backend permission types.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.OperatorType = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Name = 'Name' in params ? params.Name : null;
this.Values = 'Values' in params ? params.Values : null;
this.OperatorType = 'OperatorType' in params ? params.OperatorType : null;
}
}
/**
* DescribeCfwStatusMonitor request structure.
* @class
*/
class DescribeCfwStatusMonitorRequest extends AbstractModel {
constructor(){
super();
/**
* Operation type. describe_scene means discovery of scenarios and secondary dropdown options; fetch_scene means acquisition of scenario-based snapshots. Required.
* @type {string || null}
*/
this.Op = null;
/**
* Firewall scenario type. Supports internet_edge (Internet edge firewall), nat_cluster (NAT border firewall - cluster), nat_ha (NAT border firewall - primary/secondary), vpc_cluster (VPC boundary firewall - cluster), vpc_ha (VPC boundary firewall - primary/secondary). Required.
* @type {string || null}
*/
this.FirewallType = null;
/**
* Secondary dropdown option ID. fetch_scene is imported as needed, and the value comes from selection.available_options[].ID returned by describe_scene. internet_edge is the region, NAT is the instance ID, and VPC bandwidth scenario is the firewall group ID. The connections aggregation scenario for VPC_cluster ignores this parameter.
* @type {string || null}
*/
this.SelectionId = null;
/**
* Secondary dropdown display name. Can be used as an alternative to SelectionId for matching by name. The value comes from selection.available_options[].name returned by describe_scene.
* @type {string || null}
*/
this.SelectionName = null;
/**
* Engine instance ID. Mainly used in vpc ha scenarios where a firewall group corresponds to multiple instances. Preferentially use the selection.available_options[].instance_ID returned by describe_scene. If only instance_ids are available, select a string value from the array.
* @type {string || null}
*/
this.SelectionInstanceId = null;
/**
* Metrics tab. fetch_scene can be passed; used when not passed, this scenario default value. Support bandwidth, connections.
* @type {string || null}
*/
this.Metric = null;
/**
* Perspective under the metric. fetch_scene is optional; the default value for this scenario is used when not provided. Supports ip, subnet, session, switch, and vpc. The actual usable composite is subject to the return from describe_scene.
* @type {string || null}
*/
this.Perspective = null;
/**
* NAT primary/secondary number of connections IP perspective range. External means external IP, asset means Asset IP. Only nat_ha + connections + ip is used. Other group input will return InvalidParameter.
* @type {string || null}
*/
this.IpScope = null;
/**
* Preset time range. Default 24h; used by fetch_scene. Supports 5m, 15m, 30m, 1h, 6h, 24h, 3d, 7d, 30d, today, yesterday, day before yesterday, this week, last week, this month.
* @type {string || null}
*/
this.TimePreset = null;
/**
* Custom start time. Format YYYY-MM-DD HH:MM:SS; must be specified together with EndTime, maximum span 30 days.
* @type {string || null}
*/
this.StartTime = null;
/**
* Custom end time. Format YYYY-MM-DD HH:MM:SS; must be consistent with StartTime at the same time, maximum span 30 days.
* @type {string || null}
*/
this.EndTime = null;
/**
* Page number, starting from 1. Default is 1; used for the fetch_scene list viewing angle.
* @type {number || null}
*/
this.Page = null;
/**
* Entries per page. Default 10, value 1 to 100; used for the viewing angle of the fetch_scene list.
* @type {number || null}
*/
this.Limit = null;
/**
* Whether to only get overview data. When true, fetch_scene only requests overview, skips table/detail, and is suitable for viewing scenario snapshot summary.
* @type {boolean || null}
*/
this.OverviewOnly = null;
/**
* Original offset coverage. Option, overwrites the calculation result of Page after input; value 0 to 10000.
* @type {number || null}
*/
this.Offset = null;
/**
* Sorting field. Option. InputMax and OutputMax are supported for the Internet boundary IP and NAT IP/subnet perspective. SwitchName is supported for the VPC switch perspective. FlowMax is supported for the VPC IP/VPC perspective. Do not pass other groups.
* @type {string || null}
*/
this.SortBy = null;
/**
* Sorting order. Default desc; supports asc, desc.
* @type {string || null}
*/
this.SortOrder = null;
/**
* Filter condition list. Reserved.
* @type {Array.<CfwStatusMonitorFilter> || null}
*/
this.Filters = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Op = 'Op' in params ? params.Op : null;
this.FirewallType = 'FirewallType' in params ? params.FirewallType : null;
this.SelectionId = 'SelectionId' in params ? params.SelectionId : null;
this.SelectionName = 'SelectionName' in params ? params.SelectionName : null;
this.SelectionInstanceId = 'SelectionInstanceId' in params ? params.SelectionInstanceId : null;
this.Metric = 'Metric' in params ? params.Metric : null;
this.Perspective = 'Perspective' in params ? params.Perspective : null;
this.IpScope = 'IpScope' in params ? params.IpScope : null;
this.TimePreset = 'TimePreset' in params ? params.TimePreset : null;
this.StartTime = 'StartTime' in params ? params.StartTime : null;
this.EndTime = 'EndTime' in params ? params.EndTime : null;
this.Page = 'Page' in params ? params.Page : null;
this.Limit = 'Limit' in params ? params.Limit : null;
this.OverviewOnly = 'OverviewOnly' in params ? params.OverviewOnly : null;
this.Offset = 'Offset' in params ? params.Offset : null;
this.SortBy = 'SortBy' in params ? params.SortBy : null;
this.SortOrder = 'SortOrder' in params ? params.SortOrder : null;
if (params.Filters) {
this.Filters = new Array();
for (let z in params.Filters) {
let obj = new CfwStatusMonitorFilter();
obj.deserialize(params.Filters[z]);
this.Filters.push(obj);
}
}
}
}
/**
* ModifyNatFwVpcDnsSwitch response structure.
* @class
*/
class ModifyNatFwVpcDnsSwitchResponse extends AbstractModel {
constructor(){
super();
/**
* Modified successfully
Note: This field may return `null`, indicating that no valid value was found.
* @type {string || null}
*/
this.ReturnMsg = 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.ReturnMsg = 'ReturnMsg' in params ? params.ReturnMsg : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeNatFwInstanceWithRegion request structure.
* @class
*/
class DescribeNatFwInstanceWithRegionRequest extends AbstractModel {
constructor(){
super();
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
}
}
/**
* ModifyNatAcRule response structure.
* @class
*/
class ModifyNatAcRuleResponse extends AbstractModel {
constructor(){
super();
/**
* ID list of new rules that have been successfully modified.
* @type {Array.<number> || null}
*/
this.RuleUuid = 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.RuleUuid = 'RuleUuid' in params ? params.RuleUuid : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeRuleOverview response structure.
* @class
*/
class DescribeRuleOverviewResponse extends AbstractModel {
constructor(){
super();
/**
* Total number of rules
Note: This field may return `null`, indicating that no valid value was found.
* @type {number || null}
*/
this.AllTotal = null;
/**
* Number of blocking rules
Note: This field may return `null`, indicating that no valid value was found.
* @type {number || null}
*/
this.StrategyNum = null;
/**
* Number of enabled rules
Note: This field may return `null`, indicating that no valid value was found.
* @type {number || null}
*/
this.StartRuleNum = null;
/**
* Number of disabled rules
Note: This field may return `null`, indicating that no valid value was found.
* @type {number || null}
*/
this.StopRuleNum = null;
/**
* Remaining quota
Note: This field may return `null`, indicating that no valid value was found.
* @type {number || null}
*/
this.RemainingNum = 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.AllTotal = 'AllTotal' in params ? params.AllTotal : null;
this.StrategyNum = 'StrategyNum' in params ? params.StrategyNum : null;
this.StartRuleNum = 'StartRuleNum' in params ? params.StartRuleNum : null;
this.StopRuleNum = 'StopRuleNum' in params ? params.StopRuleNum : null;
this.RemainingNum = 'RemainingNum' in params ? params.RemainingNum : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* NAT firewall DNAT rules
* @class
*/
class CfwNatDnatRule extends AbstractModel {
constructor(){
super();
/**
* Network protocol. Valid values: TCP or UDP.
* @type {string || null}
*/
this.IpProtocol = null;
/**
* Elastic IP.
* @type {string || null}
*/
this.PublicIpAddress = null;
/**
* Public port.
* @type {number || null}
*/
this.PublicPort = null;
/**
* Private address.
* @type {string || null}
*/
this.PrivateIpAddress = null;
/**
* Private port.
* @type {number || null}
*/
this.PrivatePort = null;
/**
* The description of NAT firewall forwarding rules.
* @type {string || null}
*/
this.Description = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.IpProtocol = 'IpProtocol' in params ? params.IpProtocol : null;
this.PublicIpAddress = 'PublicIpAddress' in params ? params.PublicIpAddress : null;
this.PublicPort = 'PublicPort' in params ? params.PublicPort : null;
this.PrivateIpAddress = 'PrivateIpAddress' in params ? params.PrivateIpAddress : null;
this.PrivatePort = 'PrivatePort' in params ? params.PrivatePort : null;
this.Description = 'Description' in params ? params.Description : null;
}
}
/**
* Firewall IP range information
* @class
*/
class FwCidrInfo extends AbstractModel {
constructor(){
super();
/**
* The IP range type of the firewall. Values: `VpcSelf` (VPC IP range preferred); `Assis` (Secondary IP range preferred); `Custom` (Custom IP range)
* @type {string || null}
*/
this.FwCidrType = null;
/**
* The IP segment assigned for each VPC.
* @type {Array.<FwVpcCidr> || null}
*/
this.FwCidrLst = null;
/**
* The IP segment used by other firewalls. Specify this if you want to assign a dedicated segment for the firewall.
* @type {string || null}
*/
this.ComFwCidr = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.FwCidrType = 'FwCidrType' in params ? params.FwCidrType : null;
if (params.FwCidrLst) {
this.FwCidrLst = new Array();
for (let z in params.FwCidrLst) {
let obj = new FwVpcCidr();
obj.deserialize(params.FwCidrLst[z]);
this.FwCidrLst.push(obj);
}
}
this.ComFwCidr = 'ComFwCidr' in params ? params.ComFwCidr : null;
}
}
/**
* Most frequent attacker statistics
* @class
*/
class StaticInfo extends AbstractModel {
constructor(){
super();
/**
* Number
* @type {number || null}
*/
this.Num = null;
/**
* Port
* @type {string || null}
*/
this.Port = null;
/**
* IP
* @type {string || null}
*/
this.Ip = null;
/**
* Address
* @type {string || null}
*/
this.Address = null;
/**
* Asset ID
* @type {string || null}
*/
this.InsID = null;
/**
* Asset name
* @type {string || null}
*/
this.InsName = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Num = 'Num' in params ? params.Num : null;
this.Port = 'Port' in params ? params.Port : null;
this.Ip = 'Ip' in params ? params.Ip : null;
this.Address = 'Address' in params ? params.Address : null;
this.InsID = 'InsID' in params ? params.InsID : null;
this.InsName = 'InsName' in params ? params.InsName : null;
}
}
/**
* DescribeNatAcRule response structure.
* @class
*/
class DescribeNatAcRuleResponse extends AbstractModel {
constructor(){
super();
/**
* Total number of entries.
* @type {number || null}
*/
this.Total = null;
/**
* NAT access control list data.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<DescAcItem> || null}
*/
this.Data = null;
/**
* Total number of entries returned without filtering.
* @type {number || null}
*/
this.AllTotal = 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.Total = 'Total' in params ? params.Total : null;
if (params.Data) {
this.Data = new Array();
for (let z in params.Data) {
let obj = new DescAcItem();
obj.deserialize(params.Data[z]);
this.Data.push(obj);
}
}
this.AllTotal = 'AllTotal' in params ? params.AllTotal : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ModifyPublicIPSwitchStatus response structure.
* @class
*/
class ModifyPublicIPSwitchStatusResponse extends AbstractModel {
constructor(){
super();
/**
* Return message
Note: This field may return `null`, indicating that no valid value was found.
* @type {string || null}
*/
this.ReturnMsg = null;
/**
* Error code. 0: success; non-0: failed
* @type {number || null}
*/
this.ReturnCode = 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.ReturnMsg = 'ReturnMsg' in params ? params.ReturnMsg : null;
this.ReturnCode = 'ReturnCode' in params ? params.ReturnCode : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* AddAclRule request structure.
* @class
*/
class AddAclRuleRequest extends AbstractModel {
constructor(){
super();
/**
* The list of Internet boundary rules to be added cannot be empty. Each rule must meet the requirements for direction, source and target, action, scope, protocol port, and template restrictions. The entire request must also comply with rule quota and effective rule count limitations. Account-related values must come from read-only queries: for address templates, call DescribeAddressTemplateList, filter the request with TemplateType=1 or 5, and confirm that the returned Data[].Type is 1 or 5. Write Data[].Uuid (with the mb_ prefix) to the corresponding Content, and do not use Data[].TemplateId (with the ip-/dm- prefix). For protocol port templates, filter the request with TemplateType=6, and write Data[].TemplateId (with the pp- prefix) to ParamTemplateId. For asset instances, call DescribeCfwAssets, parse the returned results, and use assets[].instance_id. For asset groups, call DescribeResourceGroupNew, pass QueryType=resource, GroupId="0", ShowType=all, parse the returned results, and use GroupId. For resource tags, pass QueryType=tag, skip the "all assets" root node, and construct JSON using the first-level node GroupName as the Key and the selected second-level sub-node GroupName as the Value, without writing GroupId. For regions, call DescribeAclRegInfo: for Scope=serial, pass FwType=["SERIAL"]; for Scope=side, pass FwType=["BYPASS"]; for Scope=all, pass both items simultaneously, and use Data[].RegionCode. Do not use display names or manually concatenate values. The range for overwrite import is determined solely by the Direction of the first rule.
* @type {Array.<CreateRuleItem> || null}
*/
this.Rules = null;
/**
* <p>AI operation source</p><p>Enumeration value:</p><ul><li>console: console source value</li><li>wechat: WeChat</li></ul>
* @type {string || null}
*/
this.CfwAiAgentOperationSource = null;
/**
* Add method. Omit or an empty string means ordinary addition; insert_rule means adding new at a specified position; batch_import means non-overwrite batch import; batch_import_cover means overwrite import, which deletes the existing operation rule corresponding to the first rule's Direction and then adds Rules. Deleted rules will not be restored if addition fails, with extremely high risk. The coverage area is only determined by the first rule. The caller must ensure the Directions of the Rules match. Only the above values are supported.
* @type {string || null}
*/
this.From = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.Rules) {
this.Rules = new Array();
for (let z in params.Rules) {
let obj = new CreateRuleItem();
obj.deserialize(params.Rules[z]);
this.Rules.push(obj);
}
}
this.CfwAiAgentOperationSource = 'CfwAiAgentOperationSource' in params ? params.CfwAiAgentOperationSource : null;
this.From = 'From' in params ? params.From : null;
}
}
/**
* ModifyNatAcRule request structure.
* @class
*/
class ModifyNatAcRuleRequest extends AbstractModel {
constructor(){
super();
/**
* Array of rules to be modified.
* @type {Array.<CreateNatRuleItem> || null}
*/
this.Rules = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.Rules) {
this.Rules = new Array();
for (let z in params.Rules) {
let obj = new CreateNatRuleItem();
obj.deserialize(params.Rules[z]);
this.Rules.push(obj);
}
}
}
}
/**
* ModifyAcRule response structure.
* @class
*/
class ModifyAcRuleResponse extends AbstractModel {
constructor(){
super();
/**
* Status value. 0: operation successful; non-0: operation failed
* @type {number || null}
*/
this.Status = null;
/**
* Returns redundant information
Note: This field may return `null`, indicating that no valid value was found.
* @type {string || null}
*/
this.Info = 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.Status = 'Status' in params ? params.Status : null;
this.Info = 'Info' in params ? params.Info : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ModifyNatSequenceRules request structure.
* @class
*/
class ModifyNatSequenceRulesRequest extends AbstractModel {
constructor(){
super();
/**
* Rule sequence number. Values: `OrderIndex` (Original sequence number), `NewOrderIndex` (New sequence number)
* @type {Array.<RuleChangeItem> || null}
*/
this.RuleChangeItems = null;
/**
* Rule direction. Values: `1` (Inbound) and `0` (Outbound)
* @type {number || null}
*/
this.Direction = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.RuleChangeItems) {
this.RuleChangeItems = new Array();
for (let z in params.RuleChangeItems) {
let obj = new RuleChangeItem();
obj.deserialize(params.RuleChangeItems[z]);
this.RuleChangeItems.push(obj);
}
}
this.Direction = 'Direction' in params ? params.Direction : null;
}
}
/**
* DescribeTableStatus response structure.
* @class
*/
class DescribeTableStatusResponse extends AbstractModel {
constructor(){
super();
/**
* 0: normal; non-0: abnormal
Note: This field may return `null`, indicating that no valid value was found.
* @type {number || null}
*/
this.Status = 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.Status = 'Status' in params ? params.Status : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* AddAcRule request structure.
* @class
*/
class AddAcRuleRequest extends AbstractModel {
constructor(){
super();
/**
* -1: lowest priority; 1: highest priority
* @type {string || null}
*/
this.OrderIndex = null;
/**
* The action that Cloud Firewall performs on the traffic. Valid values:
accept: allow
drop: deny
log: observe
* @type {string || null}
*/
this.RuleAction = null;
/**
* The traffic direction for access control rules. Valid values:
in: incoming traffic access control
out: outgoing traffic access control
* @type {string || null}
*/
this.Direction = null;
/**
* The description of access control rules.
* @type {string || null}
*/
this.Description = null;
/**
* The type of source address in access control rules. Valid values:
net: source IP or range (IP or CIDR)
location: source region
template: CFW address template
instance: instance ID
vendor: Cloud vendor
* @type {string || null}
*/
this.SourceType = null;
/**
* The source address in the access control policy.
When `SourceType` is `net`, `SourceContent` is the source IP or CIDR block.
For example: 1.1.1.0/24
When `SourceType` is `template`, `SourceContent` must be the source address template ID.
When `SourceType` is `location`, `SourceContent` is the source region.
For example, ["BJ11", "ZB"]
When `SourceType` is `instance`, `SourceContent` is the public IP of the instance.
For example, ins-xxxxx
When `SourceType` is `vendor`, `SourceContent` is the cloud service provider.
Values: `aws`, `huawei`, `tencent`, `aliyun`, `azure` and `all`.
* @type {string || null}
*/
this.SourceContent = null;
/**
* The type of destination address in access control rules. Valid values:
net: destination IP or range (IP or CIDR)
location: source region
template: CFW address template
instance: instance ID
vendor: Cloud vendor
domain: Domain name or IP.
* @type {string || null}
*/
this.DestType = null;
/**
* The destination address in the access control policy.
When `DestType` is `net`, `DestContent` is the destination IP or CIDR block.
For example: 1.1.1.0/24
When `DestType` is `template`, `DestContent` is the destination address template ID.
When `DestType` is `location`, `DestContent` is the destination region.
For example, ["BJ11", "ZB"]
When `DestType` is `instance`, `DestContent` is the public IP of the instance.
For example, ins-xxxxx
When `DestType` is `domain`, `DestContent` is the domain name associated with the instance.
For example, *.qq.com
When `DestType`, `DestContent` is the selected cloud service provider.
Values: `aws`, `huawei`, `tencent`, `aliyun`, `azure` and `all`.
* @type {string || null}
*/
this.DestContent = null;
/**
* The port to apply access control rules. Valid values:
-1/-1: all ports
80,443: 80 or 443
* @type {string || null}
*/
this.Port = null;
/**
* The protocol type of traffic in access control rules. Valid value: TCP. Only TCP is supported for edge firewall rules. If this parameter is not specified, it defaults to TCP.
* @type {string || null}
*/
this.Protocol = null;
/**
* The Layer 7 protocol. Valid values:
HTTP/HTTPS
TLS/SSL
* @type {string || null}
*/
this.ApplicationName = null;
/**
* Indicates whether to enable the rules. Default: enable. Valid values:
true: enable; false: disable
* @type {string || null}
*/
this.Enable = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.OrderIndex = 'OrderIndex' in params ? params.OrderIndex : null;
this.RuleAction = 'RuleAction' in params ? params.RuleAction : null;
this.Direction = 'Direction' in params ? params.Direction : null;
this.Description = 'Description' in params ? params.Description : null;
this.SourceType = 'SourceType' in params ? params.SourceType : null;
this.SourceContent = 'SourceContent' in params ? params.SourceContent : null;
this.DestType = 'DestType' in params ? params.DestType : null;
this.DestContent = 'DestContent' in params ? params.DestContent : null;
this.Port = 'Port' in params ? params.Port : null;
this.Protocol = 'Protocol' in params ? params.Protocol : null;
this.ApplicationName = 'ApplicationName' in params ? params.ApplicationName : null;
this.Enable = 'Enable' in params ? params.Enable : null;
}
}
/**
* IP protection status
* @class
*/
class IPDefendStatus extends AbstractModel {
constructor(){
super();
/**
* IP address
* @type {string || null}
*/
this.IP = null;
/**
* Protection status. 1: enabled; -1: incorrect address; others: disabled
* @type {number || null}
*/
this.Status = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.IP = 'IP' in params ? params.IP : null;
this.Status = 'Status' in params ? params.Status : null;
}
}
/**
* Allowlist or blocklist for intrusion prevention
* @class
*/
class BlockIgnoreRule extends AbstractModel {
constructor(){
super();
/**
* Domain name.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Domain = null;
/**
* Rule IP.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Ioc = null;
/**
* Threat level.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Level = null;
/**
* Source event name.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.EventName = null;
/**
* Direction. Valid values: 0: outbound; 1: inbound.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.Direction = null;
/**
* Protocol.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Protocol = null;
/**
* Address.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Address = null;
/**
* Rule type. Valid values: 1: block; 2: allow.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.Action = null;
/**
* Time when a rule starts to take effect.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.StartTime = null;
/**
* Time when a rule expires.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.EndTime = null;
/**
* Reason for ignoring.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.IgnoreReason = null;
/**
* Security event source.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Source = null;
/**
* Rule ID.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.UniqueId = null;
/**
* Number of rule matching times.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.MatchTimes = null;
/**
* Country.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Country = null;
/**
* Remarks
* @type {string || null}
*/
this.Comment = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Domain = 'Domain' in params ? params.Domain : null;
this.Ioc = 'Ioc' in params ? params.Ioc : null;
this.Level = 'Level' in params ? params.Level : null;
this.EventName = 'EventName' in params ? params.EventName : null;
this.Direction = 'Direction' in params ? params.Direction : null;
this.Protocol = 'Protocol' in params ? params.Protocol : null;
this.Address = 'Address' in params ? params.Address : null;
this.Action = 'Action' in params ? params.Action : null;
this.StartTime = 'StartTime' in params ? params.StartTime : null;
this.EndTime = 'EndTime' in params ? params.EndTime : null;
this.IgnoreReason = 'IgnoreReason' in params ? params.IgnoreReason : null;
this.Source = 'Source' in params ? params.Source : null;
this.UniqueId = 'UniqueId' in params ? params.UniqueId : null;
this.MatchTimes = 'MatchTimes' in params ? params.MatchTimes : null;
this.Country = 'Country' in params ? params.Country : null;
this.Comment = 'Comment' in params ? params.Comment : null;
}
}
/**
* ModifyNatFwVpcDnsSwitch request structure.
* @class
*/
class ModifyNatFwVpcDnsSwitchRequest extends AbstractModel {
constructor(){
super();
/**
* NAT firewall ID
* @type {string || null}
*/
this.NatFwInsId = null;
/**
* DNS toggle list
* @type {Array.<DnsVpcSwitch> || null}
*/
this.DnsVpcSwitchLst = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.NatFwInsId = 'NatFwInsId' in params ? params.NatFwInsId : null;
if (params.DnsVpcSwitchLst) {
this.DnsVpcSwitchLst = new Array();
for (let z in params.DnsVpcSwitchLst) {
let obj = new DnsVpcSwitch();
obj.deserialize(params.DnsVpcSwitchLst[z]);
this.DnsVpcSwitchLst.push(obj);
}
}
}
}
/**
* Unhandled event details
* @class
*/
class UnHandleEvent extends AbstractModel {
constructor(){
super();
/**
* Unhandled event type
* @type {Array.<UnHandleEventDetail> || null}
*/
this.EventTableListStruct = null;
/**
* 1: yes; 0: no
* @type {number || null}
*/
this.BaseLineUser = null;
/**
* 1: on; 0: off
* @type {number || null}
*/
this.BaseLineInSwitch = null;
/**
* 1: on; 0: off
* @type {number || null}
*/
this.BaseLineOutSwitch = null;
/**
* Number of inter-VPC firewall instances
Note: This field may return `null`, indicating that no valid value was found.
* @type {number || null}
*/
this.VpcFwCount = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.EventTableListStruct) {
this.EventTableListStruct = new Array();
for (let z in params.EventTableListStruct) {
let obj = new UnHandleEventDetail();
obj.deserialize(params.EventTableListStruct[z]);
this.EventTableListStruct.push(obj);
}
}
this.BaseLineUser = 'BaseLineUser' in params ? params.BaseLineUser : null;
this.BaseLineInSwitch = 'BaseLineInSwitch' in params ? params.BaseLineInSwitch : null;
this.BaseLineOutSwitch = 'BaseLineOutSwitch' in params ? params.BaseLineOutSwitch : null;
this.VpcFwCount = 'VpcFwCount' in params ? params.VpcFwCount : null;
}
}
/**
* SearchLog response structure.
* @class
*/
class SearchLogResponse extends AbstractModel {
constructor(){
super();
/**
* <p>Pass through the Context value returned by this API to obtain more logs later. The expiration time is 1 hour.<br>Note:</p><ul><li>Applicable only for single log topic retrieval. To retrieve multiple log topics, use the Context in Topics.</li></ul>
* @type {string || null}
*/
this.Context = null;
/**
* <p>Whether all logs meeting the retrieval criteria have been returned. If not, use Context parameter to retrieve more logs.<br> <br>Note: This is only valid when the search and analysis statement (Query) does not contain SQL.</p>
* @type {boolean || null}
*/
this.ListOver = null;
/**
* <p>Whether the returned data is the SQL analysis result</p>
* @type {boolean || null}
*/
this.Analysis = null;
/**
* <p>Raw logs matching the retrieval criteria</p>
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<LogInfo> || null}
*/
this.Results = null;
/**
* <p>Column names of log statistics analysis results<br>This parameter is valid only when UseNewAnalysis is false.</p>
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<string> || null}
*/
this.ColNames = null;
/**
* <p>Log statistics and analysis results<br>This parameter is valid only when UseNewAnalysis is false.</p>
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<LogItems> || null}
*/
this.AnalysisResults = null;
/**
* <p>Log statistics and analysis results<br>This parameter is valid only when UseNewAnalysis is true.</p>
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<string> || null}
*/
this.AnalysisRecords = null;
/**
* <p>Column attribute of the statistical analysis result<br>This parameter is valid only when UseNewAnalysis is true.</p>
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<Column> || null}
*/
this.Columns = null;
/**
* <p>Sampling rate used for this statistical analysis</p>
Note: This field may return null, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.SamplingRate = null;
/**
* <p>When multiple log topics are used for retrieval, basic information of each log topic, such as error message.</p>
Note: This field may return null, indicating that no valid values can be obtained.
* @type {SearchLogTopics || null}
*/
this.Topics = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Context = 'Context' in params ? params.Context : null;
this.ListOver = 'ListOver' in params ? params.ListOver : null;
this.Analysis = 'Analysis' in params ? params.Analysis : null;
if (params.Results) {
this.Results = new Array();
for (let z in params.Results) {
let obj = new LogInfo();
obj.deserialize(params.Results[z]);
this.Results.push(obj);
}
}
this.ColNames = 'ColNames' in params ? params.ColNames : null;
if (params.AnalysisResults) {
this.AnalysisResults = new Array();
for (let z in params.AnalysisResults) {
let obj = new LogItems();
obj.deserialize(params.AnalysisResults[z]);
this.AnalysisResults.push(obj);
}
}
this.AnalysisRecords = 'AnalysisRecords' in params ? params.AnalysisRecords : null;
if (params.Columns) {
this.Columns = new Array();
for (let z in params.Columns) {
let obj = new Column();
obj.deserialize(params.Columns[z]);
this.Columns.push(obj);
}
}
this.SamplingRate = 'SamplingRate' in params ? params.SamplingRate : null;
if (params.Topics) {
let obj = new SearchLogTopics();
obj.deserialize(params.Topics)
this.Topics = obj;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeCfwStatusMonitor response structure.
* @class
*/
class DescribeCfwStatusMonitorResponse extends AbstractModel {
constructor(){
super();
/**
* Query result. UTF-8 JSON object string; the caller needs to parse Response.Data. The scene returned by describe_scene includes metric_options, perspective_options, default_metric, default_perspective, selection_required_by_metric, selection_kind_by_metric, and time_preset_options; selection.available_options returns options applicable to SelectionId, SelectionName, and SelectionInstanceId. fetch_scene returns a data snapshot of the selected scenario, which may contain overview, table, or detail. The example below is a section of the field structure, and the array only shows representative values.
* @type {string || null}
*/
this.Data = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Data = 'Data' in params ? params.Data : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DeleteAllAccessControlRule request structure.
* @class
*/
class DeleteAllAccessControlRuleRequest extends AbstractModel {
constructor(){
super();
/**
* Direction. 0: outbound; 1: inbound. 0 by default
* @type {number || null}
*/
this.Direction = null;
/**
* Deletes all the access control rules for inter-VPC firewall toggles associated with the EdgeId. It is empty by default. Enter either EdgeId or Area.
* @type {string || null}
*/
this.EdgeId = null;
/**
* Deletes all the access control rules for NAT firewalls of this region. It is empty by default. Enter either EdgeId or Area.
* @type {string || null}
*/
this.Area = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Direction = 'Direction' in params ? params.Direction : null;
this.EdgeId = 'EdgeId' in params ? params.EdgeId : null;
this.Area = 'Area' in params ? params.Area : null;
}
}
/**
* ModifyBlockIgnoreList request structure.
* @class
*/
class ModifyBlockIgnoreListRequest extends AbstractModel {
constructor(){
super();
/**
* Type of the rule. Values: `1` (Blocklist); `2` (Allowlist)
* @type {number || null}
*/
this.RuleType = null;
/**
* Either IP or Domain is required
* @type {Array.<IocListData> || null}
*/
this.IOC = null;
/**
* Optional values: delete, edit, and add
* @type {string || null}
*/
this.IocAction = null;
/**
* Time format: yyyy-MM-dd HH:mm:ss. Required when IocAction is edit or add
* @type {string || null}
*/
this.StartTime = null;
/**
* End time of the period in the format of yyyy-MM-dd HH:mm:ss. It must be later than both the start time and the current time. It’s required when `IocAction` is `edit` or `add`.
* @type {string || null}
*/
this.EndTime = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RuleType = 'RuleType' in params ? params.RuleType : null;
if (params.IOC) {
this.IOC = new Array();
for (let z in params.IOC) {
let obj = new IocListData();
obj.deserialize(params.IOC[z]);
this.IOC.push(obj);
}
}
this.IocAction = 'IocAction' in params ? params.IocAction : null;
this.StartTime = 'StartTime' in params ? params.StartTime : null;
this.EndTime = 'EndTime' in params ? params.EndTime : null;
}
}
/**
* ModifyAllVPCSwitchStatus response structure.
* @class
*/
class ModifyAllVPCSwitchStatusResponse 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;
}
}
/**
* CreateSecurityGroupRules response structure.
* @class
*/
class CreateSecurityGroupRulesResponse extends AbstractModel {
constructor(){
super();
/**
* Status value. 0: added successfully; non-0: failed to add
* @type {number || null}
*/
this.Status = 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.Status = 'Status' in params ? params.Status : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeNatFwVpcDnsLst request structure.
* @class
*/
class DescribeNatFwVpcDnsLstRequest extends AbstractModel {
constructor(){
super();
/**
* NAT firewall instance ID
* @type {string || null}
*/
this.NatFwInsId = null;
/**
* Content filtered by NAT firewall, separated with ","
* @type {string || n