1. Registry
  2. Packages
  3. Oracle Cloud Infrastructure
  4. API Docs
  5. Core
  6. getDrgNatPolicyDrgNatRules
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 DrgNatRules that are associated with a DrgNatPolicy in Oracle Cloud Infrastructure Core service.

    Lists the rules for the specified DrgNatPolicy

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testDrgNatPolicyDrgNatRules = oci.core.getDrgNatPolicyDrgNatRules({
        drgNatPolicyId: testDrgNatPolicy.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_drg_nat_policy_drg_nat_rules = oci.core.get_drg_nat_policy_drg_nat_rules(drg_nat_policy_id=test_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.GetDrgNatPolicyDrgNatRules(ctx, &core.GetDrgNatPolicyDrgNatRulesArgs{
    			DrgNatPolicyId: testDrgNatPolicy.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 testDrgNatPolicyDrgNatRules = Oci.Core.GetDrgNatPolicyDrgNatRules.Invoke(new()
        {
            DrgNatPolicyId = testDrgNatPolicy.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.GetDrgNatPolicyDrgNatRulesArgs;
    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 testDrgNatPolicyDrgNatRules = CoreFunctions.getDrgNatPolicyDrgNatRules(GetDrgNatPolicyDrgNatRulesArgs.builder()
                .drgNatPolicyId(testDrgNatPolicy.get("id"))
                .build());
    
        }
    }
    
    variables:
      testDrgNatPolicyDrgNatRules:
        fn::invoke:
          function: oci:Core:getDrgNatPolicyDrgNatRules
          arguments:
            drgNatPolicyId: ${testDrgNatPolicy.id}
    
    terraform {
      required_providers {
        oci = {
          source = "pulumi/oci"
        }
      }
    }
    
    data "oci_core_drg_nat_policy_drg_nat_rules" "testDrgNatPolicyDrgNatRules" {
      drg_nat_policy_id = testDrgNatPolicy.id
    }
    

    Using getDrgNatPolicyDrgNatRules

    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 getDrgNatPolicyDrgNatRules(args: GetDrgNatPolicyDrgNatRulesArgs, opts?: InvokeOptions): Promise<GetDrgNatPolicyDrgNatRulesResult>
    function getDrgNatPolicyDrgNatRulesOutput(args: GetDrgNatPolicyDrgNatRulesOutputArgs, opts?: InvokeOutputOptions): Output<GetDrgNatPolicyDrgNatRulesResult>
    def get_drg_nat_policy_drg_nat_rules(drg_nat_policy_id: Optional[str] = None,
                                         filters: Optional[Sequence[GetDrgNatPolicyDrgNatRulesFilter]] = None,
                                         opts: Optional[InvokeOptions] = None) -> GetDrgNatPolicyDrgNatRulesResult
    def get_drg_nat_policy_drg_nat_rules_output(drg_nat_policy_id: pulumi.Input[Optional[str]] = None,
                                         filters: pulumi.Input[Optional[Sequence[pulumi.Input[GetDrgNatPolicyDrgNatRulesFilterArgs]]]] = None,
                                         opts: Optional[InvokeOutputOptions] = None) -> Output[GetDrgNatPolicyDrgNatRulesResult]
    func GetDrgNatPolicyDrgNatRules(ctx *Context, args *GetDrgNatPolicyDrgNatRulesArgs, opts ...InvokeOption) (*GetDrgNatPolicyDrgNatRulesResult, error)
    func GetDrgNatPolicyDrgNatRulesOutput(ctx *Context, args *GetDrgNatPolicyDrgNatRulesOutputArgs, opts ...InvokeOption) GetDrgNatPolicyDrgNatRulesResultOutput

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

    public static class GetDrgNatPolicyDrgNatRules 
    {
        public static Task<GetDrgNatPolicyDrgNatRulesResult> InvokeAsync(GetDrgNatPolicyDrgNatRulesArgs args, InvokeOptions? opts = null)
        public static Output<GetDrgNatPolicyDrgNatRulesResult> Invoke(GetDrgNatPolicyDrgNatRulesInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetDrgNatPolicyDrgNatRulesResult> Invoke(GetDrgNatPolicyDrgNatRulesInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetDrgNatPolicyDrgNatRulesResult> getDrgNatPolicyDrgNatRules(GetDrgNatPolicyDrgNatRulesArgs args, InvokeOptions options)
    public static Output<GetDrgNatPolicyDrgNatRulesResult> getDrgNatPolicyDrgNatRules(GetDrgNatPolicyDrgNatRulesArgs args, InvokeOptions options)
    public static Output<GetDrgNatPolicyDrgNatRulesResult> getDrgNatPolicyDrgNatRules(GetDrgNatPolicyDrgNatRulesArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: oci:Core/getDrgNatPolicyDrgNatRules:getDrgNatPolicyDrgNatRules
      arguments:
        # arguments dictionary
    data "oci_core_get_drg_nat_policy_drg_nat_rules" "name" {
        # arguments
    }

    The following arguments are supported:

    drg_nat_policy_id string
    The OCID of the DrgNatPolicy.
    filters list(object)
    drgNatPolicyId String
    The OCID of the DrgNatPolicy.
    filters List<Property Map>

    getDrgNatPolicyDrgNatRules Result

    The following output properties are available:

    DrgNatPolicyId string
    The DrgNatPolicy's Oracle ID (OCID).
    DrgNatRules List<GetDrgNatPolicyDrgNatRulesDrgNatRule>
    The list of drg_nat_rules.
    Id string
    The provider-assigned unique ID for this managed resource.
    Filters List<GetDrgNatPolicyDrgNatRulesFilter>
    DrgNatPolicyId string
    The DrgNatPolicy's Oracle ID (OCID).
    DrgNatRules []GetDrgNatPolicyDrgNatRulesDrgNatRule
    The list of drg_nat_rules.
    Id string
    The provider-assigned unique ID for this managed resource.
    Filters []GetDrgNatPolicyDrgNatRulesFilter
    drg_nat_policy_id string
    The DrgNatPolicy's Oracle ID (OCID).
    drg_nat_rules list(object)
    The list of drg_nat_rules.
    id string
    The provider-assigned unique ID for this managed resource.
    filters list(object)
    drgNatPolicyId String
    The DrgNatPolicy's Oracle ID (OCID).
    drgNatRules List<GetDrgNatPolicyDrgNatRulesDrgNatRule>
    The list of drg_nat_rules.
    id String
    The provider-assigned unique ID for this managed resource.
    filters List<GetDrgNatPolicyDrgNatRulesFilter>
    drgNatPolicyId string
    The DrgNatPolicy's Oracle ID (OCID).
    drgNatRules GetDrgNatPolicyDrgNatRulesDrgNatRule[]
    The list of drg_nat_rules.
    id string
    The provider-assigned unique ID for this managed resource.
    filters GetDrgNatPolicyDrgNatRulesFilter[]
    drg_nat_policy_id str
    The DrgNatPolicy's Oracle ID (OCID).
    drg_nat_rules Sequence[GetDrgNatPolicyDrgNatRulesDrgNatRule]
    The list of drg_nat_rules.
    id str
    The provider-assigned unique ID for this managed resource.
    filters Sequence[GetDrgNatPolicyDrgNatRulesFilter]
    drgNatPolicyId String
    The DrgNatPolicy's Oracle ID (OCID).
    drgNatRules List<Property Map>
    The list of drg_nat_rules.
    id String
    The provider-assigned unique ID for this managed resource.
    filters List<Property Map>

    Supporting Types

    GetDrgNatPolicyDrgNatRulesDrgNatRule

    DrgNatPolicyId string
    The OCID of the DrgNatPolicy.
    DrgNatRulePriority string
    The priority associated with each DrgNatRule.
    Id string
    The Oracle-assigned ID of the DrgNatRule.
    OriginalDestination string
    Represents the range of IP addresses to match against when routing traffic. Original CIDR range for Destination NAT.
    OriginalSource string
    Represents the range of IP addresses to match against when routing traffic. Original CIDR range for Source NAT.
    TranslatedDestination string
    Represents the range of IP addresses to match against when routing traffic. Translated CIDR range for Destination NAT.
    TranslatedSource string
    Represents the range of IP addresses to match against when routing traffic. Translated CIDR range for Source NAT.
    DrgNatPolicyId string
    The OCID of the DrgNatPolicy.
    DrgNatRulePriority string
    The priority associated with each DrgNatRule.
    Id string
    The Oracle-assigned ID of the DrgNatRule.
    OriginalDestination string
    Represents the range of IP addresses to match against when routing traffic. Original CIDR range for Destination NAT.
    OriginalSource string
    Represents the range of IP addresses to match against when routing traffic. Original CIDR range for Source NAT.
    TranslatedDestination string
    Represents the range of IP addresses to match against when routing traffic. Translated CIDR range for Destination NAT.
    TranslatedSource string
    Represents the range of IP addresses to match against when routing traffic. Translated CIDR range for Source NAT.
    drg_nat_policy_id string
    The OCID of the DrgNatPolicy.
    drg_nat_rule_priority string
    The priority associated with each DrgNatRule.
    id string
    The Oracle-assigned ID of the DrgNatRule.
    original_destination string
    Represents the range of IP addresses to match against when routing traffic. Original CIDR range for Destination NAT.
    original_source string
    Represents the range of IP addresses to match against when routing traffic. Original CIDR range for Source NAT.
    translated_destination string
    Represents the range of IP addresses to match against when routing traffic. Translated CIDR range for Destination NAT.
    translated_source string
    Represents the range of IP addresses to match against when routing traffic. Translated CIDR range for Source NAT.
    drgNatPolicyId String
    The OCID of the DrgNatPolicy.
    drgNatRulePriority String
    The priority associated with each DrgNatRule.
    id String
    The Oracle-assigned ID of the DrgNatRule.
    originalDestination String
    Represents the range of IP addresses to match against when routing traffic. Original CIDR range for Destination NAT.
    originalSource String
    Represents the range of IP addresses to match against when routing traffic. Original CIDR range for Source NAT.
    translatedDestination String
    Represents the range of IP addresses to match against when routing traffic. Translated CIDR range for Destination NAT.
    translatedSource String
    Represents the range of IP addresses to match against when routing traffic. Translated CIDR range for Source NAT.
    drgNatPolicyId string
    The OCID of the DrgNatPolicy.
    drgNatRulePriority string
    The priority associated with each DrgNatRule.
    id string
    The Oracle-assigned ID of the DrgNatRule.
    originalDestination string
    Represents the range of IP addresses to match against when routing traffic. Original CIDR range for Destination NAT.
    originalSource string
    Represents the range of IP addresses to match against when routing traffic. Original CIDR range for Source NAT.
    translatedDestination string
    Represents the range of IP addresses to match against when routing traffic. Translated CIDR range for Destination NAT.
    translatedSource string
    Represents the range of IP addresses to match against when routing traffic. Translated CIDR range for Source NAT.
    drg_nat_policy_id str
    The OCID of the DrgNatPolicy.
    drg_nat_rule_priority str
    The priority associated with each DrgNatRule.
    id str
    The Oracle-assigned ID of the DrgNatRule.
    original_destination str
    Represents the range of IP addresses to match against when routing traffic. Original CIDR range for Destination NAT.
    original_source str
    Represents the range of IP addresses to match against when routing traffic. Original CIDR range for Source NAT.
    translated_destination str
    Represents the range of IP addresses to match against when routing traffic. Translated CIDR range for Destination NAT.
    translated_source str
    Represents the range of IP addresses to match against when routing traffic. Translated CIDR range for Source NAT.
    drgNatPolicyId String
    The OCID of the DrgNatPolicy.
    drgNatRulePriority String
    The priority associated with each DrgNatRule.
    id String
    The Oracle-assigned ID of the DrgNatRule.
    originalDestination String
    Represents the range of IP addresses to match against when routing traffic. Original CIDR range for Destination NAT.
    originalSource String
    Represents the range of IP addresses to match against when routing traffic. Original CIDR range for Source NAT.
    translatedDestination String
    Represents the range of IP addresses to match against when routing traffic. Translated CIDR range for Destination NAT.
    translatedSource String
    Represents the range of IP addresses to match against when routing traffic. Translated CIDR range for Source NAT.

    GetDrgNatPolicyDrgNatRulesFilter

    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