GetVolume
Get information on a volume for use in other resources. This data source provides all of the volumes properties as configured on your DigitalOcean account. This is useful if the volume in question is not managed by this provider or you need to utilize any of the volumes data.
An error is triggered if the provided volume name does not exist.
Example Usage
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(DigitalOcean.GetVolume.InvokeAsync(new DigitalOcean.GetVolumeArgs
{
Name = "app-data",
Region = "nyc3",
}));
}
}
Coming soon!
import pulumi
import pulumi_digitalocean as digitalocean
example = digitalocean.get_volume(name="app-data",
region="nyc3")import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const example = pulumi.output(digitalocean.getVolume({
name: "app-data",
region: "nyc3",
}, { async: true }));Using GetVolume
function getVolume(args: GetVolumeArgs, opts?: InvokeOptions): Promise<GetVolumeResult>function get_volume(description=None, name=None, region=None, opts=None)func LookupVolume(ctx *Context, args *LookupVolumeArgs, opts ...InvokeOption) (*LookupVolumeResult, error)Note: This function is named
LookupVolumein the Go SDK.
public static class GetVolume {
public static Task<GetVolumeResult> InvokeAsync(GetVolumeArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetVolume Result
The following output properties are available:
- Droplet
Ids List<int> A list of associated Droplet ids.
- Filesystem
Label string Filesystem label currently in-use on the block storage volume.
- Filesystem
Type string Filesystem type currently in-use on the block storage volume.
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Size int
The size of the block storage volume in GiB.
- List<string>
A list of the tags associated to the Volume.
- Urn string
- Description string
Text describing a block storage volume.
- Region string
- Droplet
Ids []int A list of associated Droplet ids.
- Filesystem
Label string Filesystem label currently in-use on the block storage volume.
- Filesystem
Type string Filesystem type currently in-use on the block storage volume.
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Size int
The size of the block storage volume in GiB.
- []string
A list of the tags associated to the Volume.
- Urn string
- Description string
Text describing a block storage volume.
- Region string
- droplet
Ids number[] A list of associated Droplet ids.
- filesystem
Label string Filesystem label currently in-use on the block storage volume.
- filesystem
Type string Filesystem type currently in-use on the block storage volume.
- id string
The provider-assigned unique ID for this managed resource.
- name string
- size number
The size of the block storage volume in GiB.
- string[]
A list of the tags associated to the Volume.
- urn string
- description string
Text describing a block storage volume.
- region string
- droplet_
ids List[Integer] A list of associated Droplet ids.
- filesystem_
label str Filesystem label currently in-use on the block storage volume.
- filesystem_
type str Filesystem type currently in-use on the block storage volume.
- id str
The provider-assigned unique ID for this managed resource.
- name str
- size float
The size of the block storage volume in GiB.
- List[str]
A list of the tags associated to the Volume.
- urn str
- description str
Text describing a block storage volume.
- region str
Package Details
- Repository
- https://github.com/pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
digitaloceanTerraform Provider.