// This file is auto-generated, don't edit it import * as $dara from '@darabonba/typescript'; export class CreateLaunchTemplateVersionRequestSystemDisk extends $dara.Model { /** * @remarks * The ID of the automatic snapshot policy to apply to the system disk. * * @example * sp-bp1dgzpaxwc4load**** */ autoSnapshotPolicyId?: string; /** * @remarks * Specifies whether to enable the performance burst feature. Valid values: * * * true: encrypts the disk. * * false: does not enable the performance burst feature. * * @example * true */ burstingEnabled?: boolean; /** * @remarks * The category of the system disk. Valid values: * * * cloud: basic disk. * * cloud_efficiency: ultra disk. * * cloud_ssd: standard SSD. * * cloud_auto: Enterprise SSD (ESSD) AutoPL disk. * * cloud_essd: ESSD. You can use `SystemDisk.PerformanceLevel` to set the performance level of the ESSD to use as the system disk. * * cloud_essd_entry: ESSD Entry disk. * * For non-I/O optimized instances of retired instance types, the default value is cloud. For other types of instances, the default value is cloud_efficiency. * * @example * cloud_ssd */ category?: string; /** * @remarks * Specifies whether to release the system disk when the instance is released. Valid values: * * * true * * false * * Default value: true. * * @example * true */ deleteWithInstance?: boolean; /** * @remarks * The description of the system disk. The description must be 2 to 256 characters in length and cannot start with `http://` or `https://`. * * @example * testSystemDiskDescription */ description?: string; /** * @remarks * The name of the system disk. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with `http://` or `https://`. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-). * * @example * cloud_ssdSystem */ diskName?: string; /** * @remarks * Specifies whether to encrypt the system disk. Valid values: * * * true * * false * * Default value: false * * > You cannot encrypt system disks when you create instances in Hong Kong Zone D or Singapore Zone A. * * @example * false */ encrypted?: string; /** * @remarks * > This parameter is not publicly available. * * @example * 30000 */ iops?: number; /** * @remarks * The ID of the KMS key to use for the system disk. * * @example * 0e478b7a-4262-4802-b8cb-00d3fb40**** */ KMSKeyId?: string; /** * @remarks * The performance level of the ESSD to be used as the system disk. Default value: PL0. Valid values: * * * PL0: A single ESSD can deliver up to 10,000 random read/write IOPS. * * PL1: A single ESSD can deliver up to 50,000 random read/write IOPS. * * PL2: A single ESSD can deliver up to 100,000 random read/write IOPS. * * PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS. * * For more information about ESSD performance levels, see [ESSDs](https://help.aliyun.com/document_detail/122389.html). * * @example * PL0 */ performanceLevel?: string; /** * @remarks * The provisioned read/write IOPS of the ESSD AutoPL disk to use as data disk N. Valid values: 0 to min{50,000, 1,000 × Capacity - Baseline IOPS} * * Baseline IOPS = min{1,800 + 50 × Capacity, 50,000} * * > This parameter is available only if you set the Category parameter to cloud_auto. For more information, see [ESSD AutoPL disks](https://help.aliyun.com/document_detail/368372.html) and [Modify the performance configurations of an ESSD AutoPL disk](https://help.aliyun.com/document_detail/413275.html). * * @example * 50000 */ provisionedIops?: number; /** * @remarks * The size of the system disk. Unit: GiB. Valid values: * * * Valid values if you set SystemDisk.Category to cloud: 20 to 500. * * Valid values if you set SystemDisk.Category to other disk categories: 20 to 2048. * * The value of this parameter must be at least 20 and greater than or equal to the size of the image. * * @example * 40 */ size?: number; static names(): { [key: string]: string } { return { autoSnapshotPolicyId: 'AutoSnapshotPolicyId', burstingEnabled: 'BurstingEnabled', category: 'Category', deleteWithInstance: 'DeleteWithInstance', description: 'Description', diskName: 'DiskName', encrypted: 'Encrypted', iops: 'Iops', KMSKeyId: 'KMSKeyId', performanceLevel: 'PerformanceLevel', provisionedIops: 'ProvisionedIops', size: 'Size', }; } static types(): { [key: string]: any } { return { autoSnapshotPolicyId: 'string', burstingEnabled: 'boolean', category: 'string', deleteWithInstance: 'boolean', description: 'string', diskName: 'string', encrypted: 'string', iops: 'number', KMSKeyId: 'string', performanceLevel: 'string', provisionedIops: 'number', size: 'number', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateLaunchTemplateVersionRequestDataDisk extends $dara.Model { /** * @remarks * The ID of the automatic snapshot policy to apply to data disk N. * * @example * sp-bp67acfmxazb4p**** */ autoSnapshotPolicyId?: string; /** * @remarks * Specifies whether to enable the performance burst feature for the system disk. Valid values: * * * true * * false * * @example * true */ burstingEnabled?: boolean; /** * @remarks * The category of data disk N. Valid values: * * * cloud: basic disk * * cloud_efficiency: utra disk * * cloud_ssd: standard SSD * * cloud_auto: ESSD AutoPL disk * * cloud_essd: ESSD * * cloud_essd_entry: ESSD Entry disk * * For I/O optimized instances, the default value is cloud_efficiency. For non-I/O optimized instances, the default value is cloud. * * @example * cloud_ssd */ category?: string; /** * @remarks * Specifies whether to release data disk N when the associated instance is released. Valid values: * * * true * * false * * Default value: true. * * @example * true */ deleteWithInstance?: boolean; /** * @remarks * The description of data disk N. The description must be 2 to 256 characters in length and cannot start with `http://` or `https://`. * * @example * testDataDiskDescription */ description?: string; /** * @remarks * The mount point of data disk N. The mount points are named based on the number of data disks: * * * 1st to 25th data disks: /dev/xvd`[b-z]`. * * From the 26th data disk on: /dev/xvd`[aa-zz]`. For example, the 26th data disk is named /dev/xvdaa, the 27th data disk is named /dev/xvdab, and so on. * * > This parameter is applicable to scenarios in which a full image is used to create instances. A full image is an image that contains an operating system, application software, and business data. For these scenarios, you can set the parameter to the mount point of data disk N contained in the full image and modify `DataDisk.N.Size` and `DataDisk.N.Category` to change the category and size of data disk N created based on the image. * * @example * null */ device?: string; /** * @remarks * The name of data disk N. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with `http://` or `https://`. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-). * * @example * testDataDiskName */ diskName?: string; /** * @remarks * Specifies whether to encrypt data disk N. * * @example * false */ encrypted?: string; /** * @remarks * The ID of the KMS key used for the data disk. * * @example * 0e478b7a-4262-4802-b8cb-00d**** */ KMSKeyId?: string; /** * @remarks * The performance level of the ESSD to use as data disk N. The value of N must be the same as that in `DataDisk.N.Category` when DataDisk.N.Category is set to cloud_essd. Valid values: * * * PL0: A single ESSD can deliver up to 10000 random read/write IOPS. * * PL1 (default): A single ESSD can deliver up to 50000 random read/write IOPS. * * PL2: A single ESSD can deliver up to 100000 random read/write IOPS. * * PL3: A single ESSD can deliver up to 1000000 random read/write IOPS. * * For information about ESSD performance levels, see [ESSDs](https://help.aliyun.com/document_detail/122389.html). * * @example * PL1 */ performanceLevel?: string; /** * @remarks * The provisioned read/write IOPS of the ESSD AutoPL disk. Valid values: 0 to min{50,000, 1,000 × Capacity - Baseline IOPS}. * * Baseline IOPS = min{1,800 + 50 × Capacity, 50,000}. * * > This parameter is available only if you set DiskCategory to cloud_auto. For more information, see [ESSD AutoPL disks](https://help.aliyun.com/document_detail/368372.html) and [Modify the performance configurations of an ESSD AutoPL disk](https://help.aliyun.com/document_detail/413275.html). * * @example * 50000 */ provisionedIops?: number; /** * @remarks * The size of data disk N. Valid values of N: 1 to 16. Unit: GiB. Valid values: * * * Valid values if DataDisk.N.Category is set to cloud: 5 to 2000. * * * Valid values if DataDisk.N.Category is set to cloud_efficiency: 20 to 32768. * * * Valid values when DataDisk.N.Category is set to cloud_ssd: 20 to 32768. * * * Valid values if you set DataDisk.N.Category to cloud_essd: vary based on the `DataDisk.N.PerformanceLevel` value. * * * Valid values if you set DataDisk.N.PerformanceLevel to PL0: 1 to 32768. * * Valid values if you set DataDisk.N.PerformanceLevel to PL1: 20 to 32768. * * Valid values if you set DataDisk.N.PerformanceLevel to PL2: 461 to 32768. * * Valid values if you set DataDisk.N.PerformanceLevel to PL3: 1261 to 32768. * * * Valid values if you set DataDisk.N.Category to cloud_auto: 1 to 32768. * * * Valid values if you set DataDisk.N.Category to cloud_essd_entry: 10 to 32768. * * The value of this parameter must be greater than or equal to the size of the snapshot specified by `SnapshotId`. * * @example * 2000 */ size?: number; /** * @remarks * The ID of the snapshot to use to create data disk N. Valid values of N: 1 to 16. When `DataDisk.N.SnapshotId` is specified, `DataDisk.N.Size` is ignored. The data disk is created with the size of the specified snapshot. * * Use snapshots created on or after July 15, 2013. Otherwise, an error is returned and your request is rejected. * * @example * s-bp17441ohwka0yuh**** */ snapshotId?: string; static names(): { [key: string]: string } { return { autoSnapshotPolicyId: 'AutoSnapshotPolicyId', burstingEnabled: 'BurstingEnabled', category: 'Category', deleteWithInstance: 'DeleteWithInstance', description: 'Description', device: 'Device', diskName: 'DiskName', encrypted: 'Encrypted', KMSKeyId: 'KMSKeyId', performanceLevel: 'PerformanceLevel', provisionedIops: 'ProvisionedIops', size: 'Size', snapshotId: 'SnapshotId', }; } static types(): { [key: string]: any } { return { autoSnapshotPolicyId: 'string', burstingEnabled: 'boolean', category: 'string', deleteWithInstance: 'boolean', description: 'string', device: 'string', diskName: 'string', encrypted: 'string', KMSKeyId: 'string', performanceLevel: 'string', provisionedIops: 'number', size: 'number', snapshotId: 'string', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateLaunchTemplateVersionRequestImageOptions extends $dara.Model { /** * @remarks * Specifies whether the instance that uses the image supports logons of the ecs-user user. Valid values: * * * true * * false * * @example * false */ loginAsNonRoot?: boolean; static names(): { [key: string]: string } { return { loginAsNonRoot: 'LoginAsNonRoot', }; } static types(): { [key: string]: any } { return { loginAsNonRoot: 'boolean', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateLaunchTemplateVersionRequestNetworkInterface extends $dara.Model { /** * @remarks * Specifies whether to release ENI N when the instance is released. Valid values: * * * true * * false * * Default value: true. * * > This parameter takes effect only for secondary ENIs. * * @example * true */ deleteOnRelease?: boolean; /** * @remarks * The description of the secondary ENI. The description must be 2 to 256 characters in length and cannot start with `http://` or `https://`. The value of N in `NetworkInterface.N` cannot be greater than 1. * * @example * testNetworkInterfaceDescription */ description?: string; /** * @remarks * The type of ENI N. Valid values of N: 1 and 2. If the value of N is 1, you can configure a primary or secondary ENI. If the value of N is 2, you must configure a primary ENI and a secondary ENI. * * Valid values: * * * Primary * * Secondary * * Default value: Secondary. * * @example * ecs.g5.large */ instanceType?: string; /** * @remarks * The name of the secondary ENI. The value of N in `NetworkInterface.N` cannot be greater than 1. * * @example * testNetworkInterfaceName */ networkInterfaceName?: string; /** * @remarks * The communication mode of the primary ENI. Valid values: * * * Standard: uses the TCP communication mode. * * HighPerformance: uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled. * * @example * Standard */ networkInterfaceTrafficMode?: string; /** * @remarks * The primary private IP address of the secondary ENI. The value of N in `NetworkInterface.N` cannot be greater than 1. * * @example * ``192.168.**.**`` */ primaryIpAddress?: string; /** * @remarks * The ID of the security group to which to assign the secondary ENI. The security groups of the secondary ENI and of the instance must belong to the same VPC. The value of N in `NetworkInterface.N` cannot be greater than 1. * * > You cannot specify both `NetworkInterface.N.SecurityGroupId` and `NetworkInterface.N.SecurityGroupIds.N`. * * @example * sg-bp15ed6xe1yxeycg**** */ securityGroupId?: string; /** * @remarks * The IDs of the security groups to which to assign the secondary ENI. The security groups and the secondary ENI must reside in the same VPC. The valid values of N in `SecurityGroupIds.N` vary based on the maximum number of security groups to which a secondary ENI can belong. For more information, see the "Security group limits" section in [Limits](https://help.aliyun.com/document_detail/25412.html). The value of N in `NetworkInterface.N` cannot be greater than 1. * * > You cannot specify both `NetworkInterface.N.SecurityGroupId` and `NetworkInterface.N.SecurityGroupIds.N`. * * @example * sg-bp67acfmxazb4p**** */ securityGroupIds?: string[]; /** * @remarks * The ID of the vSwitch to which to connect the secondary ENI. The instance and the secondary ENI must reside in the same zone of the same VPC, but they can be connected to different vSwitches. The value of N in `NetworkInterface.N` cannot be greater than 1. * * @example * vsw-bp1s5fnvk4gn2tws0**** */ vSwitchId?: string; static names(): { [key: string]: string } { return { deleteOnRelease: 'DeleteOnRelease', description: 'Description', instanceType: 'InstanceType', networkInterfaceName: 'NetworkInterfaceName', networkInterfaceTrafficMode: 'NetworkInterfaceTrafficMode', primaryIpAddress: 'PrimaryIpAddress', securityGroupId: 'SecurityGroupId', securityGroupIds: 'SecurityGroupIds', vSwitchId: 'VSwitchId', }; } static types(): { [key: string]: any } { return { deleteOnRelease: 'boolean', description: 'string', instanceType: 'string', networkInterfaceName: 'string', networkInterfaceTrafficMode: 'string', primaryIpAddress: 'string', securityGroupId: 'string', securityGroupIds: { 'type': 'array', 'itemType': 'string' }, vSwitchId: 'string', }; } validate() { if(Array.isArray(this.securityGroupIds)) { $dara.Model.validateArray(this.securityGroupIds); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateLaunchTemplateVersionRequestSecurityOptions extends $dara.Model { trustedSystemMode?: string; static names(): { [key: string]: string } { return { trustedSystemMode: 'TrustedSystemMode', }; } static types(): { [key: string]: any } { return { trustedSystemMode: 'string', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateLaunchTemplateVersionRequestTag extends $dara.Model { /** * @remarks * The key of tag N to add to the ECS instance, disks, and primary ENI created based on the launch template version. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key can be up to 128 characters in length and cannot contain http:// or https://. The tag key cannot start with acs: or aliyun. * * @example * TestKey */ key?: string; /** * @remarks * The value of tag N to add to the ECS instance, disks, and primary ENI created based on the launch template version. Valid values of N: 1 to 20. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot contain http:// or https://. * * @example * TestValue */ value?: string; static names(): { [key: string]: string } { return { key: 'Key', value: 'Value', }; } static types(): { [key: string]: any } { return { key: 'string', value: 'string', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateLaunchTemplateVersionRequest extends $dara.Model { systemDisk?: CreateLaunchTemplateVersionRequestSystemDisk; /** * @remarks * The automatic release time of the instance. Specify the time in the [ISO 8601](https://help.aliyun.com/document_detail/25696.html) standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. * * * If the value of `ss` is not `00`, the time is automatically rounded down to the nearest minute based on the value of `mm`. * * The specified time must be at least 30 minutes later than the current time. * * The specified time can be at most three years later than the current time. * * @example * 2018-01-01T12:05:00Z */ autoReleaseTime?: string; /** * @remarks * Specifies whether to enable auto-renewal for the instance. This parameter is valid only if `InstanceChargeType` is set to `PrePaid`. Valid values: * * * true * * false * * Default value: false. * * @example * true */ autoRenew?: boolean; /** * @remarks * The auto-renewal period of the instance. Valid values: * * Valid values when PeriodUnit is set to Month: 1, 2, 3, 6, 12, 24, 36, 48, and 60. * * Default value: 1. * * @example * 1 */ autoRenewPeriod?: number; /** * @remarks * The performance mode of the burstable instance. Valid values: * * * Standard: the standard mode. For more information, see the "Standard mode" section in [Overview of burstable instances](https://help.aliyun.com/document_detail/59977.html). * * Unlimited: the unlimited mode. For more information, see the "Unlimited mode" section in [Overview of burstable instances](https://help.aliyun.com/document_detail/59977.html). * * @example * Standard */ creditSpecification?: string; /** * @remarks * The information about the data disks. */ dataDisk?: CreateLaunchTemplateVersionRequestDataDisk[]; /** * @remarks * Specifies whether to enable release protection for the instance. This parameter specifies whether you can use the ECS console or call the [DeleteInstance](https://help.aliyun.com/document_detail/25507.html) operation to release the instance. Valid values: * * * true * * false * * Default value: false. * * > This parameter is applicable only to pay-as-you-go instances. The release protection feature can protect instances against manual releases, but not against automatic releases. * * @example * false */ deletionProtection?: boolean; /** * @remarks * The ID of the deployment set to which to deploy the instance. * * @example * ds-bp1brhwhoqinyjd6**** */ deploymentSetId?: string; /** * @remarks * The description of the instance. The description must be 2 to 256 characters in length and cannot start with `http://` or `https://`. * * @example * testDescription */ description?: string; /** * @remarks * Specifies whether to enable the operating system configuration of the instance. * * @example * false */ enableVmOsConfig?: boolean; /** * @remarks * The hostname of the instance. * * * The hostname cannot start or end with a period (.) or hyphen (-). It cannot contain consecutive periods (.) or hyphens (-). * * For Windows instances, the hostname must be 2 to 15 characters in length and cannot contain periods (.) or contain only digits. It can contain letters, digits, and hyphens (-). * * For instances that run other operating systems such as Linux, the hostname must be 2 to 64 characters in length. You can use periods (.) to separate the hostname into multiple segments. Each segment can contain letters, digits, and hyphens (-). * * @example * testHostName */ hostName?: string; /** * @remarks * Specifies whether to enable the access channel for instance metadata. Valid values: * * * enabled * * disabled * * Default value: enabled. * * > For information about instance metadata, see [Obtain information about an ECS instance, such as instance attributes inside ECS instances from instance metadata service](https://help.aliyun.com/document_detail/108460.html). * * @example * enabled */ httpEndpoint?: string; /** * @remarks * > This parameter is not publicly available. * * @example * 3 */ httpPutResponseHopLimit?: number; /** * @remarks * Specifies whether to forcefully use the security hardening mode (IMDSv2) to access instance metadata. Valid values: * * * optional: does not forcefully use the security hardening mode (IMDSv2). * * required: forcefully uses the security hardening mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode. * * Default value: optional. * * > For information about the modes of accessing instance metadata, see [Obtain information about an ECS instance, such as instance attributes inside ECS instances from instance metadata service](https://help.aliyun.com/document_detail/108460.html). * * @example * optional */ httpTokens?: string; /** * @remarks * The ID of the image to use to create the Elastic Compute Service (ECS) instance. You can call the [DescribeImages](https://help.aliyun.com/document_detail/25534.html) operation to query available images. * * @example * win2008r2_64_ent_sp1_en-us_40G_alibase_20170915.vhd */ imageId?: string; /** * @remarks * Details about the image options. */ imageOptions?: CreateLaunchTemplateVersionRequestImageOptions; /** * @remarks * The source of the image. * * > This parameter will be removed in the future. We recommend that you use other parameters to ensure future compatibility. * * @example * system */ imageOwnerAlias?: string; /** * @remarks * The billing method of the instance. Valid values: * * * PrePaid: subscription. If you set this parameter to PrePaid, make sure that your account has sufficient credits. Otherwise, an `InvalidPayMethod` error is returned. * * PostPaid: pay-as-you-go * * @example * PrePaid */ instanceChargeType?: string; /** * @remarks * The instance name. The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-). The default value of this parameter is the `InstanceId` value. * * When you create multiple ECS instances at a time, you can batch configure sequential names for the instances. The instance names can contain square brackets ([]) and commas (,). For more information, see [Batch configure sequential names or hostnames for multiple instances](https://help.aliyun.com/document_detail/196048.html). * * @example * k8s-node-[1,4]-alibabacloud */ instanceName?: string; /** * @remarks * The instance type. For more information, see [Overview of instance families](https://help.aliyun.com/document_detail/25378.html). You can also call the [DescribeInstanceTypes](https://help.aliyun.com/document_detail/25620.html) operation to query the most recent list of instance types. * * @example * ecs.g5.large */ instanceType?: string; /** * @remarks * The billing method for network usage. Default value: PayByTraffic. Valid values: * * * PayByBandwidth: pay-by-bandwidth * * PayByTraffic: pay-by-traffic * * > When the **pay-by-traffic** billing method for network usage is used, the maximum inbound and outbound bandwidths are used as the upper limits of bandwidths instead of guaranteed performance specifications. In scenarios where demand outstrips resource supplies, these maximum bandwidth values may not be reached. If you want guaranteed bandwidths for your instance, use the **pay-by-bandwidth** billing method for network usage. * * @example * PayByTraffic */ internetChargeType?: string; /** * @remarks * The maximum inbound public bandwidth. Unit: Mbit/s. Valid values: * * * When the purchased outbound public bandwidth is less than or equal to 10 Mbit/s, the valid values of this parameter are 1 to 10 and the default value is 10. * * If the purchased outbound public bandwidth is greater than 10 Mbit/s, the valid values of this parameter range from 1 to the `InternetMaxBandwidthOut` value and the default value is the `InternetMaxBandwidthOut` value. * * @example * 50 */ internetMaxBandwidthIn?: number; /** * @remarks * The maximum outbound public bandwidth. Unit: Mbit/s. Valid values: 0 to 100. * * @example * 5 */ internetMaxBandwidthOut?: number; /** * @remarks * Specifies whether to create an I/O optimized instance. Valid values: * * * none: The instance is not I/O optimized. * * optimized: creates an I/O optimized instance. * * @example * optimized */ ioOptimized?: string; /** * @remarks * The number of IPv6 addresses to randomly generate for the primary elastic network interface (ENI). Valid values: 1 to 10. * * @example * 1 */ ipv6AddressCount?: number; /** * @remarks * The name of the key pair to bind to the instance. * * * For Windows instances, this parameter is ignored The `Password` parameter is valid even if the KeyPairName parameter is specified. * * For Linux instances, the password-based logon method is disabled by default. * * @example * testKeyPairName */ keyPairName?: string; /** * @remarks * The ID of the launch template. For more information, call the [DescribeLaunchTemplates](https://help.aliyun.com/document_detail/73759.html) operation. You must specify `LaunchTemplateId` or `LaunchTemplateName` to specify a launch template. * * @example * lt-m5eiaupmvm2op9d**** */ launchTemplateId?: string; /** * @remarks * The name of the launch template. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with `http://` or `https://`. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-). * * @example * testLaunchTemplateName */ launchTemplateName?: string; /** * @remarks * The information of the elastic network interfaces (ENIs). */ networkInterface?: CreateLaunchTemplateVersionRequestNetworkInterface[]; /** * @remarks * The network type of the instance. Valid values: * * * classic: classic network * * vpc: VPC * * @example * vpc */ networkType?: string; ownerAccount?: string; ownerId?: number; /** * @remarks * Specifies whether to use the password that is preconfigured in the image. Valid values: * * * true * * false * * Default value: false. * * > If you specify PasswordInherit, you must leave Password empty and make sure that a password is preconfigured for the image. * * @example * false */ passwordInherit?: boolean; /** * @remarks * The subscription period of the instance. Unit: months. This parameter is valid and required only when `InstanceChargeType` is set to `PrePaid`. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60. * * @example * 1 */ period?: number; /** * @remarks * The unit of the subscription period. Valid values: * * Month (default) * * @example * Month */ periodUnit?: string; /** * @remarks * The private IP address to assign to the instance. * * To assign a private IP address to an instance of the VPC type, make sure that the IP address is an idle IP address within the CIDR block of the vSwitch specified by the `VSwitchId` parameter. * * @example * ``10.1.**.**`` */ privateIpAddress?: string; /** * @remarks * The name of the instance Resource Access Management (RAM) role. You can call the [ListRoles](https://help.aliyun.com/document_detail/28713.html) operation provided by RAM to query the instance RAM roles that you created. * * @example * testRamRoleName */ ramRoleName?: string; /** * @remarks * The region ID of the command. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation to query the most recent list of regions. * * This parameter is required. * * @example * cn-hangzhou */ regionId?: string; /** * @remarks * The ID of the resource group to which to assign the instance. * * @example * rg-bp67acfmxazb4p**** */ resourceGroupId?: string; resourceOwnerAccount?: string; resourceOwnerId?: number; /** * @remarks * Specifies whether to enable security hardening for the operating system. Valid values: * * * Active: Security hardening is enabled. This value is applicable only to public images. * * Deactive: Security hardening is disabled. This value is available to all types of images. * * @example * Active */ securityEnhancementStrategy?: string; /** * @remarks * The ID of the security group to which to assign the ECS instance created based on the launch template version. Instances in the same security group can access each other. * * > You cannot specify `SecurityGroupId` and `SecurityGroupIds.N` in the same request. * * @example * sg-bp15ed6xe1yxeycg**** */ securityGroupId?: string; /** * @remarks * The ID of security group N to which to assign the instance. The valid values of N depend on the maximum number of security groups to which the instance can belong. For more information, see [Quantity limits](https://help.aliyun.com/document_detail/25412.html). * * > The `SecurityGroupId` parameter and the `SecurityGroupIds.N` parameter are mutually exclusive. * * @example * sg-bp15ed6xe1yxeycg7**** */ securityGroupIds?: string[]; securityOptions?: CreateLaunchTemplateVersionRequestSecurityOptions; /** * @remarks * The protection period of the spot instance. Unit: hours. Default value: 1. Valid values: * * * 1: After a spot instance is created, Alibaba Cloud ensures that the instance is not automatically released within 1 hour. After the 1-hour protection period ends, the system compares the bid price with the market price and checks the resource inventory to determine whether to retain or release the instance. * * 0: After a spot instance is created, Alibaba Cloud does not ensure that the instance runs for 1 hour. The system compares the bid price with the market price and checks the resource inventory to determine whether to retain or release the instance. * * Alibaba Cloud sends an ECS system event to notify you 5 minutes before the instance is released. Spot instances are billed by second. We recommend that you specify a protection period based on your business requirements. * * > This parameter takes effect only if SpotStrategy is set to SpotWithPriceLimit or SpotAsPriceGo. * * @example * 1 */ spotDuration?: number; /** * @remarks * The maximum hourly price of the spot instance. A maximum of three decimal places are allowed. * * @example * 0.97 */ spotPriceLimit?: number; /** * @remarks * The preemption policy for the pay-as-you-go instance. This parameter is valid only when the `InstanceChargeType` parameter is set to `PostPaid`. Default value: NoSpot. Valid values: * * * NoSpot: The instance is created as a pay-as-you-go instance. * * SpotWithPriceLimit: The instances of the compute node are spot instances. These types of instances have a specified maximum hourly price. * * SpotAsPriceGo: The instance is created as a spot instance for which the market price at the time of purchase is automatically used as the bid price. * * @example * NoSpot */ spotStrategy?: string; /** * @remarks * The tags to add to the ECS instance, disks, and primary elastic network interface (ENI) created based on the launch template version. */ tag?: CreateLaunchTemplateVersionRequestTag[]; /** * @remarks * The user data of the instance. The user data must be encoded in Base64. The maximum size of raw data is 32 KB. * * @example * ZWNobyBoZWxsbyBl**** */ userData?: string; /** * @remarks * The ID of the vSwitch to which to connect the instance. This parameter is required if you specify the VpcId parameter. * * @example * vsw-bp1s5fnvk4gn2tws0**** */ vSwitchId?: string; /** * @remarks * The description of the launch template version. The description must be 2 to 256 characters in length and cannot start with `http://` or `https://`. * * @example * testVersionDescription */ versionDescription?: string; /** * @remarks * The ID of the virtual private cloud (VPC) in which to create the ECS instance. * * @example * vpc-bp12433upq1y5scen**** */ vpcId?: string; /** * @remarks * The ID of the zone to which the instance belongs. * * @example * cn-hangzhou-g */ zoneId?: string; static names(): { [key: string]: string } { return { systemDisk: 'SystemDisk', autoReleaseTime: 'AutoReleaseTime', autoRenew: 'AutoRenew', autoRenewPeriod: 'AutoRenewPeriod', creditSpecification: 'CreditSpecification', dataDisk: 'DataDisk', deletionProtection: 'DeletionProtection', deploymentSetId: 'DeploymentSetId', description: 'Description', enableVmOsConfig: 'EnableVmOsConfig', hostName: 'HostName', httpEndpoint: 'HttpEndpoint', httpPutResponseHopLimit: 'HttpPutResponseHopLimit', httpTokens: 'HttpTokens', imageId: 'ImageId', imageOptions: 'ImageOptions', imageOwnerAlias: 'ImageOwnerAlias', instanceChargeType: 'InstanceChargeType', instanceName: 'InstanceName', instanceType: 'InstanceType', internetChargeType: 'InternetChargeType', internetMaxBandwidthIn: 'InternetMaxBandwidthIn', internetMaxBandwidthOut: 'InternetMaxBandwidthOut', ioOptimized: 'IoOptimized', ipv6AddressCount: 'Ipv6AddressCount', keyPairName: 'KeyPairName', launchTemplateId: 'LaunchTemplateId', launchTemplateName: 'LaunchTemplateName', networkInterface: 'NetworkInterface', networkType: 'NetworkType', ownerAccount: 'OwnerAccount', ownerId: 'OwnerId', passwordInherit: 'PasswordInherit', period: 'Period', periodUnit: 'PeriodUnit', privateIpAddress: 'PrivateIpAddress', ramRoleName: 'RamRoleName', regionId: 'RegionId', resourceGroupId: 'ResourceGroupId', resourceOwnerAccount: 'ResourceOwnerAccount', resourceOwnerId: 'ResourceOwnerId', securityEnhancementStrategy: 'SecurityEnhancementStrategy', securityGroupId: 'SecurityGroupId', securityGroupIds: 'SecurityGroupIds', securityOptions: 'SecurityOptions', spotDuration: 'SpotDuration', spotPriceLimit: 'SpotPriceLimit', spotStrategy: 'SpotStrategy', tag: 'Tag', userData: 'UserData', vSwitchId: 'VSwitchId', versionDescription: 'VersionDescription', vpcId: 'VpcId', zoneId: 'ZoneId', }; } static types(): { [key: string]: any } { return { systemDisk: CreateLaunchTemplateVersionRequestSystemDisk, autoReleaseTime: 'string', autoRenew: 'boolean', autoRenewPeriod: 'number', creditSpecification: 'string', dataDisk: { 'type': 'array', 'itemType': CreateLaunchTemplateVersionRequestDataDisk }, deletionProtection: 'boolean', deploymentSetId: 'string', description: 'string', enableVmOsConfig: 'boolean', hostName: 'string', httpEndpoint: 'string', httpPutResponseHopLimit: 'number', httpTokens: 'string', imageId: 'string', imageOptions: CreateLaunchTemplateVersionRequestImageOptions, imageOwnerAlias: 'string', instanceChargeType: 'string', instanceName: 'string', instanceType: 'string', internetChargeType: 'string', internetMaxBandwidthIn: 'number', internetMaxBandwidthOut: 'number', ioOptimized: 'string', ipv6AddressCount: 'number', keyPairName: 'string', launchTemplateId: 'string', launchTemplateName: 'string', networkInterface: { 'type': 'array', 'itemType': CreateLaunchTemplateVersionRequestNetworkInterface }, networkType: 'string', ownerAccount: 'string', ownerId: 'number', passwordInherit: 'boolean', period: 'number', periodUnit: 'string', privateIpAddress: 'string', ramRoleName: 'string', regionId: 'string', resourceGroupId: 'string', resourceOwnerAccount: 'string', resourceOwnerId: 'number', securityEnhancementStrategy: 'string', securityGroupId: 'string', securityGroupIds: { 'type': 'array', 'itemType': 'string' }, securityOptions: CreateLaunchTemplateVersionRequestSecurityOptions, spotDuration: 'number', spotPriceLimit: 'number', spotStrategy: 'string', tag: { 'type': 'array', 'itemType': CreateLaunchTemplateVersionRequestTag }, userData: 'string', vSwitchId: 'string', versionDescription: 'string', vpcId: 'string', zoneId: 'string', }; } validate() { if(this.systemDisk && typeof (this.systemDisk as any).validate === 'function') { (this.systemDisk as any).validate(); } if(Array.isArray(this.dataDisk)) { $dara.Model.validateArray(this.dataDisk); } if(this.imageOptions && typeof (this.imageOptions as any).validate === 'function') { (this.imageOptions as any).validate(); } if(Array.isArray(this.networkInterface)) { $dara.Model.validateArray(this.networkInterface); } if(Array.isArray(this.securityGroupIds)) { $dara.Model.validateArray(this.securityGroupIds); } if(this.securityOptions && typeof (this.securityOptions as any).validate === 'function') { (this.securityOptions as any).validate(); } if(Array.isArray(this.tag)) { $dara.Model.validateArray(this.tag); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } }