1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Ocvp
  5. getDatastoreClusters
Oracle Cloud Infrastructure v3.10.0 published on Wednesday, Nov 5, 2025 by Pulumi

oci.Ocvp.getDatastoreClusters

Start a Neo task
Explain and create an oci.Ocvp.getDatastoreClusters resource
oci logo
Oracle Cloud Infrastructure v3.10.0 published on Wednesday, Nov 5, 2025 by Pulumi

    This data source provides the list of Datastore Clusters in Oracle Cloud Infrastructure Oracle Cloud VMware Solution service.

    List the Datastore Clusters in the specified compartment. The list can be filtered by compartment, Datastore Cluster, Display name and Lifecycle state

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testDatastoreClusters = oci.Ocvp.getDatastoreClusters({
        compartmentId: compartmentId,
        clusterId: testCluster.id,
        datastoreClusterId: testDatastoreCluster.id,
        displayName: datastoreClusterDisplayName,
        state: datastoreClusterState,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_datastore_clusters = oci.Ocvp.get_datastore_clusters(compartment_id=compartment_id,
        cluster_id=test_cluster["id"],
        datastore_cluster_id=test_datastore_cluster["id"],
        display_name=datastore_cluster_display_name,
        state=datastore_cluster_state)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/ocvp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ocvp.GetDatastoreClusters(ctx, &ocvp.GetDatastoreClustersArgs{
    			CompartmentId:      compartmentId,
    			ClusterId:          pulumi.StringRef(testCluster.Id),
    			DatastoreClusterId: pulumi.StringRef(testDatastoreCluster.Id),
    			DisplayName:        pulumi.StringRef(datastoreClusterDisplayName),
    			State:              pulumi.StringRef(datastoreClusterState),
    		}, 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 testDatastoreClusters = Oci.Ocvp.GetDatastoreClusters.Invoke(new()
        {
            CompartmentId = compartmentId,
            ClusterId = testCluster.Id,
            DatastoreClusterId = testDatastoreCluster.Id,
            DisplayName = datastoreClusterDisplayName,
            State = datastoreClusterState,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Ocvp.OcvpFunctions;
    import com.pulumi.oci.Ocvp.inputs.GetDatastoreClustersArgs;
    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 testDatastoreClusters = OcvpFunctions.getDatastoreClusters(GetDatastoreClustersArgs.builder()
                .compartmentId(compartmentId)
                .clusterId(testCluster.id())
                .datastoreClusterId(testDatastoreCluster.id())
                .displayName(datastoreClusterDisplayName)
                .state(datastoreClusterState)
                .build());
    
        }
    }
    
    variables:
      testDatastoreClusters:
        fn::invoke:
          function: oci:Ocvp:getDatastoreClusters
          arguments:
            compartmentId: ${compartmentId}
            clusterId: ${testCluster.id}
            datastoreClusterId: ${testDatastoreCluster.id}
            displayName: ${datastoreClusterDisplayName}
            state: ${datastoreClusterState}
    

    Using getDatastoreClusters

    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 getDatastoreClusters(args: GetDatastoreClustersArgs, opts?: InvokeOptions): Promise<GetDatastoreClustersResult>
    function getDatastoreClustersOutput(args: GetDatastoreClustersOutputArgs, opts?: InvokeOptions): Output<GetDatastoreClustersResult>
    def get_datastore_clusters(cluster_id: Optional[str] = None,
                               compartment_id: Optional[str] = None,
                               datastore_cluster_id: Optional[str] = None,
                               display_name: Optional[str] = None,
                               filters: Optional[Sequence[GetDatastoreClustersFilter]] = None,
                               state: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetDatastoreClustersResult
    def get_datastore_clusters_output(cluster_id: Optional[pulumi.Input[str]] = None,
                               compartment_id: Optional[pulumi.Input[str]] = None,
                               datastore_cluster_id: Optional[pulumi.Input[str]] = None,
                               display_name: Optional[pulumi.Input[str]] = None,
                               filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetDatastoreClustersFilterArgs]]]] = None,
                               state: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetDatastoreClustersResult]
    func GetDatastoreClusters(ctx *Context, args *GetDatastoreClustersArgs, opts ...InvokeOption) (*GetDatastoreClustersResult, error)
    func GetDatastoreClustersOutput(ctx *Context, args *GetDatastoreClustersOutputArgs, opts ...InvokeOption) GetDatastoreClustersResultOutput

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

    public static class GetDatastoreClusters 
    {
        public static Task<GetDatastoreClustersResult> InvokeAsync(GetDatastoreClustersArgs args, InvokeOptions? opts = null)
        public static Output<GetDatastoreClustersResult> Invoke(GetDatastoreClustersInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDatastoreClustersResult> getDatastoreClusters(GetDatastoreClustersArgs args, InvokeOptions options)
    public static Output<GetDatastoreClustersResult> getDatastoreClusters(GetDatastoreClustersArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:Ocvp/getDatastoreClusters:getDatastoreClusters
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The OCID of the compartment.
    ClusterId string
    The OCID of the SDDC Cluster.
    DatastoreClusterId string
    The OCID of the Datastore Cluster.
    DisplayName string
    A filter to return only resources that match the given display name exactly.
    Filters List<GetDatastoreClustersFilter>
    State string
    The lifecycle state of the resource.
    CompartmentId string
    The OCID of the compartment.
    ClusterId string
    The OCID of the SDDC Cluster.
    DatastoreClusterId string
    The OCID of the Datastore Cluster.
    DisplayName string
    A filter to return only resources that match the given display name exactly.
    Filters []GetDatastoreClustersFilter
    State string
    The lifecycle state of the resource.
    compartmentId String
    The OCID of the compartment.
    clusterId String
    The OCID of the SDDC Cluster.
    datastoreClusterId String
    The OCID of the Datastore Cluster.
    displayName String
    A filter to return only resources that match the given display name exactly.
    filters List<GetDatastoreClustersFilter>
    state String
    The lifecycle state of the resource.
    compartmentId string
    The OCID of the compartment.
    clusterId string
    The OCID of the SDDC Cluster.
    datastoreClusterId string
    The OCID of the Datastore Cluster.
    displayName string
    A filter to return only resources that match the given display name exactly.
    filters GetDatastoreClustersFilter[]
    state string
    The lifecycle state of the resource.
    compartment_id str
    The OCID of the compartment.
    cluster_id str
    The OCID of the SDDC Cluster.
    datastore_cluster_id str
    The OCID of the Datastore Cluster.
    display_name str
    A filter to return only resources that match the given display name exactly.
    filters Sequence[GetDatastoreClustersFilter]
    state str
    The lifecycle state of the resource.
    compartmentId String
    The OCID of the compartment.
    clusterId String
    The OCID of the SDDC Cluster.
    datastoreClusterId String
    The OCID of the Datastore Cluster.
    displayName String
    A filter to return only resources that match the given display name exactly.
    filters List<Property Map>
    state String
    The lifecycle state of the resource.

    getDatastoreClusters Result

    The following output properties are available:

    CompartmentId string
    The OCID of the compartment that contains the Datastore.
    DatastoreClusterCollections List<GetDatastoreClustersDatastoreClusterCollection>
    The list of datastore_cluster_collection.
    Id string
    The provider-assigned unique ID for this managed resource.
    ClusterId string
    The OCID of the VMware Cluster that Datastore cluster is attached to.
    DatastoreClusterId string
    DisplayName string
    A descriptive name for the Datastore Cluster. It must be unique within a SDDC, start with a letter, and contain only letters, digits, whitespaces, dashes and underscores. Avoid entering confidential information.
    Filters List<GetDatastoreClustersFilter>
    State string
    The current state of the Datastore Cluster.
    CompartmentId string
    The OCID of the compartment that contains the Datastore.
    DatastoreClusterCollections []GetDatastoreClustersDatastoreClusterCollection
    The list of datastore_cluster_collection.
    Id string
    The provider-assigned unique ID for this managed resource.
    ClusterId string
    The OCID of the VMware Cluster that Datastore cluster is attached to.
    DatastoreClusterId string
    DisplayName string
    A descriptive name for the Datastore Cluster. It must be unique within a SDDC, start with a letter, and contain only letters, digits, whitespaces, dashes and underscores. Avoid entering confidential information.
    Filters []GetDatastoreClustersFilter
    State string
    The current state of the Datastore Cluster.
    compartmentId String
    The OCID of the compartment that contains the Datastore.
    datastoreClusterCollections List<GetDatastoreClustersDatastoreClusterCollection>
    The list of datastore_cluster_collection.
    id String
    The provider-assigned unique ID for this managed resource.
    clusterId String
    The OCID of the VMware Cluster that Datastore cluster is attached to.
    datastoreClusterId String
    displayName String
    A descriptive name for the Datastore Cluster. It must be unique within a SDDC, start with a letter, and contain only letters, digits, whitespaces, dashes and underscores. Avoid entering confidential information.
    filters List<GetDatastoreClustersFilter>
    state String
    The current state of the Datastore Cluster.
    compartmentId string
    The OCID of the compartment that contains the Datastore.
    datastoreClusterCollections GetDatastoreClustersDatastoreClusterCollection[]
    The list of datastore_cluster_collection.
    id string
    The provider-assigned unique ID for this managed resource.
    clusterId string
    The OCID of the VMware Cluster that Datastore cluster is attached to.
    datastoreClusterId string
    displayName string
    A descriptive name for the Datastore Cluster. It must be unique within a SDDC, start with a letter, and contain only letters, digits, whitespaces, dashes and underscores. Avoid entering confidential information.
    filters GetDatastoreClustersFilter[]
    state string
    The current state of the Datastore Cluster.
    compartment_id str
    The OCID of the compartment that contains the Datastore.
    datastore_cluster_collections Sequence[GetDatastoreClustersDatastoreClusterCollection]
    The list of datastore_cluster_collection.
    id str
    The provider-assigned unique ID for this managed resource.
    cluster_id str
    The OCID of the VMware Cluster that Datastore cluster is attached to.
    datastore_cluster_id str
    display_name str
    A descriptive name for the Datastore Cluster. It must be unique within a SDDC, start with a letter, and contain only letters, digits, whitespaces, dashes and underscores. Avoid entering confidential information.
    filters Sequence[GetDatastoreClustersFilter]
    state str
    The current state of the Datastore Cluster.
    compartmentId String
    The OCID of the compartment that contains the Datastore.
    datastoreClusterCollections List<Property Map>
    The list of datastore_cluster_collection.
    id String
    The provider-assigned unique ID for this managed resource.
    clusterId String
    The OCID of the VMware Cluster that Datastore cluster is attached to.
    datastoreClusterId String
    displayName String
    A descriptive name for the Datastore Cluster. It must be unique within a SDDC, start with a letter, and contain only letters, digits, whitespaces, dashes and underscores. Avoid entering confidential information.
    filters List<Property Map>
    state String
    The current state of the Datastore Cluster.

    Supporting Types

    GetDatastoreClustersDatastoreClusterCollection

    GetDatastoreClustersDatastoreClusterCollectionItem

    AvailabilityDomain string
    The availability domain of the Datastore Cluster.
    CapacityInGbs double
    Total size of all datastores associated with the datastore cluster in GB.
    ClusterId string
    The OCID of the SDDC Cluster.
    CompartmentId string
    The OCID of the compartment.
    DatastoreClusterType string
    Type of the datastore cluster.
    DatastoreIds List<string>
    The OCIDs of the Datastores that belong to the Datastore Cluster
    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.
    EsxiHostIds List<string>
    The OCIDs of the ESXi hosts to attach the datastore to. All ESXi hosts must belong to the same VMware cluster.
    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 OCID of the Datastore cluster.
    SddcId string
    The OCID of the SDDC that Datastore cluster is associated with.
    State string
    The lifecycle state of the resource.
    SystemTags Dictionary<string, string>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {orcl-cloud: {free-tier-retain: true}}
    TimeCreated string
    The date and time the Datastore Cluster was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    TimeUpdated string
    The date and time the Datastore Cluster was updated, in the format defined by RFC3339.
    AvailabilityDomain string
    The availability domain of the Datastore Cluster.
    CapacityInGbs float64
    Total size of all datastores associated with the datastore cluster in GB.
    ClusterId string
    The OCID of the SDDC Cluster.
    CompartmentId string
    The OCID of the compartment.
    DatastoreClusterType string
    Type of the datastore cluster.
    DatastoreIds []string
    The OCIDs of the Datastores that belong to the Datastore Cluster
    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.
    EsxiHostIds []string
    The OCIDs of the ESXi hosts to attach the datastore to. All ESXi hosts must belong to the same VMware cluster.
    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 OCID of the Datastore cluster.
    SddcId string
    The OCID of the SDDC that Datastore cluster is associated with.
    State string
    The lifecycle state of the resource.
    SystemTags map[string]string
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {orcl-cloud: {free-tier-retain: true}}
    TimeCreated string
    The date and time the Datastore Cluster was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    TimeUpdated string
    The date and time the Datastore Cluster was updated, in the format defined by RFC3339.
    availabilityDomain String
    The availability domain of the Datastore Cluster.
    capacityInGbs Double
    Total size of all datastores associated with the datastore cluster in GB.
    clusterId String
    The OCID of the SDDC Cluster.
    compartmentId String
    The OCID of the compartment.
    datastoreClusterType String
    Type of the datastore cluster.
    datastoreIds List<String>
    The OCIDs of the Datastores that belong to the Datastore Cluster
    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.
    esxiHostIds List<String>
    The OCIDs of the ESXi hosts to attach the datastore to. All ESXi hosts must belong to the same VMware cluster.
    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 OCID of the Datastore cluster.
    sddcId String
    The OCID of the SDDC that Datastore cluster is associated with.
    state String
    The lifecycle state of the resource.
    systemTags Map<String,String>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {orcl-cloud: {free-tier-retain: true}}
    timeCreated String
    The date and time the Datastore Cluster was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    timeUpdated String
    The date and time the Datastore Cluster was updated, in the format defined by RFC3339.
    availabilityDomain string
    The availability domain of the Datastore Cluster.
    capacityInGbs number
    Total size of all datastores associated with the datastore cluster in GB.
    clusterId string
    The OCID of the SDDC Cluster.
    compartmentId string
    The OCID of the compartment.
    datastoreClusterType string
    Type of the datastore cluster.
    datastoreIds string[]
    The OCIDs of the Datastores that belong to the Datastore Cluster
    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.
    esxiHostIds string[]
    The OCIDs of the ESXi hosts to attach the datastore to. All ESXi hosts must belong to the same VMware cluster.
    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 OCID of the Datastore cluster.
    sddcId string
    The OCID of the SDDC that Datastore cluster is associated with.
    state string
    The lifecycle state of the resource.
    systemTags {[key: string]: string}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {orcl-cloud: {free-tier-retain: true}}
    timeCreated string
    The date and time the Datastore Cluster was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    timeUpdated string
    The date and time the Datastore Cluster was updated, in the format defined by RFC3339.
    availability_domain str
    The availability domain of the Datastore Cluster.
    capacity_in_gbs float
    Total size of all datastores associated with the datastore cluster in GB.
    cluster_id str
    The OCID of the SDDC Cluster.
    compartment_id str
    The OCID of the compartment.
    datastore_cluster_type str
    Type of the datastore cluster.
    datastore_ids Sequence[str]
    The OCIDs of the Datastores that belong to the Datastore Cluster
    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.
    esxi_host_ids Sequence[str]
    The OCIDs of the ESXi hosts to attach the datastore to. All ESXi hosts must belong to the same VMware cluster.
    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 OCID of the Datastore cluster.
    sddc_id str
    The OCID of the SDDC that Datastore cluster is associated with.
    state str
    The lifecycle state of the resource.
    system_tags Mapping[str, str]
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {orcl-cloud: {free-tier-retain: true}}
    time_created str
    The date and time the Datastore Cluster was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    time_updated str
    The date and time the Datastore Cluster was updated, in the format defined by RFC3339.
    availabilityDomain String
    The availability domain of the Datastore Cluster.
    capacityInGbs Number
    Total size of all datastores associated with the datastore cluster in GB.
    clusterId String
    The OCID of the SDDC Cluster.
    compartmentId String
    The OCID of the compartment.
    datastoreClusterType String
    Type of the datastore cluster.
    datastoreIds List<String>
    The OCIDs of the Datastores that belong to the Datastore Cluster
    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.
    esxiHostIds List<String>
    The OCIDs of the ESXi hosts to attach the datastore to. All ESXi hosts must belong to the same VMware cluster.
    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 OCID of the Datastore cluster.
    sddcId String
    The OCID of the SDDC that Datastore cluster is associated with.
    state String
    The lifecycle state of the resource.
    systemTags Map<String>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {orcl-cloud: {free-tier-retain: true}}
    timeCreated String
    The date and time the Datastore Cluster was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    timeUpdated String
    The date and time the Datastore Cluster was updated, in the format defined by RFC3339.

    GetDatastoreClustersFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []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
    Oracle Cloud Infrastructure v3.10.0 published on Wednesday, Nov 5, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate