tencentcloud-sdk-nodejs-intl-en
Version:
1,028 lines (876 loc) • 397 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");
/**
* DisableAutoScalingGroup response structure.
* @class
*/
class DisableAutoScalingGroupResponse 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;
}
}
/**
* ModifyLaunchConfigurationAttributes request structure.
* @class
*/
class ModifyLaunchConfigurationAttributesRequest extends AbstractModel {
constructor(){
super();
/**
* Launch configuration ID. obtain the launch configuration ID by logging in to the [console](https://console.cloud.tencent.com/autoscaling/config) or calling the api [DescribeLaunchConfigurations](https://intl.cloud.tencent.com/document/api/377/20445?from_cn_redirect=1) and retrieving the LaunchConfigurationId from the return information.
* @type {string || null}
*/
this.LaunchConfigurationId = null;
/**
* [Image](https://intl.cloud.tencent.com/document/product/213/4940?from_cn_redirect=1) ID in the format of `img-xxx`. There are three types of images: <br/><li>Public images </li><li>Custom images </li><li>Shared images </li><br/>You can obtain the image IDs in the [CVM console](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE).</li><li>You can also use the [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1) and look for `ImageId` in the response.</li>
* @type {string || null}
*/
this.ImageId = null;
/**
* Types of cvm instances. different instance models specify different resource specifications. supports up to 10 instance models.
The launch configuration uses `InstanceType` to indicate one single instance type and `InstanceTypes` to indicate multiple instance types. specifying the `InstanceTypes` field will invalidate the original `InstanceType`. specific values can be obtained by calling the api [DescribeZoneInstanceConfigInfos](https://www.tencentcloud.com/document/product/213/33254) to obtain the latest specification table or refer to [instance specifications](https://intl.cloud.tencent.com/document/product/213/11518?from_cn_redirect=1).
* @type {Array.<string> || null}
*/
this.InstanceTypes = null;
/**
* InstanceType verification policy, which is effective when actual modification is made to InstanceTypes. Valid values include ALL and ANY and the default value is ANY.
<li>ALL: Verification passes if all InstanceTypes are available; otherwise, a verification error will be reported.</li>
<li>ANY: Verification passes if any InstanceType is available; otherwise, a verification error will be reported.</li>
Common reasons for unavailable InstanceTypes include the InstanceType being sold out, and the corresponding cloud disk being sold out.
If a model in InstanceTypes does not exist or has been abolished, a verification error will be reported regardless of the valid values set for InstanceTypesCheckPolicy.
* @type {string || null}
*/
this.InstanceTypesCheckPolicy = null;
/**
* Display name of the launch configuration, which can contain Chinese characters, letters, numbers, underscores, separators ("-"), and decimal points with a maximum length of 60 bytes.
* @type {string || null}
*/
this.LaunchConfigurationName = null;
/**
* Base64-encoded custom data of up to 16 KB. If you want to clear `UserData`, set it to an empty string.
* @type {string || null}
*/
this.UserData = null;
/**
* Security group to which the instance belongs. This parameter can be obtained from the `SecurityGroupId` field in the response of the [`DescribeSecurityGroups`](https://intl.cloud.tencent.com/document/api/215/15808?from_cn_redirect=1) API.
At least one security group is required for this parameter. The security group specified is sequential.
* @type {Array.<string> || null}
*/
this.SecurityGroupIds = null;
/**
* Information of the public network bandwidth configuration.
When the public outbound network bandwidth is 0 Mbps, assigning a public IP is not allowed. Accordingly, if a public IP is assigned, the new public network outbound bandwidth must be greater than 0 Mbps.
* @type {InternetAccessible || null}
*/
this.InternetAccessible = null;
/**
* Instance billing mode. Valid values:
<li>POSTPAID_BY_HOUR: pay-as-you-go hourly</li>
<li>SPOTPAID: spot instance</li>
<li> CDCPAID: dedicated cluster</li>
* @type {string || null}
*/
this.InstanceChargeType = null;
/**
* Parameter setting for the prepaid mode (monthly subscription mode). This parameter can specify the renewal period, whether to set the auto-renewal, and other attributes of the monthly-subscribed instances.
This parameter is required when changing the instance billing mode to monthly subscription. It will be automatically discarded after you choose another billing mode.
This field requires passing in the `Period` field. Other fields that are not passed in will use their default values.
This field can be modified only when the current billing mode is monthly subscription.
* @type {InstanceChargePrepaid || null}
*/
this.InstanceChargePrepaid = null;
/**
* Market-related options for instances, such as parameters related to spot instances.
This parameter is required when changing the instance billing mode to spot instance. It will be automatically discarded after you choose another instance billing mode.
This field requires passing in the `MaxPrice` field under the `SpotOptions`. Other fields that are not passed in will use their default values.
This field can be modified only when the current billing mode is spot instance.
* @type {InstanceMarketOptionsRequest || null}
*/
this.InstanceMarketOptions = null;
/**
* Cloud disk type selection policy. Valid values:
<li>ORIGINAL: Use the set cloud disk type.</li>
<li>AUTOMATIC: Automatically select the currently available cloud disk type.</li>
* @type {string || null}
*/
this.DiskTypePolicy = null;
/**
* Instance system disk configurations
* @type {SystemDisk || null}
*/
this.SystemDisk = null;
/**
* Configuration information of instance data disks.
Up to 11 data disks can be specified and will be collectively modified. Please provide all the new values for the modification.
The default data disk should be the same as the system disk.
* @type {Array.<DataDisk> || null}
*/
this.DataDisks = null;
/**
* Specifies the related settings for the cloud virtual machine HostName (HostName).
windows instances do not support setting hostname.
When adding new attributes, the cloud virtual machine hostname must be transmitted. other fields not transmitted will be set as default.
Validates whether the host name (with suffix added if it exists) exceeds the maximum of 46 characters.
* @type {HostNameSettings || null}
*/
this.HostNameSettings = null;
/**
* Specifies the related settings of the cloud virtual machine (cvm) instance name.
If the user sets this field in the launch configuration, the instance name of the instance created by the scaling group will be set according to this field and passed to CVM. if the user does not set this field in the launch configuration, the instance name of the instance created by the scaling group will be set as "as-{{ scaling group AutoScalingGroupName }}" and passed to CVM.
Specifies the instance name of the cloud virtual machine when adding this attribute. other fields not transmitted will be set as default.
Verifies whether the instance name (add the suffix if it exists) exceeds the maximum of 108 characters.
* @type {InstanceNameSettings || null}
*/
this.InstanceNameSettings = null;
/**
* Specifies whether to enable additional services, such as security services and monitoring service.
* @type {EnhancedService || null}
*/
this.EnhancedService = null;
/**
* Role name of the CAM role. can be obtained from roleName in the return value from the [DescribeRoleList API](https://intl.cloud.tencent.com/document/product/598/36223?from_cn_redirect=1).
* @type {string || null}
*/
this.CamRoleName = null;
/**
* High-Performance computing cluster ID. See [Tencent Cloud HPC Documentation](https://www.tencentcloud.com/zh/document/product/1236) for more details.
Note: this field is empty by default.
* @type {string || null}
*/
this.HpcClusterId = null;
/**
* IPv6 public network bandwidth configuration. If the IPv6 address is available in the new instance, public network bandwidth can be allocated to the IPv6 address. This parameter is invalid if `Ipv6AddressCount` of the scaling group associated with the launch configuration is 0.
* @type {IPv6InternetAccessible || null}
*/
this.IPv6InternetAccessible = null;
/**
* Placement group id. only one can be specified. obtain through the API [DescribeDisasterRecoverGroups](https://intl.cloud.tencent.com/document/product/213/17810?from_cn_redirect=1).
* @type {Array.<string> || null}
*/
this.DisasterRecoverGroupIds = null;
/**
* Instance login settings, which include passwords, keys, or the original login settings inherited from the image. <br>Please note that specifying new login settings will overwrite the existing ones. For instance, if you previously used a password for login and then use this parameter to switch the login settings to a key, the original password will be removed.
* @type {LoginSettings || null}
*/
this.LoginSettings = null;
/**
* Instance tag list. By specifying this parameter, the instances added through scale-out can be bound to the tag. Up to 10 Tags can be specified.
This parameter will overwrite the original instance tag list. To add new tags, you need to pass the new tags along with the original tags.
* @type {Array.<InstanceTag> || null}
*/
this.InstanceTags = null;
/**
* Image family name. this parameter can be obtained by calling the [DescribeImages](https://intl.cloud.tencent.com/document/product/213/15715?from_cn_redirect=1) api.
* @type {string || null}
*/
this.ImageFamily = null;
/**
* Cloud Dedicated Cluster (CDC) ID.
* @type {string || null}
*/
this.DedicatedClusterId = null;
/**
* Custom metadata.
* @type {Metadata || null}
*/
this.Metadata = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.LaunchConfigurationId = 'LaunchConfigurationId' in params ? params.LaunchConfigurationId : null;
this.ImageId = 'ImageId' in params ? params.ImageId : null;
this.InstanceTypes = 'InstanceTypes' in params ? params.InstanceTypes : null;
this.InstanceTypesCheckPolicy = 'InstanceTypesCheckPolicy' in params ? params.InstanceTypesCheckPolicy : null;
this.LaunchConfigurationName = 'LaunchConfigurationName' in params ? params.LaunchConfigurationName : null;
this.UserData = 'UserData' in params ? params.UserData : null;
this.SecurityGroupIds = 'SecurityGroupIds' in params ? params.SecurityGroupIds : null;
if (params.InternetAccessible) {
let obj = new InternetAccessible();
obj.deserialize(params.InternetAccessible)
this.InternetAccessible = obj;
}
this.InstanceChargeType = 'InstanceChargeType' in params ? params.InstanceChargeType : null;
if (params.InstanceChargePrepaid) {
let obj = new InstanceChargePrepaid();
obj.deserialize(params.InstanceChargePrepaid)
this.InstanceChargePrepaid = obj;
}
if (params.InstanceMarketOptions) {
let obj = new InstanceMarketOptionsRequest();
obj.deserialize(params.InstanceMarketOptions)
this.InstanceMarketOptions = obj;
}
this.DiskTypePolicy = 'DiskTypePolicy' in params ? params.DiskTypePolicy : null;
if (params.SystemDisk) {
let obj = new SystemDisk();
obj.deserialize(params.SystemDisk)
this.SystemDisk = obj;
}
if (params.DataDisks) {
this.DataDisks = new Array();
for (let z in params.DataDisks) {
let obj = new DataDisk();
obj.deserialize(params.DataDisks[z]);
this.DataDisks.push(obj);
}
}
if (params.HostNameSettings) {
let obj = new HostNameSettings();
obj.deserialize(params.HostNameSettings)
this.HostNameSettings = obj;
}
if (params.InstanceNameSettings) {
let obj = new InstanceNameSettings();
obj.deserialize(params.InstanceNameSettings)
this.InstanceNameSettings = obj;
}
if (params.EnhancedService) {
let obj = new EnhancedService();
obj.deserialize(params.EnhancedService)
this.EnhancedService = obj;
}
this.CamRoleName = 'CamRoleName' in params ? params.CamRoleName : null;
this.HpcClusterId = 'HpcClusterId' in params ? params.HpcClusterId : null;
if (params.IPv6InternetAccessible) {
let obj = new IPv6InternetAccessible();
obj.deserialize(params.IPv6InternetAccessible)
this.IPv6InternetAccessible = obj;
}
this.DisasterRecoverGroupIds = 'DisasterRecoverGroupIds' in params ? params.DisasterRecoverGroupIds : null;
if (params.LoginSettings) {
let obj = new LoginSettings();
obj.deserialize(params.LoginSettings)
this.LoginSettings = obj;
}
if (params.InstanceTags) {
this.InstanceTags = new Array();
for (let z in params.InstanceTags) {
let obj = new InstanceTag();
obj.deserialize(params.InstanceTags[z]);
this.InstanceTags.push(obj);
}
}
this.ImageFamily = 'ImageFamily' in params ? params.ImageFamily : null;
this.DedicatedClusterId = 'DedicatedClusterId' in params ? params.DedicatedClusterId : null;
if (params.Metadata) {
let obj = new Metadata();
obj.deserialize(params.Metadata)
this.Metadata = obj;
}
}
}
/**
* DisableAutoScalingGroup request structure.
* @class
*/
class DisableAutoScalingGroupRequest extends AbstractModel {
constructor(){
super();
/**
* Scaling group ID. obtain the scaling group ID by logging in to the [console](https://console.cloud.tencent.com/autoscaling/group) or calling the api [DescribeAutoScalingGroups](https://intl.cloud.tencent.com/document/api/377/20438?from_cn_redirect=1), and retrieve AutoScalingGroupId from the returned information.
* @type {string || null}
*/
this.AutoScalingGroupId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.AutoScalingGroupId = 'AutoScalingGroupId' in params ? params.AutoScalingGroupId : null;
}
}
/**
* DescribeRefreshActivities response structure.
* @class
*/
class DescribeRefreshActivitiesResponse extends AbstractModel {
constructor(){
super();
/**
* Number of refresh activities that meet the conditions.
* @type {number || null}
*/
this.TotalCount = null;
/**
* A collection of information about refresh activities that meet the conditions.
* @type {Array.<RefreshActivity> || null}
*/
this.RefreshActivitySet = 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.RefreshActivitySet) {
this.RefreshActivitySet = new Array();
for (let z in params.RefreshActivitySet) {
let obj = new RefreshActivity();
obj.deserialize(params.RefreshActivitySet[z]);
this.RefreshActivitySet.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ModifyAutoScalingGroup request structure.
* @class
*/
class ModifyAutoScalingGroupRequest extends AbstractModel {
constructor(){
super();
/**
* <p>Scaling group ID. obtain available scaling group ids in the following ways:</p>
<li>query scaling group ids by logging in to the [console](https://console.cloud.tencent.com/autoscaling/group).</li>
<li>obtain scaling group ids by calling the [DescribeAutoScalingGroups](https://www.tencentcloud.com/document/api/377/20438?from_cn_redirect=1) api and retrieving AutoScalingGroupId from the returned information.</li>
* @type {string || null}
*/
this.AutoScalingGroupId = null;
/**
* <p>The scaling group name must be unique in your account. name only supports chinese, english, digits, underscore, separator "-", and decimal point. the maximum length cannot exceed 55 bytes.</p>.
* @type {string || null}
*/
this.AutoScalingGroupName = null;
/**
* <P>Default cooldown in seconds, value ranges from 0 to 3600, default value is 300.</p>.
* @type {number || null}
*/
this.DefaultCooldown = null;
/**
* <P>Expected number of instances. value range [0,2000]. to meet the maximum value equal to or greater than the expected value, and the expected value equal to or greater than the minimum value.</p>.
* @type {number || null}
*/
this.DesiredCapacity = null;
/**
* <p>Launch configuration ID. obtain available launch configuration ids in the following ways:</p>
<li>query the launch configuration ID by logging in to the [console](https://console.cloud.tencent.com/autoscaling/config).</li>
<li>obtain the launch configuration ID by calling the [DescribeLaunchConfigurations](https://www.tencentcloud.com/document/api/377/20445?from_cn_redirect=1) api and retrieving the LaunchConfigurationId from the returned information.</li>
* @type {string || null}
*/
this.LaunchConfigurationId = null;
/**
* <P>Maximum number of instances. value range: [0,2000]. to meet the requirement, the maximum value must be equal to or greater than the expected value, and the expected value must be equal to or greater than the minimum value.</p>.
* @type {number || null}
*/
this.MaxSize = null;
/**
* <P>Minimum number of instances. value range: [0,2000]. to meet the requirement, the maximum value must be equal to or greater than the expected value, and the expected value must be equal to or greater than the minimum value.</p>.
* @type {number || null}
*/
this.MinSize = null;
/**
* <p>Project ID. obtain this parameter by calling the `ProjectId` field in the return value of [DescribeProject](https://www.tencentcloud.com/document/api/651/78725?from_cn_redirect=1). Default value is 0, indicating usage of the default project.</p>.
* @type {number || null}
*/
this.ProjectId = null;
/**
* subnet ID list. valid vpc subnet ids can be obtained by logging in to the [console](https://console.cloud.tencent.com/vpc/subnet) for querying. you can also call the API [DescribeSubnets](https://www.tencentcloud.com/document/product/215/15784?from_cn_redirect=1) and retrieve them from the SubnetId field in the API response.
* @type {Array.<string> || null}
*/
this.SubnetIds = null;
/**
* <p>Termination policy, whose maximum length is currently 1. valid values: OLDEST_INSTANCE and NEWEST_INSTANCE.</p><li> OLDEST_INSTANCE terminates the OLDEST INSTANCE in the scaling group first.</li><li> NEWEST_INSTANCE terminates the NEWEST INSTANCE in the scaling group first.</li>.
* @type {Array.<string> || null}
*/
this.TerminationPolicies = null;
/**
* vpc ID. when modifying the vpc, you need to change the SubnetIds parameter to the subnet of this vpc. effective VpcId can be queried by logging in to the [console](https://console.cloud.tencent.com/vpc/vpc); you can also call the [DescribeVpc](https://www.tencentcloud.com/document/api/215/15778?from_cn_redirect=1) api and get the VpcId field from the api response.
* @type {string || null}
*/
this.VpcId = null;
/**
* <P>AZ list</p>.
* @type {Array.<string> || null}
*/
this.Zones = null;
/**
* <p>RETRY policy, whose valid values include IMMEDIATE_RETRY, INCREMENTAL_INTERVALS, and NO_RETRY, with the default value being IMMEDIATE_RETRY. a partially successful scaling operation is considered a failed activity.</p><li>IMMEDIATE_RETRY: RETRY immediately, attempting retries in rapid succession over a short period, and cease further retries after a certain number of consecutive failures (5 times).</li><li>INCREMENTAL_INTERVALS: INCREMENTAL interval RETRY, with the RETRY interval gradually increasing as the number of consecutive failures rises, ranging from seconds to 1 day.</li><li>NO_RETRY: NO RETRY until a user call or Alarm information is received again.</li>.
* @type {string || null}
*/
this.RetryPolicy = null;
/**
* <p>Availability Zone validation policy. valid values include ALL and ANY. default value: ANY. it is effective when scaling group actual change resource-related fields (launch configuration, az, subnet) are modified.</p><li> ALL: verification passes if ALL azs (Zone) or subnets (SubnetId) are available. otherwise, a verification error will be reported.</li><li> ANY: verification passes if ANY AZ (Zone) or subnet (SubnetId) is available. otherwise, a verification error will be reported.</li><p>common causes for unavailable azs or subnets include CVM instancetype sold out in the az, CBS cloud disk sold out in the az, insufficient quota in the az, or insufficient IP addresses in the subnet.</p><p>if Zones/SubnetIds contain nonexistent azs or subnets, a verification error will be reported regardless of the values of ZonesCheckPolicy.</p>.
* @type {string || null}
*/
this.ZonesCheckPolicy = null;
/**
* <P>Service settings, including cloud monitoring and unhealthy instance replacement.</p>.
* @type {ServiceSettings || null}
*/
this.ServiceSettings = null;
/**
* <p>The instance has a configuration for the number of IPv6 addresses. valid values include 0 and 1. the default value is 0, which means the instance does not allocate an IPv6 address. you need to use a VPC that supports IPv6 and enable IPv6 CIDR in the subnet.</p>
* @type {number || null}
*/
this.Ipv6AddressCount = null;
/**
* <p>The multi-az/subnet policy, with values including PRIORITY and EQUALITY, defaults to PRIORITY.</p><li> PRIORITY: attempt to create instances taking the order of the az/subnet list as the PRIORITY. if instances can be successfully created in the az/subnet with the highest PRIORITY, they will always be created there.</li> <li> EQUALITY: instances added through scale-out will be distributed across multiple azs/subnets to ensure A relatively balanced number of instances in each az/subnet after expansion.</li> <p>points to consider:</p><li> when the scaling group is based on A classic network, this policy applies to multi-az. when the scaling group is based on A VPC network, this policy applies to multi-subnet, no longer considering AZ factors. for example, with four subnets labeled A, B, c, and D, where A, B, and c are in availability zone 1 and D is in availability zone 2, consider subnets A, B, c, and D for sorting, without considering availability zones 1 and 2.</li> <li> this policy applies to multi-az/subnet but is not applicable to the instancetypes parameter of the launch configuration. selection of multiple models is according to PRIORITY policy.</li> <li> when creating instances according to the PRIORITY policy, ensure the policy for multiple models first, then the policy for multi-az/subnet. for example, with multiple models A and B, and multiple subnets 1, 2, and 3, attempts will be made in the order A1, A2, A3, B1, B2, B3. if A1 is sold out, A2 will be attempted (not B1).</li>.
* @type {string || null}
*/
this.MultiZoneSubnetPolicy = null;
/**
* <p>Scaling group instance health check type, values are as follows:</p><li>CVM: determine whether an instance is unhealthy based on its network status. an unhealthy network status refers to an event where instances become unreachable via PING. for detailed criteria of judgment, refer to [instance health check](https://www.tencentcloud.com/document/product/377/8553?from_cn_redirect=1).</li><li>CLB: determine whether an instance is unhealthy based on the health check status of CLB. for the principle of CLB health check, see [health check](https://www.tencentcloud.com/document/product/214/6097?from_cn_redirect=1).</li>.
* @type {string || null}
*/
this.HealthCheckType = null;
/**
* <p>Specifies the CLB health check grace period in seconds.</p><p>value range: [0, 7200].</p><p>default value: 0.</p>
* @type {number || null}
*/
this.LoadBalancerHealthCheckGracePeriod = null;
/**
* <p>Instance allocation policy. valid values include LAUNCH_CONFIGURATION and SPOT_MIXED.</p><li> LAUNCH_CONFIGURATION represents the traditional startup CONFIGURATION mode.</li><li> SPOT_MIXED represents the SPOT hybrid mode. currently only support hybrid mode when the LAUNCH CONFIGURATION uses pay-as-you-go billing mode. in hybrid mode, the scaling group will scale out based on the SPOT model. the billing type of the associated LAUNCH CONFIGURATION cannot be modified when using hybrid mode.</li>.
* @type {string || null}
*/
this.InstanceAllocationPolicy = null;
/**
* <p>Allocation policy of instances for each billing type in SPOT hybrid mode.<br>available only when InstanceAllocationPolicy is set to SPOT_MIXED.</p>.
* @type {SpotMixedAllocationPolicy || null}
*/
this.SpotMixedAllocationPolicy = null;
/**
* <p>The capacity rebalancing feature is only applicable to spot instances within the scaling group. valid values:</p><li> TRUE: enable this feature. when spot instances within the scaling group are about to be automatically recycled by the spot instance service, AS initiates the termination process of spot instances. if a scale-in hook is configured, trigger before termination. after the termination process starts, AS asynchronously initiates scale-out to reach the expected number of instances.</li> <li> FALSE: disable this feature. AS waits for the spot instance to be terminated before scaling out to reach the number of instances expected by the scaling group.</li>.
* @type {boolean || null}
*/
this.CapacityRebalance = null;
/**
* <P>Instance name sequencing settings. once enabled, append incremental numeric sequence to the names of instances automatically created within the scaling group.</p>.
* @type {InstanceNameIndexSettings || null}
*/
this.InstanceNameIndexSettings = null;
/**
* <P>Instance hostname sequencing settings. once enabled, append incremental numeric sequence to the hostname of instances automatically created within the scaling group.</p>.
* @type {HostNameIndexSettings || null}
*/
this.HostNameIndexSettings = null;
/**
* <p>The concurrent scaling up functionality for matching expected numbers cannot be set when InstanceAllocationPolicy is in spot hybrid mode or when ScalingMode is in the scaling-prioritized startup mode. currently only two matching expected number scale-out activities are supported to run concurrently. other types of activities such as specified quantity scale-out or scale-in cannot be specified. set to FALSE indicates disabled.</p>.
* @type {boolean || null}
*/
this.ConcurrentScaleOutForDesiredCapacity = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.AutoScalingGroupId = 'AutoScalingGroupId' in params ? params.AutoScalingGroupId : null;
this.AutoScalingGroupName = 'AutoScalingGroupName' in params ? params.AutoScalingGroupName : null;
this.DefaultCooldown = 'DefaultCooldown' in params ? params.DefaultCooldown : null;
this.DesiredCapacity = 'DesiredCapacity' in params ? params.DesiredCapacity : null;
this.LaunchConfigurationId = 'LaunchConfigurationId' in params ? params.LaunchConfigurationId : null;
this.MaxSize = 'MaxSize' in params ? params.MaxSize : null;
this.MinSize = 'MinSize' in params ? params.MinSize : null;
this.ProjectId = 'ProjectId' in params ? params.ProjectId : null;
this.SubnetIds = 'SubnetIds' in params ? params.SubnetIds : null;
this.TerminationPolicies = 'TerminationPolicies' in params ? params.TerminationPolicies : null;
this.VpcId = 'VpcId' in params ? params.VpcId : null;
this.Zones = 'Zones' in params ? params.Zones : null;
this.RetryPolicy = 'RetryPolicy' in params ? params.RetryPolicy : null;
this.ZonesCheckPolicy = 'ZonesCheckPolicy' in params ? params.ZonesCheckPolicy : null;
if (params.ServiceSettings) {
let obj = new ServiceSettings();
obj.deserialize(params.ServiceSettings)
this.ServiceSettings = obj;
}
this.Ipv6AddressCount = 'Ipv6AddressCount' in params ? params.Ipv6AddressCount : null;
this.MultiZoneSubnetPolicy = 'MultiZoneSubnetPolicy' in params ? params.MultiZoneSubnetPolicy : null;
this.HealthCheckType = 'HealthCheckType' in params ? params.HealthCheckType : null;
this.LoadBalancerHealthCheckGracePeriod = 'LoadBalancerHealthCheckGracePeriod' in params ? params.LoadBalancerHealthCheckGracePeriod : null;
this.InstanceAllocationPolicy = 'InstanceAllocationPolicy' in params ? params.InstanceAllocationPolicy : null;
if (params.SpotMixedAllocationPolicy) {
let obj = new SpotMixedAllocationPolicy();
obj.deserialize(params.SpotMixedAllocationPolicy)
this.SpotMixedAllocationPolicy = obj;
}
this.CapacityRebalance = 'CapacityRebalance' in params ? params.CapacityRebalance : null;
if (params.InstanceNameIndexSettings) {
let obj = new InstanceNameIndexSettings();
obj.deserialize(params.InstanceNameIndexSettings)
this.InstanceNameIndexSettings = obj;
}
if (params.HostNameIndexSettings) {
let obj = new HostNameIndexSettings();
obj.deserialize(params.HostNameIndexSettings)
this.HostNameIndexSettings = obj;
}
this.ConcurrentScaleOutForDesiredCapacity = 'ConcurrentScaleOutForDesiredCapacity' in params ? params.ConcurrentScaleOutForDesiredCapacity : null;
}
}
/**
* ScaleOutInstances request structure.
* @class
*/
class ScaleOutInstancesRequest extends AbstractModel {
constructor(){
super();
/**
* Scaling group ID. obtain available scaling group ids in the following ways:.
<li>Specifies the scaling group ID by logging in to the [console](https://console.cloud.tencent.com/autoscaling/group).</li>.
<li>Obtain the scaling group ID by calling the api [DescribeAutoScalingGroups](https://www.tencentcloud.com/document/api/377/20438?from_cn_redirect=1) and retrieving the AutoScalingGroupId from the returned information.</li>.
* @type {string || null}
*/
this.AutoScalingGroupId = null;
/**
* Number of resource instances to scale out. the static value range of this parameter is [1,2000]. this parameter must not be larger than the difference between the expected number and the maximum value. for example, if the expected number of the scaling group is 20 and the maximum value is 100, the valid values are [1,80].
* @type {number || null}
*/
this.ScaleOutNumber = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.AutoScalingGroupId = 'AutoScalingGroupId' in params ? params.AutoScalingGroupId : null;
this.ScaleOutNumber = 'ScaleOutNumber' in params ? params.ScaleOutNumber : null;
}
}
/**
* AS event notification
* @class
*/
class AutoScalingNotification extends AbstractModel {
constructor(){
super();
/**
* Auto scaling group ID.
* @type {string || null}
*/
this.AutoScalingGroupId = null;
/**
* List of user group IDs.
* @type {Array.<string> || null}
*/
this.NotificationUserGroupIds = null;
/**
* Notification event list. valid values are as follows:.
<Li>SCALE_OUT_SUCCESSFUL: scale-out succeeded</li>.
<Li>SCALE_OUT_FAILED: scale-out failed</li>.
<Li>SCALE_IN_SUCCESSFUL: scale-in succeeded</li>.
<Li>SCALE_IN_FAILED: scale-in failed</li>.
<Li>REPLACE_UNHEALTHY_INSTANCE_SUCCESSFUL: unhealthy instance replacement succeeded</li>.
<Li>REPLACE_UNHEALTHY_INSTANCE_FAILED: unhealthy instance replacement failed</li>.
* @type {Array.<string> || null}
*/
this.NotificationTypes = null;
/**
* Event notification ID.
* @type {string || null}
*/
this.AutoScalingNotificationId = null;
/**
* Notification receiver type. valid values:.
USER_GROUP: specifies the user group.
TDMQ_CMQ_TOPIC: tdmq for cmq topic.
TDMQ_CMQ_QUEUE: specifies the tdmq cmq queue.
`CMQ_QUEUE`: cmq queue. [cmq API offline](https://intl.cloud.tencent.com/document/product/1496/83970?from_cn_redirect=1). unable to select.
CMQ_TOPIC: cmq topic. [cmq API offline](https://intl.cloud.tencent.com/document/product/1496/83970?from_cn_redirect=1), unable to select.
* @type {string || null}
*/
this.TargetType = null;
/**
* TDMQ CMQ queue name.
* @type {string || null}
*/
this.QueueName = null;
/**
* TDMQ CMQ topic name.
* @type {string || null}
*/
this.TopicName = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.AutoScalingGroupId = 'AutoScalingGroupId' in params ? params.AutoScalingGroupId : null;
this.NotificationUserGroupIds = 'NotificationUserGroupIds' in params ? params.NotificationUserGroupIds : null;
this.NotificationTypes = 'NotificationTypes' in params ? params.NotificationTypes : null;
this.AutoScalingNotificationId = 'AutoScalingNotificationId' in params ? params.AutoScalingNotificationId : null;
this.TargetType = 'TargetType' in params ? params.TargetType : null;
this.QueueName = 'QueueName' in params ? params.QueueName : null;
this.TopicName = 'TopicName' in params ? params.TopicName : null;
}
}
/**
* ModifyScheduledAction request structure.
* @class
*/
class ModifyScheduledActionRequest extends AbstractModel {
constructor(){
super();
/**
* Scheduled task ID that needs modification. obtain the scheduled task ID by calling the api [DescribeScheduledActions](https://intl.cloud.tencent.com/document/api/377/20450?from_cn_redirect=1) and retrieving the ScheduledActionId from the returned information.
* @type {string || null}
*/
this.ScheduledActionId = null;
/**
* Scheduled task name, which can only contain letters, numbers, underscores, hyphens ("-"), and decimal points with a maximum length of 60 bytes and must be unique in an auto scaling group.
* @type {string || null}
*/
this.ScheduledActionName = null;
/**
* The maximum number of instances set for the auto scaling group when the scheduled task is triggered.
* @type {number || null}
*/
this.MaxSize = null;
/**
* The minimum number of instances set for the auto scaling group when the scheduled task is triggered.
* @type {number || null}
*/
this.MinSize = null;
/**
* The desired number of instances set for the auto scaling group when the scheduled task is triggered.
* @type {number || null}
*/
this.DesiredCapacity = null;
/**
* Initial triggered time of the scheduled task. The value is in `Beijing time` (UTC+8) in the format of `YYYY-MM-DDThh:mm:ss+08:00` according to the `ISO8601` standard.
* @type {string || null}
*/
this.StartTime = null;
/**
* End time of the scheduled task. The value is in `Beijing time` (UTC+8) in the format of `YYYY-MM-DDThh:mm:ss+08:00` according to the `ISO8601` standard. <br>This parameter and `Recurrence` need to be specified at the same time. After the end time, the scheduled task will no longer take effect.
* @type {string || null}
*/
this.EndTime = null;
/**
* The repeating mode of the scheduled task. follows the standard Cron format. The [Recurrence parameter limits](https://intl.cloud.tencent.com/document/product/377/88119?from_cn_redirect=1) consist of 5 fields separated by space, with the structure: minute, hr, date, month, week. this parameter must be simultaneously specified with `EndTime`.
* @type {string || null}
*/
this.Recurrence = null;
/**
* This flag disables the normal update of the DesiredCapacityproperty that would otherwise occur when a scheduled scaling task is triggered.
Specifies whether the scheduled task triggers proactive modification of the DesiredCapacity when the value is True. DesiredCapacity may be modified by the minSize and maxSize mechanism.
The following cases assume that DisableUpdateDesiredCapacity is True:
- When scheduled task triggered, the original DesiredCapacity is 5. The scheduled task changes the minSize to 10, the maxSize to 20, and the DesiredCapacity to 15. Since the DesiredCapacity update is disabled, 15 does not take effect. However, the original DesiredCapacity 5 is less than minSize 10, so the final new DesiredCapacity is 10.
- When scheduled task triggered, the original DesiredCapacity is 25. The scheduled task changes the minSize to 10 and the maxSize to 20, and the DesiredCapacity to 15. Since the DesiredCapacity update is disabled, 15 does not take effect. However, the original DesiredCapacity 25 is greater than the maxSize 20, so the final new DesiredCapacity is 20.
- When scheduled task triggered, the original DesiredCapacity is 13. The scheduled task changes the minSize to 10 and the maxSize to 20, and the DesiredCapacity to 15. Since the DesiredCapacity update is disabled, 15 does not take effect, and the DesiredCapacity is still 13.
* @type {boolean || null}
*/
this.DisableUpdateDesiredCapacity = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.ScheduledActionId = 'ScheduledActionId' in params ? params.ScheduledActionId : null;
this.ScheduledActionName = 'ScheduledActionName' in params ? params.ScheduledActionName : null;
this.MaxSize = 'MaxSize' in params ? params.MaxSize : null;
this.MinSize = 'MinSize' in params ? params.MinSize : null;
this.DesiredCapacity = 'DesiredCapacity' in params ? params.DesiredCapacity : null;
this.StartTime = 'StartTime' in params ? params.StartTime : null;
this.EndTime = 'EndTime' in params ? params.EndTime : null;
this.Recurrence = 'Recurrence' in params ? params.Recurrence : null;
this.DisableUpdateDesiredCapacity = 'DisableUpdateDesiredCapacity' in params ? params.DisableUpdateDesiredCapacity : null;
}
}
/**
* DescribeAutoScalingGroups request structure.
* @class
*/
class DescribeAutoScalingGroupsRequest extends AbstractModel {
constructor(){
super();
/**
* Queries by one or more auto scaling group IDs in the format of `asg-nkdwoui0`. The maximum quantity per request is 100. This parameter does not support specifying both `AutoScalingGroupIds` and `Filters` at the same time.
* @type {Array.<string> || null}
*/
this.AutoScalingGroupIds = null;
/**
* Filter criteria
<li> auto-scaling-group-id - String - required: no - (filter) filter by auto scaling group id.</li>.
Specifies the scaling group ID obtained by logging in to the [console](https://console.cloud.tencent.com/autoscaling/group) or calling the api [DescribeAutoScalingGroups](https://intl.cloud.tencent.com/document/api/377/20438?from_cn_redirect=1) and retrieving the AutoScalingGroupId from the return information.
<li> auto-scaling-group-name - String - required: no - (filter) filter by auto scaling group name.</li>.
<li> vague-auto-scaling-group-name - String - required: no - (filter) filter by scaling group name fuzzy search.</li>.
<li>launch-configuration-id - String - required: no - (filter condition) filter by launch configuration id. you can obtain the launch configuration id by logging in to the [console](https://console.cloud.tencent.com/autoscaling/config) or calling the api [DescribeLaunchConfigurations](https://intl.cloud.tencent.com/document/api/377/20445?from_cn_redirect=1) and retrieving the LaunchConfigurationId from the returned information.</li>.
<li> `tag-key` - String - optional - filter by the tag key. you can call the API [GetTags](https://intl.cloud.tencent.com/document/product/651/72275?from_cn_redirect=1) to obtain the tag key from the returned information.</li>.
<li>tag-value - String - required: no - (filter condition) filter by tag value. you can obtain the tag value by calling the API [GetTags](https://intl.cloud.tencent.com/document/product/651/72275?from_cn_redirect=1) and retrieving the TagValue from the returned information.</li>.
<li>tag:tag-key - String - required: no - (filter condition) filter by tag key-value pair. replace tag-key with a specific tag key. see example 2 for reference. call the API [GetTags](https://intl.cloud.tencent.com/document/product/651/72275?from_cn_redirect=1) to obtain the TagKey from the returned information.</li>.
The maximum number of `Filters` per request is 10, and that of `Filter.Values` is 5. the `AutoScalingGroupIds` and `Filters` parameters cannot be specified simultaneously.
* @type {Array.<Filter> || null}
*/
this.Filters = null;
/**
* Number of returned results. Default value: 20. Maximum value: 100. For more information on `Limit`, see the relevant section in the API [overview](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1).
* @type {number || null}
*/
this.Limit = null;
/**
* Offset. Default value: 0. For more information on `Offset`, see the relevant section in the API [overview](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1).
* @type {number || null}
*/
this.Offset = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.AutoScalingGroupIds = 'AutoScalingGroupIds' in params ? params.AutoScalingGroupIds : 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.Limit = 'Limit' in params ? params.Limit : null;
this.Offset = 'Offset' in params ? params.Offset : null;
}
}
/**
* Information set of eligible launch configurations.
* @class
*/
class LaunchConfiguration extends AbstractModel {
constructor(){
super();
/**
* Project ID of the instance.
* @type {number || null}
*/
this.ProjectId = null;
/**
* Launch configuration ID
* @type {string || null}
*/
this.LaunchConfigurationId = null;
/**
* Launch configuration name.
* @type {string || null}
*/
this.LaunchConfigurationName = null;
/**
* Instance model.
* @type {string || null}
*/
this.InstanceType = null;
/**
* Information of the instance's system disk configuration.
* @type {SystemDisk || null}
*/
this.SystemDisk = null;
/**
* Information of the instance's data disk configuration.
* @type {Array.<DataDisk> || null}
*/
this.DataDisks = null;
/**
* Instance login settings.
* @type {LimitedLoginSettings || null}
*/
this.LoginSettings = null;
/**
* Information of the public network bandwidth configuration.
* @type {InternetAccessible || null}
*/
this.InternetAccessible = null;
/**
* Security group of the instance.
* @type {Array.<string> || null}
*/
this.SecurityGroupIds = null;
/**
* Auto scaling group associated with the launch configuration.
* @type {Array.<AutoScalingGroupAbstract> || null}
*/
this.AutoScalingGroupAbstractSet = null;
/**
* Custom data.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.UserData = null;
/**
* Specifies the startup configuration creation time. uses UTC standard time.
* @type {string || null}
*/
this.CreatedTime = null;
/**
* Conditions of enhancement services for the instance and their settings.
* @type {EnhancedService || null}
*/
this.EnhancedService = null;
/**
* Image ID.
* @type {string || null}
*/
this.ImageId = null;
/**
* Current status of the launch configuration. Valid values: <li>NORMAL: Normal.</li> <li>IMAGE_ABNORMAL: Image exception in the launch configuration.</li> <li>CBS_SNAP_ABNORMAL: Exception with data disk snapshot in the launch configuration.</li> <li>SECURITY_GROUP_ABNORMAL: Security group exception in the launch configuration.</li>
* @type {string || null}
*/
this.LaunchConfigurationStatus = null;
/**
* Instance billing type. valid values:.
<Li>POSTPAID_BY_HOUR: pay-as-you-go hourly</li>.
<Li>SPOTPAID: spot payment</li>.
<Li>PREPAID: prepaid, i.e., monthly subscription</li>.
<Li>CDCPAID: dedicated cluster payment</li>.
* @type {string || null}
*/
this.InstanceChargeType = null;
/**
* Market options of the instance, such as parameters related to spot instances. This parameter is required for spot instances.
Note: This field may return null, indica