1. Registry
  2. Packages
  3. Oracle Cloud Infrastructure
  4. API Docs
  5. Core
  6. getDrgNatPolicies
Viewing docs for Oracle Cloud Infrastructure v5.5.0
published on Thursday, Oct 22, 2026 by Pulumi
oci logo oci logo
Viewing docs for Oracle Cloud Infrastructure v5.5.0
published on Thursday, Oct 22, 2026 by Pulumi

    This data source provides the list of DrgNatPolicies in Oracle Cloud Infrastructure Core service.

    The list of DrgNatPolicies in the compartment.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testDrgNatPolicies = oci.core.getDrgNatPolicies({
        compartmentId: compartmentId,
        displayName: drgNatPolicyDisplayName,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_drg_nat_policies = oci.core.get_drg_nat_policies(compartment_id=compartment_id,
        display_name=drg_nat_policy_display_name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v5/go/oci/core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := core.GetDrgNatPolicies(ctx, &core.GetDrgNatPoliciesArgs{
    			CompartmentId: compartmentId,
    			DisplayName:   pulumi.StringRef(drgNatPolicyDisplayName),
    		}, 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 testDrgNatPolicies = Oci.Core.GetDrgNatPolicies.Invoke(new()
        {
            CompartmentId = compartmentId,
            DisplayName = drgNatPolicyDisplayName,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Core.CoreFunctions;
    import com.pulumi.oci.Core.inputs.GetDrgNatPoliciesArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 testDrgNatPolicies = CoreFunctions.getDrgNatPolicies(GetDrgNatPoliciesArgs.builder()
                .compartmentId(compartmentId)
                .displayName(drgNatPolicyDisplayName)
                .build());
    
        }
    }
    
    variables:
      testDrgNatPolicies:
        fn::invoke:
          function: oci:Core:getDrgNatPolicies
          arguments:
            compartmentId: ${compartmentId}
            displayName: ${drgNatPolicyDisplayName}
    
    terraform {
      required_providers {
        oci = {
          source = "pulumi/oci"
        }
      }
    }
    
    data "oci_core_drg_nat_policies" "testDrgNatPolicies" {
      compartment_id = compartmentId
      display_name   = drgNatPolicyDisplayName
    }
    

    Using getDrgNatPolicies

    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 getDrgNatPolicies(args: GetDrgNatPoliciesArgs, opts?: InvokeOptions): Promise<GetDrgNatPoliciesResult>
    function getDrgNatPoliciesOutput(args: GetDrgNatPoliciesOutputArgs, opts?: InvokeOutputOptions): Output<GetDrgNatPoliciesResult>
    def get_drg_nat_policies(compartment_id: Optional[str] = None,
                             display_name: Optional[str] = None,
                             filters: Optional[Sequence[GetDrgNatPoliciesFilter]] = None,
                             opts: Optional[InvokeOptions] = None) -> GetDrgNatPoliciesResult
    def get_drg_nat_policies_output(compartment_id: pulumi.Input[Optional[str]] = None,
                             display_name: pulumi.Input[Optional[str]] = None,
                             filters: pulumi.Input[Optional[Sequence[pulumi.Input[GetDrgNatPoliciesFilterArgs]]]] = None,
                             opts: Optional[InvokeOutputOptions] = None) -> Output[GetDrgNatPoliciesResult]
    func GetDrgNatPolicies(ctx *Context, args *GetDrgNatPoliciesArgs, opts ...InvokeOption) (*GetDrgNatPoliciesResult, error)
    func GetDrgNatPoliciesOutput(ctx *Context, args *GetDrgNatPoliciesOutputArgs, opts ...InvokeOption) GetDrgNatPoliciesResultOutput

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

    public static class GetDrgNatPolicies 
    {
        public static Task<GetDrgNatPoliciesResult> InvokeAsync(GetDrgNatPoliciesArgs args, InvokeOptions? opts = null)
        public static Output<GetDrgNatPoliciesResult> Invoke(GetDrgNatPoliciesInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetDrgNatPoliciesResult> Invoke(GetDrgNatPoliciesInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetDrgNatPoliciesResult> getDrgNatPolicies(GetDrgNatPoliciesArgs args, InvokeOptions options)
    public static Output<GetDrgNatPoliciesResult> getDrgNatPolicies(GetDrgNatPoliciesArgs args, InvokeOptions options)
    public static Output<GetDrgNatPoliciesResult> getDrgNatPolicies(GetDrgNatPoliciesArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: oci:Core/getDrgNatPolicies:getDrgNatPolicies
      arguments:
        # arguments dictionary
    data "oci_core_get_drg_nat_policies" "name" {
        # arguments
    }

    The following arguments are supported:

    CompartmentId string
    The OCID of the compartment.
    DisplayName string
    A filter to return only resources that match the given display name exactly.
    Filters List<GetDrgNatPoliciesFilter>
    CompartmentId string
    The OCID of the compartment.
    DisplayName string
    A filter to return only resources that match the given display name exactly.
    Filters []GetDrgNatPoliciesFilter
    compartment_id string
    The OCID of the compartment.
    display_name string
    A filter to return only resources that match the given display name exactly.
    filters list(object)
    compartmentId String
    The OCID of the compartment.
    displayName String
    A filter to return only resources that match the given display name exactly.
    filters List<GetDrgNatPoliciesFilter>
    compartmentId string
    The OCID of the compartment.
    displayName string
    A filter to return only resources that match the given display name exactly.
    filters GetDrgNatPoliciesFilter[]
    compartment_id str
    The OCID of the compartment.
    display_name str
    A filter to return only resources that match the given display name exactly.
    filters Sequence[GetDrgNatPoliciesFilter]
    compartmentId String
    The OCID of the compartment.
    displayName String
    A filter to return only resources that match the given display name exactly.
    filters List<Property Map>

    getDrgNatPolicies Result

    The following output properties are available:

    CompartmentId string
    The OCID of the compartment containing the DrgNatPolicy.
    DrgNatPolicies List<GetDrgNatPoliciesDrgNatPolicy>
    The list of drg_nat_policies.
    Id string
    The provider-assigned unique ID for this managed resource.
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    Filters List<GetDrgNatPoliciesFilter>
    CompartmentId string
    The OCID of the compartment containing the DrgNatPolicy.
    DrgNatPolicies []GetDrgNatPoliciesDrgNatPolicy
    The list of drg_nat_policies.
    Id string
    The provider-assigned unique ID for this managed resource.
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    Filters []GetDrgNatPoliciesFilter
    compartment_id string
    The OCID of the compartment containing the DrgNatPolicy.
    drg_nat_policies list(object)
    The list of drg_nat_policies.
    id string
    The provider-assigned unique ID for this managed resource.
    display_name string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    filters list(object)
    compartmentId String
    The OCID of the compartment containing the DrgNatPolicy.
    drgNatPolicies List<GetDrgNatPoliciesDrgNatPolicy>
    The list of drg_nat_policies.
    id String
    The provider-assigned unique ID for this managed resource.
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    filters List<GetDrgNatPoliciesFilter>
    compartmentId string
    The OCID of the compartment containing the DrgNatPolicy.
    drgNatPolicies GetDrgNatPoliciesDrgNatPolicy[]
    The list of drg_nat_policies.
    id string
    The provider-assigned unique ID for this managed resource.
    displayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    filters GetDrgNatPoliciesFilter[]
    compartment_id str
    The OCID of the compartment containing the DrgNatPolicy.
    drg_nat_policies Sequence[GetDrgNatPoliciesDrgNatPolicy]
    The list of drg_nat_policies.
    id str
    The provider-assigned unique ID for this managed resource.
    display_name str
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    filters Sequence[GetDrgNatPoliciesFilter]
    compartmentId String
    The OCID of the compartment containing the DrgNatPolicy.
    drgNatPolicies List<Property Map>
    The list of drg_nat_policies.
    id String
    The provider-assigned unique ID for this managed resource.
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    filters List<Property Map>

    Supporting Types

    GetDrgNatPoliciesDrgNatPolicy

    CompartmentId string
    The OCID of the compartment.
    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 filter to return only resources that match the given display name exactly.
    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 DrgNatPolicy's Oracle ID (OCID).
    State string
    The DrgNatPolicy's current state.
    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 date and time the DrgNatPolicy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    CompartmentId string
    The OCID of the compartment.
    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 filter to return only resources that match the given display name exactly.
    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 DrgNatPolicy's Oracle ID (OCID).
    State string
    The DrgNatPolicy's current state.
    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 date and time the DrgNatPolicy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    compartment_id string
    The OCID of the compartment.
    defined_tags 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"}
    display_name string
    A filter to return only resources that match the given display name exactly.
    freeform_tags 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 DrgNatPolicy's Oracle ID (OCID).
    state string
    The DrgNatPolicy's current state.
    system_tags map(string)
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    time_created string
    The date and time the DrgNatPolicy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    compartmentId String
    The OCID of the compartment.
    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 filter to return only resources that match the given display name exactly.
    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 DrgNatPolicy's Oracle ID (OCID).
    state String
    The DrgNatPolicy's current state.
    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 date and time the DrgNatPolicy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    compartmentId string
    The OCID of the compartment.
    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 filter to return only resources that match the given display name exactly.
    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 DrgNatPolicy's Oracle ID (OCID).
    state string
    The DrgNatPolicy's current state.
    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 date and time the DrgNatPolicy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    compartment_id str
    The OCID of the compartment.
    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 filter to return only resources that match the given display name exactly.
    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 DrgNatPolicy's Oracle ID (OCID).
    state str
    The DrgNatPolicy's current state.
    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 date and time the DrgNatPolicy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    compartmentId String
    The OCID of the compartment.
    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 filter to return only resources that match the given display name exactly.
    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 DrgNatPolicy's Oracle ID (OCID).
    state String
    The DrgNatPolicy's current state.
    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 date and time the DrgNatPolicy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

    GetDrgNatPoliciesFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name string
    values list(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

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo oci logo
    Viewing docs for Oracle Cloud Infrastructure v5.5.0
    published on Thursday, Oct 22, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial