Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
Use this data source to query detailed information of volumes
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooZones = volcengine.ecs.getZones({});
const fooVolume: volcengine.ebs.Volume[] = [];
for (const range = {value: 0}; range.value < 3; range.value++) {
fooVolume.push(new volcengine.ebs.Volume(`fooVolume-${range.value}`, {
volumeName: `acc-test-volume-${range.value}`,
volumeType: "ESSD_PL0",
description: "acc-test",
kind: "data",
size: 60,
zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
volumeChargeType: "PostPaid",
projectName: "default",
}));
}
const fooVolumes = volcengine.ebs.getVolumesOutput({
ids: fooVolume.map(__item => __item.id),
});
import pulumi
import pulumi_volcengine as volcengine
foo_zones = volcengine.ecs.get_zones()
foo_volume = []
for range in [{"value": i} for i in range(0, 3)]:
foo_volume.append(volcengine.ebs.Volume(f"fooVolume-{range['value']}",
volume_name=f"acc-test-volume-{range['value']}",
volume_type="ESSD_PL0",
description="acc-test",
kind="data",
size=60,
zone_id=foo_zones.zones[0].id,
volume_charge_type="PostPaid",
project_name="default"))
foo_volumes = volcengine.ebs.get_volumes_output(ids=[__item.id for __item in foo_volume])
package main
import (
"fmt"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ebs"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooZones, err := ecs.GetZones(ctx, nil, nil);
if err != nil {
return err
}
var fooVolume []*ebs.Volume
for index := 0; index < 3; index++ {
key0 := index
val0 := index
__res, err := ebs.NewVolume(ctx, fmt.Sprintf("fooVolume-%v", key0), &ebs.VolumeArgs{
VolumeName: pulumi.String(fmt.Sprintf("acc-test-volume-%v", val0)),
VolumeType: pulumi.String("ESSD_PL0"),
Description: pulumi.String("acc-test"),
Kind: pulumi.String("data"),
Size: pulumi.Int(60),
ZoneId: pulumi.String(fooZones.Zones[0].Id),
VolumeChargeType: pulumi.String("PostPaid"),
ProjectName: pulumi.String("default"),
})
if err != nil {
return err
}
fooVolume = append(fooVolume, __res)
}
_ = ebs.GetVolumesOutput(ctx, ebs.GetVolumesOutputArgs{
Ids: %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ #-functions-volcengine:ebs-getVolumes:getVolumes.pp:17,9-24),
}, nil);
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooZones = Volcengine.Ecs.GetZones.Invoke();
var fooVolume = new List<Volcengine.Ebs.Volume>();
for (var rangeIndex = 0; rangeIndex < 3; rangeIndex++)
{
var range = new { Value = rangeIndex };
fooVolume.Add(new Volcengine.Ebs.Volume($"fooVolume-{range.Value}", new()
{
VolumeName = $"acc-test-volume-{range.Value}",
VolumeType = "ESSD_PL0",
Description = "acc-test",
Kind = "data",
Size = 60,
ZoneId = fooZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
VolumeChargeType = "PostPaid",
ProjectName = "default",
}));
}
var fooVolumes = Volcengine.Ebs.GetVolumes.Invoke(new()
{
Ids = fooVolume.Select(__item => __item.Id).ToList(),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.GetZonesArgs;
import com.pulumi.volcengine.ebs.Volume;
import com.pulumi.volcengine.ebs.VolumeArgs;
import com.pulumi.volcengine.ebs.EbsFunctions;
import com.pulumi.volcengine.ebs.inputs.GetVolumesArgs;
import com.pulumi.codegen.internal.KeyedValue;
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 fooZones = EcsFunctions.getZones();
for (var i = 0; i < 3; i++) {
new Volume("fooVolume-" + i, VolumeArgs.builder()
.volumeName(String.format("acc-test-volume-%s", range.value()))
.volumeType("ESSD_PL0")
.description("acc-test")
.kind("data")
.size(60)
.zoneId(fooZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.volumeChargeType("PostPaid")
.projectName("default")
.build());
}
final var fooVolumes = EbsFunctions.getVolumes(GetVolumesArgs.builder()
.ids(fooVolume.stream().map(element -> element.id()).collect(toList()))
.build());
}
}
Example coming soon!
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(ids: Optional[Sequence[str]] = None,
instance_id: Optional[str] = None,
kind: Optional[str] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
tags: Optional[Sequence[GetVolumesTag]] = None,
volume_name: Optional[str] = None,
volume_status: Optional[str] = None,
volume_type: Optional[str] = None,
zone_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVolumesResult
def get_volumes_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
kind: Optional[pulumi.Input[str]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Sequence[pulumi.Input[GetVolumesTagArgs]]]] = None,
volume_name: Optional[pulumi.Input[str]] = None,
volume_status: Optional[pulumi.Input[str]] = None,
volume_type: Optional[pulumi.Input[str]] = None,
zone_id: 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: volcengine:ebs/getVolumes:getVolumes
arguments:
# arguments dictionaryThe following arguments are supported:
- Ids List<string>
- A list of Volume IDs.
- Instance
Id string - The Id of instance.
- Kind string
- The Kind of Volume.
- Name
Regex string - A Name Regex of Volume.
- Output
File string - File name where to save data source results.
-
List<Get
Volumes Tag> - Tags.
- Volume
Name string - The name of Volume.
- Volume
Status string - The Status of Volume, the value can be
availableorattachingorattachedordetachingorcreatingordeletingorerrororextending. - Volume
Type string - The type of Volume.
- Zone
Id string - The Id of Zone.
- Ids []string
- A list of Volume IDs.
- Instance
Id string - The Id of instance.
- Kind string
- The Kind of Volume.
- Name
Regex string - A Name Regex of Volume.
- Output
File string - File name where to save data source results.
-
[]Get
Volumes Tag - Tags.
- Volume
Name string - The name of Volume.
- Volume
Status string - The Status of Volume, the value can be
availableorattachingorattachedordetachingorcreatingordeletingorerrororextending. - Volume
Type string - The type of Volume.
- Zone
Id string - The Id of Zone.
- ids List<String>
- A list of Volume IDs.
- instance
Id String - The Id of instance.
- kind String
- The Kind of Volume.
- name
Regex String - A Name Regex of Volume.
- output
File String - File name where to save data source results.
-
List<Get
Volumes Tag> - Tags.
- volume
Name String - The name of Volume.
- volume
Status String - The Status of Volume, the value can be
availableorattachingorattachedordetachingorcreatingordeletingorerrororextending. - volume
Type String - The type of Volume.
- zone
Id String - The Id of Zone.
- ids string[]
- A list of Volume IDs.
- instance
Id string - The Id of instance.
- kind string
- The Kind of Volume.
- name
Regex string - A Name Regex of Volume.
- output
File string - File name where to save data source results.
-
Get
Volumes Tag[] - Tags.
- volume
Name string - The name of Volume.
- volume
Status string - The Status of Volume, the value can be
availableorattachingorattachedordetachingorcreatingordeletingorerrororextending. - volume
Type string - The type of Volume.
- zone
Id string - The Id of Zone.
- ids Sequence[str]
- A list of Volume IDs.
- instance_
id str - The Id of instance.
- kind str
- The Kind of Volume.
- name_
regex str - A Name Regex of Volume.
- output_
file str - File name where to save data source results.
-
Sequence[Get
Volumes Tag] - Tags.
- volume_
name str - The name of Volume.
- volume_
status str - The Status of Volume, the value can be
availableorattachingorattachedordetachingorcreatingordeletingorerrororextending. - volume_
type str - The type of Volume.
- zone_
id str - The Id of Zone.
- ids List<String>
- A list of Volume IDs.
- instance
Id String - The Id of instance.
- kind String
- The Kind of Volume.
- name
Regex String - A Name Regex of Volume.
- output
File String - File name where to save data source results.
- List<Property Map>
- Tags.
- volume
Name String - The name of Volume.
- volume
Status String - The Status of Volume, the value can be
availableorattachingorattachedordetachingorcreatingordeletingorerrororextending. - volume
Type String - The type of Volume.
- zone
Id String - The Id of Zone.
getVolumes Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of Volume query.
- Volumes
List<Get
Volumes Volume> - The collection of Volume query.
- Ids List<string>
- Instance
Id string - Kind string
- Name
Regex string - Output
File string -
List<Get
Volumes Tag> - Tags.
- Volume
Name string - Volume
Status string - Volume
Type string - Zone
Id string
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of Volume query.
- Volumes
[]Get
Volumes Volume - The collection of Volume query.
- Ids []string
- Instance
Id string - Kind string
- Name
Regex string - Output
File string -
[]Get
Volumes Tag - Tags.
- Volume
Name string - Volume
Status string - Volume
Type string - Zone
Id string
- id String
- The provider-assigned unique ID for this managed resource.
- total
Count Integer - The total count of Volume query.
- volumes
List<Get
Volumes Volume> - The collection of Volume query.
- ids List<String>
- instance
Id String - kind String
- name
Regex String - output
File String -
List<Get
Volumes Tag> - Tags.
- volume
Name String - volume
Status String - volume
Type String - zone
Id String
- id string
- The provider-assigned unique ID for this managed resource.
- total
Count number - The total count of Volume query.
- volumes
Get
Volumes Volume[] - The collection of Volume query.
- ids string[]
- instance
Id string - kind string
- name
Regex string - output
File string -
Get
Volumes Tag[] - Tags.
- volume
Name string - volume
Status string - volume
Type string - zone
Id string
- id str
- The provider-assigned unique ID for this managed resource.
- total_
count int - The total count of Volume query.
- volumes
Sequence[Get
Volumes Volume] - The collection of Volume query.
- ids Sequence[str]
- instance_
id str - kind str
- name_
regex str - output_
file str -
Sequence[Get
Volumes Tag] - Tags.
- volume_
name str - volume_
status str - volume_
type str - zone_
id str
- id String
- The provider-assigned unique ID for this managed resource.
- total
Count Number - The total count of Volume query.
- volumes List<Property Map>
- The collection of Volume query.
- ids List<String>
- instance
Id String - kind String
- name
Regex String - output
File String - List<Property Map>
- Tags.
- volume
Name String - volume
Status String - volume
Type String - zone
Id String
Supporting Types
GetVolumesTag
GetVolumesVolume
- Baseline
Performances List<GetVolumes Volume Baseline Performance> - The baseline performance of the volume.
- Billing
Type int - Created
At string - Delete
With boolInstance - Description string
- Device
Name string - Expired
Time string - Extra
Performances List<GetVolumes Volume Extra Performance> - The extra performance of the volume.
- Id string
- Image
Id string - Instance
Id string - The Id of instance.
- Kind string
- The Kind of Volume.
- Pay
Type string - Renew
Type int - Size int
- Status string
-
List<Get
Volumes Volume Tag> - Tags.
- Total
Performances List<GetVolumes Volume Total Performance> - The baseline performance of the volume.
- Trade
Status int - Updated
At string - Volume
Id string - Volume
Name string - The name of Volume.
- Volume
Type string - The type of Volume.
- Zone
Id string - The Id of Zone.
- Baseline
Performances []GetVolumes Volume Baseline Performance - The baseline performance of the volume.
- Billing
Type int - Created
At string - Delete
With boolInstance - Description string
- Device
Name string - Expired
Time string - Extra
Performances []GetVolumes Volume Extra Performance - The extra performance of the volume.
- Id string
- Image
Id string - Instance
Id string - The Id of instance.
- Kind string
- The Kind of Volume.
- Pay
Type string - Renew
Type int - Size int
- Status string
-
[]Get
Volumes Volume Tag - Tags.
- Total
Performances []GetVolumes Volume Total Performance - The baseline performance of the volume.
- Trade
Status int - Updated
At string - Volume
Id string - Volume
Name string - The name of Volume.
- Volume
Type string - The type of Volume.
- Zone
Id string - The Id of Zone.
- baseline
Performances List<GetVolumes Volume Baseline Performance> - The baseline performance of the volume.
- billing
Type Integer - created
At String - delete
With BooleanInstance - description String
- device
Name String - expired
Time String - extra
Performances List<GetVolumes Volume Extra Performance> - The extra performance of the volume.
- id String
- image
Id String - instance
Id String - The Id of instance.
- kind String
- The Kind of Volume.
- pay
Type String - renew
Type Integer - size Integer
- status String
-
List<Get
Volumes Volume Tag> - Tags.
- total
Performances List<GetVolumes Volume Total Performance> - The baseline performance of the volume.
- trade
Status Integer - updated
At String - volume
Id String - volume
Name String - The name of Volume.
- volume
Type String - The type of Volume.
- zone
Id String - The Id of Zone.
- baseline
Performances GetVolumes Volume Baseline Performance[] - The baseline performance of the volume.
- billing
Type number - created
At string - delete
With booleanInstance - description string
- device
Name string - expired
Time string - extra
Performances GetVolumes Volume Extra Performance[] - The extra performance of the volume.
- id string
- image
Id string - instance
Id string - The Id of instance.
- kind string
- The Kind of Volume.
- pay
Type string - renew
Type number - size number
- status string
-
Get
Volumes Volume Tag[] - Tags.
- total
Performances GetVolumes Volume Total Performance[] - The baseline performance of the volume.
- trade
Status number - updated
At string - volume
Id string - volume
Name string - The name of Volume.
- volume
Type string - The type of Volume.
- zone
Id string - The Id of Zone.
- baseline_
performances Sequence[GetVolumes Volume Baseline Performance] - The baseline performance of the volume.
- billing_
type int - created_
at str - delete_
with_ boolinstance - description str
- device_
name str - expired_
time str - extra_
performances Sequence[GetVolumes Volume Extra Performance] - The extra performance of the volume.
- id str
- image_
id str - instance_
id str - The Id of instance.
- kind str
- The Kind of Volume.
- pay_
type str - renew_
type int - size int
- status str
-
Sequence[Get
Volumes Volume Tag] - Tags.
- total_
performances Sequence[GetVolumes Volume Total Performance] - The baseline performance of the volume.
- trade_
status int - updated_
at str - volume_
id str - volume_
name str - The name of Volume.
- volume_
type str - The type of Volume.
- zone_
id str - The Id of Zone.
- baseline
Performances List<Property Map> - The baseline performance of the volume.
- billing
Type Number - created
At String - delete
With BooleanInstance - description String
- device
Name String - expired
Time String - extra
Performances List<Property Map> - The extra performance of the volume.
- id String
- image
Id String - instance
Id String - The Id of instance.
- kind String
- The Kind of Volume.
- pay
Type String - renew
Type Number - size Number
- status String
- List<Property Map>
- Tags.
- total
Performances List<Property Map> - The baseline performance of the volume.
- trade
Status Number - updated
At String - volume
Id String - volume
Name String - The name of Volume.
- volume
Type String - The type of Volume.
- zone
Id String - The Id of Zone.
GetVolumesVolumeBaselinePerformance
- Iops int
- The total IOPS performance size for volume.
- Throughput int
- The total Throughput performance size for volume. Unit: MB/s.
- Iops int
- The total IOPS performance size for volume.
- Throughput int
- The total Throughput performance size for volume. Unit: MB/s.
- iops Integer
- The total IOPS performance size for volume.
- throughput Integer
- The total Throughput performance size for volume. Unit: MB/s.
- iops number
- The total IOPS performance size for volume.
- throughput number
- The total Throughput performance size for volume. Unit: MB/s.
- iops int
- The total IOPS performance size for volume.
- throughput int
- The total Throughput performance size for volume. Unit: MB/s.
- iops Number
- The total IOPS performance size for volume.
- throughput Number
- The total Throughput performance size for volume. Unit: MB/s.
GetVolumesVolumeExtraPerformance
- Extra
Performance stringType Id - The type of extra performance for volume.
- Iops int
- The total IOPS performance size for volume.
- Throughput int
- The total Throughput performance size for volume. Unit: MB/s.
- Extra
Performance stringType Id - The type of extra performance for volume.
- Iops int
- The total IOPS performance size for volume.
- Throughput int
- The total Throughput performance size for volume. Unit: MB/s.
- extra
Performance StringType Id - The type of extra performance for volume.
- iops Integer
- The total IOPS performance size for volume.
- throughput Integer
- The total Throughput performance size for volume. Unit: MB/s.
- extra
Performance stringType Id - The type of extra performance for volume.
- iops number
- The total IOPS performance size for volume.
- throughput number
- The total Throughput performance size for volume. Unit: MB/s.
- extra_
performance_ strtype_ id - The type of extra performance for volume.
- iops int
- The total IOPS performance size for volume.
- throughput int
- The total Throughput performance size for volume. Unit: MB/s.
- extra
Performance StringType Id - The type of extra performance for volume.
- iops Number
- The total IOPS performance size for volume.
- throughput Number
- The total Throughput performance size for volume. Unit: MB/s.
GetVolumesVolumeTag
GetVolumesVolumeTotalPerformance
- Iops int
- The total IOPS performance size for volume.
- Throughput int
- The total Throughput performance size for volume. Unit: MB/s.
- Iops int
- The total IOPS performance size for volume.
- Throughput int
- The total Throughput performance size for volume. Unit: MB/s.
- iops Integer
- The total IOPS performance size for volume.
- throughput Integer
- The total Throughput performance size for volume. Unit: MB/s.
- iops number
- The total IOPS performance size for volume.
- throughput number
- The total Throughput performance size for volume. Unit: MB/s.
- iops int
- The total IOPS performance size for volume.
- throughput int
- The total Throughput performance size for volume. Unit: MB/s.
- iops Number
- The total IOPS performance size for volume.
- throughput Number
- The total Throughput performance size for volume. Unit: MB/s.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengineTerraform Provider.
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
