// *** 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 reboot_instance
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var rebootInstance = new Tencentcloud.Cvm.RebootInstance("rebootInstance", new Tencentcloud.Cvm.RebootInstanceArgs
    ///         {
    ///             ForceReboot = false,
    ///             InstanceId = "ins-xxxxx",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Cvm/rebootInstance:RebootInstance")]
    public partial class RebootInstance : Pulumi.CustomResource
    {
        /// <summary>
        /// This parameter has been disused. We recommend using StopType instead. Note that ForceReboot and StopType parameters cannot be specified at the same time. Whether to forcibly restart an instance after a normal restart fails. Valid values are `TRUE` and `FALSE`. Default value: FALSE.
        /// </summary>
        [Output("forceReboot")]
        public Output<bool?> ForceReboot { get; private set; } = null!;

        /// <summary>
        /// Instance ID.
        /// </summary>
        [Output("instanceId")]
        public Output<string> InstanceId { get; private set; } = null!;

        /// <summary>
        /// Shutdown type. Valid values: `SOFT`: soft shutdown; `HARD`: hard shutdown; `SOFT_FIRST`: perform a soft shutdown first, and perform a hard shutdown if the soft shutdown fails. Default value: SOFT.
        /// </summary>
        [Output("stopType")]
        public Output<string?> StopType { get; private set; } = null!;


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

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

    public sealed class RebootInstanceArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// This parameter has been disused. We recommend using StopType instead. Note that ForceReboot and StopType parameters cannot be specified at the same time. Whether to forcibly restart an instance after a normal restart fails. Valid values are `TRUE` and `FALSE`. Default value: FALSE.
        /// </summary>
        [Input("forceReboot")]
        public Input<bool>? ForceReboot { get; set; }

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

        /// <summary>
        /// Shutdown type. Valid values: `SOFT`: soft shutdown; `HARD`: hard shutdown; `SOFT_FIRST`: perform a soft shutdown first, and perform a hard shutdown if the soft shutdown fails. Default value: SOFT.
        /// </summary>
        [Input("stopType")]
        public Input<string>? StopType { get; set; }

        public RebootInstanceArgs()
        {
        }
    }

    public sealed class RebootInstanceState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// This parameter has been disused. We recommend using StopType instead. Note that ForceReboot and StopType parameters cannot be specified at the same time. Whether to forcibly restart an instance after a normal restart fails. Valid values are `TRUE` and `FALSE`. Default value: FALSE.
        /// </summary>
        [Input("forceReboot")]
        public Input<bool>? ForceReboot { get; set; }

        /// <summary>
        /// Instance ID.
        /// </summary>
        [Input("instanceId")]
        public Input<string>? InstanceId { get; set; }

        /// <summary>
        /// Shutdown type. Valid values: `SOFT`: soft shutdown; `HARD`: hard shutdown; `SOFT_FIRST`: perform a soft shutdown first, and perform a hard shutdown if the soft shutdown fails. Default value: SOFT.
        /// </summary>
        [Input("stopType")]
        public Input<string>? StopType { get; set; }

        public RebootInstanceState()
        {
        }
    }
}
