// *** 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.Vpc
{
    /// <summary>
    /// Provides a VPC Prefix List resource.
    /// 
    /// For information about VPC Prefix List and how to use it, see [What is Prefix List](https://www.alibabacloud.com/help/zh/virtual-private-cloud/latest/creatvpcprefixlist).
    /// 
    /// &gt; **NOTE:** Available in v1.182.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.Vpc.PrefixList("default", new()
    ///     {
    ///         Entrys = new[]
    ///         {
    ///             new AliCloud.Vpc.Inputs.PrefixListEntryArgs
    ///             {
    ///                 Cidr = "192.168.0.0/16",
    ///                 Description = "description",
    ///             },
    ///         },
    ///         IpVersion = "IPV4",
    ///         MaxEntries = 50,
    ///         PrefixListName = @var.Name,
    ///         PrefixListDescription = "description",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// VPC Prefix List can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:vpc/prefixList:PrefixList example &lt;id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:vpc/prefixList:PrefixList")]
    public partial class PrefixList : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The CIDR address block list of the prefix list. See the following `Block entrys`.
        /// </summary>
        [Output("entrys")]
        public Output<ImmutableArray<Outputs.PrefixListEntry>> Entrys { get; private set; } = null!;

        /// <summary>
        /// The IP version of the prefix list. Valid values: `IPV4`, `IPV6`.
        /// </summary>
        [Output("ipVersion")]
        public Output<string> IpVersion { get; private set; } = null!;

        /// <summary>
        /// The maximum number of entries for CIDR address blocks in the prefix list.
        /// </summary>
        [Output("maxEntries")]
        public Output<int> MaxEntries { get; private set; } = null!;

        /// <summary>
        /// The description of the prefix list. It must be 2 to 256 characters in length and must start with a letter or Chinese, but cannot start with `http://` or `https://`.
        /// </summary>
        [Output("prefixListDescription")]
        public Output<string?> PrefixListDescription { get; private set; } = null!;

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

        /// <summary>
        /// (Available in v1.196.0+) The status of the Prefix List.
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;


        /// <summary>
        /// Create a PrefixList 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 PrefixList(string name, PrefixListArgs? args = null, CustomResourceOptions? options = null)
            : base("alicloud:vpc/prefixList:PrefixList", name, args ?? new PrefixListArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class PrefixListArgs : global::Pulumi.ResourceArgs
    {
        [Input("entrys")]
        private InputList<Inputs.PrefixListEntryArgs>? _entrys;

        /// <summary>
        /// The CIDR address block list of the prefix list. See the following `Block entrys`.
        /// </summary>
        public InputList<Inputs.PrefixListEntryArgs> Entrys
        {
            get => _entrys ?? (_entrys = new InputList<Inputs.PrefixListEntryArgs>());
            set => _entrys = value;
        }

        /// <summary>
        /// The IP version of the prefix list. Valid values: `IPV4`, `IPV6`.
        /// </summary>
        [Input("ipVersion")]
        public Input<string>? IpVersion { get; set; }

        /// <summary>
        /// The maximum number of entries for CIDR address blocks in the prefix list.
        /// </summary>
        [Input("maxEntries")]
        public Input<int>? MaxEntries { get; set; }

        /// <summary>
        /// The description of the prefix list. It must be 2 to 256 characters in length and must start with a letter or Chinese, but cannot start with `http://` or `https://`.
        /// </summary>
        [Input("prefixListDescription")]
        public Input<string>? PrefixListDescription { get; set; }

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

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

    public sealed class PrefixListState : global::Pulumi.ResourceArgs
    {
        [Input("entrys")]
        private InputList<Inputs.PrefixListEntryGetArgs>? _entrys;

        /// <summary>
        /// The CIDR address block list of the prefix list. See the following `Block entrys`.
        /// </summary>
        public InputList<Inputs.PrefixListEntryGetArgs> Entrys
        {
            get => _entrys ?? (_entrys = new InputList<Inputs.PrefixListEntryGetArgs>());
            set => _entrys = value;
        }

        /// <summary>
        /// The IP version of the prefix list. Valid values: `IPV4`, `IPV6`.
        /// </summary>
        [Input("ipVersion")]
        public Input<string>? IpVersion { get; set; }

        /// <summary>
        /// The maximum number of entries for CIDR address blocks in the prefix list.
        /// </summary>
        [Input("maxEntries")]
        public Input<int>? MaxEntries { get; set; }

        /// <summary>
        /// The description of the prefix list. It must be 2 to 256 characters in length and must start with a letter or Chinese, but cannot start with `http://` or `https://`.
        /// </summary>
        [Input("prefixListDescription")]
        public Input<string>? PrefixListDescription { get; set; }

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

        /// <summary>
        /// (Available in v1.196.0+) The status of the Prefix List.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

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