1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. NetworkFirewall
  5. getNetworkFirewallPolicyNatRule
Oracle Cloud Infrastructure v3.0.0 published on Thursday, Jun 5, 2025 by Pulumi

oci.NetworkFirewall.getNetworkFirewallPolicyNatRule

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v3.0.0 published on Thursday, Jun 5, 2025 by Pulumi

    This data source provides details about a specific Network Firewall Policy Nat Rule resource in Oracle Cloud Infrastructure Network Firewall service.

    Get NAT Rule by the given name in the context of network firewall policy.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testNetworkFirewallPolicyNatRule = oci.NetworkFirewall.getNetworkFirewallPolicyNatRule({
        natRuleName: testRule.name,
        networkFirewallPolicyId: testNetworkFirewallPolicy.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_network_firewall_policy_nat_rule = oci.NetworkFirewall.get_network_firewall_policy_nat_rule(nat_rule_name=test_rule["name"],
        network_firewall_policy_id=test_network_firewall_policy["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/networkfirewall"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := networkfirewall.GetNetworkFirewallPolicyNatRule(ctx, &networkfirewall.GetNetworkFirewallPolicyNatRuleArgs{
    			NatRuleName:             testRule.Name,
    			NetworkFirewallPolicyId: testNetworkFirewallPolicy.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testNetworkFirewallPolicyNatRule = Oci.NetworkFirewall.GetNetworkFirewallPolicyNatRule.Invoke(new()
        {
            NatRuleName = testRule.Name,
            NetworkFirewallPolicyId = testNetworkFirewallPolicy.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.NetworkFirewall.NetworkFirewallFunctions;
    import com.pulumi.oci.NetworkFirewall.inputs.GetNetworkFirewallPolicyNatRuleArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var testNetworkFirewallPolicyNatRule = NetworkFirewallFunctions.getNetworkFirewallPolicyNatRule(GetNetworkFirewallPolicyNatRuleArgs.builder()
                .natRuleName(testRule.name())
                .networkFirewallPolicyId(testNetworkFirewallPolicy.id())
                .build());
    
        }
    }
    
    variables:
      testNetworkFirewallPolicyNatRule:
        fn::invoke:
          function: oci:NetworkFirewall:getNetworkFirewallPolicyNatRule
          arguments:
            natRuleName: ${testRule.name}
            networkFirewallPolicyId: ${testNetworkFirewallPolicy.id}
    

    Using getNetworkFirewallPolicyNatRule

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getNetworkFirewallPolicyNatRule(args: GetNetworkFirewallPolicyNatRuleArgs, opts?: InvokeOptions): Promise<GetNetworkFirewallPolicyNatRuleResult>
    function getNetworkFirewallPolicyNatRuleOutput(args: GetNetworkFirewallPolicyNatRuleOutputArgs, opts?: InvokeOptions): Output<GetNetworkFirewallPolicyNatRuleResult>
    def get_network_firewall_policy_nat_rule(nat_rule_name: Optional[str] = None,
                                             network_firewall_policy_id: Optional[str] = None,
                                             opts: Optional[InvokeOptions] = None) -> GetNetworkFirewallPolicyNatRuleResult
    def get_network_firewall_policy_nat_rule_output(nat_rule_name: Optional[pulumi.Input[str]] = None,
                                             network_firewall_policy_id: Optional[pulumi.Input[str]] = None,
                                             opts: Optional[InvokeOptions] = None) -> Output[GetNetworkFirewallPolicyNatRuleResult]
    func LookupNetworkFirewallPolicyNatRule(ctx *Context, args *LookupNetworkFirewallPolicyNatRuleArgs, opts ...InvokeOption) (*LookupNetworkFirewallPolicyNatRuleResult, error)
    func LookupNetworkFirewallPolicyNatRuleOutput(ctx *Context, args *LookupNetworkFirewallPolicyNatRuleOutputArgs, opts ...InvokeOption) LookupNetworkFirewallPolicyNatRuleResultOutput

    > Note: This function is named LookupNetworkFirewallPolicyNatRule in the Go SDK.

    public static class GetNetworkFirewallPolicyNatRule 
    {
        public static Task<GetNetworkFirewallPolicyNatRuleResult> InvokeAsync(GetNetworkFirewallPolicyNatRuleArgs args, InvokeOptions? opts = null)
        public static Output<GetNetworkFirewallPolicyNatRuleResult> Invoke(GetNetworkFirewallPolicyNatRuleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNetworkFirewallPolicyNatRuleResult> getNetworkFirewallPolicyNatRule(GetNetworkFirewallPolicyNatRuleArgs args, InvokeOptions options)
    public static Output<GetNetworkFirewallPolicyNatRuleResult> getNetworkFirewallPolicyNatRule(GetNetworkFirewallPolicyNatRuleArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:NetworkFirewall/getNetworkFirewallPolicyNatRule:getNetworkFirewallPolicyNatRule
      arguments:
        # arguments dictionary

    The following arguments are supported:

    NatRuleName string
    Unique identifier for NAT Rules in the network firewall policy.
    NetworkFirewallPolicyId string
    Unique Network Firewall Policy identifier
    NatRuleName string
    Unique identifier for NAT Rules in the network firewall policy.
    NetworkFirewallPolicyId string
    Unique Network Firewall Policy identifier
    natRuleName String
    Unique identifier for NAT Rules in the network firewall policy.
    networkFirewallPolicyId String
    Unique Network Firewall Policy identifier
    natRuleName string
    Unique identifier for NAT Rules in the network firewall policy.
    networkFirewallPolicyId string
    Unique Network Firewall Policy identifier
    nat_rule_name str
    Unique identifier for NAT Rules in the network firewall policy.
    network_firewall_policy_id str
    Unique Network Firewall Policy identifier
    natRuleName String
    Unique identifier for NAT Rules in the network firewall policy.
    networkFirewallPolicyId String
    Unique Network Firewall Policy identifier

    getNetworkFirewallPolicyNatRule Result

    The following output properties are available:

    Action string
    action:

    • DIPP_SRC_NAT - Dynamic-ip-port source NAT.
    Conditions List<GetNetworkFirewallPolicyNatRuleCondition>
    Match criteria used in NAT Rule used on the firewall policy.
    Description string
    Description of a NAT rule. This field can be used to add additional info.
    Id string
    Name string
    Name for the NAT rule, must be unique within the policy.
    NatRuleName string
    NetworkFirewallPolicyId string
    ParentResourceId string
    OCID of the Network Firewall Policy this decryption profile belongs to.
    Positions List<GetNetworkFirewallPolicyNatRulePosition>
    An object which defines the position of the rule.
    PriorityOrder string
    The priority order in which this rule should be evaluated
    Type string
    NAT type:

    • NATV4 - NATV4 type NAT.
    Action string
    action:

    • DIPP_SRC_NAT - Dynamic-ip-port source NAT.
    Conditions []GetNetworkFirewallPolicyNatRuleCondition
    Match criteria used in NAT Rule used on the firewall policy.
    Description string
    Description of a NAT rule. This field can be used to add additional info.
    Id string
    Name string
    Name for the NAT rule, must be unique within the policy.
    NatRuleName string
    NetworkFirewallPolicyId string
    ParentResourceId string
    OCID of the Network Firewall Policy this decryption profile belongs to.
    Positions []GetNetworkFirewallPolicyNatRulePosition
    An object which defines the position of the rule.
    PriorityOrder string
    The priority order in which this rule should be evaluated
    Type string
    NAT type:

    • NATV4 - NATV4 type NAT.
    action String
    action:

    • DIPP_SRC_NAT - Dynamic-ip-port source NAT.
    conditions List<GetPolicyNatRuleCondition>
    Match criteria used in NAT Rule used on the firewall policy.
    description String
    Description of a NAT rule. This field can be used to add additional info.
    id String
    name String
    Name for the NAT rule, must be unique within the policy.
    natRuleName String
    networkFirewallPolicyId String
    parentResourceId String
    OCID of the Network Firewall Policy this decryption profile belongs to.
    positions List<GetPolicyNatRulePosition>
    An object which defines the position of the rule.
    priorityOrder String
    The priority order in which this rule should be evaluated
    type String
    NAT type:

    • NATV4 - NATV4 type NAT.
    action string
    action:

    • DIPP_SRC_NAT - Dynamic-ip-port source NAT.
    conditions GetNetworkFirewallPolicyNatRuleCondition[]
    Match criteria used in NAT Rule used on the firewall policy.
    description string
    Description of a NAT rule. This field can be used to add additional info.
    id string
    name string
    Name for the NAT rule, must be unique within the policy.
    natRuleName string
    networkFirewallPolicyId string
    parentResourceId string
    OCID of the Network Firewall Policy this decryption profile belongs to.
    positions GetNetworkFirewallPolicyNatRulePosition[]
    An object which defines the position of the rule.
    priorityOrder string
    The priority order in which this rule should be evaluated
    type string
    NAT type:

    • NATV4 - NATV4 type NAT.
    action str
    action:

    • DIPP_SRC_NAT - Dynamic-ip-port source NAT.
    conditions Sequence[GetNetworkFirewallPolicyNatRuleCondition]
    Match criteria used in NAT Rule used on the firewall policy.
    description str
    Description of a NAT rule. This field can be used to add additional info.
    id str
    name str
    Name for the NAT rule, must be unique within the policy.
    nat_rule_name str
    network_firewall_policy_id str
    parent_resource_id str
    OCID of the Network Firewall Policy this decryption profile belongs to.
    positions Sequence[GetNetworkFirewallPolicyNatRulePosition]
    An object which defines the position of the rule.
    priority_order str
    The priority order in which this rule should be evaluated
    type str
    NAT type:

    • NATV4 - NATV4 type NAT.
    action String
    action:

    • DIPP_SRC_NAT - Dynamic-ip-port source NAT.
    conditions List<Property Map>
    Match criteria used in NAT Rule used on the firewall policy.
    description String
    Description of a NAT rule. This field can be used to add additional info.
    id String
    name String
    Name for the NAT rule, must be unique within the policy.
    natRuleName String
    networkFirewallPolicyId String
    parentResourceId String
    OCID of the Network Firewall Policy this decryption profile belongs to.
    positions List<Property Map>
    An object which defines the position of the rule.
    priorityOrder String
    The priority order in which this rule should be evaluated
    type String
    NAT type:

    • NATV4 - NATV4 type NAT.

    Supporting Types

    GetNetworkFirewallPolicyNatRuleCondition

    DestinationAddresses List<string>
    An array of IP address list names to be evaluated against the traffic destination address.
    Service string
    A Service name to be evaluated against the traffic protocol and protocol-specific parameters.
    SourceAddresses List<string>
    An array of IP address list names to be evaluated against the traffic source address.
    DestinationAddresses []string
    An array of IP address list names to be evaluated against the traffic destination address.
    Service string
    A Service name to be evaluated against the traffic protocol and protocol-specific parameters.
    SourceAddresses []string
    An array of IP address list names to be evaluated against the traffic source address.
    destinationAddresses List<String>
    An array of IP address list names to be evaluated against the traffic destination address.
    service String
    A Service name to be evaluated against the traffic protocol and protocol-specific parameters.
    sourceAddresses List<String>
    An array of IP address list names to be evaluated against the traffic source address.
    destinationAddresses string[]
    An array of IP address list names to be evaluated against the traffic destination address.
    service string
    A Service name to be evaluated against the traffic protocol and protocol-specific parameters.
    sourceAddresses string[]
    An array of IP address list names to be evaluated against the traffic source address.
    destination_addresses Sequence[str]
    An array of IP address list names to be evaluated against the traffic destination address.
    service str
    A Service name to be evaluated against the traffic protocol and protocol-specific parameters.
    source_addresses Sequence[str]
    An array of IP address list names to be evaluated against the traffic source address.
    destinationAddresses List<String>
    An array of IP address list names to be evaluated against the traffic destination address.
    service String
    A Service name to be evaluated against the traffic protocol and protocol-specific parameters.
    sourceAddresses List<String>
    An array of IP address list names to be evaluated against the traffic source address.

    GetNetworkFirewallPolicyNatRulePosition

    AfterRule string
    Identifier for rule after which this rule lies.
    BeforeRule string
    Identifier for rule before which this rule lies.
    AfterRule string
    Identifier for rule after which this rule lies.
    BeforeRule string
    Identifier for rule before which this rule lies.
    afterRule String
    Identifier for rule after which this rule lies.
    beforeRule String
    Identifier for rule before which this rule lies.
    afterRule string
    Identifier for rule after which this rule lies.
    beforeRule string
    Identifier for rule before which this rule lies.
    after_rule str
    Identifier for rule after which this rule lies.
    before_rule str
    Identifier for rule before which this rule lies.
    afterRule String
    Identifier for rule after which this rule lies.
    beforeRule String
    Identifier for rule before which this rule lies.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v3.0.0 published on Thursday, Jun 5, 2025 by Pulumi