Oracle Cloud Infrastructure v3.9.0 published on Wednesday, Sep 24, 2025 by Pulumi
oci.Core.getDrgs
This data source provides the list of Drgs in Oracle Cloud Infrastructure Core service.
Lists the DRGs in the specified compartment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testDrgs = oci.Core.getDrgs({
    compartmentId: compartmentId,
});
import pulumi
import pulumi_oci as oci
test_drgs = oci.Core.get_drgs(compartment_id=compartment_id)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/core"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := core.GetDrgs(ctx, &core.GetDrgsArgs{
			CompartmentId: compartmentId,
		}, 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 testDrgs = Oci.Core.GetDrgs.Invoke(new()
    {
        CompartmentId = compartmentId,
    });
});
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.GetDrgsArgs;
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 testDrgs = CoreFunctions.getDrgs(GetDrgsArgs.builder()
            .compartmentId(compartmentId)
            .build());
    }
}
variables:
  testDrgs:
    fn::invoke:
      function: oci:Core:getDrgs
      arguments:
        compartmentId: ${compartmentId}
Using getDrgs
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 getDrgs(args: GetDrgsArgs, opts?: InvokeOptions): Promise<GetDrgsResult>
function getDrgsOutput(args: GetDrgsOutputArgs, opts?: InvokeOptions): Output<GetDrgsResult>def get_drgs(compartment_id: Optional[str] = None,
             filters: Optional[Sequence[GetDrgsFilter]] = None,
             opts: Optional[InvokeOptions] = None) -> GetDrgsResult
def get_drgs_output(compartment_id: Optional[pulumi.Input[str]] = None,
             filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetDrgsFilterArgs]]]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetDrgsResult]func GetDrgs(ctx *Context, args *GetDrgsArgs, opts ...InvokeOption) (*GetDrgsResult, error)
