<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.CloudFirewall
{
    /// <summary>
    /// Provides a Cloud Firewall Control Policy resource.
    /// 
    /// For information about Cloud Firewall Control Policy Order and how to use it, see [What is Control Policy Order](https://www.alibabacloud.com/help/doc-detail/138867.htm).
    /// 
    /// &gt; **NOTE:** Available in v1.130.0+.
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var example1 = new AliCloud.CloudFirewall.ControlPolicy("example1", new()
    ///     {
    ///         ApplicationName = "ANY",
    ///         AclAction = "accept",
    ///         Description = "example",
    ///         DestinationType = "net",
    ///         Destination = "100.1.1.0/24",
    ///         Direction = "out",
    ///         Proto = "ANY",
    ///         Source = "1.2.3.0/24",
    ///         SourceType = "net",
    ///     });
    /// 
    ///     var example2 = new AliCloud.CloudFirewall.ControlPolicyOrder("example2", new()
    ///     {
    ///         AclUuid = example1.AclUuid,
    ///         Direction = example1.Direction,
    ///         Order = 1,
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Cloud Firewall Control Policy Order can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:cloudfirewall/controlPolicyOrder:ControlPolicyOrder example &lt;acl_uuid&gt;:&lt;direction&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:cloudfirewall/controlPolicyOrder:ControlPolicyOrder")]
    public partial class ControlPolicyOrder : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The unique ID of the access control policy.
        /// </summary>
        [Output("aclUuid")]
        public Output<string> AclUuid { get; private set; } = null!;

        /// <summary>
        /// Direction. Valid values: `in`, `out`.
        /// </summary>
        [Output("direction")]
        public Output<string> Direction { get; private set; } = null!;

        /// <summary>
        /// The priority of the access control policy. The priority value starts from 1. A small priority value indicates a high priority. **NOTE:** The value of -1 indicates the lowest priority.
        /// </summary>
        [Output("order")]
        public Output<int?> Order { get; private set; } = null!;


        /// <summary>
        /// Create a ControlPolicyOrder 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 ControlPolicyOrder(string name, ControlPolicyOrderArgs args, CustomResourceOptions? options = null)
            : base("alicloud:cloudfirewall/controlPolicyOrder:ControlPolicyOrder", name, args ?? new ControlPolicyOrderArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class ControlPolicyOrderArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The unique ID of the access control policy.
        /// </summary>
        [Input("aclUuid", required: true)]
        public Input<string> AclUuid { get; set; } = null!;

        /// <summary>
        /// Direction. Valid values: `in`, `out`.
        /// </summary>
        [Input("direction", required: true)]
        public Input<string> Direction { get; set; } = null!;

        /// <summary>
        /// The priority of the access control policy. The priority value starts from 1. A small priority value indicates a high priority. **NOTE:** The value of -1 indicates the lowest priority.
        /// </summary>
        [Input("order")]
        public Input<int>? Order { get; set; }

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

    public sealed class ControlPolicyOrderState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The unique ID of the access control policy.
        /// </summary>
        [Input("aclUuid")]
        public Input<string>? AclUuid { get; set; }

        /// <summary>
        /// Direction. Valid values: `in`, `out`.
        /// </summary>
        [Input("direction")]
        public Input<string>? Direction { get; set; }

        /// <summary>
        /// The priority of the access control policy. The priority value starts from 1. A small priority value indicates a high priority. **NOTE:** The value of -1 indicates the lowest priority.
        /// </summary>
        [Input("order")]
        public Input<int>? Order { get; set; }

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