<filename>sdk/dotnet/Ecs/EcsInstanceSet.cs// *** 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 Instance Set resource.
    /// 
    /// For information about ECS Instance Set and how to use it, see [What is Instance Set](https://www.alibabacloud.com/help/en/elastic-compute-service/latest/runinstances).
    /// 
    /// &gt; **NOTE:** Available in v1.173.0+.
    /// 
    /// &gt; **NOTE:** This resource is used to batch create a group of instance resources with the same configuration. However, this resource is not recommended. `alicloud.ecs.Instance` is preferred.
    /// 
    /// &gt; **NOTE:** In the instances managed by this resource, names are automatically generated based on `instance_name` and `unique_suffix`.
    /// 
    /// &gt; **NOTE:** Only `tags` support batch modification.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using System.Linq;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var config = new Config();
    ///     var name = config.Get("name") ?? "tf-testaccecsset";
    ///     var defaultZones = AliCloud.GetZones.Invoke(new()
    ///     {
    ///         AvailableDiskCategory = "cloud_efficiency",
    ///         AvailableResourceCreation = "VSwitch",
    ///     });
    /// 
    ///     var defaultInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
    ///     {
    ///         AvailabilityZone = defaultZones.Apply(getZonesResult =&gt; getZonesResult.Zones[0]?.Id),
    ///         CpuCoreCount = 1,
    ///         MemorySize = 2,
    ///     });
    /// 
    ///     var defaultImages = AliCloud.Ecs.GetImages.Invoke(new()
    ///     {
    ///         NameRegex = "^ubuntu_[0-9]+_[0-9]+_x64*",
    ///         MostRecent = true,
    ///         Owners = "system",
    ///     });
    /// 
    ///     var defaultNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
    ///     {
    ///         NameRegex = "default-NODELETING",
    ///     });
    /// 
    ///     var defaultSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
    ///     {
    ///         VpcId = defaultNetworks.Apply(getNetworksResult =&gt; getNetworksResult.Ids[0]),
    ///         ZoneId = defaultZones.Apply(getZonesResult =&gt; getZonesResult.Zones[0]?.Id),
    ///     });
    /// 
    ///     var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("defaultSecurityGroup", new()
    ///     {
    ///         VpcId = defaultNetworks.Apply(getNetworksResult =&gt; getNetworksResult.Ids[0]),
    ///     });
    /// 
    ///     var beijingK = new AliCloud.Ecs.EcsInstanceSet("beijingK", new()
    ///     {
    ///         Amount = 100,
    ///         ImageId = defaultImages.Apply(getImagesResult =&gt; getImagesResult.Images[0]?.Id),
    ///         InstanceType = defaultInstanceTypes.Apply(getInstanceTypesResult =&gt; getInstanceTypesResult.InstanceTypes[0]?.Id),
    ///         InstanceName = name,
    ///         InstanceChargeType = "PostPaid",
    ///         SystemDiskPerformanceLevel = "PL0",
    ///         SystemDiskCategory = "cloud_essd",
    ///         SystemDiskSize = 200,
    ///         VswitchId = defaultSwitches.Apply(getSwitchesResult =&gt; getSwitchesResult.Ids[0]),
    ///         SecurityGroupIds = new[]
    ///         {
    ///             defaultSecurityGroup,
    ///         }.Select(__item =&gt; __item.Id).ToList(),
    ///         ZoneId = defaultZones.Apply(getZonesResult =&gt; getZonesResult.Zones[0]?.Id),
    ///     });
    /// 
    /// });
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:ecs/ecsInstanceSet:EcsInstanceSet")]
    public partial class EcsInstanceSet : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The number of instances that you want to create. Valid values: `1` to `100`.
        /// </summary>
        [Output("amount")]
        public Output<int?> Amount { get; private set; } = null!;

        /// <summary>
        /// The automatic release time of the `PostPaid` instance.
        /// </summary>
        [Output("autoReleaseTime")]
        public Output<string?> AutoReleaseTime { get; private set; } = null!;

        /// <summary>
        /// Whether to enable auto-renewal for the instance. This parameter is valid only when the `instance_charge_type` is set to `PrePaid`.
        /// </summary>
        [Output("autoRenew")]
        public Output<bool?> AutoRenew { get; private set; } = null!;

        /// <summary>
        /// Auto renewal period of an instance, in the unit of month. It is valid when `instance_charge_type` is `PrePaid`.
        /// - When `period_unit` is `Month`, Valid values: `1`, `2`, `3`, `6`, `12`.
        /// - When `period_unit` is `Week`, Valid values: `1`, `2`, `3`.
        /// </summary>
        [Output("autoRenewPeriod")]
        public Output<int?> AutoRenewPeriod { get; private set; } = null!;

        /// <summary>
        /// Indicate how to check instance ready to use.
        /// - `false`: Default value. Means that the instances are ready when their DescribeInstances status is Running, at which time guestOS(Ecs os) may not be ready yet.
        /// - `true`: Checking instance ready with Ecs assistant, which means guestOs boots successfully. Premise is that the specified image `image_id` has built-in Ecs assistant. Most of the public images have assistant installed already.
        /// </summary>
        [Output("bootCheckOsWithAssistant")]
        public Output<bool?> BootCheckOsWithAssistant { get; private set; } = null!;

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

        /// <summary>
        /// The ID of the dedicated host on which to create the instance. If the `dedicated_host_id` is specified, the `spot_strategy` and `spot_price_limit`  are ignored. This is because preemptible instances cannot be created on dedicated hosts.
        /// </summary>
        [Output("dedicatedHostId")]
        public Output<string?> DedicatedHostId { get; private set; } = null!;

        /// <summary>
        /// Whether to enable release protection for the instance.
        /// </summary>
        [Output("deletionProtection")]
        public Output<bool> DeletionProtection { get; private set; } = null!;

        /// <summary>
        /// The ID of the deployment set to which to deploy the instance.
        /// </summary>
        [Output("deploymentSetId")]
        public Output<string?> DeploymentSetId { get; private set; } = null!;

        /// <summary>
        /// The description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with `http://` or `https://`.
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// The instances that need to be excluded from the Instance Set. See the following `Block exclude_instance_filter`.
        /// </summary>
        [Output("excludeInstanceFilter")]
        public Output<Outputs.EcsInstanceSetExcludeInstanceFilter?> ExcludeInstanceFilter { get; private set; } = null!;

        /// <summary>
        /// The hostname of instance.
        /// </summary>
        [Output("hostName")]
        public Output<string> HostName { get; private set; } = null!;

        /// <summary>
        /// The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
        /// </summary>
        [Output("hpcClusterId")]
        public Output<string?> HpcClusterId { get; private set; } = null!;

        /// <summary>
        /// The Image to use for the instance.
        /// </summary>
        [Output("imageId")]
        public Output<string> ImageId { get; private set; } = null!;

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

        /// <summary>
        /// A list of ECS Instance ID.
        /// </summary>
        [Output("instanceIds")]
        public Output<ImmutableArray<string>> InstanceIds { get; private set; } = null!;

        /// <summary>
        /// The name of the ECS. This instance_name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen, and must not begin with `http://` or `https://`.
        /// </summary>
        [Output("instanceName")]
        public Output<string?> InstanceName { get; private set; } = null!;

        /// <summary>
        /// The type of instance to start.
        /// </summary>
        [Output("instanceType")]
        public Output<string> InstanceType { get; private set; } = null!;

        /// <summary>
        /// The Internet charge type of the instance. Valid values are `PayByBandwidth`, `PayByTraffic`.
        /// </summary>
        [Output("internetChargeType")]
        public Output<string> InternetChargeType { get; private set; } = null!;

        /// <summary>
        /// The Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Valid values: `1` to `100`.
        /// </summary>
        [Output("internetMaxBandwidthOut")]
        public Output<int> InternetMaxBandwidthOut { get; private set; } = null!;

        /// <summary>
        /// The name of key pair that can login ECS instance successfully without password.
        /// </summary>
        [Output("keyPairName")]
        public Output<string?> KeyPairName { get; private set; } = null!;

        /// <summary>
        /// The ID of the launch template.
        /// </summary>
        [Output("launchTemplateId")]
        public Output<string?> LaunchTemplateId { get; private set; } = null!;

        /// <summary>
        /// The name of the launch template. To use a launch template to create an instance, you must use the `launch_template_id` or `launch_template_name` parameter to specify the launch template.
        /// </summary>
        [Output("launchTemplateName")]
        public Output<string?> LaunchTemplateName { get; private set; } = null!;

        /// <summary>
        /// The version of the launch template.
        /// </summary>
        [Output("launchTemplateVersion")]
        public Output<string?> LaunchTemplateVersion { get; private set; } = null!;

        /// <summary>
        /// A list of NetworkInterface. See the following `Block network_interfaces`.
        /// </summary>
        [Output("networkInterfaces")]
        public Output<ImmutableArray<Outputs.EcsInstanceSetNetworkInterface>> NetworkInterfaces { get; private set; } = null!;

        /// <summary>
        /// The password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols.
        /// </summary>
        [Output("password")]
        public Output<string?> Password { get; private set; } = null!;

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

        /// <summary>
        /// The duration that you will buy the resource, in month. It is valid when `instance_charge_type` is `PrePaid`.
        /// - When `period_unit` is `Month`, Valid values: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `12`, `24`, `36`, `48`, `60`.
        /// - When `period_unit` is `Week`, Valid values: `1`, `2`, `3`.
        /// </summary>
        [Output("period")]
        public Output<int?> Period { get; private set; } = null!;

        /// <summary>
        /// The duration unit that you will buy the resource. It is valid when `instance_charge_type` is 'PrePaid'. Valid value: `Week`, `Month`.
        /// </summary>
        [Output("periodUnit")]
        public Output<string?> PeriodUnit { get; private set; } = null!;

        /// <summary>
        /// The Instance RAM role name.
        /// </summary>
        [Output("ramRoleName")]
        public Output<string?> RamRoleName { get; private set; } = null!;

        /// <summary>
        /// The ID of resource group which the instance belongs.
        /// </summary>
        [Output("resourceGroupId")]
        public Output<string?> ResourceGroupId { get; private set; } = null!;

        /// <summary>
        /// The security enhancement strategy.
        /// - `Active`: Enable security enhancement strategy, it only works on system images.
        /// - `Deactive`: Disable security enhancement strategy, it works on all images.
        /// </summary>
        [Output("securityEnhancementStrategy")]
        public Output<string?> SecurityEnhancementStrategy { get; private set; } = null!;

        /// <summary>
        /// A list of security group ids to associate with.
        /// </summary>
        [Output("securityGroupIds")]
        public Output<ImmutableArray<string>> SecurityGroupIds { get; private set; } = null!;

        /// <summary>
        /// The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
        /// </summary>
        [Output("spotPriceLimit")]
        public Output<double> SpotPriceLimit { get; private set; } = null!;

        /// <summary>
        /// The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter `instance_charge_type` is 'PostPaid'.
        /// - `NoSpot`: A regular Pay-As-You-Go instance.
        /// - `SpotWithPriceLimit`: A price threshold for a spot instance.
        /// - `SpotAsPriceGo`: A price that is based on the highest Pay-As-You-Go instance
        /// </summary>
        [Output("spotStrategy")]
        public Output<string> SpotStrategy { get; private set; } = null!;

        /// <summary>
        /// The ID of the automatic snapshot policy applied to the system disk.
        /// </summary>
        [Output("systemDiskAutoSnapshotPolicyId")]
        public Output<string?> SystemDiskAutoSnapshotPolicyId { get; private set; } = null!;

        /// <summary>
        /// The category of the system disk. Valid values are `cloud_efficiency`, `cloud_ssd`, `cloud_essd`, `cloud`.
        /// </summary>
        [Output("systemDiskCategory")]
        public Output<string> SystemDiskCategory { get; private set; } = null!;

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

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

        /// <summary>
        /// The performance level of the ESSD used as the system disk. Valid values: `PL0`, `PL1`, `PL2`, `PL3`.
        /// </summary>
        [Output("systemDiskPerformanceLevel")]
        public Output<string> SystemDiskPerformanceLevel { get; private set; } = null!;

        /// <summary>
        /// The size of the system disk, measured in GiB. Value range:  values: `20` to `500`.
        /// </summary>
        [Output("systemDiskSize")]
        public Output<int> SystemDiskSize { get; private set; } = null!;

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

        /// <summary>
        /// Whether to automatically append incremental suffixes to the hostname specified by the HostName parameter and to the instance name specified by the InstanceName parameter when you batch create instances. The incremental suffixes can range from `001` to `999`.
        /// </summary>
        [Output("uniqueSuffix")]
        public Output<bool?> UniqueSuffix { get; private set; } = null!;

        /// <summary>
        /// The virtual switch ID to launch in VPC.
        /// </summary>
        [Output("vswitchId")]
        public Output<string?> VswitchId { get; private set; } = null!;

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


        /// <summary>
        /// Create a EcsInstanceSet 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 EcsInstanceSet(string name, EcsInstanceSetArgs args, CustomResourceOptions? options = null)
            : base("alicloud:ecs/ecsInstanceSet:EcsInstanceSet", name, args ?? new EcsInstanceSetArgs(), MakeResourceOptions(options, ""))
        {
        }

        private EcsInstanceSet(string name, Input<string> id, EcsInstanceSetState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:ecs/ecsInstanceSet:EcsInstanceSet", 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 EcsInstanceSet 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 EcsInstanceSet Get(string name, Input<string> id, EcsInstanceSetState? state = null, CustomResourceOptions? options = null)
        {
            return new EcsInstanceSet(name, id, state, options);
        }
    }

    public sealed class EcsInstanceSetArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The number of instances that you want to create. Valid values: `1` to `100`.
        /// </summary>
        [Input("amount")]
        public Input<int>? Amount { get; set; }

        /// <summary>
        /// The automatic release time of the `PostPaid` instance.
        /// </summary>
        [Input("autoReleaseTime")]
        public Input<string>? AutoReleaseTime { get; set; }

        /// <summary>
        /// Whether to enable auto-renewal for the instance. This parameter is valid only when the `instance_charge_type` is set to `PrePaid`.
        /// </summary>
        [Input("autoRenew")]
        public Input<bool>? AutoRenew { get; set; }

        /// <summary>
        /// Auto renewal period of an instance, in the unit of month. It is valid when `instance_charge_type` is `PrePaid`.
        /// - When `period_unit` is `Month`, Valid values: `1`, `2`, `3`, `6`, `12`.
        /// - When `period_unit` is `Week`, Valid values: `1`, `2`, `3`.
        /// </summary>
        [Input("autoRenewPeriod")]
        public Input<int>? AutoRenewPeriod { get; set; }

        /// <summary>
        /// Indicate how to check instance ready to use.
        /// - `false`: Default value. Means that the instances are ready when their DescribeInstances status is Running, at which time guestOS(Ecs os) may not be ready yet.
        /// - `true`: Checking instance ready with Ecs assistant, which means guestOs boots successfully. Premise is that the specified image `image_id` has built-in Ecs assistant. Most of the public images have assistant installed already.
        /// </summary>
        [Input("bootCheckOsWithAssistant")]
        public Input<bool>? BootCheckOsWithAssistant { get; set; }

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

        /// <summary>
        /// The list of data disks created with instance. See the following `Block data_disks`.
        /// </summary>
        public InputList<Inputs.EcsInstanceSetDataDiskArgs> DataDisks
        {
            get => _dataDisks ?? (_dataDisks = new InputList<Inputs.EcsInstanceSetDataDiskArgs>());
            set => _dataDisks = value;
        }

        /// <summary>
        /// The ID of the dedicated host on which to create the instance. If the `dedicated_host_id` is specified, the `spot_strategy` and `spot_price_limit`  are ignored. This is because preemptible instances cannot be created on dedicated hosts.
        /// </summary>
        [Input("dedicatedHostId")]
        public Input<string>? DedicatedHostId { get; set; }

        /// <summary>
        /// Whether to enable release protection for the instance.
        /// </summary>
        [Input("deletionProtection")]
        public Input<bool>? DeletionProtection { get; set; }

        /// <summary>
        /// The ID of the deployment set to which to deploy the instance.
        /// </summary>
        [Input("deploymentSetId")]
        public Input<string>? DeploymentSetId { get; set; }

        /// <summary>
        /// The description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with `http://` or `https://`.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// The instances that need to be excluded from the Instance Set. See the following `Block exclude_instance_filter`.
        /// </summary>
        [Input("excludeInstanceFilter")]
        public Input<Inputs.EcsInstanceSetExcludeInstanceFilterArgs>? ExcludeInstanceFilter { get; set; }

        /// <summary>
        /// The hostname of instance.
        /// </summary>
        [Input("hostName")]
        public Input<string>? HostName { get; set; }

        /// <summary>
        /// The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
        /// </summary>
        [Input("hpcClusterId")]
        public Input<string>? HpcClusterId { get; set; }

        /// <summary>
        /// The Image to use for the instance.
        /// </summary>
        [Input("imageId", required: true)]
        public Input<string> ImageId { get; set; } = null!;

        /// <summary>
        /// The billing method of the instance. Valid values: `PrePaid`, `PostPaid`.
        /// </summary>
        [Input("instanceChargeType")]
        public Input<string>? InstanceChargeType { get; set; }

        /// <summary>
        /// The name of the ECS. This instance_name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen, and must not begin with `http://` or `https://`.
        /// </summary>
        [Input("instanceName")]
        public Input<string>? InstanceName { get; set; }

        /// <summary>
        /// The type of instance to start.
        /// </summary>
        [Input("instanceType", required: true)]
        public Input<string> InstanceType { get; set; } = null!;

        /// <summary>
        /// The Internet charge type of the instance. Valid values are `PayByBandwidth`, `PayByTraffic`.
        /// </summary>
        [Input("internetChargeType")]
        public Input<string>? InternetChargeType { get; set; }

        /// <summary>
        /// The Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Valid values: `1` to `100`.
        /// </summary>
        [Input("internetMaxBandwidthOut")]
        public Input<int>? InternetMaxBandwidthOut { get; set; }

        /// <summary>
        /// The name of key pair that can login ECS instance successfully without password.
        /// </summary>
        [Input("keyPairName")]
        public Input<string>? KeyPairName { get; set; }

        /// <summary>
        /// The ID of the launch template.
        /// </summary>
        [Input("launchTemplateId")]
        public Input<string>? LaunchTemplateId { get; set; }

        /// <summary>
        /// The name of the launch template. To use a launch template to create an instance, you must use the `launch_template_id` or `launch_template_name` parameter to specify the launch template.
        /// </summary>
        [Input("launchTemplateName")]
        public Input<string>? LaunchTemplateName { get; set; }

        /// <summary>
        /// The version of the launch template.
        /// </summary>
        [Input("launchTemplateVersion")]
        public Input<string>? LaunchTemplateVersion { get; set; }

        [Input("networkInterfaces")]
        private InputList<Inputs.EcsInstanceSetNetworkInterfaceArgs>? _networkInterfaces;

        /// <summary>
        /// A list of NetworkInterface. See the following `Block network_interfaces`.
        /// </summary>
        public InputList<Inputs.EcsInstanceSetNetworkInterfaceArgs> NetworkInterfaces
        {
            get => _networkInterfaces ?? (_networkInterfaces = new InputList<Inputs.EcsInstanceSetNetworkInterfaceArgs>());
            set => _networkInterfaces = value;
        }

        /// <summary>
        /// The password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols.
        /// </summary>
        [Input("password")]
        public Input<string>? Password { get; set; }

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

        /// <summary>
        /// The duration that you will buy the resource, in month. It is valid when `instance_charge_type` is `PrePaid`.
        /// - When `period_unit` is `Month`, Valid values: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `12`, `24`, `36`, `48`, `60`.
        /// - When `period_unit` is `Week`, Valid values: `1`, `2`, `3`.
        /// </summary>
        [Input("period")]
        public Input<int>? Period { get; set; }

        /// <summary>
        /// The duration unit that you will buy the resource. It is valid when `instance_charge_type` is 'PrePaid'. Valid value: `Week`, `Month`.
        /// </summary>
        [Input("periodUnit")]
        public Input<string>? PeriodUnit { get; set; }

        /// <summary>
        /// The Instance RAM role name.
        /// </summary>
        [Input("ramRoleName")]
        public Input<string>? RamRoleName { get; set; }

        /// <summary>
        /// The ID of resource group which the instance belongs.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        /// <summary>
        /// The security enhancement strategy.
        /// - `Active`: Enable security enhancement strategy, it only works on system images.
        /// - `Deactive`: Disable security enhancement strategy, it works on all images.
        /// </summary>
        [Input("securityEnhancementStrategy")]
        public Input<string>? SecurityEnhancementStrategy { get; set; }

        [Input("securityGroupIds", required: true)]
        private InputList<string>? _securityGroupIds;

        /// <summary>
        /// A list of security group ids to associate with.
        /// </summary>
        public InputList<string> SecurityGroupIds
        {
            get => _securityGroupIds ?? (_securityGroupIds = new InputList<string>());
            set => _securityGroupIds = value;
        }

        /// <summary>
        /// The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
        /// </summary>
        [Input("spotPriceLimit")]
        public Input<double>? SpotPriceLimit { get; set; }

        /// <summary>
        /// The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter `instance_charge_type` is 'PostPaid'.
        /// - `NoSpot`: A regular Pay-As-You-Go instance.
        /// - `SpotWithPriceLimit`: A price threshold for a spot instance.
        /// - `SpotAsPriceGo`: A price that is based on the highest Pay-As-You-Go instance
        /// </summary>
        [Input("spotStrategy")]
        public Input<string>? SpotStrategy { get; set; }

        /// <summary>
        /// The ID of the automatic snapshot policy applied to the system disk.
        /// </summary>
        [Input("systemDiskAutoSnapshotPolicyId")]
        public Input<string>? SystemDiskAutoSnapshotPolicyId { get; set; }

        /// <summary>
        /// The category of the system disk. Valid values are `cloud_efficiency`, `cloud_ssd`, `cloud_essd`, `cloud`.
        /// </summary>
        [Input("systemDiskCategory")]
        public Input<string>? SystemDiskCategory { get; set; }

        /// <summary>
        /// The description of the system disk. The description must be 2 to 256 characters in length and cannot start with `http://` or `https://`.
        /// </summary>
        [Input("systemDiskDescription")]
        public Input<string>? SystemDiskDescription { get; set; }

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

        /// <summary>
        /// The performance level of the ESSD used as the system disk. Valid values: `PL0`, `PL1`, `PL2`, `PL3`.
        /// </summary>
        [Input("systemDiskPerformanceLevel")]
        public Input<string>? SystemDiskPerformanceLevel { get; set; }

        /// <summary>
        /// The size of the system disk, measured in GiB. Value range:  values: `20` to `500`.
        /// </summary>
        [Input("systemDiskSize")]
        public Input<int>? SystemDiskSize { get; set; }

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

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        public InputMap<string> Tags
        {
            get => _tags ?? (_tags = new InputMap<string>());
            set => _tags = value;
        }

        /// <summary>
        /// Whether to automatically append incremental suffixes to the hostname specified by the HostName parameter and to the instance name specified by the InstanceName parameter when you batch create instances. The incremental suffixes can range from `001` to `999`.
        /// </summary>
        [Input("uniqueSuffix")]
        public Input<bool>? UniqueSuffix { get; set; }

        /// <summary>
        /// The virtual switch ID to launch in VPC.
        /// </summary>
        [Input("vswitchId")]
        public Input<string>? VswitchId { get; set; }

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

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

    public sealed class EcsInstanceSetState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The number of instances that you want to create. Valid values: `1` to `100`.
        /// </summary>
        [Input("amount")]
        public Input<int>? Amount { get; set; }

        /// <summary>
        /// The automatic release time of the `PostPaid` instance.
        /// </summary>
        [Input("autoReleaseTime")]
        public Input<string>? AutoReleaseTime { get; set; }

        /// <summary>
        /// Whether to enable auto-renewal for the instance. This parameter is valid only when the `instance_charge_type` is set to `PrePaid`.
        /// </summary>
        [Input("autoRenew")]
        public Input<bool>? AutoRenew { get; set; }

        /// <summary>
        /// Auto renewal period of an instance, in the unit of month. It is valid when `instance_charge_type` is `PrePaid`.
        /// - When `period_unit` is `Month`, Valid values: `1`, `2`, `3`, `6`, `12`.
        /// - When `period_unit` is `Week`, Valid values: `1`, `2`, `3`.
        /// </summary>
        [Input("autoRenewPeriod")]
        public Input<int>? AutoRenewPeriod { get; set; }

        /// <summary>
        /// Indicate how to check instance ready to use.
        /// - `false`: Default value. Means that the instances are ready when their DescribeInstances status is Running, at which time guestOS(Ecs os) may not be ready yet.
        /// - `true`: Checking instance ready with Ecs assistant, which means guestOs boots successfully. Premise is that the specified image `image_id` has built-in Ecs assistant. Most of the public images have assistant installed already.
        /// </summary>
        [Input("bootCheckOsWithAssistant")]
        public Input<bool>? BootCheckOsWithAssistant { get; set; }

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

        /// <summary>
        /// The list of data disks created with instance. See the following `Block data_disks`.
        /// </summary>
        public InputList<Inputs.EcsInstanceSetDataDiskGetArgs> DataDisks
        {
            get => _dataDisks ?? (_dataDisks = new InputList<Inputs.EcsInstanceSetDataDiskGetArgs>());
            set => _dataDisks = value;
        }

        /// <summary>
        /// The ID of the dedicated host on which to create the instance. If the `dedicated_host_id` is specified, the `spot_strategy` and `spot_price_limit`  are ignored. This is because preemptible instances cannot be created on dedicated hosts.
        /// </summary>
        [Input("dedicatedHostId")]
        public Input<string>? DedicatedHostId { get; set; }

        /// <summary>
        /// Whether to enable release protection for the instance.
        /// </summary>
        [Input("deletionProtection")]
        public Input<bool>? DeletionProtection { get; set; }

        /// <summary>
        /// The ID of the deployment set to which to deploy the instance.
        /// </summary>
        [Input("deploymentSetId")]
        public Input<string>? DeploymentSetId { get; set; }

        /// <summary>
        /// The description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with `http://` or `https://`.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// The instances that need to be excluded from the Instance Set. See the following `Block exclude_instance_filter`.
        /// </summary>
        [Input("excludeInstanceFilter")]
        public Input<Inputs.EcsInstanceSetExcludeInstanceFilterGetArgs>? ExcludeInstanceFilter { get; set; }

        /// <summary>
        /// The hostname of instance.
        /// </summary>
        [Input("hostName")]
        public Input<string>? HostName { get; set; }

        /// <summary>
        /// The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
        /// </summary>
        [Input("hpcClusterId")]
        public Input<string>? HpcClusterId { get; set; }

        /// <summary>
        /// The Image to use for the instance.
        /// </summary>
        [Input("imageId")]
        public Input<string>? ImageId { get; set; }

        /// <summary>
        /// The billing method of the instance. Valid values: `PrePaid`, `PostPaid`.
        /// </summary>
        [Input("instanceChargeType")]
        public Input<string>? InstanceChargeType { get; set; }

        [Input("instanceIds")]
        private InputList<string>? _instanceIds;

        /// <summary>
        /// A list of ECS Instance ID.
        /// </summary>
        public InputList<string> InstanceIds
        {
            get => _instanceIds ?? (_instanceIds = new InputList<string>());
            set => _instanceIds = value;
        }

        /// <summary>
        /// The name of the ECS. This instance_name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen, and must not begin with `http://` or `https://`.
        /// </summary>
        [Input("instanceName")]
        public Input<string>? InstanceName { get; set; }

        /// <summary>
        /// The type of instance to start.
        /// </summary>
        [Input("instanceType")]
        public Input<string>? InstanceType { get; set; }

        /// <summary>
        /// The Internet charge type of the instance. Valid values are `PayByBandwidth`, `PayByTraffic`.
        /// </summary>
        [Input("internetChargeType")]
        public Input<string>? InternetChargeType { get; set; }

        /// <summary>
        /// The Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Valid values: `1` to `100`.
        /// </summary>
        [Input("internetMaxBandwidthOut")]
        public Input<int>? InternetMaxBandwidthOut { get; set; }

        /// <summary>
        /// The name of key pair that can login ECS instance successfully without password.
        /// </summary>
        [Input("keyPairName")]
        public Input<string>? KeyPairName { get; set; }

        /// <summary>
        /// The ID of the launch template.
        /// </summary>
        [Input("launchTemplateId")]
        public Input<string>? LaunchTemplateId { get; set; }

        /// <summary>
        /// The name of the launch template. To use a launch template to create an instance, you must use the `launch_template_id` or `launch_template_name` parameter to specify the launch template.
        /// </summary>
        [Input("launchTemplateName")]
        public Input<string>? LaunchTemplateName { get; set; }

        /// <summary>
        /// The version of the launch template.
        /// </summary>
        [Input("launchTemplateVersion")]
        public Input<string>? LaunchTemplateVersion { get; set; }

        [Input("networkInterfaces")]
        private InputList<Inputs.EcsInstanceSetNetworkInterfaceGetArgs>? _networkInterfaces;

        /// <summary>
        /// A list of NetworkInterface. See the following `Block network_interfaces`.
        /// </summary>
        public InputList<Inputs.EcsInstanceSetNetworkInterfaceGetArgs> NetworkInterfaces
        {
            get => _networkInterfaces ?? (_networkInterfaces = new InputList<Inputs.EcsInstanceSetNetworkInterfaceGetArgs>());
            set => _networkInterfaces = value;
        }

        /// <summary>
        /// The password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols.
        /// </summary>
        [Input("password")]
        public Input<string>? Password { get; set; }

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

        /// <summary>
        /// The duration that you will buy the resource, in month. It is valid when `instance_charge_type` is `PrePaid`.
        /// - When `period_unit` is `Month`, Valid values: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `12`, `24`, `36`, `48`, `60`.
        /// - When `period_unit` is `Week`, Valid values: `1`, `2`, `3`.
        /// </summary>
        [Input("period")]
        public Input<int>? Period { get; set; }

        /// <summary>
        /// The duration unit that you will buy the resource. It is valid when `instance_charge_type` is 'PrePaid'. Valid value: `Week`, `Month`.
        /// </summary>
        [Input("periodUnit")]
        public Input<string>? PeriodUnit { get; set; }

        /// <summary>
        /// The Instance RAM role name.
        /// </summary>
        [Input("ramRoleName")]
        public Input<string>? RamRoleName { get; set; }

        /// <summary>
        /// The ID of resource group which the instance belongs.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        /// <summary>
        /// The security enhancement strategy.
        /// - `Active`: Enable security enhancement strategy, it only works on system images.
        /// - `Deactive`: Disable security enhancement strategy, it works on all images.
        /// </summary>
        [Input("securityEnhancementStrategy")]
        public Input<string>? SecurityEnhancementStrategy { get; set; }

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

        /// <summary>
        /// A list of security group ids to associate with.
        /// </summary>
        public InputList<string> SecurityGroupIds
        {
            get => _securityGroupIds ?? (_securityGroupIds = new InputList<string>());
            set => _securityGroupIds = value;
        }

        /// <summary>
        /// The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
        /// </summary>
        [Input("spotPriceLimit")]
        public Input<double>? SpotPriceLimit { get; set; }

        /// <summary>
        /// The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter `instance_charge_type` is 'PostPaid'.
        /// - `NoSpot`: A regular Pay-As-You-Go instance.
        /// - `SpotWithPriceLimit`: A price threshold for a spot instance.
        /// - `SpotAsPriceGo`: A price that is based on the highest Pay-As-You-Go instance
        /// </summary>
        [Input("spotStrategy")]
        public Input<string>? SpotStrategy { get; set; }

        /// <summary>
        /// The ID of the automatic snapshot policy applied to the system disk.
        /// </summary>
        [Input("systemDiskAutoSnapshotPolicyId")]
        public Input<string>? SystemDiskAutoSnapshotPolicyId { get; set; }

        /// <summary>
        /// The category of the system disk. Valid values are `cloud_efficiency`, `cloud_ssd`, `cloud_essd`, `cloud`.
        /// </summary>
        [Input("systemDiskCategory")]
        public Input<string>? SystemDiskCategory { get; set; }

        /// <summary>
        /// The description of the system disk. The description must be 2 to 256 characters in length and cannot start with `http://` or `https://`.
        /// </summary>
        [Input("systemDiskDescription")]
        public Input<string>? SystemDiskDescription { get; set; }

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

        /// <summary>
        /// The performance level of the ESSD used as the system disk. Valid values: `PL0`, `PL1`, `PL2`, `PL3`.
        /// </summary>
        [Input("systemDiskPerformanceLevel")]
        public Input<string>? SystemDiskPerformanceLevel { get; set; }

        /// <summary>
        /// The size of the system disk, measured in GiB. Value range:  values: `20` to `500`.
        /// </summary>
        [Input("systemDiskSize")]
        public Input<int>? SystemDiskSize { get; set; }

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

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        public InputMap<string> Tags
        {
            get => _tags ?? (_tags = new InputMap<string>());
            set => _tags = value;
        }

        /// <summary>
        /// Whether to automatically append incremental suffixes to the hostname specified by the HostName parameter and to the instance name specified by the InstanceName parameter when you batch create instances. The incremental suffixes can range from `001` to `999`.
        /// </summary>
        [Input("uniqueSuffix")]
        public Input<bool>? UniqueSuffix { get; set; }

        /// <summary>
        /// The virtual switch ID to launch in VPC.
        /// </summary>
        [Input("vswitchId")]
        public Input<string>? VswitchId { get; set; }

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

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