// *** 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;
using Pulumi;

namespace TencentCloudIAC.PulumiPackage.Tencentcloud.Cvm
{
    /// <summary>
    /// Provides a resource to create a cvm launch_template
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var demo = new Tencentcloud.Cvm.LaunchTemplate("demo", new Tencentcloud.Cvm.LaunchTemplateArgs
    ///         {
    ///             ImageId = "img-xxxxxxxxx",
    ///             LaunchTemplateName = "test",
    ///             Placement = new Tencentcloud.Cvm.Inputs.LaunchTemplatePlacementArgs
    ///             {
    ///                 HostIds = {},
    ///                 HostIps = {},
    ///                 ProjectId = 0,
    ///                 Zone = "ap-guangzhou-6",
    ///             },
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Cvm/launchTemplate:LaunchTemplate")]
    public partial class LaunchTemplate : Pulumi.CustomResource
    {
        /// <summary>
        /// Timed task.
        /// </summary>
        [Output("actionTimer")]
        public Output<Outputs.LaunchTemplateActionTimer> ActionTimer { get; private set; } = null!;

        /// <summary>
        /// The role name of CAM.
        /// </summary>
        [Output("camRoleName")]
        public Output<string?> CamRoleName { get; private set; } = null!;

        /// <summary>
        /// A string to used guarantee request idempotency.
        /// </summary>
        [Output("clientToken")]
        public Output<string?> ClientToken { get; private set; } = null!;

        /// <summary>
        /// Data disk configuration information of the instance.
        /// </summary>
        [Output("dataDisks")]
        public Output<ImmutableArray<Outputs.LaunchTemplateDataDisk>> DataDisks { get; private set; } = null!;

        /// <summary>
        /// Instance destruction protection flag.
        /// </summary>
        [Output("disableApiTermination")]
        public Output<bool?> DisableApiTermination { get; private set; } = null!;

        /// <summary>
        /// The ID of disaster recover group.
        /// </summary>
        [Output("disasterRecoverGroupIds")]
        public Output<ImmutableArray<string>> DisasterRecoverGroupIds { get; private set; } = null!;

        /// <summary>
        /// Whether to preflight only this request, true or false.
        /// </summary>
        [Output("dryRun")]
        public Output<bool?> DryRun { get; private set; } = null!;

        /// <summary>
        /// Enhanced service. If this parameter is not specified, cloud monitoring and cloud security services will be enabled by default in public images.
        /// </summary>
        [Output("enhancedService")]
        public Output<Outputs.LaunchTemplateEnhancedService> EnhancedService { get; private set; } = null!;

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

        /// <summary>
        /// The ID of HPC cluster.
        /// </summary>
        [Output("hpcClusterId")]
        public Output<string?> HpcClusterId { get; private set; } = null!;

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

        /// <summary>
        /// The configuration of charge prepaid.
        /// </summary>
        [Output("instanceChargePrepaid")]
        public Output<Outputs.LaunchTemplateInstanceChargePrepaid?> InstanceChargePrepaid { get; private set; } = null!;

        /// <summary>
        /// The charge type of instance. Default value: POSTPAID_BY_HOUR.
        /// </summary>
        [Output("instanceChargeType")]
        public Output<string> InstanceChargeType { get; private set; } = null!;

        /// <summary>
        /// The number of instances purchased.
        /// </summary>
        [Output("instanceCount")]
        public Output<int?> InstanceCount { get; private set; } = null!;

        /// <summary>
        /// The marketplace options of instance.
        /// </summary>
        [Output("instanceMarketOptions")]
        public Output<Outputs.LaunchTemplateInstanceMarketOptions?> InstanceMarketOptions { get; private set; } = null!;

        /// <summary>
        /// The name of instance. If you do not specify an instance display name, 'Unnamed' is displayed by default.
        /// </summary>
        [Output("instanceName")]
        public Output<string> InstanceName { get; private set; } = null!;

        /// <summary>
        /// The type of the instance. If this parameter is not specified, the system will dynamically specify the default model according to the resource sales in the current region.
        /// </summary>
        [Output("instanceType")]
        public Output<string> InstanceType { get; private set; } = null!;

        /// <summary>
        /// The information settings of public network bandwidth. If you do not specify this parameter, the default Internet bandwidth is 0 Mbps.
        /// </summary>
        [Output("internetAccessible")]
        public Output<Outputs.LaunchTemplateInternetAccessible> InternetAccessible { get; private set; } = null!;

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

        /// <summary>
        /// Instance launch template version description.
        /// </summary>
        [Output("launchTemplateVersionDescription")]
        public Output<string?> LaunchTemplateVersionDescription { get; private set; } = null!;

        /// <summary>
        /// The login settings of instance. By default, passwords are randomly generated and notified to users via internal messages.
        /// </summary>
        [Output("loginSettings")]
        public Output<Outputs.LaunchTemplateLoginSettings> LoginSettings { get; private set; } = null!;

        /// <summary>
        /// The location of instance.
        /// </summary>
        [Output("placement")]
        public Output<Outputs.LaunchTemplatePlacement> Placement { get; private set; } = null!;

        /// <summary>
        /// The security group ID of instance. If this parameter is not specified, the default security group is bound.
        /// </summary>
        [Output("securityGroupIds")]
        public Output<ImmutableArray<string>> SecurityGroupIds { get; private set; } = null!;

        /// <summary>
        /// System disk configuration information of the instance. If this parameter is not specified, it is assigned according to the system default.
        /// </summary>
        [Output("systemDisk")]
        public Output<Outputs.LaunchTemplateSystemDisk> SystemDisk { get; private set; } = null!;

        /// <summary>
        /// Tag description list.
        /// </summary>
        [Output("tagSpecifications")]
        public Output<ImmutableArray<Outputs.LaunchTemplateTagSpecification>> TagSpecifications { get; private set; } = null!;

        /// <summary>
        /// Tag description list.
        /// </summary>
        [Output("tags")]
        public Output<ImmutableDictionary<string, object>?> Tags { get; private set; } = null!;

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

        /// <summary>
        /// The configuration information of VPC. If this parameter is not specified, the basic network is used by default.
        /// </summary>
        [Output("virtualPrivateCloud")]
        public Output<Outputs.LaunchTemplateVirtualPrivateCloud> VirtualPrivateCloud { get; private set; } = null!;


        /// <summary>
        /// Create a LaunchTemplate 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 LaunchTemplate(string name, LaunchTemplateArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Cvm/launchTemplate:LaunchTemplate", name, args ?? new LaunchTemplateArgs(), MakeResourceOptions(options, ""))
        {
        }

        private LaunchTemplate(string name, Input<string> id, LaunchTemplateState? state = null, CustomResourceOptions? options = null)
            : base("tencentcloud:Cvm/launchTemplate:LaunchTemplate", 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/tencentcloudstack",
            };
            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 LaunchTemplate 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 LaunchTemplate Get(string name, Input<string> id, LaunchTemplateState? state = null, CustomResourceOptions? options = null)
        {
            return new LaunchTemplate(name, id, state, options);
        }
    }

    public sealed class LaunchTemplateArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Timed task.
        /// </summary>
        [Input("actionTimer")]
        public Input<Inputs.LaunchTemplateActionTimerArgs>? ActionTimer { get; set; }

        /// <summary>
        /// The role name of CAM.
        /// </summary>
        [Input("camRoleName")]
        public Input<string>? CamRoleName { get; set; }

        /// <summary>
        /// A string to used guarantee request idempotency.
        /// </summary>
        [Input("clientToken")]
        public Input<string>? ClientToken { get; set; }

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

        /// <summary>
        /// Data disk configuration information of the instance.
        /// </summary>
        public InputList<Inputs.LaunchTemplateDataDiskArgs> DataDisks
        {
            get => _dataDisks ?? (_dataDisks = new InputList<Inputs.LaunchTemplateDataDiskArgs>());
            set => _dataDisks = value;
        }

        /// <summary>
        /// Instance destruction protection flag.
        /// </summary>
        [Input("disableApiTermination")]
        public Input<bool>? DisableApiTermination { get; set; }

        [Input("disasterRecoverGroupIds")]
        private InputList<string>? _disasterRecoverGroupIds;

        /// <summary>
        /// The ID of disaster recover group.
        /// </summary>
        public InputList<string> DisasterRecoverGroupIds
        {
            get => _disasterRecoverGroupIds ?? (_disasterRecoverGroupIds = new InputList<string>());
            set => _disasterRecoverGroupIds = value;
        }

        /// <summary>
        /// Whether to preflight only this request, true or false.
        /// </summary>
        [Input("dryRun")]
        public Input<bool>? DryRun { get; set; }

        /// <summary>
        /// Enhanced service. If this parameter is not specified, cloud monitoring and cloud security services will be enabled by default in public images.
        /// </summary>
        [Input("enhancedService")]
        public Input<Inputs.LaunchTemplateEnhancedServiceArgs>? EnhancedService { get; set; }

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

        /// <summary>
        /// The ID of HPC cluster.
        /// </summary>
        [Input("hpcClusterId")]
        public Input<string>? HpcClusterId { get; set; }

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

        /// <summary>
        /// The configuration of charge prepaid.
        /// </summary>
        [Input("instanceChargePrepaid")]
        public Input<Inputs.LaunchTemplateInstanceChargePrepaidArgs>? InstanceChargePrepaid { get; set; }

        /// <summary>
        /// The charge type of instance. Default value: POSTPAID_BY_HOUR.
        /// </summary>
        [Input("instanceChargeType")]
        public Input<string>? InstanceChargeType { get; set; }

        /// <summary>
        /// The number of instances purchased.
        /// </summary>
        [Input("instanceCount")]
        public Input<int>? InstanceCount { get; set; }

        /// <summary>
        /// The marketplace options of instance.
        /// </summary>
        [Input("instanceMarketOptions")]
        public Input<Inputs.LaunchTemplateInstanceMarketOptionsArgs>? InstanceMarketOptions { get; set; }

        /// <summary>
        /// The name of instance. If you do not specify an instance display name, 'Unnamed' is displayed by default.
        /// </summary>
        [Input("instanceName")]
        public Input<string>? InstanceName { get; set; }

        /// <summary>
        /// The type of the instance. If this parameter is not specified, the system will dynamically specify the default model according to the resource sales in the current region.
        /// </summary>
        [Input("instanceType")]
        public Input<string>? InstanceType { get; set; }

        /// <summary>
        /// The information settings of public network bandwidth. If you do not specify this parameter, the default Internet bandwidth is 0 Mbps.
        /// </summary>
        [Input("internetAccessible")]
        public Input<Inputs.LaunchTemplateInternetAccessibleArgs>? InternetAccessible { get; set; }

        /// <summary>
        /// The name of launch template.
        /// </summary>
        [Input("launchTemplateName", required: true)]
        public Input<string> LaunchTemplateName { get; set; } = null!;

        /// <summary>
        /// Instance launch template version description.
        /// </summary>
        [Input("launchTemplateVersionDescription")]
        public Input<string>? LaunchTemplateVersionDescription { get; set; }

        /// <summary>
        /// The login settings of instance. By default, passwords are randomly generated and notified to users via internal messages.
        /// </summary>
        [Input("loginSettings")]
        public Input<Inputs.LaunchTemplateLoginSettingsArgs>? LoginSettings { get; set; }

        /// <summary>
        /// The location of instance.
        /// </summary>
        [Input("placement", required: true)]
        public Input<Inputs.LaunchTemplatePlacementArgs> Placement { get; set; } = null!;

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

        /// <summary>
        /// The security group ID of instance. If this parameter is not specified, the default security group is bound.
        /// </summary>
        public InputList<string> SecurityGroupIds
        {
            get => _securityGroupIds ?? (_securityGroupIds = new InputList<string>());
            set => _securityGroupIds = value;
        }

        /// <summary>
        /// System disk configuration information of the instance. If this parameter is not specified, it is assigned according to the system default.
        /// </summary>
        [Input("systemDisk")]
        public Input<Inputs.LaunchTemplateSystemDiskArgs>? SystemDisk { get; set; }

        [Input("tagSpecifications")]
        private InputList<Inputs.LaunchTemplateTagSpecificationArgs>? _tagSpecifications;

        /// <summary>
        /// Tag description list.
        /// </summary>
        public InputList<Inputs.LaunchTemplateTagSpecificationArgs> TagSpecifications
        {
            get => _tagSpecifications ?? (_tagSpecifications = new InputList<Inputs.LaunchTemplateTagSpecificationArgs>());
            set => _tagSpecifications = value;
        }

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

        /// <summary>
        /// Tag description list.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

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

        /// <summary>
        /// The configuration information of VPC. If this parameter is not specified, the basic network is used by default.
        /// </summary>
        [Input("virtualPrivateCloud")]
        public Input<Inputs.LaunchTemplateVirtualPrivateCloudArgs>? VirtualPrivateCloud { get; set; }

        public LaunchTemplateArgs()
        {
        }
    }

