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

oci.Ocvp.getDatastore

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

    This data source provides details about a specific Datastore resource in Oracle Cloud Infrastructure Oracle Cloud VMware Solution service.

    Get the specified Datastore’s information.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testDatastore = oci.Ocvp.getDatastore({
        datastoreId: testDatastoreOciOcvpDatastore.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_datastore = oci.Ocvp.get_datastore(datastore_id=test_datastore_oci_ocvp_datastore["id"])
    
    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.GetDatastore(ctx, &ocvp.GetDatastoreArgs{
    			DatastoreId: testDatastoreOciOcvpDatastore.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 testDatastore = Oci.Ocvp.GetDatastore.Invoke(new()
        {
            DatastoreId = testDatastoreOciOcvpDatastore.Id,
        });
    
    });
    
    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.GetDatastoreArgs;
    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 testDatastore = OcvpFunctions.getDatastore(GetDatastoreArgs.builder()
                .datastoreId(testDatastoreOciOcvpDatastore.id())
                .build());
    
        }
    }
    
    variables:
      testDatastore:
        fn::invoke:
          function: oci:Ocvp:getDatastore
          arguments:
            datastoreId: ${testDatastoreOciOcvpDatastore.id}
    

    Using getDatastore

    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 getDatastore(args: GetDatastoreArgs, opts?: InvokeOptions): Promise<GetDatastoreResult>
    function getDatastoreOutput(args: GetDatastoreOutputArgs, opts?: InvokeOptions): Output<GetDatastoreResult>
    def get_datastore(datastore_id: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetDatastoreResult
    def get_datastore_output(datastore_id: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetDatastoreResult]
    func LookupDatastore(ctx *Context, args *LookupDatastoreArgs, opts ...InvokeOption) (*LookupDatastoreResult, error)
    func LookupDatastoreOutput(ctx *Context, args *LookupDatastoreOutputArgs, opts ...InvokeOption) LookupDatastoreResultOutput

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

    public static class GetDatastore 
    {
        public static Task<GetDatastoreResult> InvokeAsync(GetDatastoreArgs args, InvokeOptions? opts = null)
        public static Output<GetDatastoreResult> Invoke(GetDatastoreInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDatastoreResult> getDatastore(GetDatastoreArgs args, InvokeOptions options)
    public static Output<GetDatastoreResult> getDatastore(GetDatastoreArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:Ocvp/getDatastore:getDatastore
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DatastoreId string
    The OCID of the Datastore.
    DatastoreId string
    The OCID of the Datastore.
    datastoreId String
    The OCID of the Datastore.
    datastoreId string
    The OCID of the Datastore.
    datastore_id str
    The OCID of the Datastore.
    datastoreId String
    The OCID of the Datastore.

    getDatastore Result

    The following output properties are available:

    AvailabilityDomain string
    The availability domain of the Datastore.
    BlockVolumeDetails List<GetDatastoreBlockVolumeDetail>
    The list of Block Volume details that belong to the datastore.
    BlockVolumeIds List<string>
    The List of Block volume OCIDs that belong to the Datastore.
    CapacityInGbs double
    Total size of the datastore in GB.
    ClusterId string
    The OCID of the VMware Cluster that Datastore is attached to.
    CompartmentId string
    The OCID of the compartment that contains the Datastore.
    DatastoreId string
    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 descriptive name for the Datastore. It must be unique within a SDDC, start with a letter, and contain only letters, digits, whitespaces, dashes and underscores. Avoid entering confidential information.
    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.
    SddcId string
    The OCID of the SDDC that Datastore is associated with.
    State string
    The current state of the Datastore.
    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 was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    TimeUpdated string
    The date and time the Datastore was updated, in the format defined by RFC3339.
    AvailabilityDomain string
    The availability domain of the Datastore.
    BlockVolumeDetails []GetDatastoreBlockVolumeDetail
    The list of Block Volume details that belong to the datastore.
    BlockVolumeIds []string
    The List of Block volume OCIDs that belong to the Datastore.
    CapacityInGbs float64
    Total size of the datastore in GB.
    ClusterId string
    The OCID of the VMware Cluster that Datastore is attached to.
    CompartmentId string
    The OCID of the compartment that contains the Datastore.
    DatastoreId string
    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 descriptive name for the Datastore. It must be unique within a SDDC, start with a letter, and contain only letters, digits, whitespaces, dashes and underscores. Avoid entering confidential information.
    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.
    SddcId string
    The OCID of the SDDC that Datastore is associated with.
    State string
    The current state of the Datastore.
    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 was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    TimeUpdated string
    The date and time the Datastore was updated, in the format defined by RFC3339.
    availabilityDomain String
    The availability domain of the Datastore.
    blockVolumeDetails List<GetDatastoreBlockVolumeDetail>
    The list of Block Volume details that belong to the datastore.
    blockVolumeIds List<String>
    The List of Block volume OCIDs that belong to the Datastore.
    capacityInGbs Double
    Total size of the datastore in GB.
    clusterId String
    The OCID of the VMware Cluster that Datastore is attached to.
    compartmentId String
    The OCID of the compartment that contains the Datastore.
    datastoreId String
    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 descriptive name for the Datastore. It must be unique within a SDDC, start with a letter, and contain only letters, digits, whitespaces, dashes and underscores. Avoid entering confidential information.
    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.
    sddcId String
    The OCID of the SDDC that Datastore is associated with.
    state String
    The current state of the Datastore.
    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 was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    timeUpdated String
    The date and time the Datastore was updated, in the format defined by RFC3339.
    availabilityDomain string
    The availability domain of the Datastore.
    blockVolumeDetails GetDatastoreBlockVolumeDetail[]
    The list of Block Volume details that belong to the datastore.
    blockVolumeIds string[]
    The List of Block volume OCIDs that belong to the Datastore.
    capacityInGbs number
    Total size of the datastore in GB.
    clusterId string
    The OCID of the VMware Cluster that Datastore is attached to.
    compartmentId string
    The OCID of the compartment that contains the Datastore.
    datastoreId string
    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 descriptive name for the Datastore. It must be unique within a SDDC, start with a letter, and contain only letters, digits, whitespaces, dashes and underscores. Avoid entering confidential information.
    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.
    sddcId string
    The OCID of the SDDC that Datastore is associated with.
    state string
    The current state of the Datastore.
    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 was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    timeUpdated string
    The date and time the Datastore was updated, in the format defined by RFC3339.
    availability_domain str
    The availability domain of the Datastore.
    block_volume_details Sequence[GetDatastoreBlockVolumeDetail]
    The list of Block Volume details that belong to the datastore.
    block_volume_ids Sequence[str]
    The List of Block volume OCIDs that belong to the Datastore.
    capacity_in_gbs float
    Total size of the datastore in GB.
    cluster_id str
    The OCID of the VMware Cluster that Datastore is attached to.
    compartment_id str
    The OCID of the compartment that contains the Datastore.
    datastore_id str
    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 descriptive name for the Datastore. It must be unique within a SDDC, start with a letter, and contain only letters, digits, whitespaces, dashes and underscores. Avoid entering confidential information.
    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.
    sddc_id str
    The OCID of the SDDC that Datastore is associated with.
    state str
    The current state of the Datastore.
    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 was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    time_updated str
    The date and time the Datastore was updated, in the format defined by RFC3339.
    availabilityDomain String
    The availability domain of the Datastore.
    blockVolumeDetails List<Property Map>
    The list of Block Volume details that belong to the datastore.
    blockVolumeIds List<String>
    The List of Block volume OCIDs that belong to the Datastore.
    capacityInGbs Number
    Total size of the datastore in GB.
    clusterId String
    The OCID of the VMware Cluster that Datastore is attached to.
    compartmentId String
    The OCID of the compartment that contains the Datastore.
    datastoreId String
    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 descriptive name for the Datastore. It must be unique within a SDDC, start with a letter, and contain only letters, digits, whitespaces, dashes and underscores. Avoid entering confidential information.
    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.
    sddcId String
    The OCID of the SDDC that Datastore is associated with.
    state String
    The current state of the Datastore.
    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 was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    timeUpdated String
    The date and time the Datastore was updated, in the format defined by RFC3339.

    Supporting Types

    GetDatastoreBlockVolumeDetail

    Attachments List<GetDatastoreBlockVolumeDetailAttachment>
    List of BlockVolumeAttachment objects containing information about attachment details
    Id string
    The OCID of the Datastore.
    Iqn string
    An IQN of the Block Storage Volume.
    Attachments []GetDatastoreBlockVolumeDetailAttachment
    List of BlockVolumeAttachment objects containing information about attachment details
    Id string
    The OCID of the Datastore.
    Iqn string
    An IQN of the Block Storage Volume.
    attachments List<GetDatastoreBlockVolumeDetailAttachment>
    List of BlockVolumeAttachment objects containing information about attachment details
    id String
    The OCID of the Datastore.
    iqn String
    An IQN of the Block Storage Volume.
    attachments GetDatastoreBlockVolumeDetailAttachment[]
    List of BlockVolumeAttachment objects containing information about attachment details
    id string
    The OCID of the Datastore.
    iqn string
    An IQN of the Block Storage Volume.
    attachments Sequence[GetDatastoreBlockVolumeDetailAttachment]
    List of BlockVolumeAttachment objects containing information about attachment details
    id str
    The OCID of the Datastore.
    iqn str
    An IQN of the Block Storage Volume.
    attachments List<Property Map>
    List of BlockVolumeAttachment objects containing information about attachment details
    id String
    The OCID of the Datastore.
    iqn String
    An IQN of the Block Storage Volume.

    GetDatastoreBlockVolumeDetailAttachment

    EsxiHostId string
    The OCIDs of the ESXi host that block volume is attached to.
    IpAddress string
    The IP address of block volume attachment.
    Port int
    The port of block volume attachment.
    EsxiHostId string
    The OCIDs of the ESXi host that block volume is attached to.
    IpAddress string
    The IP address of block volume attachment.
    Port int
    The port of block volume attachment.
    esxiHostId String
    The OCIDs of the ESXi host that block volume is attached to.
    ipAddress String
    The IP address of block volume attachment.
    port Integer
    The port of block volume attachment.
    esxiHostId string
    The OCIDs of the ESXi host that block volume is attached to.
    ipAddress string
    The IP address of block volume attachment.
    port number
    The port of block volume attachment.
    esxi_host_id str
    The OCIDs of the ESXi host that block volume is attached to.
    ip_address str
    The IP address of block volume attachment.
    port int
    The port of block volume attachment.
    esxiHostId String
    The OCIDs of the ESXi host that block volume is attached to.
    ipAddress String
    The IP address of block volume attachment.
    port Number
    The port of block volume attachment.

    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