Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine
volcengine.ebs.Volumes
Explore with Pulumi AI
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),
});
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])
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
})
}
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(),
    });
});
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());
    }
}
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>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]func Volumes(ctx *Context, args *VolumesArgs, opts ...InvokeOption) (*VolumesResult, error)
func VolumesOutput(ctx *Context, args *VolumesOutputArgs, opts ...InvokeOption) VolumesResultOutputpublic static class Volumes 
{
    public static Task<VolumesResult> InvokeAsync(VolumesArgs args, InvokeOptions? opts = null)
    public static Output<VolumesResult> Invoke(VolumesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<VolumesResult> volumes(VolumesArgs args, InvokeOptions options)
public static Output<VolumesResult> volumes(VolumesArgs args, InvokeOptions options)
fn::invoke:
  function: volcengine:ebs:Volumes
  arguments:
    # arguments dictionaryThe 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.
- 
List<VolumesTag> 
- Tags.
- VolumeName string
- The name of Volume.
- VolumeStatus string
- The Status of Volume, the value can be availableorattachingorattachedordetachingorcreatingordeletingorerrororextending.
- 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.
- 
[]VolumesTag 
- Tags.
- VolumeName string
- The name of Volume.
- VolumeStatus string
- The Status of Volume, the value can be availableorattachingorattachedordetachingorcreatingordeletingorerrororextending.
- 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.
- 
List<VolumesTag> 
- Tags.
- volumeName String
- The name of Volume.
- volumeStatus String
- The Status of Volume, the value can be availableorattachingorattachedordetachingorcreatingordeletingorerrororextending.
- 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.
- 
VolumesTag[] 
- Tags.
- volumeName string
- The name of Volume.
- volumeStatus string
- The Status of Volume, the value can be availableorattachingorattachedordetachingorcreatingordeletingorerrororextending.
- 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.
- 
Sequence[VolumesTag] 
- 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.
- 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.
- List<Property Map>
- Tags.
- volumeName String
- The name of Volume.
- volumeStatus String
- The Status of Volume, the value can be availableorattachingorattachedordetachingorcreatingordeletingorerrororextending.
- 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
- 
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
- 
[]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
- 
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
- 
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
- 
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
- List<Property Map>
- Tags.
- volumeName String
- volumeStatus String
- volumeType String
- zoneId String
Supporting Types
VolumesTag 
VolumesVolume 
- BaselinePerformances List<VolumesVolume Baseline Performance> 
- The baseline performance of the volume.
- BillingType int
- CreatedAt string
- DeleteWith boolInstance 
- Description string
- DeviceName string
- ExpiredTime string
- ExtraPerformances List<VolumesVolume Extra Performance> 
- The extra performance of the volume.
- Id string
- ImageId string
- InstanceId string
- The Id of instance.
- Kind string
- The Kind of Volume.
- PayType string
- RenewType int
- Size int
- Status string
- 
List<VolumesVolume Tag> 
- Tags.
- TotalPerformances List<VolumesVolume Total Performance> 
- The baseline performance of the volume.
- TradeStatus int
- UpdatedAt string
- VolumeId string
- VolumeName string
- The name of Volume.
- VolumeType string
- The type of Volume.
- ZoneId string
- The Id of Zone.
- BaselinePerformances []VolumesVolume Baseline Performance 
- The baseline performance of the volume.
- BillingType int
- CreatedAt string
- DeleteWith boolInstance 
- Description string
- DeviceName string
- ExpiredTime string
- ExtraPerformances []VolumesVolume Extra Performance 
- The extra performance of the volume.
- Id string
- ImageId string
- InstanceId string
- The Id of instance.
- Kind string
- The Kind of Volume.
- PayType string
- RenewType int
- Size int
- Status string
- 
[]VolumesVolume Tag 
- Tags.
- TotalPerformances []VolumesVolume Total Performance 
- The baseline performance of the volume.
- TradeStatus int
- UpdatedAt string
- VolumeId string
- VolumeName string
- The name of Volume.
- VolumeType string
- The type of Volume.
- ZoneId string
- The Id of Zone.
- baselinePerformances List<VolumesVolume Baseline Performance> 
- The baseline performance of the volume.
- billingType Integer
- createdAt String
- deleteWith BooleanInstance 
- description String
- deviceName String
- expiredTime String
- extraPerformances List<VolumesVolume Extra Performance> 
- The extra performance of the volume.
- id String
- imageId String
- instanceId String
- The Id of instance.
- kind String
- The Kind of Volume.
- payType String
- renewType Integer
- size Integer
- status String
- 
List<VolumesVolume Tag> 
- Tags.
- totalPerformances List<VolumesVolume Total Performance> 
- The baseline performance of the volume.
- tradeStatus Integer
- updatedAt String
- volumeId String
- volumeName String
- The name of Volume.
- volumeType String
- The type of Volume.
- zoneId String
- The Id of Zone.
- baselinePerformances VolumesVolume Baseline Performance[] 
- The baseline performance of the volume.
- billingType number
- createdAt string
- deleteWith booleanInstance 
- description string
- deviceName string
- expiredTime string
- extraPerformances VolumesVolume Extra Performance[] 
- The extra performance of the volume.
- id string
- imageId string
- instanceId string
- The Id of instance.
- kind string
- The Kind of Volume.
- payType string
- renewType number
- size number
- status string
- 
VolumesVolume Tag[] 
- Tags.
- totalPerformances VolumesVolume Total Performance[] 
- The baseline performance of the volume.
- tradeStatus number
- updatedAt string
- volumeId string
- volumeName string
- The name of Volume.
- volumeType string
- The type of Volume.
- zoneId string
- The Id of Zone.
- baseline_performances Sequence[VolumesVolume 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[VolumesVolume 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[VolumesVolume Tag] 
- Tags.
- total_performances Sequence[VolumesVolume 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.
- baselinePerformances List<Property Map>
- The baseline performance of the volume.
- billingType Number
- createdAt String
- deleteWith BooleanInstance 
- description String
- deviceName String
- expiredTime String
- extraPerformances List<Property Map>
- The extra performance of the volume.
- id String
- imageId String
- instanceId String
- The Id of instance.
- kind String
- The Kind of Volume.
- payType String
- renewType Number
- size Number
- status String
- List<Property Map>
- Tags.
- totalPerformances List<Property Map>
- The baseline performance of the volume.
- tradeStatus Number
- updatedAt String
- volumeId String
- volumeName String
- The name of Volume.
- volumeType String
- The type of Volume.
- zoneId String
- The Id of Zone.
VolumesVolumeBaselinePerformance   
- 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.
VolumesVolumeExtraPerformance   
- ExtraPerformance 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.
- ExtraPerformance 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.
- extraPerformance 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.
- extraPerformance 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.
- extraPerformance 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.
VolumesVolumeTag  
VolumesVolumeTotalPerformance   
- 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.