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.
 - 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<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.
 - 
[]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<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.
 - 
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[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.
 
Volumes 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<Volumes
Volume>  - The collection of Volume query.
 - Ids List<string>
 - Instance
Id string - Kind string
 - Name
Regex string - Output
File string - 
List<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
[]Volumes
Volume  - The collection of Volume query.
 - Ids []string
 - Instance
Id string - Kind string
 - Name
Regex string - Output
File string - 
[]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<Volumes
Volume>  - The collection of Volume query.
 - ids List<String>
 - instance
Id String - kind String
 - name
Regex String - output
File String - 
List<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
Volumes
Volume[]  - The collection of Volume query.
 - ids string[]
 - instance
Id string - kind string
 - name
Regex string - output
File string - 
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[Volumes
Volume]  - The collection of Volume query.
 - ids Sequence[str]
 - instance_
id str - kind str
 - name_
regex str - output_
file str - 
Sequence[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
VolumesTag 
VolumesVolume 
- Baseline
Performances List<VolumesVolume 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<VolumesVolume 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<Volumes
Volume Tag>  - Tags.
 - Total
Performances List<VolumesVolume 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 []VolumesVolume 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 []VolumesVolume 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
 - 
[]Volumes
Volume Tag  - Tags.
 - Total
Performances []VolumesVolume 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<VolumesVolume 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<VolumesVolume 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<Volumes
Volume Tag>  - Tags.
 - total
Performances List<VolumesVolume 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 VolumesVolume 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 VolumesVolume 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
 - 
Volumes
Volume Tag[]  - Tags.
 - total
Performances VolumesVolume 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[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[Volumes
Volume 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.
 
- 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.
 
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   
- 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.
 
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.