<filename>sdk/dotnet/AviatrixMicrosegPolicyList.cs// *** 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.Aviatrix
{
    /// <summary>
    /// !&gt; **WARNING** **aviatrix_microseg_policy_list** is part of the Micro-segmentation private preview feature for R2.22.0. If you wish to enable a private preview mode feature, please contact your sales representative or Aviatrix Support.
    /// 
    /// The **aviatrix_microseg_policy_list** resource handles the creation and management of Micro-segmentation Policies. Available as of Provider R2.22.0+.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Aviatrix = Pulumi.Aviatrix;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     // Create an Aviatrix Microseg Policy
    ///     var test = new Aviatrix.AviatrixMicrosegPolicyList("test", new()
    ///     {
    ///         Policies = new[]
    ///         {
    ///             new Aviatrix.Inputs.AviatrixMicrosegPolicyListPolicyArgs
    ///             {
    ///                 Action = "DENY",
    ///                 DstAppDomains = new[]
    ///                 {
    ///                     "82e50c85-82bf-4b3b-b9da-aaed34a3aa53",
    ///                 },
    ///                 Logging = false,
    ///                 Name = "microseg-policy-1",
    ///                 Priority = 1,
    ///                 Protocol = "ICMP",
    ///                 SrcAppDomains = new[]
    ///                 {
    ///                     "f15c9890-c8c4-4c1a-a2b5-ef0ab34d2e30",
    ///                 },
    ///                 Watch = false,
    ///             },
    ///             new Aviatrix.Inputs.AviatrixMicrosegPolicyListPolicyArgs
    ///             {
    ///                 Action = "PERMIT",
    ///                 DstAppDomains = new[]
    ///                 {
    ///                     "f05b0ad7-d2d7-4d16-b2f6-48492319414c",
    ///                 },
    ///                 Name = "microseg-policy",
    ///                 PortRanges = new[]
    ///                 {
    ///                     new Aviatrix.Inputs.AviatrixMicrosegPolicyListPolicyPortRangeArgs
    ///                     {
    ///                         Hi = 50000,
    ///                         Lo = 49000,
    ///                     },
    ///                 },
    ///                 Priority = 0,
    ///                 Protocol = "TCP",
    ///                 SrcAppDomains = new[]
    ///                 {
    ///                     "7e7d1573-7a7a-4a53-bcb5-1ad5041961e0",
    ///                 },
    ///             },
    ///         },
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// **aviatrix_microseg_policy_list** can be imported using the controller IP, e.g. controller IP is 10.11.12.13
    /// 
    /// ```sh
    ///  $ pulumi import aviatrix:index/aviatrixMicrosegPolicyList:AviatrixMicrosegPolicyList test 10-11-12-13
    /// ```
    /// </summary>
    [AviatrixResourceType("aviatrix:index/aviatrixMicrosegPolicyList:AviatrixMicrosegPolicyList")]
    public partial class AviatrixMicrosegPolicyList : global::Pulumi.CustomResource
    {
        /// <summary>
        /// List of policies.
        /// </summary>
        [Output("policies")]
        public Output<ImmutableArray<Outputs.AviatrixMicrosegPolicyListPolicy>> Policies { get; private set; } = null!;


        /// <summary>
        /// Create a AviatrixMicrosegPolicyList 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 AviatrixMicrosegPolicyList(string name, AviatrixMicrosegPolicyListArgs args, CustomResourceOptions? options = null)
            : base("aviatrix:index/aviatrixMicrosegPolicyList:AviatrixMicrosegPolicyList", name, args ?? new AviatrixMicrosegPolicyListArgs(), MakeResourceOptions(options, ""))
        {
        }

        private AviatrixMicrosegPolicyList(string name, Input<string> id, AviatrixMicrosegPolicyListState? state = null, CustomResourceOptions? options = null)
            : base("aviatrix:index/aviatrixMicrosegPolicyList:AviatrixMicrosegPolicyList", 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/astipkovits",
            };
            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 AviatrixMicrosegPolicyList 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 AviatrixMicrosegPolicyList Get(string name, Input<string> id, AviatrixMicrosegPolicyListState? state = null, CustomResourceOptions? options = null)
        {
            return new AviatrixMicrosegPolicyList(name, id, state, options);
        }
    }

    public sealed class AviatrixMicrosegPolicyListArgs : global::Pulumi.ResourceArgs
    {
        [Input("policies", required: true)]
        private InputList<Inputs.AviatrixMicrosegPolicyListPolicyArgs>? _policies;

        /// <summary>
        /// List of policies.
        /// </summary>
        public InputList<Inputs.AviatrixMicrosegPolicyListPolicyArgs> Policies
        {
            get => _policies ?? (_policies = new InputList<Inputs.AviatrixMicrosegPolicyListPolicyArgs>());
            set => _policies = value;
        }

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

    public sealed class AviatrixMicrosegPolicyListState : global::Pulumi.ResourceArgs
    {
        [Input("policies")]
        private InputList<Inputs.AviatrixMicrosegPolicyListPolicyGetArgs>? _policies;

        /// <summary>
        /// List of policies.
        /// </summary>
        public InputList<Inputs.AviatrixMicrosegPolicyListPolicyGetArgs> Policies
        {
            get => _policies ?? (_policies = new InputList<Inputs.AviatrixMicrosegPolicyListPolicyGetArgs>());
            set => _policies = value;
        }

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