<reponame>rhysmdnz/pulumi-alicloud-rhys-hacks<gh_stars>0// *** 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 Prefix List resource.
    /// 
    /// For information about ECS Prefix List and how to use it, see [What is Prefix List.](https://www.alibabacloud.com/help/en/doc-detail/207969.html).
    /// 
    /// &gt; **NOTE:** Available in v1.152.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.EcsPrefixList("default", new()
    ///     {
    ///         AddressFamily = "IPv4",
    ///         Description = "description",
    ///         Entries = new[]
    ///         {
    ///             new AliCloud.Ecs.Inputs.EcsPrefixListEntryArgs
    ///             {
    ///                 Cidr = "192.168.0.0/24",
    ///                 Description = "description",
    ///             },
    ///         },
    ///         MaxEntries = 2,
    ///         PrefixListName = "tftest",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// ECS Prefix List can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:ecs/ecsPrefixList:EcsPrefixList example &lt;id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:ecs/ecsPrefixList:EcsPrefixList")]
    public partial class EcsPrefixList : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The IP address family. Valid values: `IPv4`,`IPv6`.
        /// </summary>
        [Output("addressFamily")]
        public Output<string> AddressFamily { get; private set; } = null!;

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

        /// <summary>
        /// The Entry. The details see Block `entry`.
        /// </summary>
        [Output("entries")]
        public Output<ImmutableArray<Outputs.EcsPrefixListEntry>> Entries { get; private set; } = null!;

        /// <summary>
        /// The maximum number of entries that the prefix list can contain.  Valid values: 1 to 200.
        /// </summary>
        [Output("maxEntries")]
        public Output<int> MaxEntries { get; private set; } = null!;

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


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

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

    public sealed class EcsPrefixListArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The IP address family. Valid values: `IPv4`,`IPv6`.
        /// </summary>
        [Input("addressFamily", required: true)]
        public Input<string> AddressFamily { get; set; } = null!;

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

        [Input("entries", required: true)]
        private InputList<Inputs.EcsPrefixListEntryArgs>? _entries;

        /// <summary>
        /// The Entry. The details see Block `entry`.
        /// </summary>
        public InputList<Inputs.EcsPrefixListEntryArgs> Entries
        {
            get => _entries ?? (_entries = new InputList<Inputs.EcsPrefixListEntryArgs>());
            set => _entries = value;
        }

        /// <summary>
        /// The maximum number of entries that the prefix list can contain.  Valid values: 1 to 200.
        /// </summary>
        [Input("maxEntries", required: true)]
        public Input<int> MaxEntries { get; set; } = null!;

        /// <summary>
        /// The name of the prefix. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with `http://`, `https://`, `com.aliyun`, or `com.alibabacloud`. It can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).
        /// </summary>
        [Input("prefixListName", required: true)]
        public Input<string> PrefixListName { get; set; } = null!;

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

    public sealed class EcsPrefixListState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The IP address family. Valid values: `IPv4`,`IPv6`.
        /// </summary>
        [Input("addressFamily")]
        public Input<string>? AddressFamily { get; set; }

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

        [Input("entries")]
        private InputList<Inputs.EcsPrefixListEntryGetArgs>? _entries;

        /// <summary>
        /// The Entry. The details see Block `entry`.
        /// </summary>
        public InputList<Inputs.EcsPrefixListEntryGetArgs> Entries
        {
            get => _entries ?? (_entries = new InputList<Inputs.EcsPrefixListEntryGetArgs>());
            set => _entries = value;
        }

        /// <summary>
        /// The maximum number of entries that the prefix list can contain.  Valid values: 1 to 200.
        /// </summary>
        [Input("maxEntries")]
        public Input<int>? MaxEntries { get; set; }

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

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