1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. getVolume
Oracle Cloud Infrastructure v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi

oci.Core.getVolume

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi

    This data source provides details about a specific Volume resource in Oracle Cloud Infrastructure Core service.

    Gets information for the specified volume.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testVolume = oci.Core.getVolume({
        volumeId: oci_core_volume.test_volume.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_volume = oci.Core.get_volume(volume_id=oci_core_volume["test_volume"]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/Core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Core.GetVolume(ctx, &core.GetVolumeArgs{
    			VolumeId: oci_core_volume.Test_volume.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 testVolume = Oci.Core.GetVolume.Invoke(new()
        {
            VolumeId = oci_core_volume.Test_volume.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.GetVolumeArgs;
    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 testVolume = CoreFunctions.getVolume(GetVolumeArgs.builder()
                .volumeId(oci_core_volume.test_volume().id())
                .build());
    
        }
    }
    
    variables:
      testVolume:
        fn::invoke:
          Function: oci:Core:getVolume
          Arguments:
            volumeId: ${oci_core_volume.test_volume.id}
    

    Using getVolume

    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 getVolume(args: GetVolumeArgs, opts?: InvokeOptions): Promise<GetVolumeResult>
    function getVolumeOutput(args: GetVolumeOutputArgs, opts?: InvokeOptions): Output<GetVolumeResult>
    def get_volume(volume_id: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetVolumeResult
    def get_volume_output(volume_id: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetVolumeResult]
    func GetVolume(ctx *Context, args *GetVolumeArgs, opts ...InvokeOption) (*GetVolumeResult, error)
    func GetVolumeOutput(ctx *Context, args *GetVolumeOutputArgs, opts ...InvokeOption) GetVolumeResultOutput

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

    public static class GetVolume 
    {
        public static Task<GetVolumeResult> InvokeAsync(GetVolumeArgs args, InvokeOptions? opts = null)
        public static Output<GetVolumeResult> Invoke(GetVolumeInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVolumeResult> getVolume(GetVolumeArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Core/getVolume:getVolume
      arguments:
        # arguments dictionary

    The following arguments are supported:

    VolumeId string
    The OCID of the volume.
    VolumeId string
    The OCID of the volume.
    volumeId String
    The OCID of the volume.
    volumeId string
    The OCID of the volume.
    volume_id str
    The OCID of the volume.
    volumeId String
    The OCID of the volume.

    getVolume Result

    The following output properties are available:

    AutoTunedVpusPerGb string
    The number of Volume Performance Units per GB that this volume is effectively tuned to.
    AutotunePolicies List<GetVolumeAutotunePolicy>
    The list of autotune policies enabled for this volume.
    AvailabilityDomain string
    The availability domain of the block volume replica. Example: Uocm:PHX-AD-1
    BackupPolicyId string

    Deprecated: The 'backup_policy_id' field has been deprecated. Please use the 'oci_core_volume_backup_policy_assignment' resource instead.

    BlockVolumeReplicas List<GetVolumeBlockVolumeReplica>
    The list of block volume replicas of this volume.
    BlockVolumeReplicasDeletion bool
    CompartmentId string
    The OCID of the compartment that contains the volume.
    DefinedTags Dictionary<string, object>
    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.
    FreeformTags Dictionary<string, object>
    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 block volume replica.
    IsAutoTuneEnabled bool
    Specifies whether the auto-tune performance is enabled for this volume. This field is deprecated. Use the DetachedVolumeAutotunePolicy instead to enable the volume for detached autotune.
    IsHydrated bool
    Specifies whether the cloned volume's data has finished copying from the source volume or backup.
    KmsKeyId string
    The OCID of the Vault service key which is the master encryption key for the volume.
    SizeInGbs string
    The size of the volume in GBs.
    SizeInMbs string
    The size of the volume in MBs. This field is deprecated. Use sizeInGBs instead.

    Deprecated: The 'size_in_mbs' field has been deprecated. Please use 'size_in_gbs' instead.

    SourceDetails List<GetVolumeSourceDetail>
    State string
    The current state of a volume.
    SystemTags Dictionary<string, object>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    TimeCreated string
    The date and time the volume was created. Format defined by RFC3339.
    VolumeBackupId string
    VolumeGroupId string
    The OCID of the source volume group.
    VolumeId string
    VpusPerGb string
    The number of volume performance units (VPUs) that will be applied to this volume per GB, representing the Block Volume service's elastic performance options. See Block Volume Performance Levels for more information.
    AutoTunedVpusPerGb string
    The number of Volume Performance Units per GB that this volume is effectively tuned to.
    AutotunePolicies []GetVolumeAutotunePolicy
    The list of autotune policies enabled for this volume.
    AvailabilityDomain string
    The availability domain of the block volume replica. Example: Uocm:PHX-AD-1
    BackupPolicyId string

    Deprecated: The 'backup_policy_id' field has been deprecated. Please use the 'oci_core_volume_backup_policy_assignment' resource instead.

    BlockVolumeReplicas []GetVolumeBlockVolumeReplica
    The list of block volume replicas of this volume.
    BlockVolumeReplicasDeletion bool
    CompartmentId string
    The OCID of the compartment that contains the volume.
    DefinedTags map[string]interface{}
    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.
    FreeformTags map[string]interface{}
    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 block volume replica.
    IsAutoTuneEnabled bool
    Specifies whether the auto-tune performance is enabled for this volume. This field is deprecated. Use the DetachedVolumeAutotunePolicy instead to enable the volume for detached autotune.
    IsHydrated bool
    Specifies whether the cloned volume's data has finished copying from the source volume or backup.
    KmsKeyId string
    The OCID of the Vault service key which is the master encryption key for the volume.
    SizeInGbs string
    The size of the volume in GBs.
    SizeInMbs string
    The size of the volume in MBs. This field is deprecated. Use sizeInGBs instead.

    Deprecated: The 'size_in_mbs' field has been deprecated. Please use 'size_in_gbs' instead.

    SourceDetails []GetVolumeSourceDetail
    State string
    The current state of a volume.
    SystemTags map[string]interface{}
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    TimeCreated string
    The date and time the volume was created. Format defined by RFC3339.
    VolumeBackupId string
    VolumeGroupId string
    The OCID of the source volume group.
    VolumeId string
    VpusPerGb string
    The number of volume performance units (VPUs) that will be applied to this volume per GB, representing the Block Volume service's elastic performance options. See Block Volume Performance Levels for more information.
    autoTunedVpusPerGb String
    The number of Volume Performance Units per GB that this volume is effectively tuned to.
    autotunePolicies List<GetVolumeAutotunePolicy>
    The list of autotune policies enabled for this volume.
    availabilityDomain String
    The availability domain of the block volume replica. Example: Uocm:PHX-AD-1
    backupPolicyId String

    Deprecated: The 'backup_policy_id' field has been deprecated. Please use the 'oci_core_volume_backup_policy_assignment' resource instead.

    blockVolumeReplicas List<GetVolumeBlockVolumeReplica>
    The list of block volume replicas of this volume.
    blockVolumeReplicasDeletion Boolean
    compartmentId String
    The OCID of the compartment that contains the volume.
    definedTags Map<String,Object>
    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.
    freeformTags Map<String,Object>
    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 block volume replica.
    isAutoTuneEnabled Boolean
    Specifies whether the auto-tune performance is enabled for this volume. This field is deprecated. Use the DetachedVolumeAutotunePolicy instead to enable the volume for detached autotune.
    isHydrated Boolean
    Specifies whether the cloned volume's data has finished copying from the source volume or backup.
    kmsKeyId String
    The OCID of the Vault service key which is the master encryption key for the volume.
    sizeInGbs String
    The size of the volume in GBs.
    sizeInMbs String
    The size of the volume in MBs. This field is deprecated. Use sizeInGBs instead.

    Deprecated: The 'size_in_mbs' field has been deprecated. Please use 'size_in_gbs' instead.

    sourceDetails List<GetVolumeSourceDetail>
    state String
    The current state of a volume.
    systemTags Map<String,Object>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    timeCreated String
    The date and time the volume was created. Format defined by RFC3339.
    volumeBackupId String
    volumeGroupId String
    The OCID of the source volume group.
    volumeId String
    vpusPerGb String
    The number of volume performance units (VPUs) that will be applied to this volume per GB, representing the Block Volume service's elastic performance options. See Block Volume Performance Levels for more information.
    autoTunedVpusPerGb string
    The number of Volume Performance Units per GB that this volume is effectively tuned to.
    autotunePolicies GetVolumeAutotunePolicy[]
    The list of autotune policies enabled for this volume.
    availabilityDomain string
    The availability domain of the block volume replica. Example: Uocm:PHX-AD-1
    backupPolicyId string

    Deprecated: The 'backup_policy_id' field has been deprecated. Please use the 'oci_core_volume_backup_policy_assignment' resource instead.

    blockVolumeReplicas GetVolumeBlockVolumeReplica[]
    The list of block volume replicas of this volume.
    blockVolumeReplicasDeletion boolean
    compartmentId string
    The OCID of the compartment that contains the volume.
    definedTags {[key: string]: any}
    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.
    freeformTags {[key: string]: any}
    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 block volume replica.
    isAutoTuneEnabled boolean
    Specifies whether the auto-tune performance is enabled for this volume. This field is deprecated. Use the DetachedVolumeAutotunePolicy instead to enable the volume for detached autotune.
    isHydrated boolean
    Specifies whether the cloned volume's data has finished copying from the source volume or backup.
    kmsKeyId string
    The OCID of the Vault service key which is the master encryption key for the volume.
    sizeInGbs string
    The size of the volume in GBs.
    sizeInMbs string
    The size of the volume in MBs. This field is deprecated. Use sizeInGBs instead.

    Deprecated: The 'size_in_mbs' field has been deprecated. Please use 'size_in_gbs' instead.

    sourceDetails GetVolumeSourceDetail[]
    state string
    The current state of a volume.
    systemTags {[key: string]: any}
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    timeCreated string
    The date and time the volume was created. Format defined by RFC3339.
    volumeBackupId string
    volumeGroupId string
    The OCID of the source volume group.
    volumeId string
    vpusPerGb string
    The number of volume performance units (VPUs) that will be applied to this volume per GB, representing the Block Volume service's elastic performance options. See Block Volume Performance Levels for more information.
    auto_tuned_vpus_per_gb str
    The number of Volume Performance Units per GB that this volume is effectively tuned to.
    autotune_policies Sequence[core.GetVolumeAutotunePolicy]
    The list of autotune policies enabled for this volume.
    availability_domain str
    The availability domain of the block volume replica. Example: Uocm:PHX-AD-1
    backup_policy_id str

    Deprecated: The 'backup_policy_id' field has been deprecated. Please use the 'oci_core_volume_backup_policy_assignment' resource instead.

    block_volume_replicas Sequence[core.GetVolumeBlockVolumeReplica]
    The list of block volume replicas of this volume.
    block_volume_replicas_deletion bool
    compartment_id str
    The OCID of the compartment that contains the volume.
    defined_tags Mapping[str, Any]
    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.
    freeform_tags Mapping[str, Any]
    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 block volume replica.
    is_auto_tune_enabled bool
    Specifies whether the auto-tune performance is enabled for this volume. This field is deprecated. Use the DetachedVolumeAutotunePolicy instead to enable the volume for detached autotune.
    is_hydrated bool
    Specifies whether the cloned volume's data has finished copying from the source volume or backup.
    kms_key_id str
    The OCID of the Vault service key which is the master encryption key for the volume.
    size_in_gbs str
    The size of the volume in GBs.
    size_in_mbs str
    The size of the volume in MBs. This field is deprecated. Use sizeInGBs instead.

    Deprecated: The 'size_in_mbs' field has been deprecated. Please use 'size_in_gbs' instead.

    source_details Sequence[core.GetVolumeSourceDetail]
    state str
    The current state of a volume.
    system_tags Mapping[str, Any]
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    time_created str
    The date and time the volume was created. Format defined by RFC3339.
    volume_backup_id str
    volume_group_id str
    The OCID of the source volume group.
    volume_id str
    vpus_per_gb str
    The number of volume performance units (VPUs) that will be applied to this volume per GB, representing the Block Volume service's elastic performance options. See Block Volume Performance Levels for more information.
    autoTunedVpusPerGb String
    The number of Volume Performance Units per GB that this volume is effectively tuned to.
    autotunePolicies List<Property Map>
    The list of autotune policies enabled for this volume.
    availabilityDomain String
    The availability domain of the block volume replica. Example: Uocm:PHX-AD-1
    backupPolicyId String

    Deprecated: The 'backup_policy_id' field has been deprecated. Please use the 'oci_core_volume_backup_policy_assignment' resource instead.

    blockVolumeReplicas List<Property Map>
    The list of block volume replicas of this volume.
    blockVolumeReplicasDeletion Boolean
    compartmentId String
    The OCID of the compartment that contains the volume.
    definedTags Map<Any>
    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.
    freeformTags Map<Any>
    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 block volume replica.
    isAutoTuneEnabled Boolean
    Specifies whether the auto-tune performance is enabled for this volume. This field is deprecated. Use the DetachedVolumeAutotunePolicy instead to enable the volume for detached autotune.
    isHydrated Boolean
    Specifies whether the cloned volume's data has finished copying from the source volume or backup.
    kmsKeyId String
    The OCID of the Vault service key which is the master encryption key for the volume.
    sizeInGbs String
    The size of the volume in GBs.
    sizeInMbs String
    The size of the volume in MBs. This field is deprecated. Use sizeInGBs instead.

    Deprecated: The 'size_in_mbs' field has been deprecated. Please use 'size_in_gbs' instead.

    sourceDetails List<Property Map>
    state String
    The current state of a volume.
    systemTags Map<Any>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    timeCreated String
    The date and time the volume was created. Format defined by RFC3339.
    volumeBackupId String
    volumeGroupId String
    The OCID of the source volume group.
    volumeId String
    vpusPerGb String
    The number of volume performance units (VPUs) that will be applied to this volume per GB, representing the Block Volume service's elastic performance options. See Block Volume Performance Levels for more information.

    Supporting Types

    GetVolumeAutotunePolicy

    AutotuneType string
    This specifies the type of autotunes supported by OCI.
    MaxVpusPerGb string
    This will be the maximum VPUs/GB performance level that the volume will be auto-tuned temporarily based on performance monitoring.
    AutotuneType string
    This specifies the type of autotunes supported by OCI.
    MaxVpusPerGb string
    This will be the maximum VPUs/GB performance level that the volume will be auto-tuned temporarily based on performance monitoring.
    autotuneType String
    This specifies the type of autotunes supported by OCI.
    maxVpusPerGb String
    This will be the maximum VPUs/GB performance level that the volume will be auto-tuned temporarily based on performance monitoring.
    autotuneType string
    This specifies the type of autotunes supported by OCI.
    maxVpusPerGb string
    This will be the maximum VPUs/GB performance level that the volume will be auto-tuned temporarily based on performance monitoring.
    autotune_type str
    This specifies the type of autotunes supported by OCI.
    max_vpus_per_gb str
    This will be the maximum VPUs/GB performance level that the volume will be auto-tuned temporarily based on performance monitoring.
    autotuneType String
    This specifies the type of autotunes supported by OCI.
    maxVpusPerGb String
    This will be the maximum VPUs/GB performance level that the volume will be auto-tuned temporarily based on performance monitoring.

    GetVolumeBlockVolumeReplica

    AvailabilityDomain string
    The availability domain of the block volume replica. Example: Uocm:PHX-AD-1
    BlockVolumeReplicaId string
    The block volume replica's Oracle ID (OCID).
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    AvailabilityDomain string
    The availability domain of the block volume replica. Example: Uocm:PHX-AD-1
    BlockVolumeReplicaId string
    The block volume replica's Oracle ID (OCID).
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    availabilityDomain String
    The availability domain of the block volume replica. Example: Uocm:PHX-AD-1
    blockVolumeReplicaId String
    The block volume replica's Oracle ID (OCID).
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    availabilityDomain string
    The availability domain of the block volume replica. Example: Uocm:PHX-AD-1
    blockVolumeReplicaId string
    The block volume replica's Oracle ID (OCID).
    displayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    availability_domain str
    The availability domain of the block volume replica. Example: Uocm:PHX-AD-1
    block_volume_replica_id str
    The block volume replica's Oracle ID (OCID).
    display_name str
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    availabilityDomain String
    The availability domain of the block volume replica. Example: Uocm:PHX-AD-1
    blockVolumeReplicaId String
    The block volume replica's Oracle ID (OCID).
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

    GetVolumeSourceDetail

    Id string
    The OCID of the block volume replica.
    Type string
    The type can be one of these values: blockVolumeReplica, volume, volumeBackup
    Id string
    The OCID of the block volume replica.
    Type string
    The type can be one of these values: blockVolumeReplica, volume, volumeBackup
    id String
    The OCID of the block volume replica.
    type String
    The type can be one of these values: blockVolumeReplica, volume, volumeBackup
    id string
    The OCID of the block volume replica.
    type string
    The type can be one of these values: blockVolumeReplica, volume, volumeBackup
    id str
    The OCID of the block volume replica.
    type str
    The type can be one of these values: blockVolumeReplica, volume, volumeBackup
    id String
    The OCID of the block volume replica.
    type String
    The type can be one of these values: blockVolumeReplica, volume, volumeBackup

    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 v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi