tencentcloud-sdk-nodejs-intl-en
Version:
1,405 lines (1,187 loc) • 466 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");
/**
* DeleteRewrite request structure.
* @class
*/
class DeleteRewriteRequest extends AbstractModel {
constructor(){
super();
/**
* CLB instance ID
* @type {string || null}
*/
this.LoadBalancerId = null;
/**
* Source listener ID
* @type {string || null}
*/
this.SourceListenerId = null;
/**
* Target listener ID
* @type {string || null}
*/
this.TargetListenerId = null;
/**
* Redirection relationship between forwarding rules
* @type {Array.<RewriteLocationMap> || null}
*/
this.RewriteInfos = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.LoadBalancerId = 'LoadBalancerId' in params ? params.LoadBalancerId : null;
this.SourceListenerId = 'SourceListenerId' in params ? params.SourceListenerId : null;
this.TargetListenerId = 'TargetListenerId' in params ? params.TargetListenerId : null;
if (params.RewriteInfos) {
this.RewriteInfos = new Array();
for (let z in params.RewriteInfos) {
let obj = new RewriteLocationMap();
obj.deserialize(params.RewriteInfos[z]);
this.RewriteInfos.push(obj);
}
}
}
}
/**
* DescribeTargetGroupList response structure.
* @class
*/
class DescribeTargetGroupListResponse extends AbstractModel {
constructor(){
super();
/**
* <p>Number of displayed results.</p>
* @type {number || null}
*/
this.TotalCount = null;
/**
* <p>Collection of displayed target group information.</p>
* @type {Array.<TargetGroupInfo> || null}
*/
this.TargetGroupSet = 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.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
if (params.TargetGroupSet) {
this.TargetGroupSet = new Array();
for (let z in params.TargetGroupSet) {
let obj = new TargetGroupInfo();
obj.deserialize(params.TargetGroupSet[z]);
this.TargetGroupSet.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeQuota request structure.
* @class
*/
class DescribeQuotaRequest extends AbstractModel {
constructor(){
super();
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
}
}
/**
* DescribeTargetGroupList request structure.
* @class
*/
class DescribeTargetGroupListRequest extends AbstractModel {
constructor(){
super();
/**
* <p>Target group ID array.</p>
* @type {Array.<string> || null}
*/
this.TargetGroupIds = null;
/**
* <p>Filter condition array. Support TargetGroupVpcId and TargetGroupName. Mutually exclusive with TargetGroupIds. Prioritize target group ID.</p>
* @type {Array.<Filter> || null}
*/
this.Filters = null;
/**
* <p>Starting display offset.</p>
* @type {number || null}
*/
this.Offset = null;
/**
* <p>Number of entries displayed per page.</p><p>Value ranges from 0 to 100.</p><p>The default value is 20.</p>
* @type {number || null}
*/
this.Limit = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TargetGroupIds = 'TargetGroupIds' in params ? params.TargetGroupIds : null;
if (params.Filters) {
this.Filters = new Array();
for (let z in params.Filters) {
let obj = new Filter();
obj.deserialize(params.Filters[z]);
this.Filters.push(obj);
}
}
this.Offset = 'Offset' in params ? params.Offset : null;
this.Limit = 'Limit' in params ? params.Limit : null;
}
}
/**
* BatchDeregisterTargets response structure.
* @class
*/
class BatchDeregisterTargetsResponse extends AbstractModel {
constructor(){
super();
/**
* IDs of the listeners failed to unbind
* @type {Array.<string> || null}
*/
this.FailListenerIdSet = null;
/**
* Failed to unbind error reason information.
* @type {string || null}
*/
this.Message = 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.FailListenerIdSet = 'FailListenerIdSet' in params ? params.FailListenerIdSet : null;
this.Message = 'Message' in params ? params.Message : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* SetLoadBalancerSecurityGroups response structure.
* @class
*/
class SetLoadBalancerSecurityGroupsResponse extends AbstractModel {
constructor(){
super();
/**
* 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.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Object bound to the layer-7 listener rule
* @class
*/
class RulesItems extends AbstractModel {
constructor(){
super();
/**
* Rule ID.
* @type {string || null}
*/
this.LocationId = null;
/**
* Domain name.
* @type {string || null}
*/
this.Domain = null;
/**
* Uri
* @type {string || null}
*/
this.Url = null;
/**
* Object bound to the real server.
* @type {Array.<LbRsTargets> || null}
*/
this.Targets = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.LocationId = 'LocationId' in params ? params.LocationId : null;
this.Domain = 'Domain' in params ? params.Domain : null;
this.Url = 'Url' in params ? params.Url : null;
if (params.Targets) {
this.Targets = new Array();
for (let z in params.Targets) {
let obj = new LbRsTargets();
obj.deserialize(params.Targets[z]);
this.Targets.push(obj);
}
}
}
}
/**
* Reserved field which can be ignored generally.
* @class
*/
class ExtraInfo extends AbstractModel {
constructor(){
super();
/**
* Whether to enable VIP Direct Connect
* @type {boolean || null}
*/
this.ZhiTong = null;
/**
* TgwGroup name
* @type {string || null}
*/
this.TgwGroupName = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.ZhiTong = 'ZhiTong' in params ? params.ZhiTong : null;
this.TgwGroupName = 'TgwGroupName' in params ? params.TgwGroupName : null;
}
}
/**
* Classic CLB listener information
* @class
*/
class ClassicalListener extends AbstractModel {
constructor(){
super();
/**
* <p>CLB listener ID</p>
* @type {string || null}
*/
this.ListenerId = null;
/**
* <p>CLB listener port</p>
* @type {number || null}
*/
this.ListenerPort = null;
/**
* <p>listener backend forwarding port</p>
* @type {number || null}
*/
this.InstancePort = null;
/**
* <p>Listener name</p>
* @type {string || null}
*/
this.ListenerName = null;
/**
* <p>Listener protocol type</p>
* @type {string || null}
*/
this.Protocol = null;
/**
* <p>Session persistence time</p>
* @type {number || null}
*/
this.SessionExpire = null;
/**
* <p>Whether health check is enabled: 1 (enabled), 0 (disabled)</p>
* @type {number || null}
*/
this.HealthSwitch = null;
/**
* <p>Response timeout</p><p>Unit: second</p>
* @type {number || null}
*/
this.TimeOut = null;
/**
* <p>Check interval</p><p>Unit: seconds</p>
* @type {number || null}
*/
this.IntervalTime = null;
/**
* <p>Health threshold</p>
* @type {number || null}
*/
this.HealthNum = null;
/**
* <p>Unhealthy threshold</p>
* @type {number || null}
*/
this.UnhealthNum = null;
/**
* <p>Request balancing method for listeners of the classic public network CLB. An empty string or wrr indicates weighted round robin. ip_hash indicates consistent hashing based on the accessed source IP address. least_conn indicates least connections.</p>
* @type {string || null}
*/
this.HttpHash = null;
/**
* <p>Health check return code of HTTP and HTTPS listeners for public network CLB. For details, see the explanation of this field in listener creation API.</p>
* @type {number || null}
*/
this.HttpCode = null;
/**
* <p>Health check path of HTTP and HTTPS listeners for public network CLB</p>
* @type {string || null}
*/
this.HttpCheckPath = null;
/**
* <p>Authentication method of the HTTPS listener for public network CLB</p>
* @type {string || null}
*/
this.SSLMode = null;
/**
* <p>Server certificate ID of the HTTPS listener for the public network CLB</p>
* @type {string || null}
*/
this.CertId = null;
/**
* <p>Client certificate ID of the HTTPS listener for public network CLB</p>
* @type {string || null}
*/
this.CertCaId = null;
/**
* <p>Listener status. 0 indicates creating in progress, 1 indicates running.</p>
* @type {number || null}
*/
this.Status = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.ListenerId = 'ListenerId' in params ? params.ListenerId : null;
this.ListenerPort = 'ListenerPort' in params ? params.ListenerPort : null;
this.InstancePort = 'InstancePort' in params ? params.InstancePort : null;
this.ListenerName = 'ListenerName' in params ? params.ListenerName : null;
this.Protocol = 'Protocol' in params ? params.Protocol : null;
this.SessionExpire = 'SessionExpire' in params ? params.SessionExpire : null;
this.HealthSwitch = 'HealthSwitch' in params ? params.HealthSwitch : null;
this.TimeOut = 'TimeOut' in params ? params.TimeOut : null;
this.IntervalTime = 'IntervalTime' in params ? params.IntervalTime : null;
this.HealthNum = 'HealthNum' in params ? params.HealthNum : null;
this.UnhealthNum = 'UnhealthNum' in params ? params.UnhealthNum : null;
this.HttpHash = 'HttpHash' in params ? params.HttpHash : null;
this.HttpCode = 'HttpCode' in params ? params.HttpCode : null;
this.HttpCheckPath = 'HttpCheckPath' in params ? params.HttpCheckPath : null;
this.SSLMode = 'SSLMode' in params ? params.SSLMode : null;
this.CertId = 'CertId' in params ? params.CertId : null;
this.CertCaId = 'CertCaId' in params ? params.CertCaId : null;
this.Status = 'Status' in params ? params.Status : null;
}
}
/**
* BatchModifyTargetWeight response structure.
* @class
*/
class BatchModifyTargetWeightResponse extends AbstractModel {
constructor(){
super();
/**
* 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.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* SetSecurityGroupForLoadbalancers request structure.
* @class
*/
class SetSecurityGroupForLoadbalancersRequest extends AbstractModel {
constructor(){
super();
/**
* Security group ID, such as sg-12345678. can be obtained through the API [DescribeSecurityGroups](https://www.tencentcloud.com/document/product/215/15808?from_cn_redirect=1).
* @type {string || null}
*/
this.SecurityGroup = null;
/**
* ADD: bind a security group;
DEL: unbind a security group
* @type {string || null}
*/
this.OperationType = null;
/**
* ID array of the clb instance. you can call the [DescribeLoadBalancers](https://www.tencentcloud.com/document/product/1108/48459?from_cn_redirect=1) API to query the ID.
Specifies the maximum length supported by the list is 20.
* @type {Array.<string> || null}
*/
this.LoadBalancerIds = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SecurityGroup = 'SecurityGroup' in params ? params.SecurityGroup : null;
this.OperationType = 'OperationType' in params ? params.OperationType : null;
this.LoadBalancerIds = 'LoadBalancerIds' in params ? params.LoadBalancerIds : null;
}
}
/**
* CreateLoadBalancer request structure.
* @class
*/
class CreateLoadBalancerRequest extends AbstractModel {
constructor(){
super();
/**
* <p>Network type of the Cloud Load Balancer instance:<br>OPEN: public network attribute, INTERNAL: private network attribute.</p>
* @type {string || null}
*/
this.LoadBalancerType = null;
/**
* <p>Type of the Cloud Load Balancer instance. 1: Common CLB instance. Currently only support passing in 1.</p>
* @type {number || null}
*/
this.Forward = null;
/**
* <p>The name of the Cloud Load Balancer instance is effective only when creating an instance. Rule: 1-80 characters in internationally compatible languages such as English letters, Chinese characters, digits, connecting line "-", underscore "_", and other common characters (Unicode supplementary characters such as emoji and rare Chinese characters are forbidden). Note: If the name is identical to an existing Cloud Load Balancer instance name in the system, the system will automatically generate the name for the created CLB instance.</p>
* @type {string || null}
*/
this.LoadBalancerName = null;
/**
* Network ID of the target device on the CLB backend, such as `vpc-12345678`, which can be obtained through the `DescribeVpcEx` API. If this parameter is not entered, `DefaultVPC` is used by default. This parameter is required when creating a private network instance.
* @type {string || null}
*/
this.VpcId = null;
/**
* <p>When you purchase a private network CLB instance in a VPC, the subnet ID must be specified. The VIP of the private network CLB instance is generated in this subnet.<br>This parameter is required when you create a private network CLB instance or a CLB instance of the IPv6FullChain version.<br>It cannot be specified when you create a public network IPv4 CLB instance.</p>
* @type {string || null}
*/
this.SubnetId = null;
/**
* ID of the project to which a CLB instance belongs, which can be obtained through the `DescribeProject` API. If this parameter is not entered, the default project will be used.
* @type {number || null}
*/
this.ProjectId = null;
/**
* <p>Applicable only to public network CLB. IP version, valid values: IPV4, IPV6, IPv6FullChain, case-insensitive, default value IPV4. Description: A value of IPV6 means IPV6 NAT64 version; a value of IPv6FullChain means IPv6 version.</p>
* @type {string || null}
*/
this.AddressIPVersion = null;
/**
* <p>Count of Cloud Load Balancers to create, default value is 1. The count must not exceed the maximum value allowed for the account, with a default creation maximum value of 20.</p>
* @type {number || null}
*/
this.Number = null;
/**
* <p>Applicable only to public network load balancing with IP version IPv4. Sets the primary AZ ID for cross-AZ disaster recovery. Both AZ ID and name are supported, such as 100001 or ap-guangzhou-1.<br>Note: The primary AZ loads traffic. The secondary AZ does not load traffic by default and is used only if the primary AZ becomes unavailable.</p>
* @type {string || null}
*/
this.MasterZoneId = null;
/**
* <p>Applicable only to public network load balancing with IP version IPv4. AZ ID, availability zone id and name are supported. Specify availability zone to create a CLB instance. For example: 100001 or ap-guangzhou-1.</p>
* @type {string || null}
*/
this.ZoneId = null;
/**
* <p>Maximum outbound bandwidth under the network billing mode. It applies only to LCU-supported instances of the private network type and all instances of the public network type.</p>
* @type {InternetAccessible || null}
*/
this.InternetAccessible = null;
/**
* <p>Applicable only to public network CLB. Currently, only Guangzhou, Shanghai, Nanjing, Jinan, Hangzhou, Fuzhou, Beijing, Shijiazhuang, Wuhan, Changsha, Chengdu, and Chongqing regions support static single-line IP type. If you need to experience it, contact business manager to submit a request. After approval, you can select operator type of China Mobile (CMCC), China Unicom (CUCC), or China Telecom (CTCC). Only can be used network billing mode BANDWIDTH_PACKAGE. If this parameter is not specified, use BGP by default. You can query ISPs supported in a region via <a href="https://www.tencentcloud.com/document/api/214/70213?from_cn_redirect=1">DescribeResources</a> api.</p>
* @type {string || null}
*/
this.VipIsp = null;
/**
* <p>When purchasing a Cloud Load Balancer, you can tag it with up to 20 tag key-value pairs.</p>
* @type {Array.<TagInfo> || null}
*/
this.Tags = null;
/**
* <p>Specify VIP to apply for Cloud Load Balancer. This parameter is optional. If this parameter is not specified, VIP is automatically assigned. This parameter is supported for IPv4 and IPv6 types but not for IPv6 NAT64 type.<br>Note: When creating a private network instance or a public IPv6 BGP instance with a designated VIP, creation fails if the VIP is not within the IP range of the specified VPC subnet or if the VIP is already occupied.</p>
* @type {string || null}
*/
this.Vip = null;
/**
* <p>Bandwidth package ID, which can be obtained through the <a href="https://www.tencentcloud.com/document/api/215/19209?from_cn_redirect=1">DescribeBandwidthPackages</a> API. When this parameter is specified, the network billing mode (InternetAccessible.InternetChargeType) supports only billing by bandwidth package (BANDWIDTH_PACKAGE), and the bandwidth package attributes determine the settlement method. For IPv6 Cloud Load Balancer instances purchased by non-promoted users with a non-BGP operator type, specifying bandwidth package ID is unsupported.</p>
* @type {string || null}
*/
this.BandwidthPackageId = null;
/**
* <p>Dedicated instance info. This parameter is required when creating a private network CLB instance of exclusive type.</p>
* @type {ExclusiveCluster || null}
*/
this.ExclusiveCluster = null;
/**
* <p>Performance capacity specification.</p><ul><li>If you need to create an LCU-supported instance, this parameter is required. Valid values:<ul><li> clb.c2.medium: Standard </li><li> clb.c3.small: Advanced 1 </li><li> clb.c3.medium: Advanced 2 </li><li> clb.c4.small: Super Large 1 </li><li> clb.c4.medium: Super Large 2 </li><li> clb.c4.large: Super Large 3 </li><li> clb.c4.xlarge: Super Large 4 </li></ul></li><li>For Chinese site users who need to create a shared instance, this parameter is not required. International site users will purchase a standard instance by default if this parameter is not passed.</li></ul> For specification details, see [Instance Specifications Comparison](https://www.tencentcloud.com/document/product/214/84689?from_cn_redirect=1).
* @type {string || null}
*/
this.SlaType = null;
/**
* <p>Cluster ID. This cluster identifier is used for configuring a public cloud exclusive cluster or a local dedicated cluster. To apply for a public cloud exclusive cluster, <a href="https://console.cloud.tencent.com/workorder/category">submit a ticket</a>. For local dedicated clusters, refer to the description in <a href="https://www.tencentcloud.com/document/product/1346?from_cn_redirect=1">Local Dedicated Cluster</a>.</p>
* @type {Array.<string> || null}
*/
this.ClusterIds = null;
/**
* <p>String used to ensure request idempotency. This string is generated by the customer and must be unique among different requests, with a maximum value of 64 ASCII characters. If not specified, request idempotency cannot be guaranteed.</p>
* @type {string || null}
*/
this.ClientToken = null;
/**
* <p>Whether binding cross-regional or cross-Vpc IP addresses is supported.</p>
* @type {boolean || null}
*/
this.SnatPro = null;
/**
* <p>Enable the cross-regional or cross-Vpc IP binding feature to create a SnatIp.</p>
* @type {Array.<SnatIp> || null}
*/
this.SnatIps = null;
/**
* <p>Tag of the Stgw exclusive cluster.</p>
* @type {string || null}
*/
this.ClusterTag = null;
/**
* <p>Applicable only to public network load balancing with IP version IPv4. Sets the secondary AZ ID for cross-AZ disaster recovery. AZ ID and name are supported, such as 100001 or ap-guangzhou-1.<br>Note: The secondary AZ is the availability zone that needs to carry traffic after primary availability zone failure. Query a region's list of primary/secondary AZs via the <a href="https://www.tencentcloud.com/document/api/214/70213?from_cn_redirect=1">DescribeResources</a> API. [If you need to trial the feature, submit a ticket application via <a href="https://console.cloud.tencent.com/workorder/category">Work Order</a>]</p>
* @type {string || null}
*/
this.SlaveZoneId = null;
/**
* <p>The unique ID of EIP can be accessed through the <a href="https://www.tencentcloud.com/document/product/215/16702?from_cn_redirect=1">DescribeAddresses</a> api for the query. Example: eip-qhx8udkc, applicable only to bind EIP for private network CLB.</p>
* @type {string || null}
*/
this.EipAddressId = null;
/**
* <p>Allow CLB traffic to the Target. Enable (true): verify security groups on CLB; deny CLB traffic to the Target (false): verify security groups on both CLB and backend instances. IPv6 CLB security group default permit, this parameter is not required.</p>
* @type {boolean || null}
*/
this.LoadBalancerPassToTarget = null;
/**
* <p>Create a domain-name based CLB.</p>
* @type {boolean || null}
*/
this.DynamicVip = null;
/**
* <p>Network outbound</p>
* @type {string || null}
*/
this.Egress = null;
/**
* <p>Prepaid billing attributes of the CLB instance</p>
* @type {LBChargePrepaid || null}
*/
this.LBChargePrepaid = null;
/**
* <p>Billing type of the CLB instance. Valid values: POSTPAID_BY_HOUR and PREPAID. Default value: POSTPAID_BY_HOUR.</p><p>Enumeration values:</p><ul><li>POSTPAID_BY_HOUR: Pay-As-You-Go</li><li>PREPAID: Monthly Subscription</li></ul>
* @type {string || null}
*/
this.LBChargeType = null;
/**
* <p>L7 access log topic ID</p>
* @type {string || null}
*/
this.AccessLogTopicId = null;
/**
* <p>Whether layer-7 advanced routing is enabled</p>
* @type {boolean || null}
*/
this.AdvancedRoute = null;
/**
* <p>Availability zone affinity info</p>
* @type {AvailableZoneAffinityInfo || null}
*/
this.AvailableZoneAffinityInfo = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.LoadBalancerType = 'LoadBalancerType' in params ? params.LoadBalancerType : null;
this.Forward = 'Forward' in params ? params.Forward : null;
this.LoadBalancerName = 'LoadBalancerName' in params ? params.LoadBalancerName : null;
this.VpcId = 'VpcId' in params ? params.VpcId : null;
this.SubnetId = 'SubnetId' in params ? params.SubnetId : null;
this.ProjectId = 'ProjectId' in params ? params.ProjectId : null;
this.AddressIPVersion = 'AddressIPVersion' in params ? params.AddressIPVersion : null;
this.Number = 'Number' in params ? params.Number : null;
this.MasterZoneId = 'MasterZoneId' in params ? params.MasterZoneId : null;
this.ZoneId = 'ZoneId' in params ? params.ZoneId : null;
if (params.InternetAccessible) {
let obj = new InternetAccessible();
obj.deserialize(params.InternetAccessible)
this.InternetAccessible = obj;
}
this.VipIsp = 'VipIsp' in params ? params.VipIsp : null;
if (params.Tags) {
this.Tags = new Array();
for (let z in params.Tags) {
let obj = new TagInfo();
obj.deserialize(params.Tags[z]);
this.Tags.push(obj);
}
}
this.Vip = 'Vip' in params ? params.Vip : null;
this.BandwidthPackageId = 'BandwidthPackageId' in params ? params.BandwidthPackageId : null;
if (params.ExclusiveCluster) {
let obj = new ExclusiveCluster();
obj.deserialize(params.ExclusiveCluster)
this.ExclusiveCluster = obj;
}
this.SlaType = 'SlaType' in params ? params.SlaType : null;
this.ClusterIds = 'ClusterIds' in params ? params.ClusterIds : null;
this.ClientToken = 'ClientToken' in params ? params.ClientToken : null;
this.SnatPro = 'SnatPro' in params ? params.SnatPro : null;
if (params.SnatIps) {
this.SnatIps = new Array();
for (let z in params.SnatIps) {
let obj = new SnatIp();
obj.deserialize(params.SnatIps[z]);
this.SnatIps.push(obj);
}
}
this.ClusterTag = 'ClusterTag' in params ? params.ClusterTag : null;
this.SlaveZoneId = 'SlaveZoneId' in params ? params.SlaveZoneId : null;
this.EipAddressId = 'EipAddressId' in params ? params.EipAddressId : null;
this.LoadBalancerPassToTarget = 'LoadBalancerPassToTarget' in params ? params.LoadBalancerPassToTarget : null;
this.DynamicVip = 'DynamicVip' in params ? params.DynamicVip : null;
this.Egress = 'Egress' in params ? params.Egress : null;
if (params.LBChargePrepaid) {
let obj = new LBChargePrepaid();
obj.deserialize(params.LBChargePrepaid)
this.LBChargePrepaid = obj;
}
this.LBChargeType = 'LBChargeType' in params ? params.LBChargeType : null;
this.AccessLogTopicId = 'AccessLogTopicId' in params ? params.AccessLogTopicId : null;
this.AdvancedRoute = 'AdvancedRoute' in params ? params.AdvancedRoute : null;
if (params.AvailableZoneAffinityInfo) {
let obj = new AvailableZoneAffinityInfo();
obj.deserialize(params.AvailableZoneAffinityInfo)
this.AvailableZoneAffinityInfo = obj;
}
}
}
/**
* DescribeLoadBalancerOverview response structure.
* @class
*/
class DescribeLoadBalancerOverviewResponse extends AbstractModel {
constructor(){
super();
/**
* Total number of CLB instances
* @type {number || null}
*/
this.TotalCount = null;
/**
* Number of CLB instances that are running
* @type {number || null}
*/
this.RunningCount = null;
/**
* Number of CLB instances that are isolated
* @type {number || null}
*/
this.IsolationCount = null;
/**
* Number of CLB instances that are about to expire
* @type {number || null}
*/
this.WillExpireCount = 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.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
this.RunningCount = 'RunningCount' in params ? params.RunningCount : null;
this.IsolationCount = 'IsolationCount' in params ? params.IsolationCount : null;
this.WillExpireCount = 'WillExpireCount' in params ? params.WillExpireCount : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DeleteRule request structure.
* @class
*/
class DeleteRuleRequest extends AbstractModel {
constructor(){
super();
/**
* ID of the CLB instance. You can call the [DescribeLoadBalancers](https://www.tencentcloud.com/document/product/214/30685?from_cn_redirect=1) API to query the ID.
* @type {string || null}
*/
this.LoadBalancerId = null;
/**
* ID of the CLB instance listener. You can call the [DescribeListeners](https://www.tencentcloud.com/document/product/214/30686?from_cn_redirect=1) API to query the ID.
* @type {string || null}
*/
this.ListenerId = null;
/**
* Array of ids of forwarding rules to be deleted, can be accessed through the [DescribeLoadBalancersDetail](https://www.tencentcloud.com/document/api/214/46916?from_cn_redirect=1) api.
* @type {Array.<string> || null}
*/
this.LocationIds = null;
/**
* Domain name of the forwarding rule to be deleted. if it is multiple domains, you can specify any one of the domain name list. it can be accessed through the [DescribeLoadBalancersDetail](https://www.tencentcloud.com/document/api/214/46916?from_cn_redirect=1) api.
* @type {string || null}
*/
this.Domain = null;
/**
* Forwarding path of the forwarding rule to be deleted can be accessed through the [DescribeLoadBalancersDetail](https://www.tencentcloud.com/document/api/214/46916?from_cn_redirect=1) api.
* @type {string || null}
*/
this.Url = null;
/**
* A default domain name must be configured under the listener. when you need to delete the default domain name, you can specify another domain name as the new default domain name. if the new default domain name is multiple domains, you can specify any one of the domain name list. it can be accessed through the [DescribeListeners](https://www.tencentcloud.com/document/product/214/30686?from_cn_redirect=1) api.
* @type {string || null}
*/
this.NewDefaultServerDomain = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.LoadBalancerId = 'LoadBalancerId' in params ? params.LoadBalancerId : null;
this.ListenerId = 'ListenerId' in params ? params.ListenerId : null;
this.LocationIds = 'LocationIds' in params ? params.LocationIds : null;
this.Domain = 'Domain' in params ? params.Domain : null;
this.Url = 'Url' in params ? params.Url : null;
this.NewDefaultServerDomain = 'NewDefaultServerDomain' in params ? params.NewDefaultServerDomain : null;
}
}
/**
* CloneLoadBalancer request structure.
* @class
*/
class CloneLoadBalancerRequest extends AbstractModel {
constructor(){
super();
/**
* Specifies the clb ID. you can call the [DescribeLoadBalancers](https://www.tencentcloud.com/document/product/214/30685?from_cn_redirect=1) API to obtain the ID.
* @type {string || null}
*/
this.LoadBalancerId = null;
/**
* Specifies the name of the cloned load balancing instance. rule: 1-60 english letters, chinese characters, digits, connecting lines "-", or underscores "_".
Note: if the name is identical to that of an existing load balancing instance in the system, the system will automatically generate a name for the created cloud load balancer instance.
* @type {string || null}
*/
this.LoadBalancerName = null;
/**
* ID of the project to which a CLB instance belongs, which can be obtained through the `DescribeProject` API. If this parameter is not passed in, the default project will be used.
* @type {number || null}
*/
this.ProjectId = null;
/**
* Sets the primary AZ ID for cross-AZ disaster recovery, such as `100001` or `ap-guangzhou-1`, which is applicable only to public network CLB.
Note: A primary AZ loads traffic, while a secondary AZ does not load traffic by default and will be used only if the primary AZ becomes unavailable. The platform will automatically select the optimal secondary AZ. You can use the `DescribeResource` API to query the primary AZ list of a region.
* @type {string || null}
*/
this.MasterZoneId = null;
/**
* Specifies the secondary AZ ID for cross-AZ disaster recovery, such as `100001` or `ap-guangzhou-1`. It is applicable only to public network CLB.
Note: A secondary AZ will load traffic if the primary AZ is faulty. You can use the `DescribeMasterZones` API to query the primary and secondary AZ list of a region.
* @type {string || null}
*/
this.SlaveZoneId = null;
/**
* Applicable only to public network clb. AZ ID, both availability zone ID and name are supported. specify availability zone to create a load balancing instance, for example: 100001 or ap-guangzhou-1. if not passed, queries CVM instances in all azs. if needed, call the API for the query [DescribeZones](https://www.tencentcloud.com/document/product/213/15707?from_cn_redirect=1) to specify availability zone.
* @type {string || null}
*/
this.ZoneId = null;
/**
* CLB network billing mode, applicable only to public network CLB instances.
* @type {InternetAccessible || null}
*/
this.InternetAccessible = null;
/**
* It only applies to public CLB. Currently, the static single-line IP type is supported only for the regions of Guangzhou, Shanghai, Nanjing, Jinan, Hangzhou, Fuzhou, Beijing, Shijiazhuang, Wuhan, Changsha, Chengdu, and Chongqing. If you need to experience it, contact your business manager. After approval, you can select the ISP type as China Mobile (CMCC), China Unicom (CUCC), or China Telecom (CTCC). The network billing mode should be selected as billing by bandwidth package (BANDWIDTH_PACKAGE). If this parameter is not specified, BGP is used by default. You can use the DescribeResources API to query ISPs supported for a region.
* @type {string || null}
*/
this.VipIsp = null;
/**
* Specifies the Vip to apply for cloud load balancer.
* @type {string || null}
*/
this.Vip = null;
/**
* Proceed to purchase cloud load balancer and Tag it at the same time.
* @type {Array.<TagInfo> || null}
*/
this.Tags = null;
/**
* Exclusive cluster information.
* @type {ExclusiveCluster || null}
*/
this.ExclusiveCluster = null;
/**
* BANDWIDTH PACKAGE ID, which can be obtained through the [DescribeBandwidthPackages](https://www.tencentcloud.com/document/api/215/19209?from_cn_redirect=1) api. specifies this parameter indicates the network billing mode (InternetAccessible.InternetChargeType) supports only billing by BANDWIDTH PACKAGE (BANDWIDTH_PACKAGE).
* @type {string || null}
*/
this.BandwidthPackageId = null;
/**
* Specifies whether the cross-regional or cross-Vpc IP binding feature is supported.
* @type {boolean || null}
*/
this.SnatPro = null;
/**
* Enables cross-regional or cross-Vpc IP binding and creates a SnatIp.
* @type {Array.<SnatIp> || null}
*/
this.SnatIps = null;
/**
* Cluster ID. This cluster identifier is used for configuring a public cloud exclusive cluster or a cloud dedicated cluster. To apply for a public cloud exclusive cluster, [submit a ticket](https://console.cloud.tencent.com/workorder/category).
* @type {Array.<string> || null}
*/
this.ClusterIds = null;
/**
* Performance capacity specification. <li>clb.c2.medium (standard type)</li> <li>clb.c3.small (advanced type 1)</li> <li>clb.c3.medium (advanced type 2)</li> <li>clb.c4.small (high-strength type 1)</li> <li>clb.c4.medium (high-strength type 2)</li> <li>clb.c4.large (high-strength type 3)</li> <li>clb.c4.xlarge (high-strength type 4)</li>.
* @type {string || null}
*/
this.SlaType = null;
/**
* Specifies the Tag of the Stgw exclusive cluster.
* @type {string || null}
*/
this.ClusterTag = null;
/**
* Applicable only to private network clb. when connected to nearby, select availability zone for deployment. you can call [DescribeZones](https://www.tencentcloud.com/document/product/213/15707?from_cn_redirect=1) to query the availability zone list.
* @type {Array.<string> || null}
*/
this.Zones = null;
/**
* The unique ID of EIP, such as EIP-qhx8udkc, applicable only to private network clb binding EIP, can be queried through the [DescribeAddresses](https://www.tencentcloud.com/document/product/215/16702?from_cn_redirect=1) API .
* @type {string || null}
*/
this.EipAddressId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.LoadBalancerId = 'LoadBalancerId' in params ? params.LoadBalancerId : null;
this.LoadBalancerName = 'LoadBalancerName' in params ? params.LoadBalancerName : null;
this.ProjectId = 'ProjectId' in params ? params.ProjectId : null;
this.MasterZoneId = 'MasterZoneId' in params ? params.MasterZoneId : null;
this.SlaveZoneId = 'SlaveZoneId' in params ? params.SlaveZoneId : null;
this.ZoneId = 'ZoneId' in params ? params.ZoneId : null;
if (params.InternetAccessible) {
let obj = new InternetAccessible();
obj.deserialize(params.InternetAccessible)
this.InternetAccessible = obj;
}
this.VipIsp = 'VipIsp' in params ? params.VipIsp : null;
this.Vip = 'Vip' in params ? params.Vip : null;
if (params.Tags) {
this.Tags = new Array();
for (let z in params.Tags) {
let obj = new TagInfo();
obj.deserialize(params.Tags[z]);
this.Tags.push(obj);
}
}
if (params.ExclusiveCluster) {
let obj = new ExclusiveCluster();
obj.deserialize(params.ExclusiveCluster)
this.ExclusiveCluster = obj;
}
this.BandwidthPackageId = 'BandwidthPackageId' in params ? params.BandwidthPackageId : null;
this.SnatPro = 'SnatPro' in params ? params.SnatPro : null;
if (params.SnatIps) {
this.SnatIps = new Array();
for (let z in params.SnatIps) {
let obj = new SnatIp();
obj.deserialize(params.SnatIps[z]);
this.SnatIps.push(obj);
}
}
this.ClusterIds = 'ClusterIds' in params ? params.ClusterIds : null;
this.SlaType = 'SlaType' in params ? params.SlaType : null;
this.ClusterTag = 'ClusterTag' in params ? params.ClusterTag : null;
this.Zones = 'Zones' in params ? params.Zones : null;
this.EipAddressId = 'EipAddressId' in params ? params.EipAddressId : null;
}
}
/**
* DisassociateTargetGroups response structure.
* @class
*/
class DisassociateTargetGroupsResponse extends AbstractModel {
constructor(){
super();
/**
* 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.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Details of real servers bound to a listener
* @class
*/
class ListenerBackend extends AbstractModel {
constructor(){
super();
/**
* Listener ID
* @type {string || null}
*/
this.ListenerId = null;
/**
* Listener protocol
* @type {string || null}
*/
this.Protocol = null;
/**
* Listener port
* @type {number || null}
*/
this.Port = null;
/**
* Information of rules under a listener (applicable only to HTTP/HTTPS listeners)
* @type {Array.<RuleTargets> || null}
*/
this.Rules = null;
/**
* List of real servers bound to the listener (applicable only to TCP/UDP/TCP_SSL listener)
* @type {Array.<Backend> || null}
*/
this.Targets = null;
/**
* End port in a port range if port range is supported, or 0 if port range is not supported
* @type {number || null}
*/
this.EndPort = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.ListenerId = 'ListenerId' in params ? params.ListenerId : null;
this.Protocol = 'Protocol' in params ? params.Protocol : null;
this.Port = 'Port' in params ? params.Port : null;
if (params.Rules) {
this.Rules = new Array();
for (let z in params.Rules) {
let obj = new RuleTargets();
obj.deserialize(params.Rules[z]);
this.Rules.push(obj);
}
}
if (params.Targets) {
this.Targets = new Array();
for (let z in params.Targets) {
let obj = new Backend();
obj.deserialize(params.Targets[z]);
this.Targets.push(obj);
}
}
this.EndPort = 'EndPort' in params ? params.EndPort : null;
}
}
/**
* SetLoadBalancerClsLog response structure.
* @class
*/
class SetLoadBalancerClsLogResponse extends AbstractModel {
constructor(){
super();
/**
* 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.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Target group instance
* @class
*/
class TargetGroupInstance extends AbstractModel {
constructor(){
super();
/**
* Private IP of target group instance
* @type {string || null}
*/
this.BindIP = null;
/**
* Port of target group instance. this field is not supported for full listen target groups.
* @type {number || null}
*/
this.Port = null;
/**
* Weight of a target group instance
Specifies that the Weight must be configured for a v2 target group. when calling the CreateTargetGroup API for target group creation, this parameter is used in combination with the Weight parameter in the create api, and one of them is required.
Valid values: 0-100.
* @type {number || null}
*/
this.Weight = null;
/**
* The new port of the target group instance. this field is not supported for full listen target groups.
* @type {number || null}
*/
this.NewPort = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.BindIP = 'BindIP' in params ? params.BindIP : null;
this.Port = 'Port' in params ? params.Port : null;
this.Weight = 'Weight' in params ? params.Weight : null;
this.NewPort = 'NewPort' in params ? params.NewPort : null;
}
}
/**
* DescribeLoadBalancerTraffic response structure.
* @class
*/
class DescribeLoadBalancerTrafficResponse extends AbstractModel {
constructor(){
super();
/**
* Load balance information sorted in descending order by outbound bandwidth.
* @type {Array.<LoadBalancerTraffic> || null}
*/
this.LoadBalancerTraffic = 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;
}
if (params.LoadBalancerTraffic) {
this.LoadBalancerTraffic = new Array();
for (let z in params.LoadBalancerTraffic) {
let obj = new LoadBalancerTraffic();
obj.deserialize(params.LoadBalancerTraffic[z]);
this.LoadBalancerTraffic.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Information of multiple certificates bound with the load balancer listener or rule.
* @class
*/
class MultiCertInfo extends AbstractModel {
constructor(){
super();
/*