1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. NetworkFirewall
  5. getNetworkFirewallPolicy
Oracle Cloud Infrastructure v3.10.0 published on Wednesday, Nov 5, 2025 by Pulumi

oci.NetworkFirewall.getNetworkFirewallPolicy

Start a Neo task
Explain and create an oci.NetworkFirewall.getNetworkFirewallPolicy resource
oci logo
Oracle Cloud Infrastructure v3.10.0 published on Wednesday, Nov 5, 2025 by Pulumi

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

    Gets a NetworkFirewallPolicy given the network firewall policy identifier.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testNetworkFirewallPolicy = oci.NetworkFirewall.getNetworkFirewallPolicy({
        networkFirewallPolicyId: testNetworkFirewallPolicyOciNetworkFirewallNetworkFirewallPolicy.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_network_firewall_policy = oci.NetworkFirewall.get_network_firewall_policy(network_firewall_policy_id=test_network_firewall_policy_oci_network_firewall_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.GetNetworkFirewallPolicy(ctx, &networkfirewall.GetNetworkFirewallPolicyArgs{
    			NetworkFirewallPolicyId: testNetworkFirewallPolicyOciNetworkFirewallNetworkFirewallPolicy.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 testNetworkFirewallPolicy = Oci.NetworkFirewall.GetNetworkFirewallPolicy.Invoke(new()
        {
            NetworkFirewallPolicyId = testNetworkFirewallPolicyOciNetworkFirewallNetworkFirewallPolicy.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.GetNetworkFirewallPolicyArgs;
    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 testNetworkFirewallPolicy = NetworkFirewallFunctions.getNetworkFirewallPolicy(GetNetworkFirewallPolicyArgs.builder()
                .networkFirewallPolicyId(testNetworkFirewallPolicyOciNetworkFirewallNetworkFirewallPolicy.id())
                .build());
    
        }
    }
    
    variables:
      testNetworkFirewallPolicy:
        fn::invoke:
          function: oci:NetworkFirewall:getNetworkFirewallPolicy
          arguments:
            networkFirewallPolicyId: ${testNetworkFirewallPolicyOciNetworkFirewallNetworkFirewallPolicy.id}
    

    Using getNetworkFirewallPolicy

    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 getNetworkFirewallPolicy(args: GetNetworkFirewallPolicyArgs, opts?: InvokeOptions): Promise<GetNetworkFirewallPolicyResult>
    function getNetworkFirewallPolicyOutput(args: GetNetworkFirewallPolicyOutputArgs, opts?: InvokeOptions): Output<GetNetworkFirewallPolicyResult>
    def get_network_firewall_policy(network_firewall_policy_id: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetNetworkFirewallPolicyResult
    def get_network_firewall_policy_output(network_firewall_policy_id: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetNetworkFirewallPolicyResult]
    func LookupNetworkFirewallPolicy(ctx *Context, args *LookupNetworkFirewallPolicyArgs, opts ...InvokeOption) (*LookupNetworkFirewallPolicyResult, error)
    func LookupNetworkFirewallPolicyOutput(ctx *Context, args *LookupNetworkFirewallPolicyOutputArgs, opts ...InvokeOption) LookupNetworkFirewallPolicyResultOutput

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

    public static class GetNetworkFirewallPolicy 
    {
        public static Task<GetNetworkFirewallPolicyResult> InvokeAsync(GetNetworkFirewallPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetNetworkFirewallPolicyResult> Invoke(GetNetworkFirewallPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNetworkFirewallPolicyResult> getNetworkFirewallPolicy(GetNetworkFirewallPolicyArgs args, InvokeOptions options)
    public static Output<GetNetworkFirewallPolicyResult> getNetworkFirewallPolicy(GetNetworkFirewallPolicyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:NetworkFirewall/getNetworkFirewallPolicy:getNetworkFirewallPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    NetworkFirewallPolicyId string
    Unique Network Firewall Policy identifier
    NetworkFirewallPolicyId string
    Unique Network Firewall Policy identifier
    networkFirewallPolicyId String
    Unique Network Firewall Policy identifier
    networkFirewallPolicyId string
    Unique Network Firewall Policy identifier
    network_firewall_policy_id str
    Unique Network Firewall Policy identifier
    networkFirewallPolicyId String
    Unique Network Firewall Policy identifier

    getNetworkFirewallPolicy Result

    The following output properties are available:

    AttachedNetworkFirewallCount int
    Count of number of Network Firewall attached to the Policy.
    CompartmentId string
    The OCID of the compartment containing the NetworkFirewall Policy.
    DefinedTags Dictionary<string, string>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    A user-friendly optional name for the firewall policy. Avoid entering confidential information.
    FreeformTags Dictionary<string, string>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Id string
    The OCID of the resource - Network Firewall Policy.
    LifecycleDetails string
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
    NetworkFirewallPolicyId string
    State string
    The current state of the Network Firewall Policy.
    SystemTags Dictionary<string, string>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The time instant at which the Network Firewall Policy was created in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    TimeUpdated string
    The time instant at which the Network Firewall Policy was updated in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    AttachedNetworkFirewallCount int
    Count of number of Network Firewall attached to the Policy.
    CompartmentId string
    The OCID of the compartment containing the NetworkFirewall Policy.
    DefinedTags map[string]string
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    A user-friendly optional name for the firewall policy. Avoid entering confidential information.
    FreeformTags map[string]string
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Id string
    The OCID of the resource - Network Firewall Policy.
    LifecycleDetails string
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
    NetworkFirewallPolicyId string
    State string
    The current state of the Network Firewall Policy.
    SystemTags map[string]string
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The time instant at which the Network Firewall Policy was created in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    TimeUpdated string
    The time instant at which the Network Firewall Policy was updated in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    attachedNetworkFirewallCount Integer
    Count of number of Network Firewall attached to the Policy.
    compartmentId String
    The OCID of the compartment containing the NetworkFirewall Policy.
    definedTags Map<String,String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    A user-friendly optional name for the firewall policy. Avoid entering confidential information.
    freeformTags Map<String,String>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id String
    The OCID of the resource - Network Firewall Policy.
    lifecycleDetails String
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
    networkFirewallPolicyId String
    state String
    The current state of the Network Firewall Policy.
    systemTags Map<String,String>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The time instant at which the Network Firewall Policy was created in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    timeUpdated String
    The time instant at which the Network Firewall Policy was updated in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    attachedNetworkFirewallCount number
    Count of number of Network Firewall attached to the Policy.
    compartmentId string
    The OCID of the compartment containing the NetworkFirewall Policy.
    definedTags {[key: string]: string}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName string
    A user-friendly optional name for the firewall policy. Avoid entering confidential information.
    freeformTags {[key: string]: string}
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id string
    The OCID of the resource - Network Firewall Policy.
    lifecycleDetails string
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
    networkFirewallPolicyId string
    state string
    The current state of the Network Firewall Policy.
    systemTags {[key: string]: string}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated string
    The time instant at which the Network Firewall Policy was created in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    timeUpdated string
    The time instant at which the Network Firewall Policy was updated in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    attached_network_firewall_count int
    Count of number of Network Firewall attached to the Policy.
    compartment_id str
    The OCID of the compartment containing the NetworkFirewall Policy.
    defined_tags Mapping[str, str]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    display_name str
    A user-friendly optional name for the firewall policy. Avoid entering confidential information.
    freeform_tags Mapping[str, str]
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id str
    The OCID of the resource - Network Firewall Policy.
    lifecycle_details str
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
    network_firewall_policy_id str
    state str
    The current state of the Network Firewall Policy.
    system_tags Mapping[str, str]
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    time_created str
    The time instant at which the Network Firewall Policy was created in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    time_updated str
    The time instant at which the Network Firewall Policy was updated in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    attachedNetworkFirewallCount Number
    Count of number of Network Firewall attached to the Policy.
    compartmentId String
    The OCID of the compartment containing the NetworkFirewall Policy.
    definedTags Map<String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    A user-friendly optional name for the firewall policy. Avoid entering confidential information.
    freeformTags Map<String>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id String
    The OCID of the resource - Network Firewall Policy.
    lifecycleDetails String
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
    networkFirewallPolicyId String
    state String
    The current state of the Network Firewall Policy.
    systemTags Map<String>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The time instant at which the Network Firewall Policy was created in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    timeUpdated String
    The time instant at which the Network Firewall Policy was updated in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

    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.10.0 published on Wednesday, Nov 5, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate