1. Registry
  2. Packages
  3. Oracle Cloud Infrastructure
  4. API Docs
  5. Core
  6. getDrgNatPolicy
Viewing docs for Oracle Cloud Infrastructure v5.3.0
published on Friday, Oct 9, 2026 by Pulumi
oci logo oci logo
Viewing docs for Oracle Cloud Infrastructure v5.3.0
published on Friday, Oct 9, 2026 by Pulumi

    This data source provides details about a specific Drg Nat Policy resource in Oracle Cloud Infrastructure Core service.

    Gets the specified DRG NAT policy’s information.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testDrgNatPolicy = oci.core.getDrgNatPolicy({
        drgNatPolicyId: testDrgNatPolicyOciCoreDrgNatPolicy.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_drg_nat_policy = oci.core.get_drg_nat_policy(drg_nat_policy_id=test_drg_nat_policy_oci_core_drg_nat_policy["id"])
    
    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.GetDrgNatPolicy(ctx, &core.GetDrgNatPolicyArgs{
    			DrgNatPolicyId: testDrgNatPolicyOciCoreDrgNatPolicy.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 testDrgNatPolicy = Oci.Core.GetDrgNatPolicy.Invoke(new()
        {
            DrgNatPolicyId = testDrgNatPolicyOciCoreDrgNatPolicy.Id,
        });
    
    });
    
    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.GetDrgNatPolicyArgs;
    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 testDrgNatPolicy = CoreFunctions.getDrgNatPolicy(GetDrgNatPolicyArgs.builder()
                .drgNatPolicyId(testDrgNatPolicyOciCoreDrgNatPolicy.id())
                .build());
    
        }
    }
    
    variables:
      testDrgNatPolicy:
        fn::invoke:
          function: oci:Core:getDrgNatPolicy
          arguments:
            drgNatPolicyId: ${testDrgNatPolicyOciCoreDrgNatPolicy.id}
    
    pulumi {
      required_providers {
        oci = {
          source = "pulumi/oci"
        }
      }
    }
    
    data "oci_core_getdrgnatpolicy" "testDrgNatPolicy" {
      drg_nat_policy_id = testDrgNatPolicyOciCoreDrgNatPolicy.id
    }
    

    Using getDrgNatPolicy

    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 getDrgNatPolicy(args: GetDrgNatPolicyArgs, opts?: InvokeOptions): Promise<GetDrgNatPolicyResult>
    function getDrgNatPolicyOutput(args: GetDrgNatPolicyOutputArgs, opts?: InvokeOutputOptions): Output<GetDrgNatPolicyResult>
    def get_drg_nat_policy(drg_nat_policy_id: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetDrgNatPolicyResult
    def get_drg_nat_policy_output(drg_nat_policy_id: pulumi.Input[Optional[str]] = None,
                           opts: Optional[InvokeOutputOptions] = None) -> Output[GetDrgNatPolicyResult]
    func LookupDrgNatPolicy(ctx *Context, args *LookupDrgNatPolicyArgs, opts ...InvokeOption) (*LookupDrgNatPolicyResult, error)
    func LookupDrgNatPolicyOutput(ctx *Context, args *LookupDrgNatPolicyOutputArgs, opts ...InvokeOption) LookupDrgNatPolicyResultOutput

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

    public static class GetDrgNatPolicy 
    {
        public static Task<GetDrgNatPolicyResult> InvokeAsync(GetDrgNatPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetDrgNatPolicyResult> Invoke(GetDrgNatPolicyInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetDrgNatPolicyResult> Invoke(GetDrgNatPolicyInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetDrgNatPolicyResult> getDrgNatPolicy(GetDrgNatPolicyArgs args, InvokeOptions options)
    public static Output<GetDrgNatPolicyResult> getDrgNatPolicy(GetDrgNatPolicyArgs args, InvokeOptions options)
    public static Output<GetDrgNatPolicyResult> getDrgNatPolicy(GetDrgNatPolicyArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: oci:Core/getDrgNatPolicy:getDrgNatPolicy
      arguments:
        # arguments dictionary
    data "oci_core_get_drg_nat_policy" "name" {
        # arguments
    }

    The following arguments are supported:

    DrgNatPolicyId string
    The OCID of the DRG NAT policy.
    DrgNatPolicyId string
    The OCID of the DRG NAT policy.
    drg_nat_policy_id string
    The OCID of the DRG NAT policy.
    drgNatPolicyId String
    The OCID of the DRG NAT policy.
    drgNatPolicyId string
    The OCID of the DRG NAT policy.
    drg_nat_policy_id str
    The OCID of the DRG NAT policy.
    drgNatPolicyId String
    The OCID of the DRG NAT policy.

    getDrgNatPolicy Result

    The following output properties are available:

    CompartmentId string
    The OCID of the compartment containing the DRG NAT 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 name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    DrgNatPolicyId string
    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 DRG NAT policy's Oracle ID (OCID).
    State string
    The DRG NAT policy'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 DRG NAT policy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    CompartmentId string
    The OCID of the compartment containing the DRG NAT 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 name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    DrgNatPolicyId string
    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 DRG NAT policy's Oracle ID (OCID).
    State string
    The DRG NAT policy'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 DRG NAT policy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    compartment_id string
    The OCID of the compartment containing the DRG NAT policy.
    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 user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    drg_nat_policy_id string
    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 DRG NAT policy's Oracle ID (OCID).
    state string
    The DRG NAT policy'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 DRG NAT policy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    compartmentId String
    The OCID of the compartment containing the DRG NAT 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 name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    drgNatPolicyId String
    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 DRG NAT policy's Oracle ID (OCID).
    state String
    The DRG NAT policy'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 DRG NAT policy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    compartmentId string
    The OCID of the compartment containing the DRG NAT 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 name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    drgNatPolicyId string
    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 DRG NAT policy's Oracle ID (OCID).
    state string
    The DRG NAT policy'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 DRG NAT policy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    compartment_id str
    The OCID of the compartment containing the DRG NAT 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 name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    drg_nat_policy_id str
    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 DRG NAT policy's Oracle ID (OCID).
    state str
    The DRG NAT policy'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 DRG NAT policy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    compartmentId String
    The OCID of the compartment containing the DRG NAT 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 name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    drgNatPolicyId String
    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 DRG NAT policy's Oracle ID (OCID).
    state String
    The DRG NAT policy'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 DRG NAT policy was created, 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 oci logo
    Viewing docs for Oracle Cloud Infrastructure v5.3.0
    published on Friday, Oct 9, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial