Oracle Cloud Infrastructure v3.9.0 published on Wednesday, Sep 24, 2025 by Pulumi
oci.Core.getVolumeGroups
This data source provides the list of Volume Groups in Oracle Cloud Infrastructure Core service.
Lists the volume groups in the specified compartment and availability domain. For more information, see Volume Groups.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testVolumeGroups = oci.Core.getVolumeGroups({
    compartmentId: compartmentId,
    availabilityDomain: volumeGroupAvailabilityDomain,
    displayName: volumeGroupDisplayName,
    state: volumeGroupState,
});
import pulumi
import pulumi_oci as oci
test_volume_groups = oci.Core.get_volume_groups(compartment_id=compartment_id,
    availability_domain=volume_group_availability_domain,
    display_name=volume_group_display_name,
    state=volume_group_state)
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.GetVolumeGroups(ctx, &core.GetVolumeGroupsArgs{
			CompartmentId:      compartmentId,
			AvailabilityDomain: pulumi.StringRef(volumeGroupAvailabilityDomain),
			DisplayName:        pulumi.StringRef(volumeGroupDisplayName),
			State:              pulumi.StringRef(volumeGroupState),
		}, 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 testVolumeGroups = Oci.Core.GetVolumeGroups.Invoke(new()
    {
        CompartmentId = compartmentId,
        AvailabilityDomain = volumeGroupAvailabilityDomain,
        DisplayName = volumeGroupDisplayName,
        State = volumeGroupState,
    });
});
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.GetVolumeGroupsArgs;
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 testVolumeGroups = CoreFunctions.getVolumeGroups(GetVolumeGroupsArgs.builder()
            .compartmentId(compartmentId)
            .availabilityDomain(volumeGroupAvailabilityDomain)
            .displayName(volumeGroupDisplayName)
            .state(volumeGroupState)
            .build());
    }
}
variables:
  testVolumeGroups:
    fn::invoke:
      function: oci:Core:getVolumeGroups
      arguments:
        compartmentId: ${compartmentId}
        availabilityDomain: ${volumeGroupAvailabilityDomain}
        displayName: ${volumeGroupDisplayName}
        state: ${volumeGroupState}
Using getVolumeGroups
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 getVolumeGroups(args: GetVolumeGroupsArgs, opts?: InvokeOptions): Promise<GetVolumeGroupsResult>
function getVolumeGroupsOutput(args: GetVolumeGroupsOutputArgs, opts?: InvokeOptions): Output<GetVolumeGroupsResult>def get_volume_groups(availability_domain: Optional[str] = None,
                      compartment_id: Optional[str] = None,
                      display_name: Optional[str] = None,
                      filters: Optional[Sequence[GetVolumeGroupsFilter]] = None,
                      state: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetVolumeGroupsResult
def get_volume_groups_output(availability_domain: Optional[pulumi.Input[str]] = None,
                      compartment_id: Optional[pulumi.Input[str]] = None,
                      display_name: Optional[pulumi.Input[str]] = None,
                      filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetVolumeGroupsFilterArgs]]]] = None,
                      state: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetVolumeGroupsResult]func GetVolumeGroups(ctx *Context, args *GetVolumeGroupsArgs, opts ...InvokeOption) (*GetVolumeGroupsResult, error)
