// *** 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>
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Aviatrix = Pulumi.Aviatrix;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     // Create an Aviatrix Gateway FQDN Tag Rule filter rule
    ///     var testFqdn = new Aviatrix.AviatrixFqdnTagRule("testFqdn", new()
    ///     {
    ///         Fqdn = "reddit.com",
    ///         FqdnTagName = "my_tag",
    ///         Port = "443",
    ///         Protocol = "tcp",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// **fqdn_tag_rule** can be imported using the `fqdn_tag_name`, `fqdn`, `protocol`, `port` and `action` separated by `~`, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import aviatrix:index/aviatrixFqdnTagRule:AviatrixFqdnTagRule test "fqdn_tag_name~fqdn~protocol~port~action"
    /// ```
    /// </summary>
    [AviatrixResourceType("aviatrix:index/aviatrixFqdnTagRule:AviatrixFqdnTagRule")]
    public partial class AviatrixFqdnTagRule : global::Pulumi.CustomResource
    {
        /// <summary>
        /// What action should happen to matching requests. Possible values are: 'Base Policy', 'Allow' or 'Deny'. Defaults to 'Base Policy' if no value provided.
        /// * For protocol "all", port must be set to "all".
        /// * For protocol “icmp”, port must be set to “ping”.
        /// </summary>
        [Output("action")]
        public Output<string?> Action { get; private set; } = null!;

        /// <summary>
        /// FQDN. Example: "facebook.com".
        /// </summary>
        [Output("fqdn")]
        public Output<string> Fqdn { get; private set; } = null!;

        /// <summary>
        /// FQDN Filter tag name.
        /// </summary>
        [Output("fqdnTagName")]
        public Output<string> FqdnTagName { get; private set; } = null!;

        /// <summary>
        /// Port. Example "25".
        /// </summary>
        [Output("port")]
        public Output<string> Port { get; private set; } = null!;

        /// <summary>
        /// Protocol. Valid values: "all", "tcp", "udp", "icmp".
        /// </summary>
        [Output("protocol")]
        public Output<string> Protocol { get; private set; } = null!;


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

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

    public sealed class AviatrixFqdnTagRuleArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// What action should happen to matching requests. Possible values are: 'Base Policy', 'Allow' or 'Deny'. Defaults to 'Base Policy' if no value provided.
        /// * For protocol "all", port must be set to "all".
        /// * For protocol “icmp”, port must be set to “ping”.
        /// </summary>
        [Input("action")]
        public Input<string>? Action { get; set; }

        /// <summary>
        /// FQDN. Example: "facebook.com".
        /// </summary>
        [Input("fqdn", required: true)]
        public Input<string> Fqdn { get; set; } = null!;

        /// <summary>
        /// FQDN Filter tag name.
        /// </summary>
        [Input("fqdnTagName", required: true)]
        public Input<string> FqdnTagName { get; set; } = null!;

        /// <summary>
        /// Port. Example "25".
        /// </summary>
        [Input("port", required: true)]
        public Input<string> Port { get; set; } = null!;

        /// <summary>
        /// Protocol. Valid values: "all", "tcp", "udp", "icmp".
        /// </summary>
        [Input("protocol", required: true)]
        public Input<string> Protocol { get; set; } = null!;

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

    public sealed class AviatrixFqdnTagRuleState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// What action should happen to matching requests. Possible values are: 'Base Policy', 'Allow' or 'Deny'. Defaults to 'Base Policy' if no value provided.
        /// * For protocol "all", port must be set to "all".
        /// * For protocol “icmp”, port must be set to “ping”.
        /// </summary>
        [Input("action")]
        public Input<string>? Action { get; set; }

        /// <summary>
        /// FQDN. Example: "facebook.com".
        /// </summary>
        [Input("fqdn")]
        public Input<string>? Fqdn { get; set; }

        /// <summary>
        /// FQDN Filter tag name.
        /// </summary>
        [Input("fqdnTagName")]
        public Input<string>? FqdnTagName { get; set; }

        /// <summary>
        /// Port. Example "25".
        /// </summary>
        [Input("port")]
        public Input<string>? Port { get; set; }

        /// <summary>
        /// Protocol. Valid values: "all", "tcp", "udp", "icmp".
        /// </summary>
        [Input("protocol")]
        public Input<string>? Protocol { get; set; }

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