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

oci.NetworkFirewall.getNetworkFirewallPolicyNatRules

Explore with Pulumi AI

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

    This data source provides the list of Network Firewall Policy Nat Rules in Oracle Cloud Infrastructure Network Firewall service.

    Returns a list of NAT Rules for the Network Firewall Policy.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testNetworkFirewallPolicyNatRules = oci.NetworkFirewall.getNetworkFirewallPolicyNatRules({
        networkFirewallPolicyId: testNetworkFirewallPolicy.id,
        displayName: networkFirewallPolicyNatRuleDisplayName,
        natRulePriorityOrder: networkFirewallPolicyNatRuleNatRulePriorityOrder,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_network_firewall_policy_nat_rules = oci.NetworkFirewall.get_network_firewall_policy_nat_rules(network_firewall_policy_id=test_network_firewall_policy["id"],
        display_name=network_firewall_policy_nat_rule_display_name,
        nat_rule_priority_order=network_firewall_policy_nat_rule_nat_rule_priority_order)
    
    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.GetNetworkFirewallPolicyNatRules(ctx, &networkfirewall.GetNetworkFirewallPolicyNatRulesArgs{
    			NetworkFirewallPolicyId: testNetworkFirewallPolicy.Id,
    			DisplayName:             pulumi.StringRef(networkFirewallPolicyNatRuleDisplayName),
    			NatRulePriorityOrder:    pulumi.IntRef(networkFirewallPolicyNatRuleNatRulePriorityOrder),
    		}, 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 testNetworkFirewallPolicyNatRules = Oci.NetworkFirewall.GetNetworkFirewallPolicyNatRules.Invoke(new()
        {
            NetworkFirewallPolicyId = testNetworkFirewallPolicy.Id,
            DisplayName = networkFirewallPolicyNatRuleDisplayName,
            NatRulePriorityOrder = networkFirewallPolicyNatRuleNatRulePriorityOrder,
        });
    
    });
    
    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.GetNetworkFirewallPolicyNatRulesArgs;
    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 testNetworkFirewallPolicyNatRules = NetworkFirewallFunctions.getNetworkFirewallPolicyNatRules(GetNetworkFirewallPolicyNatRulesArgs.builder()
                .networkFirewallPolicyId(testNetworkFirewallPolicy.id())
                .displayName(networkFirewallPolicyNatRuleDisplayName)
                .natRulePriorityOrder(networkFirewallPolicyNatRuleNatRulePriorityOrder)
                .build());
    
        }
    }
    
    variables:
      testNetworkFirewallPolicyNatRules:
        fn::invoke:
          function: oci:NetworkFirewall:getNetworkFirewallPolicyNatRules
          arguments:
            networkFirewallPolicyId: ${testNetworkFirewallPolicy.id}
            displayName: ${networkFirewallPolicyNatRuleDisplayName}
            natRulePriorityOrder: ${networkFirewallPolicyNatRuleNatRulePriorityOrder}
    

    Using getNetworkFirewallPolicyNatRules

    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 getNetworkFirewallPolicyNatRules(args: GetNetworkFirewallPolicyNatRulesArgs, opts?: InvokeOptions): Promise<GetNetworkFirewallPolicyNatRulesResult>
    function getNetworkFirewallPolicyNatRulesOutput(args: GetNetworkFirewallPolicyNatRulesOutputArgs, opts?: InvokeOptions): Output<GetNetworkFirewallPolicyNatRulesResult>
    def get_network_firewall_policy_nat_rules(display_name: Optional[str] = None,
                                              filters: Optional[Sequence[GetNetworkFirewallPolicyNatRulesFilter]] = None,
                                              nat_rule_priority_order: Optional[int] = None,
                                              network_firewall_policy_id: Optional[str] = None,
                                              opts: Optional[InvokeOptions] = None) -> GetNetworkFirewallPolicyNatRulesResult
    def get_network_firewall_policy_nat_rules_output(display_name: Optional[pulumi.Input[str]] = None,
                                              filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetNetworkFirewallPolicyNatRulesFilterArgs]]]] = None,
                                              nat_rule_priority_order: Optional[pulumi.Input[int]] = None,
                                              network_firewall_policy_id: Optional[pulumi.Input[str]] = None,
                                              opts: Optional[InvokeOptions] = None) -> Output[GetNetworkFirewallPolicyNatRulesResult]
    func GetNetworkFirewallPolicyNatRules(ctx *Context, args *GetNetworkFirewallPolicyNatRulesArgs, opts ...InvokeOption) (*GetNetworkFirewallPolicyNatRulesResult, error)
    func GetNetworkFirewallPolicyNatRulesOutput(ctx *Context, args *GetNetworkFirewallPolicyNatRulesOutputArgs, opts ...InvokeOption) GetNetworkFirewallPolicyNatRulesResultOutput

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

    public static class GetNetworkFirewallPolicyNatRules 
    {
        public static Task<GetNetworkFirewallPolicyNatRulesResult> InvokeAsync(GetNetworkFirewallPolicyNatRulesArgs args, InvokeOptions? opts = null)
        public static Output<GetNetworkFirewallPolicyNatRulesResult> Invoke(GetNetworkFirewallPolicyNatRulesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNetworkFirewallPolicyNatRulesResult> getNetworkFirewallPolicyNatRules(GetNetworkFirewallPolicyNatRulesArgs args, InvokeOptions options)
    public static Output<GetNetworkFirewallPolicyNatRulesResult> getNetworkFirewallPolicyNatRules(GetNetworkFirewallPolicyNatRulesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:NetworkFirewall/getNetworkFirewallPolicyNatRules:getNetworkFirewallPolicyNatRules
      arguments:
        # arguments dictionary

    The following arguments are supported:

    NetworkFirewallPolicyId string
    Unique Network Firewall Policy identifier
    DisplayName string
    A filter to return only resources that match the entire display name given.
    Filters List<GetNetworkFirewallPolicyNatRulesFilter>
    NatRulePriorityOrder int
    Unique priority order for NAT Rules in the network firewall policy.
    NetworkFirewallPolicyId string
    Unique Network Firewall Policy identifier
    DisplayName string
    A filter to return only resources that match the entire display name given.
    Filters []GetNetworkFirewallPolicyNatRulesFilter
    NatRulePriorityOrder int
    Unique priority order for NAT Rules in the network firewall policy.
    networkFirewallPolicyId String
    Unique Network Firewall Policy identifier
    displayName String
    A filter to return only resources that match the entire display name given.
    filters List<GetPolicyNatRulesFilter>
    natRulePriorityOrder Integer
    Unique priority order for NAT Rules in the network firewall policy.
    networkFirewallPolicyId string
    Unique Network Firewall Policy identifier
    displayName string
    A filter to return only resources that match the entire display name given.
    filters GetNetworkFirewallPolicyNatRulesFilter[]
    natRulePriorityOrder number
    Unique priority order for NAT Rules in the network firewall policy.
    network_firewall_policy_id str
    Unique Network Firewall Policy identifier
    display_name str
    A filter to return only resources that match the entire display name given.
    filters Sequence[GetNetworkFirewallPolicyNatRulesFilter]
    nat_rule_priority_order int
    Unique priority order for NAT Rules in the network firewall policy.
    networkFirewallPolicyId String
    Unique Network Firewall Policy identifier
    displayName String
    A filter to return only resources that match the entire display name given.
    filters List<Property Map>
    natRulePriorityOrder Number
    Unique priority order for NAT Rules in the network firewall policy.

    getNetworkFirewallPolicyNatRules Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    NatRuleCollections []GetNetworkFirewallPolicyNatRulesNatRuleCollection
    The list of nat_rule_collection.
    NetworkFirewallPolicyId string
    DisplayName string
    Filters []GetNetworkFirewallPolicyNatRulesFilter
    NatRulePriorityOrder int
    id String
    The provider-assigned unique ID for this managed resource.
    natRuleCollections List<GetPolicyNatRulesNatRuleCollection>
    The list of nat_rule_collection.
    networkFirewallPolicyId String
    displayName String
    filters List<GetPolicyNatRulesFilter>
    natRulePriorityOrder Integer
    id string
    The provider-assigned unique ID for this managed resource.
    natRuleCollections GetNetworkFirewallPolicyNatRulesNatRuleCollection[]
    The list of nat_rule_collection.
    networkFirewallPolicyId string
    displayName string
    filters GetNetworkFirewallPolicyNatRulesFilter[]
    natRulePriorityOrder number
    id String
    The provider-assigned unique ID for this managed resource.
    natRuleCollections List<Property Map>
    The list of nat_rule_collection.
    networkFirewallPolicyId String
    displayName String
    filters List<Property Map>
    natRulePriorityOrder Number

    Supporting Types

    GetNetworkFirewallPolicyNatRulesFilter

    Name string
    Name for the NAT rule, must be unique within the policy.
    Values List<string>
    Regex bool
    Name string
    Name for the NAT rule, must be unique within the policy.
    Values []string
    Regex bool
    name String
    Name for the NAT rule, must be unique within the policy.
    values List<String>
    regex Boolean
    name string
    Name for the NAT rule, must be unique within the policy.
    values string[]
    regex boolean
    name str
    Name for the NAT rule, must be unique within the policy.
    values Sequence[str]
    regex bool
    name String
    Name for the NAT rule, must be unique within the policy.
    values List<String>
    regex Boolean

    GetNetworkFirewallPolicyNatRulesNatRuleCollection

    GetNetworkFirewallPolicyNatRulesNatRuleCollectionItem

    Action string
    action:

    • DIPP_SRC_NAT - Dynamic-ip-port source NAT.
    Condition GetNetworkFirewallPolicyNatRulesNatRuleCollectionItemCondition
    Match criteria used in NAT Rule used on the firewall policy.
    Name string
    Name for the NAT rule, must be unique within the policy.
    NetworkFirewallPolicyId string
    Unique Network Firewall Policy identifier
    ParentResourceId string
    OCID of the Network Firewall Policy this decryption profile belongs to.
    Position GetNetworkFirewallPolicyNatRulesNatRuleCollectionItemPosition
    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.
    Description string
    Description of a NAT rule. This field can be used to add additional info.
    Action string
    action:

    • DIPP_SRC_NAT - Dynamic-ip-port source NAT.
    Condition GetNetworkFirewallPolicyNatRulesNatRuleCollectionItemCondition
    Match criteria used in NAT Rule used on the firewall policy.
    Name string
    Name for the NAT rule, must be unique within the policy.
    NetworkFirewallPolicyId string
    Unique Network Firewall Policy identifier
    ParentResourceId string
    OCID of the Network Firewall Policy this decryption profile belongs to.
    Position GetNetworkFirewallPolicyNatRulesNatRuleCollectionItemPosition
    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.
    Description string
    Description of a NAT rule. This field can be used to add additional info.
    action String
    action:

    • DIPP_SRC_NAT - Dynamic-ip-port source NAT.
    condition GetPolicyNatRulesNatRuleCollectionItemCondition
    Match criteria used in NAT Rule used on the firewall policy.
    name String
    Name for the NAT rule, must be unique within the policy.
    networkFirewallPolicyId String
    Unique Network Firewall Policy identifier
    parentResourceId String
    OCID of the Network Firewall Policy this decryption profile belongs to.
    position GetPolicyNatRulesNatRuleCollectionItemPosition
    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.
    description String
    Description of a NAT rule. This field can be used to add additional info.
    action string
    action:

    • DIPP_SRC_NAT - Dynamic-ip-port source NAT.
    condition GetNetworkFirewallPolicyNatRulesNatRuleCollectionItemCondition
    Match criteria used in NAT Rule used on the firewall policy.
    name string
    Name for the NAT rule, must be unique within the policy.
    networkFirewallPolicyId string
    Unique Network Firewall Policy identifier
    parentResourceId string
    OCID of the Network Firewall Policy this decryption profile belongs to.
    position GetNetworkFirewallPolicyNatRulesNatRuleCollectionItemPosition
    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.
    description string
    Description of a NAT rule. This field can be used to add additional info.
    action str
    action:

    • DIPP_SRC_NAT - Dynamic-ip-port source NAT.
    condition GetNetworkFirewallPolicyNatRulesNatRuleCollectionItemCondition
    Match criteria used in NAT Rule used on the firewall policy.
    name str
    Name for the NAT rule, must be unique within the policy.
    network_firewall_policy_id str
    Unique Network Firewall Policy identifier
    parent_resource_id str
    OCID of the Network Firewall Policy this decryption profile belongs to.
    position GetNetworkFirewallPolicyNatRulesNatRuleCollectionItemPosition
    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.
    description str
    Description of a NAT rule. This field can be used to add additional info.
    action String
    action:

    • DIPP_SRC_NAT - Dynamic-ip-port source NAT.
    condition Property Map
    Match criteria used in NAT Rule used on the firewall policy.
    name String
    Name for the NAT rule, must be unique within the policy.
    networkFirewallPolicyId String
    Unique Network Firewall Policy identifier
    parentResourceId String
    OCID of the Network Firewall Policy this decryption profile belongs to.
    position 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.
    description String
    Description of a NAT rule. This field can be used to add additional info.

    GetNetworkFirewallPolicyNatRulesNatRuleCollectionItemCondition

    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.

    GetNetworkFirewallPolicyNatRulesNatRuleCollectionItemPosition

    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