func GetVolumeGroupsOutput(ctx *Context, args *GetVolumeGroupsOutputArgs, opts ...InvokeOption) GetVolumeGroupsResultOutput> Note: This function is named GetVolumeGroups in the Go SDK.
public static class GetVolumeGroups 
{
    public static Task<GetVolumeGroupsResult> InvokeAsync(GetVolumeGroupsArgs args, InvokeOptions? opts = null)
    public static Output<GetVolumeGroupsResult> Invoke(GetVolumeGroupsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetVolumeGroupsResult> getVolumeGroups(GetVolumeGroupsArgs args, InvokeOptions options)
public static Output<GetVolumeGroupsResult> getVolumeGroups(GetVolumeGroupsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Core/getVolumeGroups:getVolumeGroups
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The OCID of the compartment.
- AvailabilityDomain string
- The name of the availability domain. Example: Uocm:PHX-AD-1
- DisplayName string
- A filter to return only resources that match the given display name exactly.
- Filters
List<GetVolume Groups Filter> 
- State string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- CompartmentId string
- The OCID of the compartment.
- AvailabilityDomain string
- The name of the availability domain. Example: Uocm:PHX-AD-1
- DisplayName string
- A filter to return only resources that match the given display name exactly.
- Filters
[]GetVolume Groups Filter 
- State string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- compartmentId String
- The OCID of the compartment.
- availabilityDomain String
- The name of the availability domain. Example: Uocm:PHX-AD-1
- displayName String
- A filter to return only resources that match the given display name exactly.
- filters
List<GetVolume Groups Filter> 
- state String
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- compartmentId string
- The OCID of the compartment.
- availabilityDomain string
- The name of the availability domain. Example: Uocm:PHX-AD-1
- displayName string
- A filter to return only resources that match the given display name exactly.
- filters
GetVolume Groups Filter[] 
- state string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- compartment_id str
- The OCID of the compartment.
- availability_domain str
- The name of the availability domain. Example: Uocm:PHX-AD-1
- display_name str
- A filter to return only resources that match the given display name exactly.
- filters
Sequence[GetVolume Groups Filter] 
- state str
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- compartmentId String
- The OCID of the compartment.
- availabilityDomain String
- The name of the availability domain. Example: Uocm:PHX-AD-1
- displayName String
- A filter to return only resources that match the given display name exactly.
- filters List<Property Map>
- state String
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
getVolumeGroups Result
The following output properties are available:
- CompartmentId string
- The OCID of the compartment that contains the volume group.
- Id string
- The provider-assigned unique ID for this managed resource.
- VolumeGroups List<GetVolume Groups Volume Group> 
- The list of volume_groups.
- AvailabilityDomain string
- The availability domain of the boot volume replica replica. Example: Uocm:PHX-AD-1
- DisplayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Filters
List<GetVolume Groups Filter> 
- State string
- The current state of a volume group.
- CompartmentId string
- The OCID of the compartment that contains the volume group.
- Id string
- The provider-assigned unique ID for this managed resource.
- VolumeGroups []GetVolume Groups Volume Group 
- The list of volume_groups.
- AvailabilityDomain string
- The availability domain of the boot volume replica replica. Example: Uocm:PHX-AD-1
- DisplayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Filters
[]GetVolume Groups Filter 
- State string
- The current state of a volume group.
- compartmentId String
- The OCID of the compartment that contains the volume group.
- id String
- The provider-assigned unique ID for this managed resource.
- volumeGroups List<GetVolume Groups Volume Group> 
- The list of volume_groups.
- availabilityDomain String
- The availability domain of the boot volume replica replica. Example: Uocm:PHX-AD-1
- displayName String
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- filters
List<GetVolume Groups Filter> 
- state String
- The current state of a volume group.
- compartmentId string
- The OCID of the compartment that contains the volume group.
- id string
- The provider-assigned unique ID for this managed resource.
- volumeGroups GetVolume Groups Volume Group[] 
- The list of volume_groups.
- availabilityDomain string
- The availability domain of the boot volume replica replica. Example: Uocm:PHX-AD-1
- displayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- filters
GetVolume Groups Filter[] 
- state string
- The current state of a volume group.
- compartment_id str
- The OCID of the compartment that contains the volume group.
- id str
- The provider-assigned unique ID for this managed resource.
- volume_groups Sequence[GetVolume Groups Volume Group] 
- The list of volume_groups.
- availability_domain str
- The availability domain of the boot volume replica replica. Example: Uocm:PHX-AD-1
- display_name str
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- filters
Sequence[GetVolume Groups Filter] 
- state str
- The current state of a volume group.
- compartmentId String
- The OCID of the compartment that contains the volume group.
- id String
- The provider-assigned unique ID for this managed resource.
- volumeGroups List<Property Map>
- The list of volume_groups.
- availabilityDomain String
- The availability domain of the boot volume replica replica. Example: Uocm:PHX-AD-1
- displayName String
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- filters List<Property Map>
- state String
- The current state of a volume group.
Supporting Types
GetVolumeGroupsFilter   
GetVolumeGroupsVolumeGroup    
- AvailabilityDomain string
- The name of the availability domain. Example: Uocm:PHX-AD-1
- BackupPolicy stringId 
- ClusterPlacement stringGroup Id 
- CompartmentId string
- The OCID of the compartment.
- 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.
- 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 OCID for the volume group.
- IsHydrated bool
- Specifies whether the newly created cloned volume group's data has finished copying from the source volume group or backup.
- PreserveVolume boolReplica 
- SizeIn stringGbs 
- The aggregate size of the volume group in GBs.
- SizeIn stringMbs 
- The aggregate size of the volume group in MBs.
- SourceDetails List<GetVolume Groups Volume Group Source Detail> 
- Specifies the source for a volume group.
- State string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- TimeCreated string
- The date and time the volume group was created. Format defined by RFC3339.
- VolumeGroup List<GetReplicas Volume Groups Volume Group Volume Group Replica> 
- The list of volume group replicas of this volume group.
- VolumeGroup boolReplicas Deletion 
- VolumeIds List<string>
- OCIDs for the volumes in this volume group.
- XrcKms stringKey Id 
- AvailabilityDomain string
- The name of the availability domain. Example: Uocm:PHX-AD-1
- BackupPolicy stringId 
- ClusterPlacement stringGroup Id 
- CompartmentId string
- The OCID of the compartment.
- 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.
- 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 OCID for the volume group.
- IsHydrated bool
- Specifies whether the newly created cloned volume group's data has finished copying from the source volume group or backup.
- PreserveVolume boolReplica 
- SizeIn stringGbs 
- The aggregate size of the volume group in GBs.
- SizeIn stringMbs 
- The aggregate size of the volume group in MBs.
- SourceDetails []GetVolume Groups Volume Group Source Detail 
- Specifies the source for a volume group.
- State string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- TimeCreated string
- The date and time the volume group was created. Format defined by RFC3339.
- VolumeGroup []GetReplicas Volume Groups Volume Group Volume Group Replica 
- The list of volume group replicas of this volume group.
- VolumeGroup boolReplicas Deletion 
- VolumeIds []string
- OCIDs for the volumes in this volume group.
- XrcKms stringKey Id 
- availabilityDomain String
- The name of the availability domain. Example: Uocm:PHX-AD-1
- backupPolicy StringId 
- clusterPlacement StringGroup Id 
- compartmentId String
- The OCID of the compartment.
- 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.
- 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 OCID for the volume group.
- isHydrated Boolean
- Specifies whether the newly created cloned volume group's data has finished copying from the source volume group or backup.
- preserveVolume BooleanReplica 
- sizeIn StringGbs 
- The aggregate size of the volume group in GBs.
- sizeIn StringMbs 
- The aggregate size of the volume group in MBs.
- sourceDetails List<GetVolume Groups Volume Group Source Detail> 
- Specifies the source for a volume group.
- state String
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- timeCreated String
- The date and time the volume group was created. Format defined by RFC3339.
- volumeGroup List<GetReplicas Volume Groups Volume Group Volume Group Replica> 
- The list of volume group replicas of this volume group.
- volumeGroup BooleanReplicas Deletion 
- volumeIds List<String>
- OCIDs for the volumes in this volume group.
- xrcKms StringKey Id 
- availabilityDomain string
- The name of the availability domain. Example: Uocm:PHX-AD-1
- backupPolicy stringId 
- clusterPlacement stringGroup Id 
- compartmentId string
- The OCID of the compartment.
- {[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.
- {[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 OCID for the volume group.
- isHydrated boolean
- Specifies whether the newly created cloned volume group's data has finished copying from the source volume group or backup.
- preserveVolume booleanReplica 
- sizeIn stringGbs 
- The aggregate size of the volume group in GBs.
- sizeIn stringMbs 
- The aggregate size of the volume group in MBs.
- sourceDetails GetVolume Groups Volume Group Source Detail[] 
- Specifies the source for a volume group.
- state string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- timeCreated string
- The date and time the volume group was created. Format defined by RFC3339.
- volumeGroup GetReplicas Volume Groups Volume Group Volume Group Replica[] 
- The list of volume group replicas of this volume group.
- volumeGroup booleanReplicas Deletion 
- volumeIds string[]
- OCIDs for the volumes in this volume group.
- xrcKms stringKey Id 
- availability_domain str
- The name of the availability domain. Example: Uocm:PHX-AD-1
- backup_policy_ strid 
- cluster_placement_ strgroup_ id 
- compartment_id str
- The OCID of the compartment.
- 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.
- 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 OCID for the volume group.
- is_hydrated bool
- Specifies whether the newly created cloned volume group's data has finished copying from the source volume group or backup.
- preserve_volume_ boolreplica 
- size_in_ strgbs 
- The aggregate size of the volume group in GBs.
- size_in_ strmbs 
- The aggregate size of the volume group in MBs.
- source_details Sequence[GetVolume Groups Volume Group Source Detail] 
- Specifies the source for a volume group.
- state str
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- time_created str
- The date and time the volume group was created. Format defined by RFC3339.
- volume_group_ Sequence[Getreplicas Volume Groups Volume Group Volume Group Replica] 
- The list of volume group replicas of this volume group.
- volume_group_ boolreplicas_ deletion 
- volume_ids Sequence[str]
- OCIDs for the volumes in this volume group.
- xrc_kms_ strkey_ id 
- availabilityDomain String
- The name of the availability domain. Example: Uocm:PHX-AD-1
- backupPolicy StringId 
- clusterPlacement StringGroup Id 
- compartmentId String
- The OCID of the compartment.
- 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.
- 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 OCID for the volume group.
- isHydrated Boolean
- Specifies whether the newly created cloned volume group's data has finished copying from the source volume group or backup.
- preserveVolume BooleanReplica 
- sizeIn StringGbs 
- The aggregate size of the volume group in GBs.
- sizeIn StringMbs 
- The aggregate size of the volume group in MBs.
- sourceDetails List<Property Map>
- Specifies the source for a volume group.
- state String
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- timeCreated String
- The date and time the volume group was created. Format defined by RFC3339.
- volumeGroup List<Property Map>Replicas 
- The list of volume group replicas of this volume group.
- volumeGroup BooleanReplicas Deletion 
- volumeIds List<String>
- OCIDs for the volumes in this volume group.
- xrcKms StringKey Id 
GetVolumeGroupsVolumeGroupSourceDetail      
- Type string
- The type can be one of these values: volumeGroupBackupId,volumeGroupId,volumeIds
- VolumeGroup stringBackup Id 
- The OCID of the volume group backup to restore from, if the type is volumeGroupBackup
- VolumeGroup stringId 
- The OCID of the volume group to clone from, if the type is volumeGroup
- VolumeGroup stringReplica Id 
- The volume group replica's Oracle ID (OCID).
- VolumeIds List<string>
- OCIDs for the volumes in this volume group.
- Type string
- The type can be one of these values: volumeGroupBackupId,volumeGroupId,volumeIds
- VolumeGroup stringBackup Id 
- The OCID of the volume group backup to restore from, if the type is volumeGroupBackup
- VolumeGroup stringId 
- The OCID of the volume group to clone from, if the type is volumeGroup
- VolumeGroup stringReplica Id 
- The volume group replica's Oracle ID (OCID).
- VolumeIds []string
- OCIDs for the volumes in this volume group.
- type String
- The type can be one of these values: volumeGroupBackupId,volumeGroupId,volumeIds
- volumeGroup StringBackup Id 
- The OCID of the volume group backup to restore from, if the type is volumeGroupBackup
- volumeGroup StringId 
- The OCID of the volume group to clone from, if the type is volumeGroup
- volumeGroup StringReplica Id 
- The volume group replica's Oracle ID (OCID).
- volumeIds List<String>
- OCIDs for the volumes in this volume group.
- type string
- The type can be one of these values: volumeGroupBackupId,volumeGroupId,volumeIds
- volumeGroup stringBackup Id 
- The OCID of the volume group backup to restore from, if the type is volumeGroupBackup
- volumeGroup stringId 
- The OCID of the volume group to clone from, if the type is volumeGroup
- volumeGroup stringReplica Id 
- The volume group replica's Oracle ID (OCID).
- volumeIds string[]
- OCIDs for the volumes in this volume group.
- type str
- The type can be one of these values: volumeGroupBackupId,volumeGroupId,volumeIds
- volume_group_ strbackup_ id 
- The OCID of the volume group backup to restore from, if the type is volumeGroupBackup
- volume_group_ strid 
- The OCID of the volume group to clone from, if the type is volumeGroup
- volume_group_ strreplica_ id 
- The volume group replica's Oracle ID (OCID).
- volume_ids Sequence[str]
- OCIDs for the volumes in this volume group.
- type String
- The type can be one of these values: volumeGroupBackupId,volumeGroupId,volumeIds
- volumeGroup StringBackup Id 
- The OCID of the volume group backup to restore from, if the type is volumeGroupBackup
- volumeGroup StringId 
- The OCID of the volume group to clone from, if the type is volumeGroup
- volumeGroup StringReplica Id 
- The volume group replica's Oracle ID (OCID).
- volumeIds List<String>
- OCIDs for the volumes in this volume group.
GetVolumeGroupsVolumeGroupVolumeGroupReplica       
- AvailabilityDomain string
- The name of the availability domain. Example: Uocm:PHX-AD-1
- DisplayName string
- A filter to return only resources that match the given display name exactly.
- VolumeGroup stringReplica Id 
- The volume group replica's Oracle ID (OCID).
- XrrKms stringKey Id 
- AvailabilityDomain string
- The name of the availability domain. Example: Uocm:PHX-AD-1
- DisplayName string
- A filter to return only resources that match the given display name exactly.
- VolumeGroup stringReplica Id 
- The volume group replica's Oracle ID (OCID).
- XrrKms stringKey Id 
- availabilityDomain String
- The name of the availability domain. Example: Uocm:PHX-AD-1
- displayName String
- A filter to return only resources that match the given display name exactly.
- volumeGroup StringReplica Id 
- The volume group replica's Oracle ID (OCID).
- xrrKms StringKey Id 
- availabilityDomain string
- The name of the availability domain. Example: Uocm:PHX-AD-1
- displayName string
- A filter to return only resources that match the given display name exactly.
- volumeGroup stringReplica Id 
- The volume group replica's Oracle ID (OCID).
- xrrKms stringKey Id 
- availability_domain str
- The name of the availability domain. Example: Uocm:PHX-AD-1
- display_name str
- A filter to return only resources that match the given display name exactly.
- volume_group_ strreplica_ id 
- The volume group replica's Oracle ID (OCID).
- xrr_kms_ strkey_ id 
- availabilityDomain String
- The name of the availability domain. Example: Uocm:PHX-AD-1
- displayName String
- A filter to return only resources that match the given display name exactly.
- volumeGroup StringReplica Id 
- The volume group replica's Oracle ID (OCID).
- xrrKms StringKey Id 
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.
