// This file is auto-generated, don't edit it import * as $dara from '@darabonba/typescript'; export class CreateLaunchTemplateRequestSystemDisk extends $dara.Model { /** * @remarks * The ID of the automatic snapshot policy to apply to the system disk. * * @example * sp-gc7c37d4ylw7mtnk**** */ 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 the system disk. Valid values: * * * cloud: basic disk. * * cloud_efficiency: ultra disk. * * cloud_ssd: standard SSD. * * cloud_essd: Enterprise SSD (ESSD). You can use `SystemDisk.PerformanceLevel` to set the performance level of the ESSD to use as the system disk. * * cloud_auto: ESSD AutoPL 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 * testSystemDiskName */ diskName?: string; /** * @remarks * Specifies whether to encrypt the system disk. Valid values: * * * true * * false * * Default value: false. * * > If you create an instance in Hong Kong Zone D or Singapore Zone A, you cannot encrypt the system disk. * * @example * false */ encrypted?: string; /** * @remarks * > This parameter is in invitational preview and is unavailable for general users. * * @example * null */ 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 use 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 the system 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 the SystemDisk.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 CreateLaunchTemplateRequestDataDisk extends $dara.Model { /** * @remarks * The ID of the automatic snapshot policy to apply to data disk N. * * @example * sp-m5e7fa9ute44ssa**** */ 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_essd: ESSD * * cloud_auto: ESSD AutoPL disk * * 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 you set DataDisk.N.Category to cloud: 5 to 2000. * * * Valid values if you set DataDisk.N.Category to cloud_efficiency: 20 to 32768. * * * Valid values if you set DataDisk.N.Category to cloud_ssd: 20 to 32768. * * * Valid values if you set DataDisk.N.Category to cloud_essd: vary based on the value of `DataDisk.N.PerformanceLevel`. * * * Valid values if DataDisk.N.PerformanceLevel is set to PL0: 1 to 32768. * * Valid values if DataDisk.N.PerformanceLevel is set to PL1: 20 to 32768. * * Valid values if DataDisk.N.PerformanceLevel is set 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. If you specify `DataDisk.N.SnapshotId`, `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 CreateLaunchTemplateRequestImageOptions 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 CreateLaunchTemplateRequestNetworkInterface 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 * testEniDescription */ 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 ENI N. * * Take note of the following items: * * * 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. * * If you set `NetworkInterface.N.InstanceType` to `Primary`, you do not need to specify this parameter. * * @example * testEniName */ 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 IP address to assign to ENI N. * * Take note of the following items: * * * Valid values of N: 1 and 2. * * * If the value of N is 1, you can configure a primary or secondary ENI. If you specify this parameter, set `Amount` to a numeric value greater than 1, and set NetworkInterface.N.InstanceType to Primary, the specified number of instances are created and consecutive primary IP addresses starting from the specified IP address are assigned to the instances. In this case, you cannot attach secondary ENIs to the instances. * * If the value of N is 2, you must configure a primary ENI and a secondary ENI. If you specify this parameter, set `Amount` to a numeric value greater than 1, and set NetworkInterface.N.InstanceType to Primary, you cannot set `NetworkInterface.2.InstanceType` to Secondary to attach a secondary ENI. * * * If you set `NetworkInterface.N.InstanceType` to `Primary`, this parameter is equivalent to `PrivateIpAddress`. You cannot specify both this parameter and `PrivateIpAddress` in the same request. * * * If you set `NetworkInterface.N.InstanceType` to `Secondary` or leave NetworkInterface.N.InstanceType empty, the specified primary IP address is assigned to the secondary ENI. The default value is an IP address that is randomly selected from within the CIDR block of the vSwitch to which to connect the secondary ENI. * * > You can attach only a single secondary ENI when you create an instance. After the instance is created, you can call the [CreateNetworkInterface](https://help.aliyun.com/document_detail/58504.html) and [AttachNetworkInterface](https://help.aliyun.com/document_detail/58515.html) operations to attach more secondary ENIs. * * @example * ``192.168.**.**`` */ primaryIpAddress?: string; /** * @remarks * The ID of the security group to which to assign ENI N. * * Take note of the following items: * * * 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. * * If you set `NetworkInterface.N.InstanceType` to `Primary`, you must specify this parameter. In this case, this parameter is equivalent to `SecurityGroupId`, and you cannot specify `SecurityGroupId`, `SecurityGroupIds.N`, or `NetworkInterface.N.SecurityGroupIds.N`. * * If you set `NetworkInterface.N.InstanceType` to `Secondary` or leave NetworkInterface.N.InstanceType empty, you do not need to specify this parameter. The default value is the ID of the security group to which to assign the instance. * * @example * sg-bp15ed6xe1yxeycg**** */ securityGroupId?: string; /** * @remarks * The IDs of security groups to which to assign ENI N. * * * Valid values of the first 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. * * The second N in this parameter indicates that one or more security group IDs can be specified. The valid values of N vary based on the maximum number of security groups to which an instance can belong. For more information, see the [Security group limits](~~25412#SecurityGroupQuota1~~) section of the "Limits" topic. * * Take note of the following items: * * * If you set `NetworkInterface.N.InstanceType` to `Primary`, you must specify this parameter or `NetworkInterface.N.SecurityGroupId`. In this case, this parameter is equivalent to `SecurityGroupIds.N`, and you cannot specify `SecurityGroupId`, `SecurityGroupIds.N`, or `NetworkInterface.N.SecurityGroupId`. * * If you set `NetworkInterface.N.InstanceType` to `Secondary` or leave NetworkInterface.N.InstanceType empty, you do not need to specify this parameter. The default value is the ID of the security group to which to assign the instance. * * @example * sg-bp67acfmxazb4p**** */ securityGroupIds?: string[]; /** * @remarks * The ID of the vSwitch to which to connect ENI N. * * Take note of the following items: * * * 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. * * If you set `NetworkInterface.N.InstanceType` to `Primary`, you must specify this parameter. In this case, this parameter is equivalent to `VSwitchId`. You cannot specify both NetworkInterface.N.VSwitchId and `VSwitchId` in the same request. * * If you set `NetworkInterface.N.InstanceType` to `Secondary` or leave NetworkInterface.N.InstanceType empty, you do not need to specify this parameter. The default value is the VSwitchId value. * * @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 CreateLaunchTemplateRequestSecurityOptions 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 CreateLaunchTemplateRequestTag extends $dara.Model { /** * @remarks * The key of tag N to add to the instance, disks, and primary ENI that are created from the launch template. 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 instance, disks, and primary ENI that are created from the launch template. 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 CreateLaunchTemplateRequestTemplateTag extends $dara.Model { /** * @remarks * The key of tag N to add to the launch template. 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 launch template. 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://`. The tag value cannot start with `acs:` or `aliyun`. * * @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 CreateLaunchTemplateRequest extends $dara.Model { systemDisk?: CreateLaunchTemplateRequestSystemDisk; /** * @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. Valid values: * * * true * * false * * Default value: false. * * > This parameter takes effect only if you set `InstanceChargeType` to `PrePaid`. * * @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 data disks. */ dataDisk?: CreateLaunchTemplateRequestDataDisk[]; /** * @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 instance description. The description must be 2 to 256 characters in length and cannot start with `http://` or `https://`. * * @example * testECSDescription */ description?: string; /** * @remarks * Specifies whether to enable the operating system configuration of the instance. * * > This parameter will be removed in the future. To ensure future compatibility, we recommend that you use other parameters. * * @example * false */ enableVmOsConfig?: boolean; /** * @remarks * The instance hostname. * * * 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 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?: CreateLaunchTemplateRequestImageOptions; /** * @remarks * The source of the image. Valid values: * * * system: public image provided by Alibaba Cloud. * * self: custom image that you created. * * others: shared image from another Alibaba Cloud account. * * marketplace:[Alibaba Cloud Marketplace](https://marketplace.alibabacloud.com/) image. If Alibaba Cloud Marketplace images are available, you can use the images without the need to subscribe to the images. Take note of the billing details of Alibaba Cloud Marketplace images. * * @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 of the instance. For more information, see [Instance families](https://help.aliyun.com/document_detail/25378.html). Alternatively, you can call the [DescribeInstanceTypes](https://help.aliyun.com/document_detail/25620.html) operation to query the most recent instance type list. * * @example * ecs.g5.large */ instanceType?: string; /** * @remarks * The billing method for network usage. 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 bandwidths may be limited. 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. * * When the purchased outbound public bandwidth is greater than 10 Mbit/s, the valid values of this parameter are 1 to the `InternetMaxBandwidthOut` value and the default value is the `InternetMaxBandwidthOut` value. * * @example * 10 */ internetMaxBandwidthIn?: number; /** * @remarks * The maximum outbound public bandwidth. Unit: Mbit/s. Valid values: 0 to 100. * * @example * 10 */ internetMaxBandwidthOut?: number; /** * @remarks * Specifies whether to create an I/O optimized instance. Valid values: * * * none: creates a non-I/O optimized instance. * * 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. This parameter is empty by default. * * * For Windows instances, this parameter is ignored The `Password` parameter takes effect 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 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 (-). * * This parameter is required. * * @example * testLaunchTemplateName */ launchTemplateName?: string; /** * @remarks * The information of the ENIs. */ networkInterface?: CreateLaunchTemplateRequestNetworkInterface[]; /** * @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 preset password of the image. * * > If you set the PasswordInherit parameter to true, make sure that you leave the Password parameter empty and the selected image has a preset password. * * @example * false */ passwordInherit?: boolean; /** * @remarks * The subscription duration 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 that resides in a VPC, 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 ID of the region in which to create the launch template. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation to query the most recent region list. * * This parameter is required. * * @example * cn-hangzhou */ regionId?: string; /** * @remarks * The ID of the resource group to which to assign the instance, Elastic Block Storage (EBS) device, and elastic network interface (ENI). * * @example * rg-bp67acfmxazb4p**** */ resourceGroupId?: string; resourceOwnerAccount?: string; resourceOwnerId?: number; /** * @remarks * Specifies whether to enable security hardening for the operating system. Valid values: * * * Active: enables security hardening. This value is applicable only to public images. * * Deactive: does not enable security hardening. This value is applicable to all images. * * @example * Deactive */ securityEnhancementStrategy?: string; /** * @remarks * The ID of the security group to which to assign the instance. Instances in the same security group can communicate with each other. A security group can contain up to 1,000 instances. * * > You cannot specify both the `SecurityGroupId` and `SecurityGroupIds.N` parameters. * * @example * sg-bp15ed6xe1yxeycg**** */ securityGroupId?: string; /** * @remarks * The IDs of the security groups to which to assign the instance. The valid values of N are based on the maximum number of security groups to which the instance can belong. For more information, see the "Security group limits" section in [Limits](https://help.aliyun.com/document_detail/25412.html). * * > You cannot specify both the `SecurityGroupId` and `SecurityGroupIds.N` parameters. * * @example * sg-bp15ed6xe1yxeycg7**** */ securityGroupIds?: string[]; securityOptions?: CreateLaunchTemplateRequestSecurityOptions; /** * @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 instance. The value is accurate to three decimal places. This parameter is valid only when the `SpotStrategy` parameter is set to `SpotWithPriceLimit`. * * @example * 0.97 */ spotPriceLimit?: number; /** * @remarks * The bidding policy for the pay-as-you-go instance. This parameter is valid only when the `InstanceChargeType` parameter is set to `PostPaid`. Valid values: * * * NoSpot: The instance is a regular pay-as-you-go instance. * * SpotWithPriceLimit: The instance is created as a spot instance with a user-defined 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 bidding price. * * @example * NoSpot */ spotStrategy?: string; /** * @remarks * The tags to add to the instance, disks, and primary ENI that are created from the launch template. * * **Scenario** * * If you created a launch template by calling the CreateLaunchTemplate operation and use the default version that is automatically generated for the launch template to create instances, the specified tags are automatically added to the created instances, disks, and primary ENIs. For more information about the default versions of launch templates, see [xxxx]\\(url). */ tag?: CreateLaunchTemplateRequestTag[]; /** * @remarks * The ID of the resource group to which the launch template belongs. * * @example * rg-bp67acfmxazb4p**** */ templateResourceGroupId?: string; /** * @remarks * The tags to add to the launch template. * * > You can add tags to or query the tags of launch templates by calling API operations. You cannot add tags to or query the tags of launch templates in the ECS console. */ templateTag?: CreateLaunchTemplateRequestTemplateTag[]; /** * @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 * ZWNobyBoZWxsbyBlY3Mh */ 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). * * @example * vpc-bp12433upq1y5scen**** */ vpcId?: string; /** * @remarks * The ID of the zone in which to create the instance. * * @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', 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', templateResourceGroupId: 'TemplateResourceGroupId', templateTag: 'TemplateTag', userData: 'UserData', vSwitchId: 'VSwitchId', versionDescription: 'VersionDescription', vpcId: 'VpcId', zoneId: 'ZoneId', }; } static types(): { [key: string]: any } { return { systemDisk: CreateLaunchTemplateRequestSystemDisk, autoReleaseTime: 'string', autoRenew: 'boolean', autoRenewPeriod: 'number', creditSpecification: 'string', dataDisk: { 'type': 'array', 'itemType': CreateLaunchTemplateRequestDataDisk }, deletionProtection: 'boolean', deploymentSetId: 'string', description: 'string', enableVmOsConfig: 'boolean', hostName: 'string', httpEndpoint: 'string', httpPutResponseHopLimit: 'number', httpTokens: 'string', imageId: 'string', imageOptions: CreateLaunchTemplateRequestImageOptions, imageOwnerAlias: 'string', instanceChargeType: 'string', instanceName: 'string', instanceType: 'string', internetChargeType: 'string', internetMaxBandwidthIn: 'number', internetMaxBandwidthOut: 'number', ioOptimized: 'string', ipv6AddressCount: 'number', keyPairName: 'string', launchTemplateName: 'string', networkInterface: { 'type': 'array', 'itemType': CreateLaunchTemplateRequestNetworkInterface }, 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: CreateLaunchTemplateRequestSecurityOptions, spotDuration: 'number', spotPriceLimit: 'number', spotStrategy: 'string', tag: { 'type': 'array', 'itemType': CreateLaunchTemplateRequestTag }, templateResourceGroupId: 'string', templateTag: { 'type': 'array', 'itemType': CreateLaunchTemplateRequestTemplateTag }, 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); } if(Array.isArray(this.templateTag)) { $dara.Model.validateArray(this.templateTag); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } }