1. Packages
  2. Volcengine
  3. API Docs
  4. ebs
  5. Volume
Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine

volcengine.ebs.Volume

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine

    Import

    Volume can be imported using the id, e.g.

     $ pulumi import volcengine:ebs/volume:Volume default vol-mizl7m1kqccg5smt1bdpijuj
    

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var fooZones = Volcengine.Ecs.Zones.Invoke();
    
        var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
        {
            VpcName = "acc-test-vpc",
            CidrBlock = "172.16.0.0/16",
        });
    
        var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
        {
            SubnetName = "acc-test-subnet",
            CidrBlock = "172.16.0.0/24",
            ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
            VpcId = fooVpc.Id,
        });
    
        var fooSecurityGroup = new Volcengine.Vpc.SecurityGroup("fooSecurityGroup", new()
        {
            SecurityGroupName = "acc-test-security-group",
            VpcId = fooVpc.Id,
        });
    
        var fooImages = Volcengine.Ecs.Images.Invoke(new()
        {
            OsType = "Linux",
            Visibility = "public",
            InstanceTypeId = "ecs.g1.large",
        });
    
        var fooInstance = new Volcengine.Ecs.Instance("fooInstance", new()
        {
            InstanceName = "acc-test-ecs",
            Description = "acc-test",
            HostName = "tf-acc-test",
            ImageId = fooImages.Apply(imagesResult => imagesResult.Images[0]?.ImageId),
            InstanceType = "ecs.g1.large",
            Password = "93f0cb0614Aab12",
            InstanceChargeType = "PrePaid",
            Period = 1,
            SystemVolumeType = "ESSD_PL0",
            SystemVolumeSize = 40,
            SubnetId = fooSubnet.Id,
            SecurityGroupIds = new[]
            {
                fooSecurityGroup.Id,
            },
            ProjectName = "default",
            Tags = new[]
            {
                new Volcengine.Ecs.Inputs.InstanceTagArgs
                {
                    Key = "k1",
                    Value = "v1",
                },
            },
        });
    
        var preVolume = new Volcengine.Ebs.Volume("preVolume", new()
        {
            VolumeName = "acc-test-volume",
            VolumeType = "ESSD_PL0",
            Description = "acc-test",
            Kind = "data",
            Size = 40,
            ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
            VolumeChargeType = "PrePaid",
            InstanceId = fooInstance.Id,
            ProjectName = "default",
            DeleteWithInstance = true,
            Tags = new[]
            {
                new Volcengine.Ebs.Inputs.VolumeTagArgs
                {
                    Key = "k1",
                    Value = "v1",
                },
            },
        });
    
        var postVolume = new Volcengine.Ebs.Volume("postVolume", new()
        {
            VolumeName = "acc-test-volume",
            VolumeType = "ESSD_PL0",
            Description = "acc-test",
            Kind = "data",
            Size = 40,
            ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
            VolumeChargeType = "PostPaid",
            ProjectName = "default",
            Tags = new[]
            {
                new Volcengine.Ebs.Inputs.VolumeTagArgs
                {
                    Key = "k1",
                    Value = "v1",
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"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"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		fooZones, err := ecs.Zones(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
    			VpcName:   pulumi.String("acc-test-vpc"),
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
    			SubnetName: pulumi.String("acc-test-subnet"),
    			CidrBlock:  pulumi.String("172.16.0.0/24"),
    			ZoneId:     *pulumi.String(fooZones.Zones[0].Id),
    			VpcId:      fooVpc.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		fooSecurityGroup, err := vpc.NewSecurityGroup(ctx, "fooSecurityGroup", &vpc.SecurityGroupArgs{
    			SecurityGroupName: pulumi.String("acc-test-security-group"),
    			VpcId:             fooVpc.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		fooImages, err := ecs.Images(ctx, &ecs.ImagesArgs{
    			OsType:         pulumi.StringRef("Linux"),
    			Visibility:     pulumi.StringRef("public"),
    			InstanceTypeId: pulumi.StringRef("ecs.g1.large"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		fooInstance, err := ecs.NewInstance(ctx, "fooInstance", &ecs.InstanceArgs{
    			InstanceName:       pulumi.String("acc-test-ecs"),
    			Description:        pulumi.String("acc-test"),
    			HostName:           pulumi.String("tf-acc-test"),
    			ImageId:            *pulumi.String(fooImages.Images[0].ImageId),
    			InstanceType:       pulumi.String("ecs.g1.large"),
    			Password:           pulumi.String("93f0cb0614Aab12"),
    			InstanceChargeType: pulumi.String("PrePaid"),
    			Period:             pulumi.Int(1),
    			SystemVolumeType:   pulumi.String("ESSD_PL0"),
    			SystemVolumeSize:   pulumi.Int(40),
    			SubnetId:           fooSubnet.ID(),
    			SecurityGroupIds: pulumi.StringArray{
    				fooSecurityGroup.ID(),
    			},
    			ProjectName: pulumi.String("default"),
    			Tags: ecs.InstanceTagArray{
    				&ecs.InstanceTagArgs{
    					Key:   pulumi.String("k1"),
    					Value: pulumi.String("v1"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ebs.NewVolume(ctx, "preVolume", &ebs.VolumeArgs{
    			VolumeName:         pulumi.String("acc-test-volume"),
    			VolumeType:         pulumi.String("ESSD_PL0"),
    			Description:        pulumi.String("acc-test"),
    			Kind:               pulumi.String("data"),
    			Size:               pulumi.Int(40),
    			ZoneId:             *pulumi.String(fooZones.Zones[0].Id),
    			VolumeChargeType:   pulumi.String("PrePaid"),
    			InstanceId:         fooInstance.ID(),
    			ProjectName:        pulumi.String("default"),
    			DeleteWithInstance: pulumi.Bool(true),
    			Tags: ebs.VolumeTagArray{
    				&ebs.VolumeTagArgs{
    					Key:   pulumi.String("k1"),
    					Value: pulumi.String("v1"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ebs.NewVolume(ctx, "postVolume", &ebs.VolumeArgs{
    			VolumeName:       pulumi.String("acc-test-volume"),
    			VolumeType:       pulumi.String("ESSD_PL0"),
    			Description:      pulumi.String("acc-test"),
    			Kind:             pulumi.String("data"),
    			Size:             pulumi.Int(40),
    			ZoneId:           *pulumi.String(fooZones.Zones[0].Id),
    			VolumeChargeType: pulumi.String("PostPaid"),
    			ProjectName:      pulumi.String("default"),
    			Tags: ebs.VolumeTagArray{
    				&ebs.VolumeTagArgs{
    					Key:   pulumi.String("k1"),
    					Value: pulumi.String("v1"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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.vpc.Vpc;
    import com.pulumi.volcengine.vpc.VpcArgs;
    import com.pulumi.volcengine.vpc.Subnet;
    import com.pulumi.volcengine.vpc.SubnetArgs;
    import com.pulumi.volcengine.vpc.SecurityGroup;
    import com.pulumi.volcengine.vpc.SecurityGroupArgs;
    import com.pulumi.volcengine.ecs.inputs.ImagesArgs;
    import com.pulumi.volcengine.ecs.Instance;
    import com.pulumi.volcengine.ecs.InstanceArgs;
    import com.pulumi.volcengine.ecs.inputs.InstanceTagArgs;
    import com.pulumi.volcengine.ebs.Volume;
    import com.pulumi.volcengine.ebs.VolumeArgs;
    import com.pulumi.volcengine.ebs.inputs.VolumeTagArgs;
    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();
    
            var fooVpc = new Vpc("fooVpc", VpcArgs.builder()        
                .vpcName("acc-test-vpc")
                .cidrBlock("172.16.0.0/16")
                .build());
    
            var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()        
                .subnetName("acc-test-subnet")
                .cidrBlock("172.16.0.0/24")
                .zoneId(fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()))
                .vpcId(fooVpc.id())
                .build());
    
            var fooSecurityGroup = new SecurityGroup("fooSecurityGroup", SecurityGroupArgs.builder()        
                .securityGroupName("acc-test-security-group")
                .vpcId(fooVpc.id())
                .build());
    
            final var fooImages = EcsFunctions.Images(ImagesArgs.builder()
                .osType("Linux")
                .visibility("public")
                .instanceTypeId("ecs.g1.large")
                .build());
    
            var fooInstance = new Instance("fooInstance", InstanceArgs.builder()        
                .instanceName("acc-test-ecs")
                .description("acc-test")
                .hostName("tf-acc-test")
                .imageId(fooImages.applyValue(imagesResult -> imagesResult.images()[0].imageId()))
                .instanceType("ecs.g1.large")
                .password("93f0cb0614Aab12")
                .instanceChargeType("PrePaid")
                .period(1)
                .systemVolumeType("ESSD_PL0")
                .systemVolumeSize(40)
                .subnetId(fooSubnet.id())
                .securityGroupIds(fooSecurityGroup.id())
                .projectName("default")
                .tags(InstanceTagArgs.builder()
                    .key("k1")
                    .value("v1")
                    .build())
                .build());
    
            var preVolume = new Volume("preVolume", VolumeArgs.builder()        
                .volumeName("acc-test-volume")
                .volumeType("ESSD_PL0")
                .description("acc-test")
                .kind("data")
                .size(40)
                .zoneId(fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()))
                .volumeChargeType("PrePaid")
                .instanceId(fooInstance.id())
                .projectName("default")
                .deleteWithInstance(true)
                .tags(VolumeTagArgs.builder()
                    .key("k1")
                    .value("v1")
                    .build())
                .build());
    
            var postVolume = new Volume("postVolume", VolumeArgs.builder()        
                .volumeName("acc-test-volume")
                .volumeType("ESSD_PL0")
                .description("acc-test")
                .kind("data")
                .size(40)
                .zoneId(fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()))
                .volumeChargeType("PostPaid")
                .projectName("default")
                .tags(VolumeTagArgs.builder()
                    .key("k1")
                    .value("v1")
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo_zones = volcengine.ecs.zones()
    foo_vpc = volcengine.vpc.Vpc("fooVpc",
        vpc_name="acc-test-vpc",
        cidr_block="172.16.0.0/16")
    foo_subnet = volcengine.vpc.Subnet("fooSubnet",
        subnet_name="acc-test-subnet",
        cidr_block="172.16.0.0/24",
        zone_id=foo_zones.zones[0].id,
        vpc_id=foo_vpc.id)
    foo_security_group = volcengine.vpc.SecurityGroup("fooSecurityGroup",
        security_group_name="acc-test-security-group",
        vpc_id=foo_vpc.id)
    foo_images = volcengine.ecs.images(os_type="Linux",
        visibility="public",
        instance_type_id="ecs.g1.large")
    foo_instance = volcengine.ecs.Instance("fooInstance",
        instance_name="acc-test-ecs",
        description="acc-test",
        host_name="tf-acc-test",
        image_id=foo_images.images[0].image_id,
        instance_type="ecs.g1.large",
        password="93f0cb0614Aab12",
        instance_charge_type="PrePaid",
        period=1,
        system_volume_type="ESSD_PL0",
        system_volume_size=40,
        subnet_id=foo_subnet.id,
        security_group_ids=[foo_security_group.id],
        project_name="default",
        tags=[volcengine.ecs.InstanceTagArgs(
            key="k1",
            value="v1",
        )])
    pre_volume = volcengine.ebs.Volume("preVolume",
        volume_name="acc-test-volume",
        volume_type="ESSD_PL0",
        description="acc-test",
        kind="data",
        size=40,
        zone_id=foo_zones.zones[0].id,
        volume_charge_type="PrePaid",
        instance_id=foo_instance.id,
        project_name="default",
        delete_with_instance=True,
        tags=[volcengine.ebs.VolumeTagArgs(
            key="k1",
            value="v1",
        )])
    post_volume = volcengine.ebs.Volume("postVolume",
        volume_name="acc-test-volume",
        volume_type="ESSD_PL0",
        description="acc-test",
        kind="data",
        size=40,
        zone_id=foo_zones.zones[0].id,
        volume_charge_type="PostPaid",
        project_name="default",
        tags=[volcengine.ebs.VolumeTagArgs(
            key="k1",
            value="v1",
        )])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    import * as volcengine from "@volcengine/pulumi";
    
    const fooZones = volcengine.ecs.Zones({});
    const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
        vpcName: "acc-test-vpc",
        cidrBlock: "172.16.0.0/16",
    });
    const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
        subnetName: "acc-test-subnet",
        cidrBlock: "172.16.0.0/24",
        zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
        vpcId: fooVpc.id,
    });
    const fooSecurityGroup = new volcengine.vpc.SecurityGroup("fooSecurityGroup", {
        securityGroupName: "acc-test-security-group",
        vpcId: fooVpc.id,
    });
    const fooImages = volcengine.ecs.Images({
        osType: "Linux",
        visibility: "public",
        instanceTypeId: "ecs.g1.large",
    });
    const fooInstance = new volcengine.ecs.Instance("fooInstance", {
        instanceName: "acc-test-ecs",
        description: "acc-test",
        hostName: "tf-acc-test",
        imageId: fooImages.then(fooImages => fooImages.images?.[0]?.imageId),
        instanceType: "ecs.g1.large",
        password: "93f0cb0614Aab12",
        instanceChargeType: "PrePaid",
        period: 1,
        systemVolumeType: "ESSD_PL0",
        systemVolumeSize: 40,
        subnetId: fooSubnet.id,
        securityGroupIds: [fooSecurityGroup.id],
        projectName: "default",
        tags: [{
            key: "k1",
            value: "v1",
        }],
    });
    const preVolume = new volcengine.ebs.Volume("preVolume", {
        volumeName: "acc-test-volume",
        volumeType: "ESSD_PL0",
        description: "acc-test",
        kind: "data",
        size: 40,
        zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
        volumeChargeType: "PrePaid",
        instanceId: fooInstance.id,
        projectName: "default",
        deleteWithInstance: true,
        tags: [{
            key: "k1",
            value: "v1",
        }],
    });
    const postVolume = new volcengine.ebs.Volume("postVolume", {
        volumeName: "acc-test-volume",
        volumeType: "ESSD_PL0",
        description: "acc-test",
        kind: "data",
        size: 40,
        zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
        volumeChargeType: "PostPaid",
        projectName: "default",
        tags: [{
            key: "k1",
            value: "v1",
        }],
    });
    
    resources:
      fooVpc:
        type: volcengine:vpc:Vpc
        properties:
          vpcName: acc-test-vpc
          cidrBlock: 172.16.0.0/16
      fooSubnet:
        type: volcengine:vpc:Subnet
        properties:
          subnetName: acc-test-subnet
          cidrBlock: 172.16.0.0/24
          zoneId: ${fooZones.zones[0].id}
          vpcId: ${fooVpc.id}
      fooSecurityGroup:
        type: volcengine:vpc:SecurityGroup
        properties:
          securityGroupName: acc-test-security-group
          vpcId: ${fooVpc.id}
      fooInstance:
        type: volcengine:ecs:Instance
        properties:
          instanceName: acc-test-ecs
          description: acc-test
          hostName: tf-acc-test
          imageId: ${fooImages.images[0].imageId}
          instanceType: ecs.g1.large
          password: 93f0cb0614Aab12
          instanceChargeType: PrePaid
          period: 1
          systemVolumeType: ESSD_PL0
          systemVolumeSize: 40
          subnetId: ${fooSubnet.id}
          securityGroupIds:
            - ${fooSecurityGroup.id}
          projectName: default
          tags:
            - key: k1
              value: v1
      preVolume:
        type: volcengine:ebs:Volume
        properties:
          volumeName: acc-test-volume
          volumeType: ESSD_PL0
          description: acc-test
          kind: data
          size: 40
          zoneId: ${fooZones.zones[0].id}
          volumeChargeType: PrePaid
          instanceId: ${fooInstance.id}
          projectName: default
          deleteWithInstance: true
          tags:
            - key: k1
              value: v1
      postVolume:
        type: volcengine:ebs:Volume
        properties:
          volumeName: acc-test-volume
          volumeType: ESSD_PL0
          description: acc-test
          kind: data
          size: 40
          zoneId: ${fooZones.zones[0].id}
          volumeChargeType: PostPaid
          projectName: default
          tags:
            - key: k1
              value: v1
    variables:
      fooZones:
        fn::invoke:
          Function: volcengine:ecs:Zones
          Arguments: {}
      fooImages:
        fn::invoke:
          Function: volcengine:ecs:Images
          Arguments:
            osType: Linux
            visibility: public
            instanceTypeId: ecs.g1.large
    

    Create Volume Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Volume(name: string, args: VolumeArgs, opts?: CustomResourceOptions);
    @overload
    def Volume(resource_name: str,
               args: VolumeArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Volume(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               kind: Optional[str] = None,
               size: Optional[int] = None,
               volume_name: Optional[str] = None,
               volume_type: Optional[str] = None,
               zone_id: Optional[str] = None,
               delete_with_instance: Optional[bool] = None,
               description: Optional[str] = None,
               instance_id: Optional[str] = None,
               project_name: Optional[str] = None,
               tags: Optional[Sequence[VolumeTagArgs]] = None,
               volume_charge_type: Optional[str] = None)
    func NewVolume(ctx *Context, name string, args VolumeArgs, opts ...ResourceOption) (*Volume, error)
    public Volume(string name, VolumeArgs args, CustomResourceOptions? opts = null)
    public Volume(String name, VolumeArgs args)
    public Volume(String name, VolumeArgs args, CustomResourceOptions options)
    
    type: volcengine:ebs:Volume
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args VolumeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args VolumeArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args VolumeArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VolumeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VolumeArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var volumeResource = new Volcengine.Ebs.Volume("volumeResource", new()
    {
        Kind = "string",
        Size = 0,
        VolumeName = "string",
        VolumeType = "string",
        ZoneId = "string",
        DeleteWithInstance = false,
        Description = "string",
        InstanceId = "string",
        ProjectName = "string",
        Tags = new[]
        {
            new Volcengine.Ebs.Inputs.VolumeTagArgs
            {
                Key = "string",
                Value = "string",
            },
        },
        VolumeChargeType = "string",
    });
    
    example, err := ebs.NewVolume(ctx, "volumeResource", &ebs.VolumeArgs{
    	Kind:               pulumi.String("string"),
    	Size:               pulumi.Int(0),
    	VolumeName:         pulumi.String("string"),
    	VolumeType:         pulumi.String("string"),
    	ZoneId:             pulumi.String("string"),
    	DeleteWithInstance: pulumi.Bool(false),
    	Description:        pulumi.String("string"),
    	InstanceId:         pulumi.String("string"),
    	ProjectName:        pulumi.String("string"),
    	Tags: ebs.VolumeTagArray{
    		&ebs.VolumeTagArgs{
    			Key:   pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    	VolumeChargeType: pulumi.String("string"),
    })
    
    var volumeResource = new Volume("volumeResource", VolumeArgs.builder()
        .kind("string")
        .size(0)
        .volumeName("string")
        .volumeType("string")
        .zoneId("string")
        .deleteWithInstance(false)
        .description("string")
        .instanceId("string")
        .projectName("string")
        .tags(VolumeTagArgs.builder()
            .key("string")
            .value("string")
            .build())
        .volumeChargeType("string")
        .build());
    
    volume_resource = volcengine.ebs.Volume("volumeResource",
        kind="string",
        size=0,
        volume_name="string",
        volume_type="string",
        zone_id="string",
        delete_with_instance=False,
        description="string",
        instance_id="string",
        project_name="string",
        tags=[{
            "key": "string",
            "value": "string",
        }],
        volume_charge_type="string")
    
    const volumeResource = new volcengine.ebs.Volume("volumeResource", {
        kind: "string",
        size: 0,
        volumeName: "string",
        volumeType: "string",
        zoneId: "string",
        deleteWithInstance: false,
        description: "string",
        instanceId: "string",
        projectName: "string",
        tags: [{
            key: "string",
            value: "string",
        }],
        volumeChargeType: "string",
    });
    
    type: volcengine:ebs:Volume
    properties:
        deleteWithInstance: false
        description: string
        instanceId: string
        kind: string
        projectName: string
        size: 0
        tags:
            - key: string
              value: string
        volumeChargeType: string
        volumeName: string
        volumeType: string
        zoneId: string
    

    Volume Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Volume resource accepts the following input properties:

    Kind string
    The kind of Volume, the value is data.
    Size int
    The size of Volume.
    VolumeName string
    The name of Volume.
    VolumeType string
    The type of Volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    ZoneId string
    The id of the Zone.
    DeleteWithInstance bool
    Delete Volume with Attached Instance.
    Description string
    The description of the Volume.
    InstanceId string
    The ID of the instance to which the created volume is automatically attached. Please note this field needs to ask the system administrator to apply for a whitelist. When use this field to attach ecs instance, the attached volume cannot be deleted by terraform, please use terraform state rm volcengine_volume.resource_name command to remove it from terraform state file and management.
    ProjectName string
    The ProjectName of the Volume.
    Tags List<VolumeTag>
    Tags.
    VolumeChargeType string
    The charge type of the Volume, the value is PostPaid or PrePaid. The PrePaid volume cannot be detached. Please note that PrePaid type needs to ask the system administrator to apply for a whitelist.
    Kind string
    The kind of Volume, the value is data.
    Size int
    The size of Volume.
    VolumeName string
    The name of Volume.
    VolumeType string
    The type of Volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    ZoneId string
    The id of the Zone.
    DeleteWithInstance bool
    Delete Volume with Attached Instance.
    Description string
    The description of the Volume.
    InstanceId string
    The ID of the instance to which the created volume is automatically attached. Please note this field needs to ask the system administrator to apply for a whitelist. When use this field to attach ecs instance, the attached volume cannot be deleted by terraform, please use terraform state rm volcengine_volume.resource_name command to remove it from terraform state file and management.
    ProjectName string
    The ProjectName of the Volume.
    Tags []VolumeTagArgs
    Tags.
    VolumeChargeType string
    The charge type of the Volume, the value is PostPaid or PrePaid. The PrePaid volume cannot be detached. Please note that PrePaid type needs to ask the system administrator to apply for a whitelist.
    kind String
    The kind of Volume, the value is data.
    size Integer
    The size of Volume.
    volumeName String
    The name of Volume.
    volumeType String
    The type of Volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    zoneId String
    The id of the Zone.
    deleteWithInstance Boolean
    Delete Volume with Attached Instance.
    description String
    The description of the Volume.
    instanceId String
    The ID of the instance to which the created volume is automatically attached. Please note this field needs to ask the system administrator to apply for a whitelist. When use this field to attach ecs instance, the attached volume cannot be deleted by terraform, please use terraform state rm volcengine_volume.resource_name command to remove it from terraform state file and management.
    projectName String
    The ProjectName of the Volume.
    tags List<VolumeTag>
    Tags.
    volumeChargeType String
    The charge type of the Volume, the value is PostPaid or PrePaid. The PrePaid volume cannot be detached. Please note that PrePaid type needs to ask the system administrator to apply for a whitelist.
    kind string
    The kind of Volume, the value is data.
    size number
    The size of Volume.
    volumeName string
    The name of Volume.
    volumeType string
    The type of Volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    zoneId string
    The id of the Zone.
    deleteWithInstance boolean
    Delete Volume with Attached Instance.
    description string
    The description of the Volume.
    instanceId string
    The ID of the instance to which the created volume is automatically attached. Please note this field needs to ask the system administrator to apply for a whitelist. When use this field to attach ecs instance, the attached volume cannot be deleted by terraform, please use terraform state rm volcengine_volume.resource_name command to remove it from terraform state file and management.
    projectName string
    The ProjectName of the Volume.
    tags VolumeTag[]
    Tags.
    volumeChargeType string
    The charge type of the Volume, the value is PostPaid or PrePaid. The PrePaid volume cannot be detached. Please note that PrePaid type needs to ask the system administrator to apply for a whitelist.
    kind str
    The kind of Volume, the value is data.
    size int
    The size of Volume.
    volume_name str
    The name of Volume.
    volume_type str
    The type of Volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    zone_id str
    The id of the Zone.
    delete_with_instance bool
    Delete Volume with Attached Instance.
    description str
    The description of the Volume.
    instance_id str
    The ID of the instance to which the created volume is automatically attached. Please note this field needs to ask the system administrator to apply for a whitelist. When use this field to attach ecs instance, the attached volume cannot be deleted by terraform, please use terraform state rm volcengine_volume.resource_name command to remove it from terraform state file and management.
    project_name str
    The ProjectName of the Volume.
    tags Sequence[VolumeTagArgs]
    Tags.
    volume_charge_type str
    The charge type of the Volume, the value is PostPaid or PrePaid. The PrePaid volume cannot be detached. Please note that PrePaid type needs to ask the system administrator to apply for a whitelist.
    kind String
    The kind of Volume, the value is data.
    size Number
    The size of Volume.
    volumeName String
    The name of Volume.
    volumeType String
    The type of Volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    zoneId String
    The id of the Zone.
    deleteWithInstance Boolean
    Delete Volume with Attached Instance.
    description String
    The description of the Volume.
    instanceId String
    The ID of the instance to which the created volume is automatically attached. Please note this field needs to ask the system administrator to apply for a whitelist. When use this field to attach ecs instance, the attached volume cannot be deleted by terraform, please use terraform state rm volcengine_volume.resource_name command to remove it from terraform state file and management.
    projectName String
    The ProjectName of the Volume.
    tags List<Property Map>
    Tags.
    volumeChargeType String
    The charge type of the Volume, the value is PostPaid or PrePaid. The PrePaid volume cannot be detached. Please note that PrePaid type needs to ask the system administrator to apply for a whitelist.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Volume resource produces the following output properties:

    CreatedAt string
    Creation time of Volume.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Status of Volume.
    TradeStatus int
    Status of Trade.
    CreatedAt string
    Creation time of Volume.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Status of Volume.
    TradeStatus int
    Status of Trade.
    createdAt String
    Creation time of Volume.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Status of Volume.
    tradeStatus Integer
    Status of Trade.
    createdAt string
    Creation time of Volume.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    Status of Volume.
    tradeStatus number
    Status of Trade.
    created_at str
    Creation time of Volume.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    Status of Volume.
    trade_status int
    Status of Trade.
    createdAt String
    Creation time of Volume.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Status of Volume.
    tradeStatus Number
    Status of Trade.

    Look up Existing Volume Resource

    Get an existing Volume resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: VolumeState, opts?: CustomResourceOptions): Volume
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            delete_with_instance: Optional[bool] = None,
            description: Optional[str] = None,
            instance_id: Optional[str] = None,
            kind: Optional[str] = None,
            project_name: Optional[str] = None,
            size: Optional[int] = None,
            status: Optional[str] = None,
            tags: Optional[Sequence[VolumeTagArgs]] = None,
            trade_status: Optional[int] = None,
            volume_charge_type: Optional[str] = None,
            volume_name: Optional[str] = None,
            volume_type: Optional[str] = None,
            zone_id: Optional[str] = None) -> Volume
    func GetVolume(ctx *Context, name string, id IDInput, state *VolumeState, opts ...ResourceOption) (*Volume, error)
    public static Volume Get(string name, Input<string> id, VolumeState? state, CustomResourceOptions? opts = null)
    public static Volume get(String name, Output<String> id, VolumeState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CreatedAt string
    Creation time of Volume.
    DeleteWithInstance bool
    Delete Volume with Attached Instance.
    Description string
    The description of the Volume.
    InstanceId string
    The ID of the instance to which the created volume is automatically attached. Please note this field needs to ask the system administrator to apply for a whitelist. When use this field to attach ecs instance, the attached volume cannot be deleted by terraform, please use terraform state rm volcengine_volume.resource_name command to remove it from terraform state file and management.
    Kind string
    The kind of Volume, the value is data.
    ProjectName string
    The ProjectName of the Volume.
    Size int
    The size of Volume.
    Status string
    Status of Volume.
    Tags List<VolumeTag>
    Tags.
    TradeStatus int
    Status of Trade.
    VolumeChargeType string
    The charge type of the Volume, the value is PostPaid or PrePaid. The PrePaid volume cannot be detached. Please note that PrePaid type needs to ask the system administrator to apply for a whitelist.
    VolumeName string
    The name of Volume.
    VolumeType string
    The type of Volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    ZoneId string
    The id of the Zone.
    CreatedAt string
    Creation time of Volume.
    DeleteWithInstance bool
    Delete Volume with Attached Instance.
    Description string
    The description of the Volume.
    InstanceId string
    The ID of the instance to which the created volume is automatically attached. Please note this field needs to ask the system administrator to apply for a whitelist. When use this field to attach ecs instance, the attached volume cannot be deleted by terraform, please use terraform state rm volcengine_volume.resource_name command to remove it from terraform state file and management.
    Kind string
    The kind of Volume, the value is data.
    ProjectName string
    The ProjectName of the Volume.
    Size int
    The size of Volume.
    Status string
    Status of Volume.
    Tags []VolumeTagArgs
    Tags.
    TradeStatus int
    Status of Trade.
    VolumeChargeType string
    The charge type of the Volume, the value is PostPaid or PrePaid. The PrePaid volume cannot be detached. Please note that PrePaid type needs to ask the system administrator to apply for a whitelist.
    VolumeName string
    The name of Volume.
    VolumeType string
    The type of Volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    ZoneId string
    The id of the Zone.
    createdAt String
    Creation time of Volume.
    deleteWithInstance Boolean
    Delete Volume with Attached Instance.
    description String
    The description of the Volume.
    instanceId String
    The ID of the instance to which the created volume is automatically attached. Please note this field needs to ask the system administrator to apply for a whitelist. When use this field to attach ecs instance, the attached volume cannot be deleted by terraform, please use terraform state rm volcengine_volume.resource_name command to remove it from terraform state file and management.
    kind String
    The kind of Volume, the value is data.
    projectName String
    The ProjectName of the Volume.
    size Integer
    The size of Volume.
    status String
    Status of Volume.
    tags List<VolumeTag>
    Tags.
    tradeStatus Integer
    Status of Trade.
    volumeChargeType String
    The charge type of the Volume, the value is PostPaid or PrePaid. The PrePaid volume cannot be detached. Please note that PrePaid type needs to ask the system administrator to apply for a whitelist.
    volumeName String
    The name of Volume.
    volumeType String
    The type of Volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    zoneId String
    The id of the Zone.
    createdAt string
    Creation time of Volume.
    deleteWithInstance boolean
    Delete Volume with Attached Instance.
    description string
    The description of the Volume.
    instanceId string
    The ID of the instance to which the created volume is automatically attached. Please note this field needs to ask the system administrator to apply for a whitelist. When use this field to attach ecs instance, the attached volume cannot be deleted by terraform, please use terraform state rm volcengine_volume.resource_name command to remove it from terraform state file and management.
    kind string
    The kind of Volume, the value is data.
    projectName string
    The ProjectName of the Volume.
    size number
    The size of Volume.
    status string
    Status of Volume.
    tags VolumeTag[]
    Tags.
    tradeStatus number
    Status of Trade.
    volumeChargeType string
    The charge type of the Volume, the value is PostPaid or PrePaid. The PrePaid volume cannot be detached. Please note that PrePaid type needs to ask the system administrator to apply for a whitelist.
    volumeName string
    The name of Volume.
    volumeType string
    The type of Volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    zoneId string
    The id of the Zone.
    created_at str
    Creation time of Volume.
    delete_with_instance bool
    Delete Volume with Attached Instance.
    description str
    The description of the Volume.
    instance_id str
    The ID of the instance to which the created volume is automatically attached. Please note this field needs to ask the system administrator to apply for a whitelist. When use this field to attach ecs instance, the attached volume cannot be deleted by terraform, please use terraform state rm volcengine_volume.resource_name command to remove it from terraform state file and management.
    kind str
    The kind of Volume, the value is data.
    project_name str
    The ProjectName of the Volume.
    size int
    The size of Volume.
    status str
    Status of Volume.
    tags Sequence[VolumeTagArgs]
    Tags.
    trade_status int
    Status of Trade.
    volume_charge_type str
    The charge type of the Volume, the value is PostPaid or PrePaid. The PrePaid volume cannot be detached. Please note that PrePaid type needs to ask the system administrator to apply for a whitelist.
    volume_name str
    The name of Volume.
    volume_type str
    The type of Volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    zone_id str
    The id of the Zone.
    createdAt String
    Creation time of Volume.
    deleteWithInstance Boolean
    Delete Volume with Attached Instance.
    description String
    The description of the Volume.
    instanceId String
    The ID of the instance to which the created volume is automatically attached. Please note this field needs to ask the system administrator to apply for a whitelist. When use this field to attach ecs instance, the attached volume cannot be deleted by terraform, please use terraform state rm volcengine_volume.resource_name command to remove it from terraform state file and management.
    kind String
    The kind of Volume, the value is data.
    projectName String
    The ProjectName of the Volume.
    size Number
    The size of Volume.
    status String
    Status of Volume.
    tags List<Property Map>
    Tags.
    tradeStatus Number
    Status of Trade.
    volumeChargeType String
    The charge type of the Volume, the value is PostPaid or PrePaid. The PrePaid volume cannot be detached. Please note that PrePaid type needs to ask the system administrator to apply for a whitelist.
    volumeName String
    The name of Volume.
    volumeType String
    The type of Volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    zoneId String
    The id of the Zone.

    Supporting Types

    VolumeTag, VolumeTagArgs

    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.
    key string
    The Key of Tags.
    value string
    The Value of Tags.
    key str
    The Key of Tags.
    value str
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine