tencentcloud-sdk-nodejs-intl-en
Version:
1,453 lines (1,230 loc) • 124 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");
/**
* Retention type
* @class
*/
class LBChargePrepaid extends AbstractModel {
constructor(){
super();
/**
* Reserved field.
* @type {string || null}
*/
this.RenewFlag = null;
/**
* Reserved field.
* @type {number || null}
*/
this.Period = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RenewFlag = 'RenewFlag' in params ? params.RenewFlag : null;
this.Period = 'Period' in params ? params.Period : null;
}
}
/**
* DescribeLoadBalancerListByCertId request structure.
* @class
*/
class DescribeLoadBalancerListByCertIdRequest extends AbstractModel {
constructor(){
super();
/**
* Server or client certificate ID
* @type {Array.<string> || null}
*/
this.CertIds = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.CertIds = 'CertIds' in params ? params.CertIds : null;
}
}
/**
* Classic CLB listener information
* @class
*/
class ClassicalListener extends AbstractModel {
constructor(){
super();
/**
* CLB listener ID
* @type {string || null}
*/
this.ListenerId = null;
/**
* CLB listener port
* @type {number || null}
*/
this.ListenerPort = null;
/**
* Listener backend forwarding port
* @type {number || null}
*/
this.InstancePort = null;
/**
* listener name
* @type {string || null}
*/
this.ListenerName = null;
/**
* Listener protocol type
* @type {string || null}
*/
this.Protocol = null;
/**
* Session hold time
* @type {number || null}
*/
this.SessionExpire = null;
/**
* Whether health check is enabled. 1: Enabled; 0: Disabled
* @type {number || null}
*/
this.HealthSwitch = null;
/**
* Response timeout duration
* @type {number || null}
*/
this.TimeOut = null;
/**
* check interval
* @type {number || null}
*/
this.IntervalTime = null;
/**
* health threshold
* @type {number || null}
*/
this.HealthNum = null;
/**
* unhealthy threshold
* @type {number || null}
*/
this.AbnormalNum = null;
/**
* 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.
* @type {string || null}
*/
this.HttpHash = null;
/**
* Health check return code for HTTP and HTTPS listeners of a public network Classic CLB instance. For more information, refer to the explanation of this field in the listener creation API.
* @type {number || null}
*/
this.HttpCode = null;
/**
* Health check path for HTTP and HTTPS listeners of a public network Classic CLB instance
* @type {string || null}
*/
this.HttpCheckPath = null;
/**
* Authentication method for an HTTPS listener of a public network Classic CLB instance
* @type {string || null}
*/
this.SSLMode = null;
/**
* Server certificate ID for an HTTPS listener of a public network Classic CLB instance
* @type {string || null}
*/
this.CertId = null;
/**
* Client certificate ID for an HTTPS listener of a public network Classic CLB instance
* @type {string || null}
*/
this.CertCaId = null;
/**
* Listener status. 0: Creating; 1: Running
* @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.AbnormalNum = 'AbnormalNum' in params ? params.AbnormalNum : 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;
}
}
/**
* Information of the real server bound to a CLB instance, including region and network to which it belongs.
* @class
*/
class TargetRegionInfo extends AbstractModel {
constructor(){
super();
/**
* Region of the target, such as ap-guangzhou
* @type {string || null}
*/
this.Region = null;
/**
* Network of the target. For VPC, the format is vpc-abcd1234. For a basic network, the value is 0.
* @type {string || null}
*/
this.VpcId = null;
/**
* Target's network, in the format of 86323 for a private network, or 0 if it is a basic network
* @type {number || null}
*/
this.NumericalVpcId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Region = 'Region' in params ? params.Region : null;
this.VpcId = 'VpcId' in params ? params.VpcId : null;
this.NumericalVpcId = 'NumericalVpcId' in params ? params.NumericalVpcId : null;
}
}
/**
* SetCustomizedConfigForLoadBalancer request structure.
* @class
*/
class SetCustomizedConfigForLoadBalancerRequest extends AbstractModel {
constructor(){
super();
/**
* Operation type.
-ADD
- DELETE: delete.
-UPDATE: Modify
-BIND: bind
-UNBIND: unbound
* @type {string || null}
*/
this.OperationType = null;
/**
* This field is required except for creating custom configurations. Example: pz-1234abcd
* @type {string || null}
*/
this.ConfigId = null;
/**
* Personalized configuration content. This field is required when creating custom configuration or modifying the content of custom configuration.
* @type {string || null}
*/
this.ConfigContent = null;
/**
* This field is required when you create or modify the name of a custom configuration.
* @type {string || null}
*/
this.ConfigName = null;
/**
* Load balancing instance ID. This field is required for bind/unbind.
* @type {Array.<string> || null}
*/
this.LoadBalancerIds = null;
/**
* Tag.
* @type {Array.<TagInfo> || null}
*/
this.Tags = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.OperationType = 'OperationType' in params ? params.OperationType : null;
this.ConfigId = 'ConfigId' in params ? params.ConfigId : null;
this.ConfigContent = 'ConfigContent' in params ? params.ConfigContent : null;
this.ConfigName = 'ConfigName' in params ? params.ConfigName : null;
this.LoadBalancerIds = 'LoadBalancerIds' in params ? params.LoadBalancerIds : 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);
}
}
}
}
/**
* DescribeCustomizedConfigList request structure.
* @class
*/
class DescribeCustomizedConfigListRequest extends AbstractModel {
constructor(){
super();
/**
* Configuration type. CLB: CLB dimension; SERVER: Domain name dimension; LOCATION: Rule dimension.
* @type {string || null}
*/
this.ConfigType = null;
/**
* Pagination offset. Default: 0
* @type {number || null}
*/
this.Offset = null;
/**
* Number of results. Default: 20
* @type {number || null}
*/
this.Limit = null;
/**
* Specify the name of configurations to query. Fuzzy match is supported.
* @type {string || null}
*/
this.ConfigName = null;
/**
* Configuration ID
* @type {Array.<string> || null}
*/
this.ConfigIds = null;
/**
* Filter criteria are as follows:
<li> loadbalancer-id - String - Required: No - (Filter condition) Filter by CLB ID, for example: "lb-12345678".</li>
<li> vip - String - Required: No - (Filter condition) Filter by CLB vip, for example: "1.1.1.1", "2204::22:3".</li>
* @type {Array.<Filter> || null}
*/
this.Filters = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.ConfigType = 'ConfigType' in params ? params.ConfigType : null;
this.Offset = 'Offset' in params ? params.Offset : null;
this.Limit = 'Limit' in params ? params.Limit : null;
this.ConfigName = 'ConfigName' in params ? params.ConfigName : null;
this.ConfigIds = 'ConfigIds' in params ? params.ConfigIds : 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);
}
}
}
}
/**
* Reserved. Generally unnecessary for users to concern.
* @class
*/
class ExtraInfo extends AbstractModel {
constructor(){
super();
/**
* Whether to enable VIP Direct Connect
* @type {boolean || null}
*/
this.Dnat = null;
/**
* TgwGroup name
* @type {string || null}
*/
this.TgwGroupName = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Dnat = 'Dnat' in params ? params.Dnat : null;
this.TgwGroupName = 'TgwGroupName' in params ? params.TgwGroupName : null;
}
}
/**
* DescribeCustomizedConfigAssociateList response structure.
* @class
*/
class DescribeCustomizedConfigAssociateListResponse extends AbstractModel {
constructor(){
super();
/**
* Binding relationship list
* @type {Array.<BindDetailItem> || null}
*/
this.BindList = null;
/**
* Total number of binding relationships
* @type {number || null}
*/
this.TotalCount = 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.BindList) {
this.BindList = new Array();
for (let z in params.BindList) {
let obj = new BindDetailItem();
obj.deserialize(params.BindList[z]);
this.BindList.push(obj);
}
}
this.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* CloneLoadBalancer response structure.
* @class
*/
class CloneLoadBalancerResponse 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;
}
}
/**
* 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;
}
}
/**
* DescribeLoadBalancerListByCertId response structure.
* @class
*/
class DescribeLoadBalancerListByCertIdResponse extends AbstractModel {
constructor(){
super();
/**
* Certificate ID and the list of CLB instances associated with the certificate ID
* @type {Array.<CertIdRelatedWithLoadBalancers> || null}
*/
this.CertSet = 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.CertSet) {
this.CertSet = new Array();
for (let z in params.CertSet) {
let obj = new CertIdRelatedWithLoadBalancers();
obj.deserialize(params.CertSet[z]);
this.CertSet.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : 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 Cloud Load Balancer instance. Currently only support input 1.</p>
* @type {number || null}
*/
this.Forward = null;
/**
* <p>The name of a Cloud Load Balancer instance takes effect only when creating an instance. Rule: 1-80 characters in internationally compatible languages, including English letters, Chinese characters, digits, hyphens "-", underscores "_", and other common characters (Unicode supplementary characters such as emojis and rare Chinese characters are forbidden). Note: If the name is identical to that of an existing Cloud Load Balancer instance in the system, the system will automatically generate a name for the newly created CLB instance.</p>
* @type {string || null}
*/
this.LoadBalancerName = null;
/**
* <p>The network ID of the backend target device belonging to the Cloud Load Balancer, such as vpc-12345678, can be obtained through the <a href="https://www.tencentcloud.com/document/product/215/15778?from_cn_redirect=1">DescribeVpcs</a> API. It defaults to DefaultVPC if this parameter is not specified. This parameter is required when creating a private network CLB instance.</p>
* @type {string || null}
*/
this.VpcId = null;
/**
* <p>A subnet ID must be specified when you purchase a private network CLB instance under a VPC. The VIP of the private network CLB instance is generated in this subnet. This parameter is required when you create a private network CLB instance but not supported when you create a public network IPv4 CLB instance.</p>
* @type {string || null}
*/
this.SubnetId = null;
/**
* <p>The project ID associated with the Cloud Load Balancer instance can be obtained through the <a href="https://www.tencentcloud.com/document/api/651/78725?from_cn_redirect=1">DescribeProject</a> API. If this parameter is left blank, it will be used as the default project.</p>
* @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: 1.</p>
* @type {number || null}
*/
this.Number = null;
/**
* <p>Applicable only to public network IPv4 Cloud Load Balancer. Sets the primary AZ ID for cross-AZ disaster recovery, 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. Currently, primary and secondary AZs are supported only for IPv4 CLB instances in Guangzhou, Shanghai, Nanjing, Beijing, Chengdu, Shenzhen Finance, Hong Kong (China), Seoul, Frankfurt, and Singapore regions. You can call the <a href="https://www.tencentcloud.com/document/api/214/70213?from_cn_redirect=1">DescribeResources</a> API to query the primary AZ list of a region. [If you need to experience this feature, submit a ticket](https://console.cloud.tencent.com/workorder/category).</p>
* @type {string || null}
*/
this.MasterZoneId = null;
/**
* <p>Applicable only to public network load balancing with IPv4 version. Availability zone ID. Designated availability zone to create a CLB instance, for example: 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, static single-line IP type is supported in Guangzhou, Shanghai, Nanjing, Jinan, Hangzhou, Fuzhou, Beijing, Shijiazhuang, Wuhan, Changsha, Chengdu, and Chongqing regions. If you need to experience it, contact business manager to submit a request. After approval, just select CMCC, CUCC, or CTCC as the operator type. Only can be used BANDWIDTH_PACKAGE for network billing mode. If this parameter is not specified, use BGP by default. You can check ISPs supported in a region via the <a href="https://www.tencentcloud.com/document/api/214/70213?from_cn_redirect=1">DescribeResources</a> api query.</p>
* @type {string || null}
*/
this.VipIsp = null;
/**
* <p>When you purchase Cloud Load Balancer (CLB), you can tag it with up to 20 tag key-value pairs.</p>
* @type {Array.<TagInfo> || null}
*/
this.Tags = null;
/**
* <p>Apply for a Cloud Load Balancer with a designated VIP. This parameter is optional. If this parameter is not specified, the VIP is assigned by system. This parameter is supported for IPv4 and IPv6 types but unsupported for IPv6 NAT64 type.<br>Note: When specifying a VIP to create a private network instance or a public IPv6 BGP instance, creation fails if the VIP is not within the specified VPC subnet or if the VIP is already occupied.</p>
* @type {string || null}
*/
this.Vip = null;
/**
* <p>Bandwidth package ID. If this parameter is specified, the network billing mode (InternetAccessible.InternetChargeType) will only support billing by bandwidth package (BANDWIDTH_PACKAGE). The attributes of the bandwidth package determine the settlement method. For IPv6 CLB instances purchased by non-promoted users, if the ISP type is not BGP, the bandwidth package ID cannot be specified.</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 domestic site users, this parameter is not required when creating a shared instance. For international site users, the default purchased instance is standard 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>A 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 no more than 64 ASCII characters. If not specified, request idempotency cannot be guaranteed.</p>
* @type {string || null}
*/
this.ClientToken = null;
/**
* <p>Whether the cross-regional or cross-Vpc IP binding feature is supported.</p>
* @type {boolean || null}
*/
this.SnatPro = null;
/**
* <p>After enabling the cross-regional/cross-Vpc IP binding feature, 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 IPv4 version. Sets the secondary AZ ID for cross-AZ disaster recovery, 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. You can 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 <a href="https://console.cloud.tencent.com/workorder/category">ticket application</a>]</p>
* @type {string || null}
*/
this.SlaveZoneId = null;
/**
* <p>Unique ID of EIP, such as eip-11112222, applicable only to private network CLB to bind EIP.</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.</p>
* @type {boolean || null}
*/
this.LoadBalancerPassToTarget = null;
/**
* <p>Network outbound</p>
* @type {string || null}
*/
this.Egress = null;
/**
* <p>Prepaid billing attributes of the Cloud Load Balancer 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>
* @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.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.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;
}
}
}
/**
* CLB instance health check status
* @class
*/
class LoadBalancerHealth extends AbstractModel {
constructor(){
super();
/**
* CLB instance ID
* @type {string || null}
*/
this.LoadBalancerId = null;
/**
* Load balancing instance name
* @type {string || null}
*/
this.LoadBalancerName = null;
/**
* Listener list
* @type {Array.<ListenerHealth> || null}
*/
this.Listeners = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.LoadBalancerId = 'LoadBalancerId' in params ? params.LoadBalancerId : null;
this.LoadBalancerName = 'LoadBalancerName' in params ? params.LoadBalancerName : null;
if (params.Listeners) {
this.Listeners = new Array();
for (let z in params.Listeners) {
let obj = new ListenerHealth();
obj.deserialize(params.Listeners[z]);
this.Listeners.push(obj);
}
}
}
}
/**
* DescribeTargetHealth request structure.
* @class
*/
class DescribeTargetHealthRequest extends AbstractModel {
constructor(){
super();
/**
* List of CLB instance IDs to query.
* @type {Array.<string> || null}
*/
this.LoadBalancerIds = null;
/**
* Listener ID list to query.
* @type {Array.<string> || null}
*/
this.ListenerIds = null;
/**
* List of forwarding rule IDs to query.
* @type {Array.<string> || null}
*/
this.LocationIds = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.LoadBalancerIds = 'LoadBalancerIds' in params ? params.LoadBalancerIds : null;
this.ListenerIds = 'ListenerIds' in params ? params.ListenerIds : null;
this.LocationIds = 'LocationIds' in params ? params.LocationIds : null;
}
}
/**
* CloneLoadBalancer request structure.
* @class
*/
class CloneLoadBalancerRequest extends AbstractModel {
constructor(){
super();
/**
* CLB ID.
* @type {string || null}
*/
this.LoadBalancerId = null;
/**
* The name of the cloned CLB instance. Rule: 1-60 English letters, Chinese characters, digits, hyphens "-", or underscores "_".
Note: If the name is the same as an existing Cloud Load Balancer instance in the system, the system will automatically generate the name of the created CLB instance.
* @type {string || null}
*/
this.LoadBalancerName = null;
/**
* The project ID associated with the Cloud Load Balancer instance can be obtained through the [DescribeLoadBalancers](https://www.tencentcloud.com/document/product/214/30685?from_cn_redirect=1) API. If this parameter is not specified, it will be used as the default project.
* @type {number || null}
*/
this.ProjectId = null;
/**
* Applicable only to public network CLB. Sets the primary AZ ID for cross-AZ disaster recovery, such as 100001 or ap-guangzhou-1.
Note: The primary AZ loads traffic, while the secondary AZ does not load traffic by default and is used only if the primary AZ becomes unavailable. The platform will automatically select the optimal secondary AZ. You can call the [DescribeResources](https://www.tencentcloud.com/document/api/214/70213?from_cn_redirect=1) API to query the primary AZ list of a region.
* @type {string || null}
*/
this.MasterZoneId = null;
/**
* Applicable only to public network CLB. Sets the secondary AZ ID for cross-AZ disaster recovery, such as 100001 or ap-guangzhou-1.
Note: The secondary AZ sustains traffic when the primary AZ encounters faults. You can call the [DescribeResources](https://www.tencentcloud.com/document/api/214/70213?from_cn_redirect=1) API to query the list of primary/secondary AZs in a region.
* @type {string || null}
*/
this.SlaveZoneId = null;
/**
* Applicable only to public network CLB. Availability zone ID. Specify an availability zone to create a Cloud Load Balancer instance, for example, ap-guangzhou-1. If not specified, queries CVM instances in all AZs. If needed, call the DescribeZones API (https://www.tencentcloud.com/document/product/213/15707?from_cn_redirect=1) to query the availability zone list.
* @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;
/**
* Designate a Vip to apply for Cloud Load Balancer.
* @type {string || null}
*/
this.Vip = null;
/**
* When you purchase Cloud Load Balancer (CLB), you can tag it.
* @type {Array.<TagInfo> || null}
*/
this.Tags = null;
/**
* Exclusive cluster information.
* @type {ExclusiveCluster || null}
*/
this.ExclusiveCluster = null;
/**
* Bandwidth package ID. If this parameter is specified, the network billing mode (InternetAccessible.InternetChargeType) supports only billing by bandwidth package (BANDWIDTH_PACKAGE).
* @type {string || null}
*/
this.BandwidthPackageId = null;
/**
* Whether to support the feature of binding IP addresses across regions/VPCs.
* @type {boolean || null}
*/
this.SnatPro = null;
/**
* SNAT IP addresses to be created when the feature of cross-region/cross-VPC IP address binding is enabled.
* @type {Array.<SnatIp> || null}
*/
this.SnatIps = null;
/**
* Public network exclusive cluster ID or CDCId.
* @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;
/**
* Exclusive STGW cluster tag.
* @type {string || null}
*/
this.ClusterTag = null;
/**
* Applicable only to private network CLB. When connected to nearby via private network, select availability zone for deployment. You can call the [DescribeZones](https://www.tencentcloud.com/document/product/213/15707?from_cn_redirect=1) API to query the availability zone list.
* @type {Array.<string> || null}
*/
this.Zones = null;
/**
* Unique ID of an EIP, in the format of eip-11112222, which is applicable only for binding EIP to private network CLB.
* @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;
}
}
/**
* Forwarding target, namely, a real server bound to the CLB instance
* @class
*/
class Target extends AbstractModel {
constructor(){
super();
/**
* Listening port of the backend service.
Note: This parameter must be specified when binding to CVM (Cloud Virtual Machine) or ENI (Elastic Network Interface).
* @type {number || null}
*/
this.Port = null;
/**
* Backend service type, optional: CVM (Cloud Virtual Machine), ENI (Elastic Network Interface). As an input parameter, this parameter does not take effect.
* @type {string || null}
*/
this.Type = null;
/**
* This parameter must be passed in when binding to CVM. It represents the unique ID of the CVM and can be obtained from the InstanceId field in the response of the DescribeInstances API. It indicates binding to the primary IPv4 address of the primary network interface. The following scenarios do not support specifying InstanceId: binding to non-CVM resources, binding to auxiliary network interface IPs on CVM, binding to CVM through cross-region 2.0, and binding to IPv6 addresses of CVM.
Note: You can only input one of the InstanceId or EniIp parameter.
* @type {string || null}
*/
this.InstanceId = null;
/**
* The forwarding weight of the backend service after modification, with a value range of [0, 100], defaults to 10. This parameter has a higher priority than the Weight parameter in [RsWeightRule](https://www.tencentcloud.com/document/api/214/30694?from_cn_redirect=1#RsWeightRule). The final weight value is based on this Weight parameter. Only when this Weight parameter is empty, the Weight parameter in RsWeightRule will be used.
* @type {number || null}
*/
this.Weight = null;
/**
* This parameter must be passed in for IP binding. It supports ENI IPs and other private IP addresses. If it is an ENI, it must first bind to a CVM before binding to a CLB instance.
Note: You can only input one of the InstanceId or EniIp parameter. If it is binding a dual-stack IPV6 instance, you must pass this parameter. If it is cross-region binding, you must pass the parameter, and the InstanceId parameter is not supported.
* @type {string || null}
*/
this.EniIp = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Port = 'Port' in params ? params.Port : null;
this.Type = 'Type' in params ? params.Type : null;
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.Weight = 'Weight' in params ? params.Weight : null;
this.EniIp = 'EniIp' in params ? params.EniIp : null;
}
}
/**
* Modify the data type of a node weight
* @class
*/
class RsWeightRule extends AbstractModel {
constructor(){
super();
/**
* CLB listener ID.
* @type {string || null}
*/
this.ListenerId = null;
/**
* List of real servers for which weights are to be modified.
* @type {Array.<Target> || null}
*/
this.Targets = null;
/**
* Forwarding rule ID, which is required only for Layer-7 rules but not for Layer-4 rules.
* @type {string || null}
*/
this.LocationId = null;
/**
* Domain name of the target rule. This parameter will not take effect when LocationId parameter is provided.
* @type {string || null}
*/
this.Domain = null;
/**
* URL of the target rule. This parameter will not take effect when the LocationId parameter is provided.
* @type {string || null}
*/
this.Url = null;
/**
* The forwarding weight of the backend service after modification, value ranges from 0 to 100. This parameter has a lower priority than the Weight parameter in the Target (https://www.tencentcloud.com/document/api/214/30694?from_cn_redirect=1#Target). The final weight value is determined by the Weight parameter in the Target, and only when the Weight parameter in the Target is empty, the Weight parameter in the RsWeightRule takes effect.
* @type {number || null}
*/
this.Weight = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.ListenerId = 'ListenerId' in params ? params.ListenerId : null;
if (params.Targets) {
this.Targets = new Array();
for (let z in params.Targets) {
let obj = new Target();
obj.deserialize(params.Targets[z]);
this.Targets.push(obj);
}
}
this.LocationId = 'LocationId' in params ? params.LocationId : null;
this.Domain = 'Domain' in params ? params.Domain : null;
this.Url = 'Url' in params ? params.Url : null;
this.Weight = 'Weight' in params ? params.Weight : null;
}
}
/**
* DescribeCustomizedConfigList response structure.
* @class
*/
class DescribeCustomizedConfigListResponse extends AbstractModel {
constructor(){
super();
/**
* Configuration list
* @type {Array.<ConfigListItem> || null}
*/
this.ConfigList = null;
/**
* Number of configurations
* @type {number || null}
*/
this.TotalCount = 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.ConfigList) {
this.ConfigList = new Array();
for (let z in params.ConfigList) {
let obj = new ConfigListItem();
obj.deserialize(params.ConfigList[z]);
this.ConfigList.push(obj);
}
}
this.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Certificate ID and the list of CLB instances associated with the certificate ID
* @class
*/
class CertIdRelatedWithLoadBalancers extends AbstractModel {
constructor(){
super();
/**
* Certificate ID
* @type {string || null}
*/
this.CertId = null;
/**
* List of CLB instances associated with the certificate
* @type {Array.<LoadBalancer> || null}
*/
this.LoadBalancers = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.CertId = 'CertId' in params ? params.CertId : null;
if (params.LoadBalancers) {
this.LoadBalancers = new Array();
for (let z in params.LoadBalancers) {
let obj = new LoadBalancer();
obj.deserialize(params.LoadBalancers[z]);
this.LoadBalancers.push(obj);
}
}
}
}
/**
* Health check status of a forwarding rule
* @class
*/
class RuleHealth extends AbstractModel {
constructor(){
super();
/**
* Forwarding rule ID.
* @type {string || null}
*/
this.LocationId = null;
/**
* Domain name of the forwarding rule
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Domain = null;
/**
* URL of the forwarding rule
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Url = null;
/**
* Advanced routing rule ID
* @type {string || null}
*/
this.RuleId = null;
/**
* Health check status of the backend service bound to this rule
* @type {Array.<TargetHealth> || 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;
this.RuleId = 'RuleId' in params ? params.RuleId : null;
if (params.Targets) {
this.Targets = new Array();
for (let z in params.Targets) {
let obj = new TargetHealth();
obj.deserialize(params.Targets[z]);
this.Targets.push(obj);
}
}
}
}
/**
* CLB tag information
* @class
*/
class TagInfo extends AbstractModel {
constructor(){
super();
/**
* Tag key
* @type {string || null}
*/
this.TagKey = null;
/**
* Tag value
* @type {string || null}
*/
this.T