1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. NetworkFirewall
  5. getNetworkFirewallPolicies
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.NetworkFirewall.getNetworkFirewallPolicies

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

    This data source provides the list of Network Firewall Policies in Oracle Cloud Infrastructure Network Firewall service.

    Returns a list of Network Firewall Policies.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testNetworkFirewallPolicies = oci.NetworkFirewall.getNetworkFirewallPolicies({
        compartmentId: compartmentId,
        displayName: networkFirewallPolicyDisplayName,
        id: networkFirewallPolicyId,
        state: networkFirewallPolicyState,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_network_firewall_policies = oci.NetworkFirewall.get_network_firewall_policies(compartment_id=compartment_id,
        display_name=network_firewall_policy_display_name,
        id=network_firewall_policy_id,
        state=network_firewall_policy_state)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/NetworkFirewall"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := NetworkFirewall.GetNetworkFirewallPolicies(ctx, &networkfirewall.GetNetworkFirewallPoliciesArgs{
    			CompartmentId: compartmentId,
    			DisplayName:   pulumi.StringRef(networkFirewallPolicyDisplayName),
    			Id:            pulumi.StringRef(networkFirewallPolicyId),
    			State:         pulumi.StringRef(networkFirewallPolicyState),
    		}, 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 testNetworkFirewallPolicies = Oci.NetworkFirewall.GetNetworkFirewallPolicies.Invoke(new()
        {
            CompartmentId = compartmentId,
            DisplayName = networkFirewallPolicyDisplayName,
            Id = networkFirewallPolicyId,
            State = networkFirewallPolicyState,
        });
    
    });
    
    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.GetNetworkFirewallPoliciesArgs;
    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 testNetworkFirewallPolicies = NetworkFirewallFunctions.getNetworkFirewallPolicies(GetNetworkFirewallPoliciesArgs.builder()
                .compartmentId(compartmentId)
                .displayName(networkFirewallPolicyDisplayName)
                .id(networkFirewallPolicyId)
                .state(networkFirewallPolicyState)
                .build());
    
        }
    }
    
    variables:
      testNetworkFirewallPolicies:
        fn::invoke:
          Function: oci:NetworkFirewall:getNetworkFirewallPolicies
          Arguments:
            compartmentId: ${compartmentId}
            displayName: ${networkFirewallPolicyDisplayName}
            id: ${networkFirewallPolicyId}
            state: ${networkFirewallPolicyState}
    

    Using getNetworkFirewallPolicies

    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 getNetworkFirewallPolicies(args: GetNetworkFirewallPoliciesArgs, opts?: InvokeOptions): Promise<GetNetworkFirewallPoliciesResult>
    function getNetworkFirewallPoliciesOutput(args: GetNetworkFirewallPoliciesOutputArgs, opts?: InvokeOptions): Output<GetNetworkFirewallPoliciesResult>
    def get_network_firewall_policies(compartment_id: Optional[str] = None,
                                      display_name: Optional[str] = None,
                                      filters: Optional[Sequence[_networkfirewall.GetNetworkFirewallPoliciesFilter]] = None,
                                      id: Optional[str] = None,
                                      state: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetNetworkFirewallPoliciesResult
    def get_network_firewall_policies_output(compartment_id: Optional[pulumi.Input[str]] = None,
                                      display_name: Optional[pulumi.Input[str]] = None,
                                      filters: Optional[pulumi.Input[Sequence[pulumi.Input[_networkfirewall.GetNetworkFirewallPoliciesFilterArgs]]]] = None,
                                      id: Optional[pulumi.Input[str]] = None,
                                      state: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetNetworkFirewallPoliciesResult]
    func GetNetworkFirewallPolicies(ctx *Context, args *GetNetworkFirewallPoliciesArgs, opts ...InvokeOption) (*GetNetworkFirewallPoliciesResult, error)
    func GetNetworkFirewallPoliciesOutput(ctx *Context, args *GetNetworkFirewallPoliciesOutputArgs, opts ...InvokeOption) GetNetworkFirewallPoliciesResultOutput

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

    public static class GetNetworkFirewallPolicies 
    {
        public static Task<GetNetworkFirewallPoliciesResult> InvokeAsync(GetNetworkFirewallPoliciesArgs args, InvokeOptions? opts = null)
        public static Output<GetNetworkFirewallPoliciesResult> Invoke(GetNetworkFirewallPoliciesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNetworkFirewallPoliciesResult> getNetworkFirewallPolicies(GetNetworkFirewallPoliciesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:NetworkFirewall/getNetworkFirewallPolicies:getNetworkFirewallPolicies
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The ID of the compartment in which to list resources.
    DisplayName string
    A filter to return only resources that match the entire display name given.
    Filters List<GetNetworkFirewallPoliciesFilter>
    Id string
    Unique Network Firewall Policy identifier
    State string
    A filter to return only resources with a lifecycleState matching the given value.
    CompartmentId string
    The ID of the compartment in which to list resources.
    DisplayName string
    A filter to return only resources that match the entire display name given.
    Filters []GetNetworkFirewallPoliciesFilter
    Id string
    Unique Network Firewall Policy identifier
    State string
    A filter to return only resources with a lifecycleState matching the given value.
    compartmentId String
    The ID of the compartment in which to list resources.
    displayName String
    A filter to return only resources that match the entire display name given.
    filters List<GetPoliciesFilter>
    id String
    Unique Network Firewall Policy identifier
    state String
    A filter to return only resources with a lifecycleState matching the given value.
    compartmentId string
    The ID of the compartment in which to list resources.
    displayName string
    A filter to return only resources that match the entire display name given.
    filters GetNetworkFirewallPoliciesFilter[]
    id string
    Unique Network Firewall Policy identifier
    state string
    A filter to return only resources with a lifecycleState matching the given value.
    compartment_id str
    The ID of the compartment in which to list resources.
    display_name str
    A filter to return only resources that match the entire display name given.
    filters Sequence[networkfirewall.GetNetworkFirewallPoliciesFilter]
    id str
    Unique Network Firewall Policy identifier
    state str
    A filter to return only resources with a lifecycleState matching the given value.
    compartmentId String
    The ID of the compartment in which to list resources.
    displayName String
    A filter to return only resources that match the entire display name given.
    filters List<Property Map>
    id String
    Unique Network Firewall Policy identifier
    state String
    A filter to return only resources with a lifecycleState matching the given value.

    getNetworkFirewallPolicies Result

    The following output properties are available:

    CompartmentId string
    The OCID of the compartment containing the NetworkFirewall Policy.
    NetworkFirewallPolicySummaryCollections List<GetNetworkFirewallPoliciesNetworkFirewallPolicySummaryCollection>
    The list of network_firewall_policy_summary_collection.
    DisplayName string
    A user-friendly optional name for the firewall policy. Avoid entering confidential information.
    Filters List<GetNetworkFirewallPoliciesFilter>
    Id string
    The OCID of the resource - Network Firewall Policy.
    State string
    The current state of the Network Firewall Policy.
    CompartmentId string
    The OCID of the compartment containing the NetworkFirewall Policy.
    NetworkFirewallPolicySummaryCollections []GetNetworkFirewallPoliciesNetworkFirewallPolicySummaryCollection
    The list of network_firewall_policy_summary_collection.
    DisplayName string
    A user-friendly optional name for the firewall policy. Avoid entering confidential information.
    Filters []GetNetworkFirewallPoliciesFilter
    Id string
    The OCID of the resource - Network Firewall Policy.
    State string
    The current state of the Network Firewall Policy.
    compartmentId String
    The OCID of the compartment containing the NetworkFirewall Policy.
    networkFirewallPolicySummaryCollections List<GetPoliciesPolicySummaryCollection>
    The list of network_firewall_policy_summary_collection.
    displayName String
    A user-friendly optional name for the firewall policy. Avoid entering confidential information.
    filters List<GetPoliciesFilter>
    id String
    The OCID of the resource - Network Firewall Policy.
    state String
    The current state of the Network Firewall Policy.
    compartmentId string
    The OCID of the compartment containing the NetworkFirewall Policy.
    networkFirewallPolicySummaryCollections GetNetworkFirewallPoliciesNetworkFirewallPolicySummaryCollection[]
    The list of network_firewall_policy_summary_collection.
    displayName string
    A user-friendly optional name for the firewall policy. Avoid entering confidential information.
    filters GetNetworkFirewallPoliciesFilter[]
    id string
    The OCID of the resource - Network Firewall Policy.
    state string
    The current state of the Network Firewall Policy.
    compartment_id str
    The OCID of the compartment containing the NetworkFirewall Policy.
    network_firewall_policy_summary_collections Sequence[networkfirewall.GetNetworkFirewallPoliciesNetworkFirewallPolicySummaryCollection]
    The list of network_firewall_policy_summary_collection.
    display_name str
    A user-friendly optional name for the firewall policy. Avoid entering confidential information.
    filters Sequence[networkfirewall.GetNetworkFirewallPoliciesFilter]
    id str
    The OCID of the resource - Network Firewall Policy.
    state str
    The current state of the Network Firewall Policy.
    compartmentId String
    The OCID of the compartment containing the NetworkFirewall Policy.
    networkFirewallPolicySummaryCollections List<Property Map>
    The list of network_firewall_policy_summary_collection.
    displayName String
    A user-friendly optional name for the firewall policy. Avoid entering confidential information.
    filters List<Property Map>
    id String
    The OCID of the resource - Network Firewall Policy.
    state String
    The current state of the Network Firewall Policy.

    Supporting Types

    GetNetworkFirewallPoliciesFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    GetNetworkFirewallPoliciesNetworkFirewallPolicySummaryCollection

    GetNetworkFirewallPoliciesNetworkFirewallPolicySummaryCollectionItem

    AttachedNetworkFirewallCount int
    Count of number of Network Firewall attached to the Policy.
    CompartmentId string
    The ID of the compartment in which to list resources.
    DefinedTags Dictionary<string, object>
    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 filter to return only resources that match the entire display name given.
    FreeformTags Dictionary<string, object>
    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
    Unique Network Firewall Policy identifier
    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.
    State string
    A filter to return only resources with a lifecycleState matching the given value.
    SystemTags Dictionary<string, object>
    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 ID of the compartment in which to list resources.
    DefinedTags map[string]interface{}
    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 filter to return only resources that match the entire display name given.
    FreeformTags map[string]interface{}
    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
    Unique Network Firewall Policy identifier
    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.
    State string
    A filter to return only resources with a lifecycleState matching the given value.
    SystemTags map[string]interface{}
    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 ID of the compartment in which to list resources.
    definedTags Map<String,Object>
    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 filter to return only resources that match the entire display name given.
    freeformTags Map<String,Object>
    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
    Unique Network Firewall Policy identifier
    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.
    state String
    A filter to return only resources with a lifecycleState matching the given value.
    systemTags Map<String,Object>
    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 ID of the compartment in which to list resources.
    definedTags {[key: string]: any}
    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 filter to return only resources that match the entire display name given.
    freeformTags {[key: string]: any}
    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
    Unique Network Firewall Policy identifier
    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.
    state string
    A filter to return only resources with a lifecycleState matching the given value.
    systemTags {[key: string]: any}
    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 ID of the compartment in which to list resources.
    defined_tags Mapping[str, Any]
    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 filter to return only resources that match the entire display name given.
    freeform_tags Mapping[str, Any]
    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
    Unique Network Firewall Policy identifier
    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.
    state str
    A filter to return only resources with a lifecycleState matching the given value.
    system_tags Mapping[str, Any]
    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 ID of the compartment in which to list resources.
    definedTags Map<Any>
    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 filter to return only resources that match the entire display name given.
    freeformTags Map<Any>
    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
    Unique Network Firewall Policy identifier
    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.
    state String
    A filter to return only resources with a lifecycleState matching the given value.
    systemTags Map<Any>
    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 v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi