Viewing docs for Linode v5.9.0
published on Friday, Mar 13, 2026 by Pulumi
published on Friday, Mar 13, 2026 by Pulumi
Viewing docs for Linode v5.9.0
published on Friday, Mar 13, 2026 by Pulumi
published on Friday, Mar 13, 2026 by Pulumi
Provides information about Linode volumes that match a set of filters. For more information, see the Linode APIv4 docs.
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";
const filtered_volumes = linode.getVolumes({
filters: [{
name: "label",
values: ["test-volume"],
}],
});
export const volumes = filtered_volumes.then(filtered_volumes => filtered_volumes.volumes);
import pulumi
import pulumi_linode as linode
filtered_volumes = linode.get_volumes(filters=[{
"name": "label",
"values": ["test-volume"],
}])
pulumi.export("volumes", filtered_volumes.volumes)
package main
import (
"github.com/pulumi/pulumi-linode/sdk/v5/go/linode"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
filtered_volumes, err := linode.GetVolumes(ctx, &linode.GetVolumesArgs{
Filters: []linode.GetVolumesFilter{
{
Name: "label",
Values: []string{
"test-volume",
},
},
},
}, nil)
if err != nil {
return err
}
ctx.Export("volumes", filtered_volumes.Volumes)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;
return await Deployment.RunAsync(() =>
{
var filtered_volumes = Linode.GetVolumes.Invoke(new()
{
Filters = new[]
{
new Linode.Inputs.GetVolumesFilterInputArgs
{
Name = "label",
Values = new[]
{
"test-volume",
},
},
},
});
return new Dictionary<string, object?>
{
["volumes"] = filtered_volumes.Apply(filtered_volumes => filtered_volumes.Apply(getVolumesResult => getVolumesResult.Volumes)),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.LinodeFunctions;
import com.pulumi.linode.inputs.GetVolumesArgs;
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 filtered-volumes = LinodeFunctions.getVolumes(GetVolumesArgs.builder()
.filters(GetVolumesFilterArgs.builder()
.name("label")
.values("test-volume")
.build())
.build());
ctx.export("volumes", filtered_volumes.volumes());
}
}
variables:
filtered-volumes:
fn::invoke:
function: linode:getVolumes
arguments:
filters:
- name: label
values:
- test-volume
outputs:
volumes: ${["filtered-volumes"].volumes}
Filterable Fields
labeltags
Using getVolumes
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 getVolumes(args: GetVolumesArgs, opts?: InvokeOptions): Promise<GetVolumesResult>
function getVolumesOutput(args: GetVolumesOutputArgs, opts?: InvokeOptions): Output<GetVolumesResult>def get_volumes(filters: Optional[Sequence[GetVolumesFilter]] = None,
order: Optional[str] = None,
order_by: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVolumesResult
def get_volumes_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetVolumesFilterArgs]]]] = None,
order: Optional[pulumi.Input[str]] = None,
order_by: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVolumesResult]func GetVolumes(ctx *Context, args *GetVolumesArgs, opts ...InvokeOption) (*GetVolumesResult, error)
func GetVolumesOutput(ctx *Context, args *GetVolumesOutputArgs, opts ...InvokeOption) GetVolumesResultOutput> Note: This function is named GetVolumes in the Go SDK.
public static class GetVolumes
{
public static Task<GetVolumesResult> InvokeAsync(GetVolumesArgs args, InvokeOptions? opts = null)
public static Output<GetVolumesResult> Invoke(GetVolumesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetVolumesResult> getVolumes(GetVolumesArgs args, InvokeOptions options)
public static Output<GetVolumesResult> getVolumes(GetVolumesArgs args, InvokeOptions options)
fn::invoke:
function: linode:index/getVolumes:getVolumes
arguments:
# arguments dictionaryThe following arguments are supported:
- Filters
List<Get
Volumes Filter> - Order string
- The order in which results should be returned. (
asc,desc; defaultasc) - Order
By string - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- Filters
[]Get
Volumes Filter - Order string
- The order in which results should be returned. (
asc,desc; defaultasc) - Order
By string - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- filters
List<Get
Volumes Filter> - order String
- The order in which results should be returned. (
asc,desc; defaultasc) - order
By String - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- filters
Get
Volumes Filter[] - order string
- The order in which results should be returned. (
asc,desc; defaultasc) - order
By string - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- filters
Sequence[Get
Volumes Filter] - order str
- The order in which results should be returned. (
asc,desc; defaultasc) - order_
by str - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- filters List<Property Map>
- order String
- The order in which results should be returned. (
asc,desc; defaultasc) - order
By String - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
getVolumes Result
The following output properties are available:
- Id string
- The unique ID of this Volume.
- Volumes
List<Get
Volumes Volume> - Filters
List<Get
Volumes Filter> - Order string
- Order
By string
- Id string
- The unique ID of this Volume.
- Volumes
[]Get
Volumes Volume - Filters
[]Get
Volumes Filter - Order string
- Order
By string
- id String
- The unique ID of this Volume.
- volumes
List<Get
Volumes Volume> - filters
List<Get
Volumes Filter> - order String
- order
By String
- id string
- The unique ID of this Volume.
- volumes
Get
Volumes Volume[] - filters
Get
Volumes Filter[] - order string
- order
By string
- id str
- The unique ID of this Volume.
- volumes
Sequence[Get
Volumes Volume] - filters
Sequence[Get
Volumes Filter] - order str
- order_
by str
- id String
- The unique ID of this Volume.
- volumes List<Property Map>
- filters List<Property Map>
- order String
- order
By String
Supporting Types
GetVolumesFilter
- Name string
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- Values List<string>
- A list of values for the filter to allow. These values should all be in string form.
- Match
By string - The method to match the field by. (
exact,regex,substring; defaultexact)
- Name string
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- Values []string
- A list of values for the filter to allow. These values should all be in string form.
- Match
By string - The method to match the field by. (
exact,regex,substring; defaultexact)
- name String
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values List<String>
- A list of values for the filter to allow. These values should all be in string form.
- match
By String - The method to match the field by. (
exact,regex,substring; defaultexact)
- name string
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values string[]
- A list of values for the filter to allow. These values should all be in string form.
- match
By string - The method to match the field by. (
exact,regex,substring; defaultexact)
- name str
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values Sequence[str]
- A list of values for the filter to allow. These values should all be in string form.
- match_
by str - The method to match the field by. (
exact,regex,substring; defaultexact)
- name String
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values List<String>
- A list of values for the filter to allow. These values should all be in string form.
- match
By String - The method to match the field by. (
exact,regex,substring; defaultexact)
GetVolumesVolume
- Created string
- When this Volume was created.
- Encryption string
- Whether Block Storage Disk Encryption is enabled or disabled on this Volume.
- Filesystem
Path string - The full filesystem path for the Volume based on the Volume's label. Path is /dev/disk/by-id/scsi-0LinodeVolume + Volume label.
- Id int
- The unique ID of this Volume.
- Label string
- This Volume's label is for display purposes only.
- Linode
Id int - If a Volume is attached to a specific Linode, the ID of that Linode will be displayed here. If the Volume is unattached, this value will be null.
- Region string
- The datacenter in which this Volume is located. See all regions here.
- Size int
- The Volume's size, in GiB.
- Status string
- The current status of the Volume. (
creating,active,resizing,contact_support) - List<string>
- An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
- Updated string
- When this Volume was last updated.
- Created string
- When this Volume was created.
- Encryption string
- Whether Block Storage Disk Encryption is enabled or disabled on this Volume.
- Filesystem
Path string - The full filesystem path for the Volume based on the Volume's label. Path is /dev/disk/by-id/scsi-0LinodeVolume + Volume label.
- Id int
- The unique ID of this Volume.
- Label string
- This Volume's label is for display purposes only.
- Linode
Id int - If a Volume is attached to a specific Linode, the ID of that Linode will be displayed here. If the Volume is unattached, this value will be null.
- Region string
- The datacenter in which this Volume is located. See all regions here.
- Size int
- The Volume's size, in GiB.
- Status string
- The current status of the Volume. (
creating,active,resizing,contact_support) - []string
- An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
- Updated string
- When this Volume was last updated.
- created String
- When this Volume was created.
- encryption String
- Whether Block Storage Disk Encryption is enabled or disabled on this Volume.
- filesystem
Path String - The full filesystem path for the Volume based on the Volume's label. Path is /dev/disk/by-id/scsi-0LinodeVolume + Volume label.
- id Integer
- The unique ID of this Volume.
- label String
- This Volume's label is for display purposes only.
- linode
Id Integer - If a Volume is attached to a specific Linode, the ID of that Linode will be displayed here. If the Volume is unattached, this value will be null.
- region String
- The datacenter in which this Volume is located. See all regions here.
- size Integer
- The Volume's size, in GiB.
- status String
- The current status of the Volume. (
creating,active,resizing,contact_support) - List<String>
- An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
- updated String
- When this Volume was last updated.
- created string
- When this Volume was created.
- encryption string
- Whether Block Storage Disk Encryption is enabled or disabled on this Volume.
- filesystem
Path string - The full filesystem path for the Volume based on the Volume's label. Path is /dev/disk/by-id/scsi-0LinodeVolume + Volume label.
- id number
- The unique ID of this Volume.
- label string
- This Volume's label is for display purposes only.
- linode
Id number - If a Volume is attached to a specific Linode, the ID of that Linode will be displayed here. If the Volume is unattached, this value will be null.
- region string
- The datacenter in which this Volume is located. See all regions here.
- size number
- The Volume's size, in GiB.
- status string
- The current status of the Volume. (
creating,active,resizing,contact_support) - string[]
- An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
- updated string
- When this Volume was last updated.
- created str
- When this Volume was created.
- encryption str
- Whether Block Storage Disk Encryption is enabled or disabled on this Volume.
- filesystem_
path str - The full filesystem path for the Volume based on the Volume's label. Path is /dev/disk/by-id/scsi-0LinodeVolume + Volume label.
- id int
- The unique ID of this Volume.
- label str
- This Volume's label is for display purposes only.
- linode_
id int - If a Volume is attached to a specific Linode, the ID of that Linode will be displayed here. If the Volume is unattached, this value will be null.
- region str
- The datacenter in which this Volume is located. See all regions here.
- size int
- The Volume's size, in GiB.
- status str
- The current status of the Volume. (
creating,active,resizing,contact_support) - Sequence[str]
- An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
- updated str
- When this Volume was last updated.
- created String
- When this Volume was created.
- encryption String
- Whether Block Storage Disk Encryption is enabled or disabled on this Volume.
- filesystem
Path String - The full filesystem path for the Volume based on the Volume's label. Path is /dev/disk/by-id/scsi-0LinodeVolume + Volume label.
- id Number
- The unique ID of this Volume.
- label String
- This Volume's label is for display purposes only.
- linode
Id Number - If a Volume is attached to a specific Linode, the ID of that Linode will be displayed here. If the Volume is unattached, this value will be null.
- region String
- The datacenter in which this Volume is located. See all regions here.
- size Number
- The Volume's size, in GiB.
- status String
- The current status of the Volume. (
creating,active,resizing,contact_support) - List<String>
- An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
- updated String
- When this Volume was last updated.
Package Details
- Repository
- Linode pulumi/pulumi-linode
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
linodeTerraform Provider.
Viewing docs for Linode v5.9.0
published on Friday, Mar 13, 2026 by Pulumi
published on Friday, Mar 13, 2026 by Pulumi