    public sealed class LaunchTemplateState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Timed task.
        /// </summary>
        [Input("actionTimer")]
        public Input<Inputs.LaunchTemplateActionTimerGetArgs>? ActionTimer { get; set; }

        /// <summary>
        /// The role name of CAM.
        /// </summary>
        [Input("camRoleName")]
        public Input<string>? CamRoleName { get; set; }

        /// <summary>
        /// A string to used guarantee request idempotency.
        /// </summary>
        [Input("clientToken")]
        public Input<string>? ClientToken { get; set; }

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

        /// <summary>
        /// Data disk configuration information of the instance.
        /// </summary>
        public InputList<Inputs.LaunchTemplateDataDiskGetArgs> DataDisks
        {
            get => _dataDisks ?? (_dataDisks = new InputList<Inputs.LaunchTemplateDataDiskGetArgs>());
            set => _dataDisks = value;
        }

        /// <summary>
        /// Instance destruction protection flag.
        /// </summary>
        [Input("disableApiTermination")]
        public Input<bool>? DisableApiTermination { get; set; }

        [Input("disasterRecoverGroupIds")]
        private InputList<string>? _disasterRecoverGroupIds;

        /// <summary>
        /// The ID of disaster recover group.
        /// </summary>
        public InputList<string> DisasterRecoverGroupIds
        {
            get => _disasterRecoverGroupIds ?? (_disasterRecoverGroupIds = new InputList<string>());
            set => _disasterRecoverGroupIds = value;
        }

