1. Packages
  2. Outscale Provider
  3. API Docs
  4. getVolume
outscale 1.1.0 published on Thursday, Apr 3, 2025 by outscale

outscale.getVolume

Explore with Pulumi AI

outscale 1.1.0 published on Thursday, Apr 3, 2025 by outscale

Provides information about a volume.

For more information on this resource, see the User Guide.
For more information on this resource actions, see the API documentation.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as outscale from "@pulumi/outscale";

const outscaleVolume01 = outscale.getVolume({
    filters: [{
        name: "volume_ids",
        values: ["vol-12345678"],
    }],
});
Copy
import pulumi
import pulumi_outscale as outscale

outscale_volume01 = outscale.get_volume(filters=[{
    "name": "volume_ids",
    "values": ["vol-12345678"],
}])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := outscale.LookupVolume(ctx, &outscale.LookupVolumeArgs{
			Filters: []outscale.GetVolumeFilter{
				{
					Name: "volume_ids",
					Values: []string{
						"vol-12345678",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;

return await Deployment.RunAsync(() => 
{
    var outscaleVolume01 = Outscale.GetVolume.Invoke(new()
    {
        Filters = new[]
        {
            new Outscale.Inputs.GetVolumeFilterInputArgs
            {
                Name = "volume_ids",
                Values = new[]
                {
                    "vol-12345678",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.OutscaleFunctions;
import com.pulumi.outscale.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 outscaleVolume01 = OutscaleFunctions.getVolume(GetVolumeArgs.builder()
            .filters(GetVolumeFilterArgs.builder()
                .name("volume_ids")
                .values("vol-12345678")
                .build())
            .build());

    }
}
Copy
variables:
  outscaleVolume01:
    fn::invoke:
      function: outscale:getVolume
      arguments:
        filters:
          - name: volume_ids
            values:
              - vol-12345678
Copy

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>
Copy
def get_volume(filters: Optional[Sequence[GetVolumeFilter]] = None,
               id: Optional[str] = None,
               request_id: Optional[str] = None,
               volume_id: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetVolumeResult
def get_volume_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetVolumeFilterArgs]]]] = None,
               id: Optional[pulumi.Input[str]] = None,
               request_id: Optional[pulumi.Input[str]] = None,
               volume_id: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetVolumeResult]
Copy
func LookupVolume(ctx *Context, args *LookupVolumeArgs, opts ...InvokeOption) (*LookupVolumeResult, error)
func LookupVolumeOutput(ctx *Context, args *LookupVolumeOutputArgs, opts ...InvokeOption) LookupVolumeResultOutput
Copy

> Note: This function is named LookupVolume 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)
}
Copy
public static CompletableFuture<GetVolumeResult> getVolume(GetVolumeArgs args, InvokeOptions options)
public static Output<GetVolumeResult> getVolume(GetVolumeArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: outscale:index/getVolume:getVolume
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Filters List<GetVolumeFilter>
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
Id string
RequestId string
VolumeId string
The ID of the volume.
Filters []GetVolumeFilter
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
Id string
RequestId string
VolumeId string
The ID of the volume.
filters List<GetVolumeFilter>
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
id String
requestId String
volumeId String
The ID of the volume.
filters GetVolumeFilter[]
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
id string
requestId string
volumeId string
The ID of the volume.
filters Sequence[GetVolumeFilter]
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
id str
request_id str
volume_id str
The ID of the volume.
filters List<Property Map>
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
id String
requestId String
volumeId String
The ID of the volume.

getVolume Result

The following output properties are available:

CreationDate string
The date and time (UTC) at which the volume was created.
Id string
Iops double
The number of I/O operations per second (IOPS):- For io1 volumes, the number of provisioned IOPS.- For gp2 volumes, the baseline performance of the volume.
LinkedVolumes List<GetVolumeLinkedVolume>
Information about your volume attachment.
Size double
The size of the volume, in gibibytes (GiB).
SnapshotId string
The snapshot from which the volume was created.
State string
The state of the volume (creating | available | in-use | updating | deleting | error).
SubregionName string
The Subregion in which the volume was created.
Tags List<GetVolumeTag>
One or more tags associated with the volume.
VolumeType string
The type of the volume (standard | gp2 | io1).
Filters List<GetVolumeFilter>
RequestId string
VolumeId string
The ID of the volume.
CreationDate string
The date and time (UTC) at which the volume was created.
Id string
Iops float64
The number of I/O operations per second (IOPS):- For io1 volumes, the number of provisioned IOPS.- For gp2 volumes, the baseline performance of the volume.
LinkedVolumes []GetVolumeLinkedVolume
Information about your volume attachment.
Size float64
The size of the volume, in gibibytes (GiB).
SnapshotId string
The snapshot from which the volume was created.
State string
The state of the volume (creating | available | in-use | updating | deleting | error).
SubregionName string
The Subregion in which the volume was created.
Tags []GetVolumeTag
One or more tags associated with the volume.
VolumeType string
The type of the volume (standard | gp2 | io1).
Filters []GetVolumeFilter
RequestId string
VolumeId string
The ID of the volume.
creationDate String
The date and time (UTC) at which the volume was created.
id String
iops Double
The number of I/O operations per second (IOPS):- For io1 volumes, the number of provisioned IOPS.- For gp2 volumes, the baseline performance of the volume.
linkedVolumes List<GetVolumeLinkedVolume>
Information about your volume attachment.
size Double
The size of the volume, in gibibytes (GiB).
snapshotId String
The snapshot from which the volume was created.
state String
The state of the volume (creating | available | in-use | updating | deleting | error).
subregionName String
The Subregion in which the volume was created.
tags List<GetVolumeTag>
One or more tags associated with the volume.
volumeType String
The type of the volume (standard | gp2 | io1).
filters List<GetVolumeFilter>
requestId String
volumeId String
The ID of the volume.
creationDate string
The date and time (UTC) at which the volume was created.
id string
iops number
The number of I/O operations per second (IOPS):- For io1 volumes, the number of provisioned IOPS.- For gp2 volumes, the baseline performance of the volume.
linkedVolumes GetVolumeLinkedVolume[]
Information about your volume attachment.
size number
The size of the volume, in gibibytes (GiB).
snapshotId string
The snapshot from which the volume was created.
state string
The state of the volume (creating | available | in-use | updating | deleting | error).
subregionName string
The Subregion in which the volume was created.
tags GetVolumeTag[]
One or more tags associated with the volume.
volumeType string
The type of the volume (standard | gp2 | io1).
filters GetVolumeFilter[]
requestId string
volumeId string
The ID of the volume.
creation_date str
The date and time (UTC) at which the volume was created.
id str
iops float
The number of I/O operations per second (IOPS):- For io1 volumes, the number of provisioned IOPS.- For gp2 volumes, the baseline performance of the volume.
linked_volumes Sequence[GetVolumeLinkedVolume]
Information about your volume attachment.
size float
The size of the volume, in gibibytes (GiB).
snapshot_id str
The snapshot from which the volume was created.
state str
The state of the volume (creating | available | in-use | updating | deleting | error).
subregion_name str
The Subregion in which the volume was created.
tags Sequence[GetVolumeTag]
One or more tags associated with the volume.
volume_type str
The type of the volume (standard | gp2 | io1).
filters Sequence[GetVolumeFilter]
request_id str
volume_id str
The ID of the volume.
creationDate String
The date and time (UTC) at which the volume was created.
id String
iops Number
The number of I/O operations per second (IOPS):- For io1 volumes, the number of provisioned IOPS.- For gp2 volumes, the baseline performance of the volume.
linkedVolumes List<Property Map>
Information about your volume attachment.
size Number
The size of the volume, in gibibytes (GiB).
snapshotId String
The snapshot from which the volume was created.
state String
The state of the volume (creating | available | in-use | updating | deleting | error).
subregionName String
The Subregion in which the volume was created.
tags List<Property Map>
One or more tags associated with the volume.
volumeType String
The type of the volume (standard | gp2 | io1).
filters List<Property Map>
requestId String
volumeId String
The ID of the volume.

Supporting Types

GetVolumeFilter

Name This property is required. string
Values This property is required. List<string>
Name This property is required. string
Values This property is required. []string
name This property is required. String
values This property is required. List<String>
name This property is required. string
values This property is required. string[]
name This property is required. str
values This property is required. Sequence[str]
name This property is required. String
values This property is required. List<String>

GetVolumeLinkedVolume

DeleteOnVmDeletion This property is required. bool
If true, the volume is deleted when terminating the VM. If false, the volume is not deleted when terminating the VM.
DeviceName This property is required. string
The name of the device.
State This property is required. string
The state of the volume (creating | available | in-use | updating | deleting | error).
VmId This property is required. string
The ID of the VM.
VolumeId This property is required. string
The ID of the volume.
DeleteOnVmDeletion This property is required. bool
If true, the volume is deleted when terminating the VM. If false, the volume is not deleted when terminating the VM.
DeviceName This property is required. string
The name of the device.
State This property is required. string
The state of the volume (creating | available | in-use | updating | deleting | error).
VmId This property is required. string
The ID of the VM.
VolumeId This property is required. string
The ID of the volume.
deleteOnVmDeletion This property is required. Boolean
If true, the volume is deleted when terminating the VM. If false, the volume is not deleted when terminating the VM.
deviceName This property is required. String
The name of the device.
state This property is required. String
The state of the volume (creating | available | in-use | updating | deleting | error).
vmId This property is required. String
The ID of the VM.
volumeId This property is required. String
The ID of the volume.
deleteOnVmDeletion This property is required. boolean
If true, the volume is deleted when terminating the VM. If false, the volume is not deleted when terminating the VM.
deviceName This property is required. string
The name of the device.
state This property is required. string
The state of the volume (creating | available | in-use | updating | deleting | error).
vmId This property is required. string
The ID of the VM.
volumeId This property is required. string
The ID of the volume.
delete_on_vm_deletion This property is required. bool
If true, the volume is deleted when terminating the VM. If false, the volume is not deleted when terminating the VM.
device_name This property is required. str
The name of the device.
state This property is required. str
The state of the volume (creating | available | in-use | updating | deleting | error).
vm_id This property is required. str
The ID of the VM.
volume_id This property is required. str
The ID of the volume.
deleteOnVmDeletion This property is required. Boolean
If true, the volume is deleted when terminating the VM. If false, the volume is not deleted when terminating the VM.
deviceName This property is required. String
The name of the device.
state This property is required. String
The state of the volume (creating | available | in-use | updating | deleting | error).
vmId This property is required. String
The ID of the VM.
volumeId This property is required. String
The ID of the volume.

GetVolumeTag

Key This property is required. string
The key of the tag, with a minimum of 1 character.
Value This property is required. string
The value of the tag, between 0 and 255 characters.
Key This property is required. string
The key of the tag, with a minimum of 1 character.
Value This property is required. string
The value of the tag, between 0 and 255 characters.
key This property is required. String
The key of the tag, with a minimum of 1 character.
value This property is required. String
The value of the tag, between 0 and 255 characters.
key This property is required. string
The key of the tag, with a minimum of 1 character.
value This property is required. string
The value of the tag, between 0 and 255 characters.
key This property is required. str
The key of the tag, with a minimum of 1 character.
value This property is required. str
The value of the tag, between 0 and 255 characters.
key This property is required. String
The key of the tag, with a minimum of 1 character.
value This property is required. String
The value of the tag, between 0 and 255 characters.

Package Details

Repository
outscale outscale/terraform-provider-outscale
License
Notes
This Pulumi package is based on the outscale Terraform Provider.
outscale 1.1.0 published on Thursday, Apr 3, 2025 by outscale