// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.AliCloud.Ecs
{
    /// <summary>
    /// Provides a ECS Launch Template resource.
    /// 
    /// For information about ECS Launch Template and how to use it, see [What is Launch Template](https://www.alibabacloud.com/help/en/doc-detail/74686.htm).
    /// 
    /// &gt; **NOTE:** Available in v1.120.0+.
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var @default = new AliCloud.Ecs.EcsLaunchTemplate("default", new()
    ///     {
    ///         DataDisks = new[]
    ///         {
    ///             new AliCloud.Ecs.Inputs.EcsLaunchTemplateDataDiskArgs
    ///             {
    ///                 Category = "cloud",
    ///                 DeleteWithInstance = true,
    ///                 Description = "test1",
    ///                 Encrypted = false,
    ///                 Name = "disk1",
    ///                 PerformanceLevel = "PL0",
    ///                 Size = 20,
    ///             },
    ///             new AliCloud.Ecs.Inputs.EcsLaunchTemplateDataDiskArgs
    ///             {
    ///                 Category = "cloud",
    ///                 DeleteWithInstance = true,
    ///                 Description = "test2",
    ///                 Encrypted = false,
    ///                 Name = "disk2",
    ///                 PerformanceLevel = "PL0",
    ///                 Size = 20,
    ///             },
    ///         },
    ///         Description = "Test For Terraform",
    ///         HostName = "host_name",
    ///         ImageId = "m-bp1i3ucxxxxx",
    ///         InstanceChargeType = "PrePaid",
    ///         InstanceName = "instance_name",
    ///         InstanceType = "instance_type",
    ///         InternetChargeType = "PayByBandwidth",
    ///         InternetMaxBandwidthIn = 5,
    ///         InternetMaxBandwidthOut = 0,
    ///         IoOptimized = "optimized",
    ///         KeyPairName = "key_pair_name",
    ///         LaunchTemplateName = "tf_test_name",
    ///         NetworkInterfaces = new AliCloud.Ecs.Inputs.EcsLaunchTemplateNetworkInterfacesArgs
    ///         {
    ///             Description = "hello1",
    ///             Name = "eth0",
    ///             PrimaryIp = "10.0.0.2",
    ///             SecurityGroupId = "sg-asdfnbgxxxxxxx",
    ///             VswitchId = "vw-zkdfjaxxxxxx",
    ///         },
    ///         NetworkType = "vpc",
    ///         RamRoleName = "ram_role_name",
    ///         ResourceGroupId = "rg-zkdfjaxxxxxx",
    ///         SecurityEnhancementStrategy = "Active",
    ///         SecurityGroupIds = new[]
    ///         {
    ///             "sg-zkdfjaxxxxxx",
    ///         },
    ///         SpotPriceLimit = 5,
    ///         SpotStrategy = "SpotWithPriceLimit",
    ///         SystemDisk = new AliCloud.Ecs.Inputs.EcsLaunchTemplateSystemDiskArgs
    ///         {
    ///             Category = "cloud_ssd",
    ///             DeleteWithInstance = false,
    ///             Description = "Test For Terraform",
    ///             Name = "tf_test_name",
    ///             Size = 40,
    ///         },
    ///         TemplateTags = 
    ///         {
    ///             { "Create", "Terraform" },
    ///             { "For", "Test" },
    ///         },
    ///         UserData = "xxxxxxx",
    ///         VpcId = "vpc-asdfnbgxxxxxxx",
    ///         VswitchId = "vw-zwxscaxxxxxx",
    ///         ZoneId = "cn-hangzhou-i",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// ECS Launch Template can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:ecs/ecsLaunchTemplate:EcsLaunchTemplate example &lt;id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:ecs/ecsLaunchTemplate:EcsLaunchTemplate")]
    public partial class EcsLaunchTemplate : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Instance auto release time. The time is presented using the ISO8601 standard and in UTC time. The format is  YYYY-MM-DDTHH:MM:SSZ.
        /// </summary>
        [Output("autoReleaseTime")]
        public Output<string?> AutoReleaseTime { get; private set; } = null!;

        /// <summary>
        /// The list of data disks created with instance.
        /// </summary>
        [Output("dataDisks")]
        public Output<ImmutableArray<Outputs.EcsLaunchTemplateDataDisk>> DataDisks { get; private set; } = null!;

        /// <summary>
        /// The Deployment Set Id.
        /// </summary>
        [Output("deploymentSetId")]
        public Output<string?> DeploymentSetId { get; private set; } = null!;

        /// <summary>
        /// The description of the data disk.
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// Whether to enable the instance operating system configuration.
        /// </summary>
        [Output("enableVmOsConfig")]
        public Output<bool?> EnableVmOsConfig { get; private set; } = null!;

        /// <summary>
        /// Instance host name.It cannot start or end with a period (.) or a hyphen (-) and it cannot have two or more consecutive periods (.) or hyphens (-).For Windows: The host name can be [2, 15] characters in length. It can contain A-Z, a-z, numbers, periods (.), and hyphens (-). It cannot only contain numbers. For other operating systems: The host name can be [2, 64] characters in length. It can be segments separated by periods (.). It can contain A-Z, a-z, numbers, and hyphens (-).
        /// </summary>
        [Output("hostName")]
        public Output<string?> HostName { get; private set; } = null!;

        /// <summary>
        /// The Image ID.
        /// </summary>
        [Output("imageId")]
        public Output<string?> ImageId { get; private set; } = null!;

        /// <summary>
        /// Mirror source. Valid values: `system`, `self`, `others`, `marketplace`, `""`. Default to: `""`.
        /// </summary>
        [Output("imageOwnerAlias")]
        public Output<string?> ImageOwnerAlias { get; private set; } = null!;

        /// <summary>
        /// Billing methods. Valid values: `PostPaid`, `PrePaid`.
        /// </summary>
        [Output("instanceChargeType")]
        public Output<string?> InstanceChargeType { get; private set; } = null!;

        /// <summary>
        /// The name of the instance. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
        /// </summary>
        [Output("instanceName")]
        public Output<string?> InstanceName { get; private set; } = null!;

        /// <summary>
        /// Instance type. For more information, call resource_alicloud_instances to obtain the latest instance type list.
        /// </summary>
        [Output("instanceType")]
        public Output<string?> InstanceType { get; private set; } = null!;

        /// <summary>
        /// Internet bandwidth billing method. Valid values: `PayByTraffic`, `PayByBandwidth`.
        /// </summary>
        [Output("internetChargeType")]
        public Output<string?> InternetChargeType { get; private set; } = null!;

        /// <summary>
        /// The maximum inbound bandwidth from the Internet network, measured in Mbit/s. Value range: [1, 200].
        /// </summary>
        [Output("internetMaxBandwidthIn")]
        public Output<int> InternetMaxBandwidthIn { get; private set; } = null!;

        /// <summary>
        /// Maximum outbound bandwidth from the Internet, its unit of measurement is Mbit/s. Value range: [0, 100].
        /// </summary>
        [Output("internetMaxBandwidthOut")]
        public Output<int?> InternetMaxBandwidthOut { get; private set; } = null!;

        /// <summary>
        /// Whether it is an I/O-optimized instance or not. Valid values: `none`, `optimized`.
        /// </summary>
        [Output("ioOptimized")]
        public Output<string?> IoOptimized { get; private set; } = null!;

        /// <summary>
        /// The name of the key pair.
        /// - Ignore this parameter for Windows instances. It is null by default. Even if you enter this parameter, only the  Password content is used.
        /// - The password logon method for Linux instances is set to forbidden upon initialization.
        /// </summary>
        [Output("keyPairName")]
        public Output<string?> KeyPairName { get; private set; } = null!;

        /// <summary>
        /// The name of Launch Template.
        /// </summary>
        [Output("launchTemplateName")]
        public Output<string> LaunchTemplateName { get; private set; } = null!;

        /// <summary>
        /// The name of the data disk.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// The list of network interfaces created with instance.
        /// </summary>
        [Output("networkInterfaces")]
        public Output<Outputs.EcsLaunchTemplateNetworkInterfaces?> NetworkInterfaces { get; private set; } = null!;

        /// <summary>
        /// Network type of the instance. Valid values: `classic`, `vpc`.
        /// </summary>
        [Output("networkType")]
        public Output<string?> NetworkType { get; private set; } = null!;

        /// <summary>
        /// Whether to use the password preset by the mirror.
        /// </summary>
        [Output("passwordInherit")]
        public Output<bool?> PasswordInherit { get; private set; } = null!;

        /// <summary>
        /// The subscription period of the instance. Unit: months. This parameter takes effect and is required only when InstanceChargeType is set to PrePaid. If the DedicatedHostId parameter is specified, the value of the Period parameter must be within the subscription period of the dedicated host.
        /// - When the PeriodUnit parameter is set to `Week`, the valid values of the Period parameter are `1`, `2`, `3`, and `4`.
        /// - When the PeriodUnit parameter is set to `Month`, the valid values of the Period parameter are `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `12`, `24`, `36`, `48`, and `60`.
        /// </summary>
        [Output("period")]
        public Output<int?> Period { get; private set; } = null!;

        /// <summary>
        /// The private IP address of the instance.
        /// </summary>
        [Output("privateIpAddress")]
        public Output<string?> PrivateIpAddress { get; private set; } = null!;

        /// <summary>
        /// The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
        /// </summary>
        [Output("ramRoleName")]
        public Output<string?> RamRoleName { get; private set; } = null!;

        /// <summary>
        /// The ID of the resource group to which to assign the instance, Elastic Block Storage (EBS) device, and ENI.
        /// </summary>
        [Output("resourceGroupId")]
        public Output<string?> ResourceGroupId { get; private set; } = null!;

        /// <summary>
        /// Whether or not to activate the security enhancement feature and install network security software free of charge. Valid values: `Active`, `Deactive`.
        /// </summary>
        [Output("securityEnhancementStrategy")]
        public Output<string?> SecurityEnhancementStrategy { get; private set; } = null!;

        /// <summary>
        /// The security group ID must be one in the same VPC.
        /// </summary>
        [Output("securityGroupId")]
        public Output<string?> SecurityGroupId { get; private set; } = null!;

        /// <summary>
        /// The ID of security group N to which to assign the instance.
        /// </summary>
        [Output("securityGroupIds")]
        public Output<ImmutableArray<string>> SecurityGroupIds { get; private set; } = null!;

        /// <summary>
        /// The protection period of the preemptible instance. Unit: hours. Valid values: `0`, `1`, `2`, `3`, `4`, `5`, and `6`. Default to: `1`.
        /// </summary>
        [Output("spotDuration")]
        public Output<string?> SpotDuration { get; private set; } = null!;

        /// <summary>
        /// -(Optional) Sets the maximum hourly instance price. Supports up to three decimal places.
        /// </summary>
        [Output("spotPriceLimit")]
        public Output<double?> SpotPriceLimit { get; private set; } = null!;

        /// <summary>
        /// The spot strategy for a Pay-As-You-Go instance. This parameter is valid and required only when InstanceChargeType is set to PostPaid. Valid values: `NoSpot`, `SpotAsPriceGo`, `SpotWithPriceLimit`.
        /// </summary>
        [Output("spotStrategy")]
        public Output<string?> SpotStrategy { get; private set; } = null!;

        /// <summary>
        /// The System Disk.
        /// </summary>
        [Output("systemDisk")]
        public Output<Outputs.EcsLaunchTemplateSystemDisk> SystemDisk { get; private set; } = null!;

        /// <summary>
        /// It has been deprecated from version 1.120.0, and use field `system_disk` instead.
        /// </summary>
        [Output("systemDiskCategory")]
        public Output<string> SystemDiskCategory { get; private set; } = null!;

        /// <summary>
        /// It has been deprecated from version 1.120.0, and use field `system_disk` instead.
        /// </summary>
        [Output("systemDiskDescription")]
        public Output<string> SystemDiskDescription { get; private set; } = null!;

        /// <summary>
        /// It has been deprecated from version 1.120.0, and use field `system_disk` instead.
        /// </summary>
        [Output("systemDiskName")]
        public Output<string> SystemDiskName { get; private set; } = null!;

        /// <summary>
        /// It has been deprecated from version 1.120.0, and use field `system_disk` instead.
        /// </summary>
        [Output("systemDiskSize")]
        public Output<int> SystemDiskSize { get; private set; } = null!;

        /// <summary>
        /// A mapping of tags to assign to instance, block storage, and elastic network.
        /// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
        /// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
        /// </summary>
        [Output("tags")]
        public Output<ImmutableDictionary<string, object>?> Tags { get; private set; } = null!;

        /// <summary>
        /// The template resource group id.
        /// </summary>
        [Output("templateResourceGroupId")]
        public Output<string?> TemplateResourceGroupId { get; private set; } = null!;

        /// <summary>
        /// A mapping of tags to assign to the launch template.
        /// </summary>
        [Output("templateTags")]
        public Output<ImmutableDictionary<string, object>?> TemplateTags { get; private set; } = null!;

        /// <summary>
        /// The User Data.
        /// </summary>
        [Output("userData")]
        public Output<string> UserData { get; private set; } = null!;

        /// <summary>
        /// It has been deprecated from version 1.120.0, and use field `user_data` instead.
        /// </summary>
        [Output("userdata")]
        public Output<string> Userdata { get; private set; } = null!;

        /// <summary>
        /// The description of the launch template version. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
        /// </summary>
        [Output("versionDescription")]
        public Output<string?> VersionDescription { get; private set; } = null!;

        /// <summary>
        /// The ID of the VPC.
        /// </summary>
        [Output("vpcId")]
        public Output<string> VpcId { get; private set; } = null!;

        /// <summary>
        /// The VSwitch ID for ENI. The instance must be in the same zone of the same VPC network as the ENI, but they may belong to different VSwitches.
        /// </summary>
        [Output("vswitchId")]
        public Output<string?> VswitchId { get; private set; } = null!;

        /// <summary>
        /// The zone ID of the instance.
        /// </summary>
        [Output("zoneId")]
        public Output<string> ZoneId { get; private set; } = null!;


        /// <summary>
        /// Create a EcsLaunchTemplate resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public EcsLaunchTemplate(string name, EcsLaunchTemplateArgs? args = null, CustomResourceOptions? options = null)
            : base("alicloud:ecs/ecsLaunchTemplate:EcsLaunchTemplate", name, args ?? new EcsLaunchTemplateArgs(), MakeResourceOptions(options, ""))
        {
        }

        private EcsLaunchTemplate(string name, Input<string> id, EcsLaunchTemplateState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:ecs/ecsLaunchTemplate:EcsLaunchTemplate", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/rhysmdnz/pulumi-alicloud",
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing EcsLaunchTemplate resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static EcsLaunchTemplate Get(string name, Input<string> id, EcsLaunchTemplateState? state = null, CustomResourceOptions? options = null)
        {
            return new EcsLaunchTemplate(name, id, state, options);
        }
    }

    public sealed class EcsLaunchTemplateArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Instance auto release time. The time is presented using the ISO8601 standard and in UTC time. The format is  YYYY-MM-DDTHH:MM:SSZ.
        /// </summary>
        [Input("autoReleaseTime")]
        public Input<string>? AutoReleaseTime { get; set; }

        [Input("dataDisks")]
        private InputList<Inputs.EcsLaunchTemplateDataDiskArgs>? _dataDisks;

        /// <summary>
        /// The list of data disks created with instance.
        /// </summary>
        public InputList<Inputs.EcsLaunchTemplateDataDiskArgs> DataDisks
        {
            get => _dataDisks ?? (_dataDisks = new InputList<Inputs.EcsLaunchTemplateDataDiskArgs>());
            set => _dataDisks = value;
        }

        /// <summary>
        /// The Deployment Set Id.
        /// </summary>
        [Input("deploymentSetId")]
        public Input<string>? DeploymentSetId { get; set; }

        /// <summary>
        /// The description of the data disk.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Whether to enable the instance operating system configuration.
        /// </summary>
        [Input("enableVmOsConfig")]
        public Input<bool>? EnableVmOsConfig { get; set; }

        /// <summary>
        /// Instance host name.It cannot start or end with a period (.) or a hyphen (-) and it cannot have two or more consecutive periods (.) or hyphens (-).For Windows: The host name can be [2, 15] characters in length. It can contain A-Z, a-z, numbers, periods (.), and hyphens (-). It cannot only contain numbers. For other operating systems: The host name can be [2, 64] characters in length. It can be segments separated by periods (.). It can contain A-Z, a-z, numbers, and hyphens (-).
        /// </summary>
        [Input("hostName")]
        public Input<string>? HostName { get; set; }

        /// <summary>
        /// The Image ID.
        /// </summary>
        [Input("imageId")]
        public Input<string>? ImageId { get; set; }

        /// <summary>
        /// Mirror source. Valid values: `system`, `self`, `others`, `marketplace`, `""`. Default to: `""`.
        /// </summary>
        [Input("imageOwnerAlias")]
        public Input<string>? ImageOwnerAlias { get; set; }

        /// <summary>
        /// Billing methods. Valid values: `PostPaid`, `PrePaid`.
        /// </summary>
        [Input("instanceChargeType")]
        public Input<string>? InstanceChargeType { get; set; }

        /// <summary>
        /// The name of the instance. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
        /// </summary>
        [Input("instanceName")]
        public Input<string>? InstanceName { get; set; }

        /// <summary>
        /// Instance type. For more information, call resource_alicloud_instances to obtain the latest instance type list.
        /// </summary>
        [Input("instanceType")]
        public Input<string>? InstanceType { get; set; }

        /// <summary>
        /// Internet bandwidth billing method. Valid values: `PayByTraffic`, `PayByBandwidth`.
        /// </summary>
        [Input("internetChargeType")]
        public Input<string>? InternetChargeType { get; set; }

        /// <summary>
        /// The maximum inbound bandwidth from the Internet network, measured in Mbit/s. Value range: [1, 200].
        /// </summary>
        [Input("internetMaxBandwidthIn")]
        public Input<int>? InternetMaxBandwidthIn { get; set; }

        /// <summary>
        /// Maximum outbound bandwidth from the Internet, its unit of measurement is Mbit/s. Value range: [0, 100].
        /// </summary>
        [Input("internetMaxBandwidthOut")]
        public Input<int>? InternetMaxBandwidthOut { get; set; }

        /// <summary>
        /// Whether it is an I/O-optimized instance or not. Valid values: `none`, `optimized`.
        /// </summary>
        [Input("ioOptimized")]
        public Input<string>? IoOptimized { get; set; }

        /// <summary>
        /// The name of the key pair.
        /// - Ignore this parameter for Windows instances. It is null by default. Even if you enter this parameter, only the  Password content is used.
        /// - The password logon method for Linux instances is set to forbidden upon initialization.
        /// </summary>
        [Input("keyPairName")]
        public Input<string>? KeyPairName { get; set; }

        /// <summary>
        /// The name of Launch Template.
        /// </summary>
        [Input("launchTemplateName")]
        public Input<string>? LaunchTemplateName { get; set; }

        /// <summary>
        /// The name of the data disk.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The list of network interfaces created with instance.
        /// </summary>
        [Input("networkInterfaces")]
        public Input<Inputs.EcsLaunchTemplateNetworkInterfacesArgs>? NetworkInterfaces { get; set; }

        /// <summary>
        /// Network type of the instance. Valid values: `classic`, `vpc`.
        /// </summary>
        [Input("networkType")]
        public Input<string>? NetworkType { get; set; }

        /// <summary>
        /// Whether to use the password preset by the mirror.
        /// </summary>
        [Input("passwordInherit")]
        public Input<bool>? PasswordInherit { get; set; }

        /// <summary>
        /// The subscription period of the instance. Unit: months. This parameter takes effect and is required only when InstanceChargeType is set to PrePaid. If the DedicatedHostId parameter is specified, the value of the Period parameter must be within the subscription period of the dedicated host.
        /// - When the PeriodUnit parameter is set to `Week`, the valid values of the Period parameter are `1`, `2`, `3`, and `4`.
        /// - When the PeriodUnit parameter is set to `Month`, the valid values of the Period parameter are `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `12`, `24`, `36`, `48`, and `60`.
        /// </summary>
        [Input("period")]
        public Input<int>? Period { get; set; }

        /// <summary>
        /// The private IP address of the instance.
        /// </summary>
        [Input("privateIpAddress")]
        public Input<string>? PrivateIpAddress { get; set; }

        /// <summary>
        /// The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
        /// </summary>
        [Input("ramRoleName")]
        public Input<string>? RamRoleName { get; set; }

        /// <summary>
        /// The ID of the resource group to which to assign the instance, Elastic Block Storage (EBS) device, and ENI.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        /// <summary>
        /// Whether or not to activate the security enhancement feature and install network security software free of charge. Valid values: `Active`, `Deactive`.
        /// </summary>
        [Input("securityEnhancementStrategy")]
        public Input<string>? SecurityEnhancementStrategy { get; set; }

        /// <summary>
        /// The security group ID must be one in the same VPC.
        /// </summary>
        [Input("securityGroupId")]
        public Input<string>? SecurityGroupId { get; set; }

        [Input("securityGroupIds")]
        private InputList<string>? _securityGroupIds;

        /// <summary>
        /// The ID of security group N to which to assign the instance.
        /// </summary>
        public InputList<string> SecurityGroupIds
        {
            get => _securityGroupIds ?? (_securityGroupIds = new InputList<string>());
            set => _securityGroupIds = value;
        }

        /// <summary>
        /// The protection period of the preemptible instance. Unit: hours. Valid values: `0`, `1`, `2`, `3`, `4`, `5`, and `6`. Default to: `1`.
        /// </summary>
        [Input("spotDuration")]
        public Input<string>? SpotDuration { get; set; }

        /// <summary>
        /// -(Optional) Sets the maximum hourly instance price. Supports up to three decimal places.
        /// </summary>
        [Input("spotPriceLimit")]
        public Input<double>? SpotPriceLimit { get; set; }

        /// <summary>
        /// The spot strategy for a Pay-As-You-Go instance. This parameter is valid and required only when InstanceChargeType is set to PostPaid. Valid values: `NoSpot`, `SpotAsPriceGo`, `SpotWithPriceLimit`.
        /// </summary>
        [Input("spotStrategy")]
        public Input<string>? SpotStrategy { get; set; }

        /// <summary>
        /// The System Disk.
        /// </summary>
        [Input("systemDisk")]
        public Input<Inputs.EcsLaunchTemplateSystemDiskArgs>? SystemDisk { get; set; }

        /// <summary>
        /// It has been deprecated from version 1.120.0, and use field `system_disk` instead.
        /// </summary>
        [Input("systemDiskCategory")]
        public Input<string>? SystemDiskCategory { get; set; }

        /// <summary>
        /// It has been deprecated from version 1.120.0, and use field `system_disk` instead.
        /// </summary>
        [Input("systemDiskDescription")]
        public Input<string>? SystemDiskDescription { get; set; }

        /// <summary>
        /// It has been deprecated from version 1.120.0, and use field `system_disk` instead.
        /// </summary>
        [Input("systemDiskName")]
        public Input<string>? SystemDiskName { get; set; }

        /// <summary>
        /// It has been deprecated from version 1.120.0, and use field `system_disk` instead.
        /// </summary>
        [Input("systemDiskSize")]
        public Input<int>? SystemDiskSize { get; set; }

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// A mapping of tags to assign to instance, block storage, and elastic network.
        /// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
        /// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// The template resource group id.
        /// </summary>
        [Input("templateResourceGroupId")]
        public Input<string>? TemplateResourceGroupId { get; set; }

        [Input("templateTags")]
        private InputMap<object>? _templateTags;

        /// <summary>
        /// A mapping of tags to assign to the launch template.
        /// </summary>
        public InputMap<object> TemplateTags
        {
            get => _templateTags ?? (_templateTags = new InputMap<object>());
            set => _templateTags = value;
        }

        /// <summary>
        /// The User Data.
        /// </summary>
        [Input("userData")]
        public Input<string>? UserData { get; set; }

        /// <summary>
        /// It has been deprecated from version 1.120.0, and use field `user_data` instead.
        /// </summary>
        [Input("userdata")]
        public Input<string>? Userdata { get; set; }

        /// <summary>
        /// The description of the launch template version. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
        /// </summary>
        [Input("versionDescription")]
        public Input<string>? VersionDescription { get; set; }

        /// <summary>
        /// The ID of the VPC.
        /// </summary>
        [Input("vpcId")]
        public Input<string>? VpcId { get; set; }

        /// <summary>
        /// The VSwitch ID for ENI. The instance must be in the same zone of the same VPC network as the ENI, but they may belong to different VSwitches.
        /// </summary>
        [Input("vswitchId")]
        public Input<string>? VswitchId { get; set; }

        /// <summary>
        /// The zone ID of the instance.
        /// </summary>
        [Input("zoneId")]
        public Input<string>? ZoneId { get; set; }

        public EcsLaunchTemplateArgs()
        {
        }
        public static new EcsLaunchTemplateArgs Empty => new EcsLaunchTemplateArgs();
    }

    public sealed class EcsLaunchTemplateState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Instance auto release time. The time is presented using the ISO8601 standard and in UTC time. The format is  YYYY-MM-DDTHH:MM:SSZ.
        /// </summary>
        [Input("autoReleaseTime")]
        public Input<string>? AutoReleaseTime { get; set; }

        [Input("dataDisks")]
        private InputList<Inputs.EcsLaunchTemplateDataDiskGetArgs>? _dataDisks;

        /// <summary>
        /// The list of data disks created with instance.
        /// </summary>
        public InputList<Inputs.EcsLaunchTemplateDataDiskGetArgs> DataDisks
        {
            get => _dataDisks ?? (_dataDisks = new InputList<Inputs.EcsLaunchTemplateDataDiskGetArgs>());
            set => _dataDisks = value;
        }

        /// <summary>
        /// The Deployment Set Id.
        /// </summary>
        [Input("deploymentSetId")]
        public Input<string>? DeploymentSetId { get; set; }

        /// <summary>
        /// The description of the data disk.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Whether to enable the instance operating system configuration.
        /// </summary>
        [Input("enableVmOsConfig")]
        public Input<bool>? EnableVmOsConfig { get; set; }

        /// <summary>
        /// Instance host name.It cannot start or end with a period (.) or a hyphen (-) and it cannot have two or more consecutive periods (.) or hyphens (-).For Windows: The host name can be [2, 15] characters in length. It can contain A-Z, a-z, numbers, periods (.), and hyphens (-). It cannot only contain numbers. For other operating systems: The host name can be [2, 64] characters in length. It can be segments separated by periods (.). It can contain A-Z, a-z, numbers, and hyphens (-).
        /// </summary>
        [Input("hostName")]
        public Input<string>? HostName { get; set; }

        /// <summary>
        /// The Image ID.
        /// </summary>
        [Input("imageId")]
        public Input<string>? ImageId { get; set; }

        /// <summary>
        /// Mirror source. Valid values: `system`, `self`, `others`, `marketplace`, `""`. Default to: `""`.
        /// </summary>
        [Input("imageOwnerAlias")]
        public Input<string>? ImageOwnerAlias { get; set; }

        /// <summary>
        /// Billing methods. Valid values: `PostPaid`, `PrePaid`.
        /// </summary>
        [Input("instanceChargeType")]
        public Input<string>? InstanceChargeType { get; set; }

        /// <summary>
        /// The name of the instance. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
        /// </summary>
        [Input("instanceName")]
        public Input<string>? InstanceName { get; set; }

        /// <summary>
        /// Instance type. For more information, call resource_alicloud_instances to obtain the latest instance type list.
        /// </summary>
        [Input("instanceType")]
        public Input<string>? InstanceType { get; set; }

        /// <summary>
        /// Internet bandwidth billing method. Valid values: `PayByTraffic`, `PayByBandwidth`.
        /// </summary>
        [Input("internetChargeType")]
        public Input<string>? InternetChargeType { get; set; }

        /// <summary>
        /// The maximum inbound bandwidth from the Internet network, measured in Mbit/s. Value range: [1, 200].
        /// </summary>
        [Input("internetMaxBandwidthIn")]
        public Input<int>? InternetMaxBandwidthIn { get; set; }

        /// <summary>
        /// Maximum outbound bandwidth from the Internet, its unit of measurement is Mbit/s. Value range: [0, 100].
        /// </summary>
        [Input("internetMaxBandwidthOut")]
        public Input<int>? InternetMaxBandwidthOut { get; set; }

        /// <summary>
        /// Whether it is an I/O-optimized instance or not. Valid values: `none`, `optimized`.
        /// </summary>
        [Input("ioOptimized")]
        public Input<string>? IoOptimized { get; set; }

        /// <summary>
        /// The name of the key pair.
        /// - Ignore this parameter for Windows instances. It is null by default. Even if you enter this parameter, only the  Password content is used.
        /// - The password logon method for Linux instances is set to forbidden upon initialization.
        /// </summary>
        [Input("keyPairName")]
        public Input<string>? KeyPairName { get; set; }

        /// <summary>
        /// The name of Launch Template.
        /// </summary>
        [Input("launchTemplateName")]
        public Input<string>? LaunchTemplateName { get; set; }

        /// <summary>
        /// The name of the data disk.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The list of network interfaces created with instance.
        /// </summary>
        [Input("networkInterfaces")]
        public Input<Inputs.EcsLaunchTemplateNetworkInterfacesGetArgs>? NetworkInterfaces { get; set; }

        /// <summary>
        /// Network type of the instance. Valid values: `classic`, `vpc`.
        /// </summary>
        [Input("networkType")]
        public Input<string>? NetworkType { get; set; }

        /// <summary>
        /// Whether to use the password preset by the mirror.
        /// </summary>
        [Input("passwordInherit")]
        public Input<bool>? PasswordInherit { get; set; }

        /// <summary>
        /// The subscription period of the instance. Unit: months. This parameter takes effect and is required only when InstanceChargeType is set to PrePaid. If the DedicatedHostId parameter is specified, the value of the Period parameter must be within the subscription period of the dedicated host.
        /// - When the PeriodUnit parameter is set to `Week`, the valid values of the Period parameter are `1`, `2`, `3`, and `4`.
        /// - When the PeriodUnit parameter is set to `Month`, the valid values of the Period parameter are `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `12`, `24`, `36`, `48`, and `60`.
        /// </summary>
        [Input("period")]
        public Input<int>? Period { get; set; }

        /// <summary>
        /// The private IP address of the instance.
        /// </summary>
        [Input("privateIpAddress")]
        public Input<string>? PrivateIpAddress { get; set; }

        /// <summary>
        /// The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
        /// </summary>
        [Input("ramRoleName")]
        public Input<string>? RamRoleName { get; set; }

        /// <summary>
        /// The ID of the resource group to which to assign the instance, Elastic Block Storage (EBS) device, and ENI.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        /// <summary>
        /// Whether or not to activate the security enhancement feature and install network security software free of charge. Valid values: `Active`, `Deactive`.
        /// </summary>
        [Input("securityEnhancementStrategy")]
        public Input<string>? SecurityEnhancementStrategy { get; set; }

        /// <summary>
        /// The security group ID must be one in the same VPC.
        /// </summary>
        [Input("securityGroupId")]
        public Input<string>? SecurityGroupId { get; set; }

        [Input("securityGroupIds")]
        private InputList<string>? _securityGroupIds;

        /// <summary>
        /// The ID of security group N to which to assign the instance.
        /// </summary>
        public InputList<string> SecurityGroupIds
        {
            get => _securityGroupIds ?? (_securityGroupIds = new InputList<string>());
            set => _securityGroupIds = value;
        }

        /// <summary>
        /// The protection period of the preemptible instance. Unit: hours. Valid values: `0`, `1`, `2`, `3`, `4`, `5`, and `6`. Default to: `1`.
        /// </summary>
        [Input("spotDuration")]
        public Input<string>? SpotDuration { get; set; }

        /// <summary>
        /// -(Optional) Sets the maximum hourly instance price. Supports up to three decimal places.
        /// </summary>
        [Input("spotPriceLimit")]
        public Input<double>? SpotPriceLimit { get; set; }

        /// <summary>
        /// The spot strategy for a Pay-As-You-Go instance. This parameter is valid and required only when InstanceChargeType is set to PostPaid. Valid values: `NoSpot`, `SpotAsPriceGo`, `SpotWithPriceLimit`.
        /// </summary>
        [Input("spotStrategy")]
        public Input<string>? SpotStrategy { get; set; }

        /// <summary>
        /// The System Disk.
        /// </summary>
        [Input("systemDisk")]
        public Input<Inputs.EcsLaunchTemplateSystemDiskGetArgs>? SystemDisk { get; set; }

        /// <summary>
        /// It has been deprecated from version 1.120.0, and use field `system_disk` instead.
        /// </summary>
        [Input("systemDiskCategory")]
        public Input<string>? SystemDiskCategory { get; set; }

        /// <summary>
        /// It has been deprecated from version 1.120.0, and use field `system_disk` instead.
        /// </summary>
        [Input("systemDiskDescription")]
        public Input<string>? SystemDiskDescription { get; set; }

        /// <summary>
        /// It has been deprecated from version 1.120.0, and use field `system_disk` instead.
        /// </summary>
        [Input("systemDiskName")]
        public Input<string>? SystemDiskName { get; set; }

        /// <summary>
        /// It has been deprecated from version 1.120.0, and use field `system_disk` instead.
        /// </summary>
        [Input("systemDiskSize")]
        public Input<int>? SystemDiskSize { get; set; }

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// A mapping of tags to assign to instance, block storage, and elastic network.
        /// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
        /// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// The template resource group id.
        /// </summary>
        [Input("templateResourceGroupId")]
        public Input<string>? TemplateResourceGroupId { get; set; }

        [Input("templateTags")]
        private InputMap<object>? _templateTags;

        /// <summary>
        /// A mapping of tags to assign to the launch template.
        /// </summary>
        public InputMap<object> TemplateTags
        {
            get => _templateTags ?? (_templateTags = new InputMap<object>());
            set => _templateTags = value;
        }

        /// <summary>
        /// The User Data.
        /// </summary>
        [Input("userData")]
        public Input<string>? UserData { get; set; }

        /// <summary>
        /// It has been deprecated from version 1.120.0, and use field `user_data` instead.
        /// </summary>
        [Input("userdata")]
        public Input<string>? Userdata { get; set; }

        /// <summary>
        /// The description of the launch template version. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
        /// </summary>
        [Input("versionDescription")]
        public Input<string>? VersionDescription { get; set; }

        /// <summary>
        /// The ID of the VPC.
        /// </summary>
        [Input("vpcId")]
        public Input<string>? VpcId { get; set; }

        /// <summary>
        /// The VSwitch ID for ENI. The instance must be in the same zone of the same VPC network as the ENI, but they may belong to different VSwitches.
        /// </summary>
        [Input("vswitchId")]
        public Input<string>? VswitchId { get; set; }

        /// <summary>
        /// The zone ID of the instance.
        /// </summary>
        [Input("zoneId")]
        public Input<string>? ZoneId { get; set; }

        public EcsLaunchTemplateState()
        {
        }
        public static new EcsLaunchTemplateState Empty => new EcsLaunchTemplateState();
    }
}
