Oracle Cloud Infrastructure v4.0.0 published on Friday, Feb 20, 2026 by Pulumi
Oracle Cloud Infrastructure v4.0.0 published on Friday, Feb 20, 2026 by Pulumi
This data source provides details about a specific Network Firewall Policy Nat Rule resource in Oracle Cloud Infrastructure Network Firewall service.
Get a 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/v4/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 dictionaryThe following arguments are supported:
- Nat
Rule stringName - Unique identifier for NAT rules in the Network Firewall policy.
- Network
Firewall stringPolicy Id - Unique Network Firewall Policy identifier
- Nat
Rule stringName - Unique identifier for NAT rules in the Network Firewall policy.
- Network
Firewall stringPolicy Id - Unique Network Firewall Policy identifier
- nat
Rule StringName - Unique identifier for NAT rules in the Network Firewall policy.
- network
Firewall StringPolicy Id - Unique Network Firewall Policy identifier
- nat
Rule stringName - Unique identifier for NAT rules in the Network Firewall policy.
- network
Firewall stringPolicy Id - Unique Network Firewall Policy identifier
- nat_
rule_ strname - Unique identifier for NAT rules in the Network Firewall policy.
- network_
firewall_ strpolicy_ id - Unique Network Firewall Policy identifier
- nat
Rule StringName - Unique identifier for NAT rules in the Network Firewall policy.
- network
Firewall StringPolicy Id - 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<Get
Network Firewall Policy Nat Rule Condition> - 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.
- Nat
Rule stringName - Network
Firewall stringPolicy Id - Parent
Resource stringId - The OCID of the Network Firewall policy this NAT rule belongs to.
- Positions
List<Get
Network Firewall Policy Nat Rule Position> - An object which defines the position of the rule.
- Priority
Order 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
[]Get
Network Firewall Policy Nat Rule Condition - 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.
- Nat
Rule stringName - Network
Firewall stringPolicy Id - Parent
Resource stringId - The OCID of the Network Firewall policy this NAT rule belongs to.
- Positions
[]Get
Network Firewall Policy Nat Rule Position - An object which defines the position of the rule.
- Priority
Order 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<Get
Policy Nat Rule Condition> - 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.
- nat
Rule StringName - network
Firewall StringPolicy Id - parent
Resource StringId - The OCID of the Network Firewall policy this NAT rule belongs to.
- positions
List<Get
Policy Nat Rule Position> - An object which defines the position of the rule.
- priority
Order 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
Get
Network Firewall Policy Nat Rule Condition[] - 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.
- nat
Rule stringName - network
Firewall stringPolicy Id - parent
Resource stringId - The OCID of the Network Firewall policy this NAT rule belongs to.
- positions
Get
Network Firewall Policy Nat Rule Position[] - An object which defines the position of the rule.
- priority
Order 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[Get
Network Firewall Policy Nat Rule Condition] - 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_ strname - network_
firewall_ strpolicy_ id - parent_
resource_ strid - The OCID of the Network Firewall policy this NAT rule belongs to.
- positions
Sequence[Get
Network Firewall Policy Nat Rule Position] - 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.
- nat
Rule StringName - network
Firewall StringPolicy Id - parent
Resource StringId - The OCID of the Network Firewall policy this NAT rule belongs to.
- positions List<Property Map>
- An object which defines the position of the rule.
- priority
Order String - The priority order in which this rule should be evaluated
- type String
- NAT type:
- NATV4 - NATV4 type NAT.
Supporting Types
GetNetworkFirewallPolicyNatRuleCondition
- Destination
Addresses 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.
- Source
Addresses List<string> - An array of IP address list names to be evaluated against the traffic source address.
- Destination
Addresses []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.
- Source
Addresses []string - An array of IP address list names to be evaluated against the traffic source address.
- destination
Addresses 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.
- source
Addresses List<String> - An array of IP address list names to be evaluated against the traffic source address.
- destination
Addresses 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.
- source
Addresses 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.
- destination
Addresses 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.
- source
Addresses List<String> - An array of IP address list names to be evaluated against the traffic source address.
GetNetworkFirewallPolicyNatRulePosition
- After
Rule string - Identifier for rule after which this rule lies.
- Before
Rule string - Identifier for rule before which this rule lies.
- After
Rule string - Identifier for rule after which this rule lies.
- Before
Rule string - Identifier for rule before which this rule lies.
- after
Rule String - Identifier for rule after which this rule lies.
- before
Rule String - Identifier for rule before which this rule lies.
- after
Rule string - Identifier for rule after which this rule lies.
- before
Rule 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.
- after
Rule String - Identifier for rule after which this rule lies.
- before
Rule 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
ociTerraform Provider.
Oracle Cloud Infrastructure v4.0.0 published on Friday, Feb 20, 2026 by Pulumi
