<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.Vcd
{
    [VcdResourceType("vcd:index/nsxtNatRule:NsxtNatRule")]
    public partial class NsxtNatRule : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Application Port Profile to apply for this rule
        /// </summary>
        [Output("appPortProfileId")]
        public Output<string?> AppPortProfileId { get; private set; } = null!;

        /// <summary>
        /// Description of NAT rule
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// For DNAT only. Enter a port into which the DNAT rule is translating for the packets inbound to the virtual machines.
        /// </summary>
        [Output("dnatExternalPort")]
        public Output<string?> DnatExternalPort { get; private set; } = null!;

        /// <summary>
        /// Edge gateway name in which NAT Rule is located
        /// </summary>
        [Output("edgeGatewayId")]
        public Output<string> EdgeGatewayId { get; private set; } = null!;

        /// <summary>
        /// Enables or disables this rule
        /// </summary>
        [Output("enabled")]
        public Output<bool?> Enabled { get; private set; } = null!;

        /// <summary>
        /// IP address or CIDR of external network
        /// </summary>
        [Output("externalAddress")]
        public Output<string?> ExternalAddress { get; private set; } = null!;

        /// <summary>
        /// VCD 10.2.2+ Determines how the firewall matches the address during NATing if firewall stage is not skipped. One of
        /// 'MATCH_INTERNAL_ADDRESS', 'MATCH_EXTERNAL_ADDRESS', 'BYPASS'
        /// </summary>
        [Output("firewallMatch")]
        public Output<string> FirewallMatch { get; private set; } = null!;

        /// <summary>
        /// IP address or CIDR of the virtual machines for which you are configuring NAT
        /// </summary>
        [Output("internalAddress")]
        public Output<string?> InternalAddress { get; private set; } = null!;

        /// <summary>
        /// Enable logging when this rule is applied
        /// </summary>
        [Output("logging")]
        public Output<bool?> Logging { get; private set; } = null!;

        /// <summary>
        /// Name of NAT rule
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across
        /// different organizations
        /// </summary>
        [Output("org")]
        public Output<string?> Org { get; private set; } = null!;

        /// <summary>
        /// VCD 10.2.2+ If an address has multiple NAT rules, the rule with the highest priority is applied. A lower value means a
        /// higher precedence for this rule.
        /// </summary>
        [Output("priority")]
        public Output<int> Priority { get; private set; } = null!;

        /// <summary>
        /// Rule type - one of 'DNAT', 'NO_DNAT', 'SNAT', 'NO_SNAT', 'REFLEXIVE'
        /// </summary>
        [Output("ruleType")]
        public Output<string> RuleType { get; private set; } = null!;

        /// <summary>
        /// For SNAT only. If you want the rule to apply only for traffic to a specific domain, enter an IP address for this domain
        /// or an IP address range in CIDR format.
        /// </summary>
        [Output("snatDestinationAddress")]
        public Output<string?> SnatDestinationAddress { get; private set; } = null!;

        /// <summary>
        /// The name of VDC to use, optional if defined at provider level
        /// </summary>
        [Output("vdc")]
        public Output<string> Vdc { get; private set; } = null!;


        /// <summary>
        /// Create a NsxtNatRule 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 NsxtNatRule(string name, NsxtNatRuleArgs args, CustomResourceOptions? options = null)
            : base("vcd:index/nsxtNatRule:NsxtNatRule", name, args ?? new NsxtNatRuleArgs(), MakeResourceOptions(options, ""))
        {
        }

        private NsxtNatRule(string name, Input<string> id, NsxtNatRuleState? state = null, CustomResourceOptions? options = null)
            : base("vcd:index/nsxtNatRule:NsxtNatRule", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
            };
            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 NsxtNatRule 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 NsxtNatRule Get(string name, Input<string> id, NsxtNatRuleState? state = null, CustomResourceOptions? options = null)
        {
            return new NsxtNatRule(name, id, state, options);
        }
    }

    public sealed class NsxtNatRuleArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Application Port Profile to apply for this rule
        /// </summary>
        [Input("appPortProfileId")]
        public Input<string>? AppPortProfileId { get; set; }

        /// <summary>
        /// Description of NAT rule
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// For DNAT only. Enter a port into which the DNAT rule is translating for the packets inbound to the virtual machines.
        /// </summary>
        [Input("dnatExternalPort")]
        public Input<string>? DnatExternalPort { get; set; }

        /// <summary>
        /// Edge gateway name in which NAT Rule is located
        /// </summary>
        [Input("edgeGatewayId", required: true)]
        public Input<string> EdgeGatewayId { get; set; } = null!;

        /// <summary>
        /// Enables or disables this rule
        /// </summary>
        [Input("enabled")]
        public Input<bool>? Enabled { get; set; }

        /// <summary>
        /// IP address or CIDR of external network
        /// </summary>
        [Input("externalAddress")]
        public Input<string>? ExternalAddress { get; set; }

        /// <summary>
        /// VCD 10.2.2+ Determines how the firewall matches the address during NATing if firewall stage is not skipped. One of
        /// 'MATCH_INTERNAL_ADDRESS', 'MATCH_EXTERNAL_ADDRESS', 'BYPASS'
        /// </summary>
        [Input("firewallMatch")]
        public Input<string>? FirewallMatch { get; set; }

        /// <summary>
        /// IP address or CIDR of the virtual machines for which you are configuring NAT
        /// </summary>
        [Input("internalAddress")]
        public Input<string>? InternalAddress { get; set; }

        /// <summary>
        /// Enable logging when this rule is applied
        /// </summary>
        [Input("logging")]
        public Input<bool>? Logging { get; set; }

        /// <summary>
        /// Name of NAT rule
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across
        /// different organizations
        /// </summary>
        [Input("org")]
        public Input<string>? Org { get; set; }

        /// <summary>
        /// VCD 10.2.2+ If an address has multiple NAT rules, the rule with the highest priority is applied. A lower value means a
        /// higher precedence for this rule.
        /// </summary>
        [Input("priority")]
        public Input<int>? Priority { get; set; }

        /// <summary>
        /// Rule type - one of 'DNAT', 'NO_DNAT', 'SNAT', 'NO_SNAT', 'REFLEXIVE'
        /// </summary>
        [Input("ruleType", required: true)]
        public Input<string> RuleType { get; set; } = null!;

        /// <summary>
        /// For SNAT only. If you want the rule to apply only for traffic to a specific domain, enter an IP address for this domain
        /// or an IP address range in CIDR format.
        /// </summary>
        [Input("snatDestinationAddress")]
        public Input<string>? SnatDestinationAddress { get; set; }

        /// <summary>
        /// The name of VDC to use, optional if defined at provider level
        /// </summary>
        [Input("vdc")]
        public Input<string>? Vdc { get; set; }

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

    public sealed class NsxtNatRuleState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Application Port Profile to apply for this rule
        /// </summary>
        [Input("appPortProfileId")]
        public Input<string>? AppPortProfileId { get; set; }

        /// <summary>
        /// Description of NAT rule
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// For DNAT only. Enter a port into which the DNAT rule is translating for the packets inbound to the virtual machines.
        /// </summary>
        [Input("dnatExternalPort")]
        public Input<string>? DnatExternalPort { get; set; }

        /// <summary>
        /// Edge gateway name in which NAT Rule is located
        /// </summary>
        [Input("edgeGatewayId")]
        public Input<string>? EdgeGatewayId { get; set; }

        /// <summary>
        /// Enables or disables this rule
        /// </summary>
        [Input("enabled")]
        public Input<bool>? Enabled { get; set; }

        /// <summary>
        /// IP address or CIDR of external network
        /// </summary>
        [Input("externalAddress")]
        public Input<string>? ExternalAddress { get; set; }

        /// <summary>
        /// VCD 10.2.2+ Determines how the firewall matches the address during NATing if firewall stage is not skipped. One of
        /// 'MATCH_INTERNAL_ADDRESS', 'MATCH_EXTERNAL_ADDRESS', 'BYPASS'
        /// </summary>
        [Input("firewallMatch")]
        public Input<string>? FirewallMatch { get; set; }

        /// <summary>
        /// IP address or CIDR of the virtual machines for which you are configuring NAT
        /// </summary>
        [Input("internalAddress")]
        public Input<string>? InternalAddress { get; set; }

        /// <summary>
        /// Enable logging when this rule is applied
        /// </summary>
        [Input("logging")]
        public Input<bool>? Logging { get; set; }

        /// <summary>
        /// Name of NAT rule
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across
        /// different organizations
        /// </summary>
        [Input("org")]
        public Input<string>? Org { get; set; }

        /// <summary>
        /// VCD 10.2.2+ If an address has multiple NAT rules, the rule with the highest priority is applied. A lower value means a
        /// higher precedence for this rule.
        /// </summary>
        [Input("priority")]
        public Input<int>? Priority { get; set; }

        /// <summary>
        /// Rule type - one of 'DNAT', 'NO_DNAT', 'SNAT', 'NO_SNAT', 'REFLEXIVE'
        /// </summary>
        [Input("ruleType")]
        public Input<string>? RuleType { get; set; }

        /// <summary>
        /// For SNAT only. If you want the rule to apply only for traffic to a specific domain, enter an IP address for this domain
        /// or an IP address range in CIDR format.
        /// </summary>
        [Input("snatDestinationAddress")]
        public Input<string>? SnatDestinationAddress { get; set; }

        /// <summary>
        /// The name of VDC to use, optional if defined at provider level
        /// </summary>
        [Input("vdc")]
        public Input<string>? Vdc { get; set; }

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