1. Packages
  2. Volcengine
  3. API Docs
  4. ebs
  5. Volumes
Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine

volcengine.ebs.Volumes

Explore with Pulumi AI

Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 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.Zones({});
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.VolumesOutput({
    ids: fooVolume.map(__item => __item.id),
});
Copy
import pulumi
import pulumi_volcengine as volcengine

foo_zones = volcengine.ecs.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.volumes_output(ids=[__item.id for __item in foo_volume])
Copy
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.Zones(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.VolumesOutput(ctx, ebs.VolumesOutputArgs{
Ids: %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ #-functions-volcengine:ebs-volumes:Volumes.pp:17,9-24),
}, nil);
return nil
})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;

return await Deployment.RunAsync(() => 
{
    var fooZones = Volcengine.Ecs.Zones.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(zonesResult => zonesResult.Zones[0]?.Id),
            VolumeChargeType = "PostPaid",
            ProjectName = "default",
        }));
    }
    var fooVolumes = Volcengine.Ebs.Volumes.Invoke(new()
    {
        Ids = fooVolume.Select(__item => __item.Id).ToList(),
    });

});
Copy
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.ZonesArgs;
import com.pulumi.volcengine.ebs.Volume;
import com.pulumi.volcengine.ebs.VolumeArgs;
import com.pulumi.volcengine.ebs.EbsFunctions;
import com.pulumi.volcengine.ebs_volumes.inputs.VolumesArgs;
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.Zones();

        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(zonesResult -> zonesResult.zones()[0].id()))
                .volumeChargeType("PostPaid")
                .projectName("default")
                .build());

        
}
        final var fooVolumes = EbsFunctions.Volumes(VolumesArgs.builder()
            .ids(fooVolume.stream().map(element -> element.id()).collect(toList()))
            .build());

    }
}
Copy
Coming soon!