        /// <summary>
        /// Whether to preflight only this request, true or false.
        /// </summary>
        [Input("dryRun")]
        public Input<bool>? DryRun { get; set; }

        /// <summary>
        /// Enhanced service. If this parameter is not specified, cloud monitoring and cloud security services will be enabled by default in public images.
        /// </summary>
        [Input("enhancedService")]
        public Input<Inputs.LaunchTemplateEnhancedServiceGetArgs>? EnhancedService { get; set; }

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

        /// <summary>
        /// The ID of HPC cluster.
        /// </summary>
        [Input("hpcClusterId")]
        public Input<string>? HpcClusterId { get; set; }

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

        /// <summary>
        /// The configuration of charge prepaid.
        /// </summary>
        [Input("instanceChargePrepaid")]
        public Input<Inputs.LaunchTemplateInstanceChargePrepaidGetArgs>? InstanceChargePrepaid { get; set; }

        /// <summary>
        /// The charge type of instance. Default value: POSTPAID_BY_HOUR.
        /// </summary>
        [Input("instanceChargeType")]
        public Input<string>? InstanceChargeType { get; set; }

        /// <summary>
        /// The number of instances purchased.
        /// </summary>
        [Input("instanceCount")]
        public Input<int>? InstanceCount { get; set; }

        /// <summary>
        /// The marketplace options of instance.
        /// </summary>
        [Input("instanceMarketOptions")]
        public Input<Inputs.LaunchTemplateInstanceMarketOptionsGetArgs>? InstanceMarketOptions { get; set; }