func GetDrgsOutput(ctx *Context, args *GetDrgsOutputArgs, opts ...InvokeOption) GetDrgsResultOutput> Note: This function is named GetDrgs in the Go SDK.
public static class GetDrgs 
{
    public static Task<GetDrgsResult> InvokeAsync(GetDrgsArgs args, InvokeOptions? opts = null)
    public static Output<GetDrgsResult> Invoke(GetDrgsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDrgsResult> getDrgs(GetDrgsArgs args, InvokeOptions options)
public static Output<GetDrgsResult> getDrgs(GetDrgsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Core/getDrgs:getDrgs
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The OCID of the compartment.
- Filters
List<GetDrgs Filter> 
- CompartmentId string
- The OCID of the compartment.
- Filters
[]GetDrgs Filter 
- compartmentId String
- The OCID of the compartment.
- filters
List<GetDrgs Filter> 
- compartmentId string
- The OCID of the compartment.
- filters
GetDrgs Filter[] 
- compartment_id str
- The OCID of the compartment.
- filters
Sequence[GetDrgs Filter] 
- compartmentId String
- The OCID of the compartment.
- filters List<Property Map>
getDrgs Result
The following output properties are available:
- CompartmentId string
- The OCID of the compartment containing the DRG.
- Drgs
List<GetDrgs Drg> 
- The list of drgs.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
List<GetDrgs Filter> 
- CompartmentId string
- The OCID of the compartment containing the DRG.
- Drgs
[]GetDrgs Drg 
- The list of drgs.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
[]GetDrgs Filter 
- compartmentId String
- The OCID of the compartment containing the DRG.
- drgs
List<GetDrgs Drg> 
- The list of drgs.
- id String
- The provider-assigned unique ID for this managed resource.
- filters
List<GetDrgs Filter> 
- compartmentId string
- The OCID of the compartment containing the DRG.
- drgs
GetDrgs Drg[] 
- The list of drgs.
- id string
- The provider-assigned unique ID for this managed resource.
- filters
GetDrgs Filter[] 
- compartment_id str
- The OCID of the compartment containing the DRG.
- drgs
Sequence[GetDrgs Drg] 
- The list of drgs.
- id str
- The provider-assigned unique ID for this managed resource.
- filters
Sequence[GetDrgs Filter] 
- compartmentId String
- The OCID of the compartment containing the DRG.
- drgs List<Property Map>
- The list of drgs.
- id String
- The provider-assigned unique ID for this managed resource.
- filters List<Property Map>
Supporting Types
GetDrgsDrg  
- CompartmentId string
- The OCID of the compartment.
- DefaultDrg List<GetRoute Tables Drgs Drg Default Drg Route Table> 
- The default DRG route table for this DRG. Each network type has a default DRG route table.
- DefaultExport stringDrg Route Distribution Id 
- The OCID of this DRG's default export route distribution for the DRG attachments.
- 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.
- 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's Oracle ID (OCID).
- RedundancyStatus string
- State string
- The DRG's current state.
- TimeCreated string
- The date and time the DRG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- CompartmentId string
- The OCID of the compartment.
- DefaultDrg []GetRoute Tables Drgs Drg Default Drg Route Table 
- The default DRG route table for this DRG. Each network type has a default DRG route table.
- DefaultExport stringDrg Route Distribution Id 
- The OCID of this DRG's default export route distribution for the DRG attachments.
- 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.
- 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's Oracle ID (OCID).
- RedundancyStatus string
- State string
- The DRG's current state.
- TimeCreated string
- The date and time the DRG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- compartmentId String
- The OCID of the compartment.
- defaultDrg List<GetRoute Tables Drgs Drg Default Drg Route Table> 
- The default DRG route table for this DRG. Each network type has a default DRG route table.
- defaultExport StringDrg Route Distribution Id 
- The OCID of this DRG's default export route distribution for the DRG attachments.
- 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.
- 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's Oracle ID (OCID).
- redundancyStatus String
- state String
- The DRG's current state.
- timeCreated String
- The date and time the DRG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- compartmentId string
- The OCID of the compartment.
- defaultDrg GetRoute Tables Drgs Drg Default Drg Route Table[] 
- The default DRG route table for this DRG. Each network type has a default DRG route table.
- defaultExport stringDrg Route Distribution Id 
- The OCID of this DRG's default export route distribution for the DRG attachments.
- {[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.
- {[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's Oracle ID (OCID).
- redundancyStatus string
- state string
- The DRG's current state.
- timeCreated string
- The date and time the DRG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- compartment_id str
- The OCID of the compartment.
- default_drg_ Sequence[Getroute_ tables Drgs Drg Default Drg Route Table] 
- The default DRG route table for this DRG. Each network type has a default DRG route table.
- default_export_ strdrg_ route_ distribution_ id 
- The OCID of this DRG's default export route distribution for the DRG attachments.
- 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.
- 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's Oracle ID (OCID).
- redundancy_status str
- state str
- The DRG's current state.
- time_created str
- The date and time the DRG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- compartmentId String
- The OCID of the compartment.
- defaultDrg List<Property Map>Route Tables 
- The default DRG route table for this DRG. Each network type has a default DRG route table.
- defaultExport StringDrg Route Distribution Id 
- The OCID of this DRG's default export route distribution for the DRG attachments.
- 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.
- 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's Oracle ID (OCID).
- redundancyStatus String
- state String
- The DRG's current state.
- timeCreated String
- The date and time the DRG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
GetDrgsDrgDefaultDrgRouteTable      
- IpsecTunnel string
- The OCID of the default DRG route table assigned to DRG attachments of type IPSEC_TUNNEL on creation.
- RemotePeering stringConnection 
- The OCID of the default DRG route table to be assigned to DRG attachments of type REMOTE_PEERING_CONNECTION on creation.
- Vcn string
- The OCID of the default DRG route table to be assigned to DRG attachments of type VCN on creation.
- VirtualCircuit string
- The OCID of the default DRG route table to be assigned to DRG attachments of type VIRTUAL_CIRCUIT on creation.
- IpsecTunnel string
- The OCID of the default DRG route table assigned to DRG attachments of type IPSEC_TUNNEL on creation.
- RemotePeering stringConnection 
- The OCID of the default DRG route table to be assigned to DRG attachments of type REMOTE_PEERING_CONNECTION on creation.
- Vcn string
- The OCID of the default DRG route table to be assigned to DRG attachments of type VCN on creation.
- VirtualCircuit string
- The OCID of the default DRG route table to be assigned to DRG attachments of type VIRTUAL_CIRCUIT on creation.
- ipsecTunnel String
- The OCID of the default DRG route table assigned to DRG attachments of type IPSEC_TUNNEL on creation.
- remotePeering StringConnection 
- The OCID of the default DRG route table to be assigned to DRG attachments of type REMOTE_PEERING_CONNECTION on creation.
- vcn String
- The OCID of the default DRG route table to be assigned to DRG attachments of type VCN on creation.
- virtualCircuit String
- The OCID of the default DRG route table to be assigned to DRG attachments of type VIRTUAL_CIRCUIT on creation.
- ipsecTunnel string
- The OCID of the default DRG route table assigned to DRG attachments of type IPSEC_TUNNEL on creation.
- remotePeering stringConnection 
- The OCID of the default DRG route table to be assigned to DRG attachments of type REMOTE_PEERING_CONNECTION on creation.
- vcn string
- The OCID of the default DRG route table to be assigned to DRG attachments of type VCN on creation.
- virtualCircuit string
- The OCID of the default DRG route table to be assigned to DRG attachments of type VIRTUAL_CIRCUIT on creation.
- ipsec_tunnel str
- The OCID of the default DRG route table assigned to DRG attachments of type IPSEC_TUNNEL on creation.
- remote_peering_ strconnection 
- The OCID of the default DRG route table to be assigned to DRG attachments of type REMOTE_PEERING_CONNECTION on creation.
- vcn str
- The OCID of the default DRG route table to be assigned to DRG attachments of type VCN on creation.
- virtual_circuit str
- The OCID of the default DRG route table to be assigned to DRG attachments of type VIRTUAL_CIRCUIT on creation.
- ipsecTunnel String
- The OCID of the default DRG route table assigned to DRG attachments of type IPSEC_TUNNEL on creation.
- remotePeering StringConnection 
- The OCID of the default DRG route table to be assigned to DRG attachments of type REMOTE_PEERING_CONNECTION on creation.
- vcn String
- The OCID of the default DRG route table to be assigned to DRG attachments of type VCN on creation.
- virtualCircuit String
- The OCID of the default DRG route table to be assigned to DRG attachments of type VIRTUAL_CIRCUIT on creation.
GetDrgsFilter  
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.