Using Volumes

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 volumes(args: VolumesArgs, opts?: InvokeOptions): Promise<VolumesResult>
function volumesOutput(args: VolumesOutputArgs, opts?: InvokeOptions): Output<VolumesResult>
Copy
def 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[VolumesTag]] = 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) -> VolumesResult
def 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[VolumesTagArgs]]]] = 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[VolumesResult]
Copy
func Volumes(ctx *Context, args *VolumesArgs, opts ...InvokeOption) (*VolumesResult, error)
func VolumesOutput(ctx *Context, args *VolumesOutputArgs, opts ...InvokeOption) VolumesResultOutput
Copy
public static class Volumes 
{
    public static Task<VolumesResult> InvokeAsync(VolumesArgs args, InvokeOptions? opts = null)
    public static Output<VolumesResult> Invoke(VolumesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<VolumesResult> volumes(VolumesArgs args, InvokeOptions options)
public static Output<VolumesResult> volumes(VolumesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: volcengine:ebs:Volumes
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Ids List<string>
A list of Volume IDs.
InstanceId string
The Id of instance.
Kind string
The Kind of Volume.
NameRegex string
A Name Regex of Volume.
OutputFile string
File name where to save data source results.
Tags List<VolumesTag>
Tags.
VolumeName string
The name of Volume.
VolumeStatus string
The Status of Volume, the value can be available or attaching or attached or detaching or creating or deleting or error or extending.
VolumeType string
The type of Volume.
ZoneId string
The Id of Zone.
Ids []string
A list of Volume IDs.
InstanceId string
The Id of instance.
Kind string
The Kind of Volume.
NameRegex string
A Name Regex of Volume.
OutputFile string
File name where to save data source results.
Tags []VolumesTag
Tags.
VolumeName string
The name of Volume.
VolumeStatus string
The Status of Volume, the value can be available or attaching or attached or detaching or creating or deleting or error or extending.
VolumeType string
The type of Volume.
ZoneId string
The Id of Zone.
ids List<String>
A list of Volume IDs.
instanceId String
The Id of instance.
kind String
The Kind of Volume.
nameRegex String
A Name Regex of Volume.
outputFile String
File name where to save data source results.
tags List<VolumesTag>
Tags.
volumeName String
The name of Volume.
volumeStatus String
The Status of Volume, the value can be available or attaching or attached or detaching or creating or deleting or error or extending.
volumeType String
The type of Volume.
zoneId String
The Id of Zone.
ids string[]
A list of Volume IDs.
instanceId string
The Id of instance.
kind string
The Kind of Volume.
nameRegex string
A Name Regex of Volume.
outputFile string
File name where to save data source results.
tags VolumesTag[]
Tags.
volumeName string
The name of Volume.
volumeStatus string
The Status of Volume, the value can be available or attaching or attached or detaching or creating or deleting or error or extending.
volumeType string
The type of Volume.
zoneId 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.
tags Sequence[VolumesTag]
Tags.
volume_name str
The name of Volume.
volume_status str
The Status of Volume, the value can be available or attaching or attached or detaching or creating or deleting or error or extending.
volume_type str
The type of Volume.
zone_id str
The Id of Zone.
ids List<String>
A list of Volume IDs.
instanceId String
The Id of instance.
kind String
The Kind of Volume.
nameRegex String
A Name Regex of Volume.
outputFile String
File name where to save data source results.
tags List<Property Map>
Tags.
volumeName String
The name of Volume.
volumeStatus String
The Status of Volume, the value can be available or attaching or attached or detaching or creating or deleting or error or extending.
volumeType String
The type of Volume.
zoneId String
The Id of Zone.

Volumes Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
TotalCount int
The total count of Volume query.
Volumes List<VolumesVolume>
The collection of Volume query.
Ids List<string>
InstanceId string
Kind string
NameRegex string
OutputFile string
Tags List<VolumesTag>
Tags.
VolumeName string
VolumeStatus string
VolumeType string
ZoneId string
Id string
The provider-assigned unique ID for this managed resource.
TotalCount int
The total count of Volume query.
Volumes []VolumesVolume
The collection of Volume query.
Ids []string
InstanceId string
Kind string
NameRegex string
OutputFile string
Tags []VolumesTag
Tags.
VolumeName string
VolumeStatus string
VolumeType string
ZoneId string
id String
The provider-assigned unique ID for this managed resource.
totalCount Integer
The total count of Volume query.
volumes List<VolumesVolume>
The collection of Volume query.
ids List<String>
instanceId String
kind String
nameRegex String
outputFile String
tags List<VolumesTag>
Tags.
volumeName String
volumeStatus String
volumeType String
zoneId String
id string
The provider-assigned unique ID for this managed resource.
totalCount number
The total count of Volume query.
volumes VolumesVolume[]
The collection of Volume query.
ids string[]
instanceId string
kind string
nameRegex string
outputFile string
tags VolumesTag[]
Tags.
volumeName string
volumeStatus string
volumeType string
zoneId string
id str
The provider-assigned unique ID for this managed resource.
total_count int
The total count of Volume query.
volumes Sequence[VolumesVolume]
The collection of Volume query.
ids Sequence[str]
instance_id str
kind str
name_regex str
output_file str
tags Sequence[VolumesTag]
Tags.
volume_name str
volume_status str
volume_type str
zone_id str
id String
The provider-assigned unique ID for this managed resource.
totalCount Number
The total count of Volume query.
volumes List<Property Map>
The collection of Volume query.
ids List<String>
instanceId String
kind String
nameRegex String
outputFile String
tags List<Property Map>
Tags.
volumeName String
volumeStatus String
volumeType String
zoneId String

Supporting Types

VolumesTag

Key This property is required. string
The Key of Tags.
Value This property is required. string
The Value of Tags.
Key This property is required. string
The Key of Tags.
Value This property is required. string
The Value of Tags.
key This property is required. String
The Key of Tags.
value This property is required. String
The Value of Tags.
key This property is required. string
The Key of Tags.
value This property is required. string
The Value of Tags.
key This property is required. str
The Key of Tags.
value This property is required. str
The Value of Tags.
key This property is required. String
The Key of Tags.
value This property is required. String
The Value of Tags.

VolumesVolume

BaselinePerformances This property is required. List<VolumesVolumeBaselinePerformance>
The baseline performance of the volume.
BillingType This property is required. int
CreatedAt This property is required. string
DeleteWithInstance This property is required. bool
Description This property is required. string
DeviceName This property is required. string
ExpiredTime This property is required. string
ExtraPerformances This property is required. List<VolumesVolumeExtraPerformance>
The extra performance of the volume.
Id This property is required. string
ImageId This property is required. string
InstanceId This property is required. string
The Id of instance.
Kind This property is required. string
The Kind of Volume.
PayType This property is required. string
RenewType This property is required. int
Size This property is required. int
Status This property is required. string
Tags This property is required. List<VolumesVolumeTag>
Tags.
TotalPerformances This property is required. List<VolumesVolumeTotalPerformance>
The baseline performance of the volume.
TradeStatus This property is required. int
UpdatedAt This property is required. string
VolumeId This property is required. string
VolumeName This property is required. string
The name of Volume.
VolumeType This property is required. string
The type of Volume.
ZoneId This property is required. string
The Id of Zone.
BaselinePerformances This property is required. []VolumesVolumeBaselinePerformance
The baseline performance of the volume.
BillingType This property is required. int
CreatedAt This property is required. string
DeleteWithInstance This property is required. bool
Description This property is required. string
DeviceName This property is required. string
ExpiredTime This property is required. string
ExtraPerformances This property is required. []VolumesVolumeExtraPerformance
The extra performance of the volume.
Id This property is required. string
ImageId This property is required. string
InstanceId This property is required. string
The Id of instance.
Kind This property is required. string
The Kind of Volume.
PayType This property is required. string
RenewType This property is required. int
Size This property is required. int
Status This property is required. string
Tags This property is required. []VolumesVolumeTag
Tags.
TotalPerformances This property is required. []VolumesVolumeTotalPerformance
The baseline performance of the volume.
TradeStatus This property is required. int
UpdatedAt This property is required. string
VolumeId This property is required. string
VolumeName This property is required. string
The name of Volume.
VolumeType This property is required. string
The type of Volume.
ZoneId This property is required. string
The Id of Zone.
baselinePerformances This property is required. List<VolumesVolumeBaselinePerformance>
The baseline performance of the volume.
billingType This property is required. Integer
createdAt This property is required. String
deleteWithInstance This property is required. Boolean
description This property is required. String
deviceName This property is required. String
expiredTime This property is required. String
extraPerformances This property is required. List<VolumesVolumeExtraPerformance>
The extra performance of the volume.
id This property is required. String
imageId This property is required. String
instanceId This property is required. String
The Id of instance.
kind This property is required. String
The Kind of Volume.
payType This property is required. String
renewType This property is required. Integer
size This property is required. Integer
status This property is required. String
tags This property is required. List<VolumesVolumeTag>
Tags.
totalPerformances This property is required. List<VolumesVolumeTotalPerformance>
The baseline performance of the volume.
tradeStatus This property is required. Integer
updatedAt This property is required. String
volumeId This property is required. String
volumeName This property is required. String
The name of Volume.
volumeType This property is required. String
The type of Volume.
zoneId This property is required. String
The Id of Zone.
baselinePerformances This property is required. VolumesVolumeBaselinePerformance[]
The baseline performance of the volume.
billingType This property is required. number
createdAt This property is required. string
deleteWithInstance This property is required. boolean
description This property is required. string
deviceName This property is required. string
expiredTime This property is required. string
extraPerformances This property is required. VolumesVolumeExtraPerformance[]
The extra performance of the volume.
id This property is required. string
imageId This property is required. string
instanceId This property is required. string
The Id of instance.
kind This property is required. string
The Kind of Volume.
payType This property is required. string
renewType This property is required. number
size This property is required. number
status This property is required. string
tags This property is required. VolumesVolumeTag[]
Tags.
totalPerformances This property is required. VolumesVolumeTotalPerformance[]
The baseline performance of the volume.
tradeStatus This property is required. number
updatedAt This property is required. string
volumeId This property is required. string
volumeName This property is required. string
The name of Volume.
volumeType This property is required. string
The type of Volume.
zoneId This property is required. string
The Id of Zone.
baseline_performances This property is required. Sequence[VolumesVolumeBaselinePerformance]
The baseline performance of the volume.
billing_type This property is required. int
created_at This property is required. str
delete_with_instance This property is required. bool
description This property is required. str
device_name This property is required. str
expired_time This property is required. str
extra_performances This property is required. Sequence[VolumesVolumeExtraPerformance]
The extra performance of the volume.
id This property is required. str
image_id This property is required. str
instance_id This property is required. str
The Id of instance.
kind This property is required. str
The Kind of Volume.
pay_type This property is required. str
renew_type This property is required. int
size This property is required. int
status This property is required. str
tags This property is required. Sequence[VolumesVolumeTag]
Tags.
total_performances This property is required. Sequence[VolumesVolumeTotalPerformance]
The baseline performance of the volume.
trade_status This property is required. int
updated_at This property is required. str
volume_id This property is required. str
volume_name This property is required. str
The name of Volume.
volume_type This property is required. str
The type of Volume.
zone_id This property is required. str
The Id of Zone.
baselinePerformances This property is required. List<Property Map>
The baseline performance of the volume.
billingType This property is required. Number
createdAt This property is required. String
deleteWithInstance This property is required. Boolean
description This property is required. String
deviceName This property is required. String
expiredTime This property is required. String
extraPerformances This property is required. List<Property Map>
The extra performance of the volume.
id This property is required. String
imageId This property is required. String
instanceId This property is required. String
The Id of instance.
kind This property is required. String
The Kind of Volume.
payType This property is required. String
renewType This property is required. Number
size This property is required. Number
status This property is required. String
tags This property is required. List<Property Map>
Tags.
totalPerformances This property is required. List<Property Map>
The baseline performance of the volume.
tradeStatus This property is required. Number
updatedAt This property is required. String
volumeId This property is required. String
volumeName This property is required. String
The name of Volume.
volumeType This property is required. String
The type of Volume.
zoneId This property is required. String
The Id of Zone.

VolumesVolumeBaselinePerformance

Iops This property is required. int
The total IOPS performance size for volume.
Throughput This property is required. int
The total Throughput performance size for volume. Unit: MB/s.
Iops This property is required. int
The total IOPS performance size for volume.
Throughput This property is required. int
The total Throughput performance size for volume. Unit: MB/s.
iops This property is required. Integer
The total IOPS performance size for volume.
throughput This property is required. Integer
The total Throughput performance size for volume. Unit: MB/s.
iops This property is required. number
The total IOPS performance size for volume.
throughput This property is required. number
The total Throughput performance size for volume. Unit: MB/s.
iops This property is required. int
The total IOPS performance size for volume.
throughput This property is required. int
The total Throughput performance size for volume. Unit: MB/s.
iops This property is required. Number
The total IOPS performance size for volume.
throughput This property is required. Number
The total Throughput performance size for volume. Unit: MB/s.

VolumesVolumeExtraPerformance

ExtraPerformanceTypeId This property is required. string
The type of extra performance for volume.
Iops This property is required. int
The total IOPS performance size for volume.
Throughput This property is required. int
The total Throughput performance size for volume. Unit: MB/s.
ExtraPerformanceTypeId This property is required. string
The type of extra performance for volume.
Iops This property is required. int
The total IOPS performance size for volume.
Throughput This property is required. int
The total Throughput performance size for volume. Unit: MB/s.
extraPerformanceTypeId This property is required. String
The type of extra performance for volume.
iops This property is required. Integer
The total IOPS performance size for volume.
throughput This property is required. Integer
The total Throughput performance size for volume. Unit: MB/s.
extraPerformanceTypeId This property is required. string
The type of extra performance for volume.
iops This property is required. number
The total IOPS performance size for volume.
throughput This property is required. number
The total Throughput performance size for volume. Unit: MB/s.
extra_performance_type_id This property is required. str
The type of extra performance for volume.
iops This property is required. int
The total IOPS performance size for volume.
throughput This property is required. int
The total Throughput performance size for volume. Unit: MB/s.
extraPerformanceTypeId This property is required. String
The type of extra performance for volume.
iops This property is required. Number
The total IOPS performance size for volume.
throughput This property is required. Number
The total Throughput performance size for volume. Unit: MB/s.

VolumesVolumeTag

Key This property is required. string
The Key of Tags.
Value This property is required. string
The Value of Tags.
Key This property is required. string
The Key of Tags.
Value This property is required. string
The Value of Tags.
key This property is required. String
The Key of Tags.
value This property is required. String
The Value of Tags.
key This property is required. string
The Key of Tags.
value This property is required. string
The Value of Tags.
key This property is required. str
The Key of Tags.
value This property is required. str
The Value of Tags.
key This property is required. String
The Key of Tags.
value This property is required. String
The Value of Tags.

VolumesVolumeTotalPerformance

Iops This property is required. int
The total IOPS performance size for volume.
Throughput This property is required. int
The total Throughput performance size for volume. Unit: MB/s.
Iops This property is required. int
The total IOPS performance size for volume.
Throughput This property is required. int
The total Throughput performance size for volume. Unit: MB/s.
iops This property is required. Integer
The total IOPS performance size for volume.
throughput This property is required. Integer
The total Throughput performance size for volume. Unit: MB/s.
iops This property is required. number
The total IOPS performance size for volume.
throughput This property is required. number
The total Throughput performance size for volume. Unit: MB/s.
iops This property is required. int
The total IOPS performance size for volume.
throughput This property is required. int
The total Throughput performance size for volume. Unit: MB/s.
iops This property is required. Number
The total IOPS performance size for volume.
throughput This property is required. 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 volcengine Terraform Provider.
Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine