// *** 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 Deployment Set resource.
    /// 
    /// For information about ECS Deployment Set and how to use it, see [What is Deployment Set](https://www.alibabacloud.com/help/en/doc-detail/91269.htm).
    /// 
    /// &gt; **NOTE:** Available in v1.140.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.EcsDeploymentSet("default", new()
    ///     {
    ///         DeploymentSetName = "example_value",
    ///         Description = "example_value",
    ///         Domain = "Default",
    ///         Granularity = "Host",
    ///         Strategy = "Availability",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// ECS Deployment Set can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:ecs/ecsDeploymentSet:EcsDeploymentSet example &lt;id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:ecs/ecsDeploymentSet:EcsDeploymentSet")]
    public partial class EcsDeploymentSet : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The name of the deployment set. The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with `http://` or `https://`.
        /// </summary>
        [Output("deploymentSetName")]
        public Output<string?> DeploymentSetName { get; private set; } = null!;

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

        /// <summary>
        /// The deployment domain. Valid values: `Default`.
        /// </summary>
        [Output("domain")]
        public Output<string?> Domain { get; private set; } = null!;

        /// <summary>
        /// The deployment granularity. Valid values: `Host`.
        /// </summary>
        [Output("granularity")]
        public Output<string?> Granularity { get; private set; } = null!;

        /// <summary>
        /// The on unable to redeploy failed instance. Valid values: `CancelMembershipAndStart`, `KeepStopped`.
        /// </summary>
        [Output("onUnableToRedeployFailedInstance")]
        public Output<string?> OnUnableToRedeployFailedInstance { get; private set; } = null!;

        /// <summary>
        /// The deployment strategy. Valid values: `Availability`.
        /// </summary>
        [Output("strategy")]
        public Output<string?> Strategy { get; private set; } = null!;


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

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

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

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

        /// <summary>
        /// The deployment domain. Valid values: `Default`.
        /// </summary>
        [Input("domain")]
        public Input<string>? Domain { get; set; }

        /// <summary>
        /// The deployment granularity. Valid values: `Host`.
        /// </summary>
        [Input("granularity")]
        public Input<string>? Granularity { get; set; }

        /// <summary>
        /// The on unable to redeploy failed instance. Valid values: `CancelMembershipAndStart`, `KeepStopped`.
        /// </summary>
        [Input("onUnableToRedeployFailedInstance")]
        public Input<string>? OnUnableToRedeployFailedInstance { get; set; }

        /// <summary>
        /// The deployment strategy. Valid values: `Availability`.
        /// </summary>
        [Input("strategy")]
        public Input<string>? Strategy { get; set; }

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

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

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

        /// <summary>
        /// The deployment domain. Valid values: `Default`.
        /// </summary>
        [Input("domain")]
        public Input<string>? Domain { get; set; }

        /// <summary>
        /// The deployment granularity. Valid values: `Host`.
        /// </summary>
        [Input("granularity")]
        public Input<string>? Granularity { get; set; }

        /// <summary>
        /// The on unable to redeploy failed instance. Valid values: `CancelMembershipAndStart`, `KeepStopped`.
        /// </summary>
        [Input("onUnableToRedeployFailedInstance")]
        public Input<string>? OnUnableToRedeployFailedInstance { get; set; }

        /// <summary>
        /// The deployment strategy. Valid values: `Availability`.
        /// </summary>
        [Input("strategy")]
        public Input<string>? Strategy { get; set; }

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