        /// <summary>
        /// The name of instance. If you do not specify an instance display name, 'Unnamed' is displayed by default.
        /// </summary>
        [Input("instanceName")]
        public Input<string>? InstanceName { get; set; }

        /// <summary>
        /// The type of the instance. If this parameter is not specified, the system will dynamically specify the default model according to the resource sales in the current region.
        /// </summary>
        [Input("instanceType")]
        public Input<string>? InstanceType { get; set; }

        /// <summary>
        /// The information settings of public network bandwidth. If you do not specify this parameter, the default Internet bandwidth is 0 Mbps.
        /// </summary>
        [Input("internetAccessible")]
        public Input<Inputs.LaunchTemplateInternetAccessibleGetArgs>? InternetAccessible { get; set; }

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

        /// <summary>
        /// Instance launch template version description.
        /// </summary>
        [Input("launchTemplateVersionDescription")]
        public Input<string>? LaunchTemplateVersionDescription { get; set; }

        /// <summary>
        /// The login settings of instance. By default, passwords are randomly generated and notified to users via internal messages.
        /// </summary>
        [Input("loginSettings")]
        public Input<Inputs.LaunchTemplateLoginSettingsGetArgs>? LoginSettings { get; set; }

        /// <summary>
        /// The location of instance.
        /// </summary>
        [Input("placement")]
        public Input<Inputs.LaunchTemplatePlacementGetArgs>? Placement { get; set; }

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

        /// <summary>
        /// The security group ID of instance. If this parameter is not specified, the default security group is bound.
        /// </summary>
        public InputList<string> SecurityGroupIds
        {
            get => _securityGroupIds ?? (_securityGroupIds = new InputList<string>());
            set => _securityGroupIds = value;
        }

        /// <summary>
        /// System disk configuration information of the instance. If this parameter is not specified, it is assigned according to the system default.
        /// </summary>
        [Input("systemDisk")]
        public Input<Inputs.LaunchTemplateSystemDiskGetArgs>? SystemDisk { get; set; }

        [Input("tagSpecifications")]
        private InputList<Inputs.LaunchTemplateTagSpecificationGetArgs>? _tagSpecifications;

        /// <summary>
        /// Tag description list.
        /// </summary>
        public InputList<Inputs.LaunchTemplateTagSpecificationGetArgs> TagSpecifications
        {
            get => _tagSpecifications ?? (_tagSpecifications = new InputList<Inputs.LaunchTemplateTagSpecificationGetArgs>());
            set => _tagSpecifications = value;
        }

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

        /// <summary>
        /// Tag description list.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

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

        /// <summary>
        /// The configuration information of VPC. If this parameter is not specified, the basic network is used by default.
        /// </summary>
        [Input("virtualPrivateCloud")]
        public Input<Inputs.LaunchTemplateVirtualPrivateCloudGetArgs>? VirtualPrivateCloud { get; set; }

        public LaunchTemplateState()
        {
        }
    }
}
