1. Packages
  2. Ucloud Provider
  3. API Docs
  4. Disk
ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud

ucloud.Disk

Explore with Pulumi AI

ucloud logo
ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud

    Provides a Cloud Disk resource.

    Note If the disk have attached to the instance and reboot_instance_for_resizing is not set to false, the instance will reboot automatically to make the change take effect when update the disk_size by default.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ucloud from "@pulumi/ucloud";
    
    const _default = ucloud.getZones({});
    // Create cloud disk
    const example = new ucloud.Disk("example", {
        availabilityZone: _default.then(_default => _default.zones?.[0]?.id),
        diskSize: 10,
    });
    
    import pulumi
    import pulumi_ucloud as ucloud
    
    default = ucloud.get_zones()
    # Create cloud disk
    example = ucloud.Disk("example",
        availability_zone=default.zones[0].id,
        disk_size=10)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ucloud/ucloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_default, err := ucloud.GetZones(ctx, &ucloud.GetZonesArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		// Create cloud disk
    		_, err = ucloud.NewDisk(ctx, "example", &ucloud.DiskArgs{
    			AvailabilityZone: pulumi.String(_default.Zones[0].Id),
    			DiskSize:         pulumi.Float64(10),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ucloud = Pulumi.Ucloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = Ucloud.GetZones.Invoke();
    
        // Create cloud disk
        var example = new Ucloud.Disk("example", new()
        {
            AvailabilityZone = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
            DiskSize = 10,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ucloud.UcloudFunctions;
    import com.pulumi.ucloud.inputs.GetZonesArgs;
    import com.pulumi.ucloud.Disk;
    import com.pulumi.ucloud.DiskArgs;
    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 default = UcloudFunctions.getZones();
    
            // Create cloud disk
            var example = new Disk("example", DiskArgs.builder()
                .availabilityZone(default_.zones()[0].id())
                .diskSize(10)
                .build());
    
        }
    }
    
    resources:
      # Create cloud disk
      example:
        type: ucloud:Disk
        properties:
          availabilityZone: ${default.zones[0].id}
          diskSize: 10
    variables:
      default:
        fn::invoke:
          function: ucloud:getZones
          arguments: {}
    

    Create Disk Resource

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

    Constructor syntax

    new Disk(name: string, args: DiskArgs, opts?: CustomResourceOptions);
    @overload
    def Disk(resource_name: str,
             args: DiskArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Disk(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             availability_zone: Optional[str] = None,
             disk_size: Optional[float] = None,
             charge_type: Optional[str] = None,
             disk_id: Optional[str] = None,
             disk_type: Optional[str] = None,
             duration: Optional[float] = None,
             name: Optional[str] = None,
             rdma_cluster_id: Optional[str] = None,
             reboot_instance_for_resizing: Optional[bool] = None,
             tag: Optional[str] = None)
    func NewDisk(ctx *Context, name string, args DiskArgs, opts ...ResourceOption) (*Disk, error)
    public Disk(string name, DiskArgs args, CustomResourceOptions? opts = null)
    public Disk(String name, DiskArgs args)
    public Disk(String name, DiskArgs args, CustomResourceOptions options)
    
    type: ucloud:Disk
    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 DiskArgs
    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 DiskArgs
    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 DiskArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DiskArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DiskArgs
    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 diskResource = new Ucloud.Disk("diskResource", new()
    {
        AvailabilityZone = "string",
        DiskSize = 0,
        ChargeType = "string",
        DiskId = "string",
        DiskType = "string",
        Duration = 0,
        Name = "string",
        RdmaClusterId = "string",
        RebootInstanceForResizing = false,
        Tag = "string",
    });
    
    example, err := ucloud.NewDisk(ctx, "diskResource", &ucloud.DiskArgs{
    	AvailabilityZone:          pulumi.String("string"),
    	DiskSize:                  pulumi.Float64(0),
    	ChargeType:                pulumi.String("string"),
    	DiskId:                    pulumi.String("string"),
    	DiskType:                  pulumi.String("string"),
    	Duration:                  pulumi.Float64(0),
    	Name:                      pulumi.String("string"),
    	RdmaClusterId:             pulumi.String("string"),
    	RebootInstanceForResizing: pulumi.Bool(false),
    	Tag:                       pulumi.String("string"),
    })
    
    var diskResource = new Disk("diskResource", DiskArgs.builder()
        .availabilityZone("string")
        .diskSize(0)
        .chargeType("string")
        .diskId("string")
        .diskType("string")
        .duration(0)
        .name("string")
        .rdmaClusterId("string")
        .rebootInstanceForResizing(false)
        .tag("string")
        .build());
    
    disk_resource = ucloud.Disk("diskResource",
        availability_zone="string",
        disk_size=0,
        charge_type="string",
        disk_id="string",
        disk_type="string",
        duration=0,
        name="string",
        rdma_cluster_id="string",
        reboot_instance_for_resizing=False,
        tag="string")
    
    const diskResource = new ucloud.Disk("diskResource", {
        availabilityZone: "string",
        diskSize: 0,
        chargeType: "string",
        diskId: "string",
        diskType: "string",
        duration: 0,
        name: "string",
        rdmaClusterId: "string",
        rebootInstanceForResizing: false,
        tag: "string",
    });
    
    type: ucloud:Disk
    properties:
        availabilityZone: string
        chargeType: string
        diskId: string
        diskSize: 0
        diskType: string
        duration: 0
        name: string
        rdmaClusterId: string
        rebootInstanceForResizing: false
        tag: string
    

    Disk 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 Disk resource accepts the following input properties:

    AvailabilityZone string
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    DiskSize double
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size.


    ChargeType string
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    DiskId string
    The ID of the resource disk.
    DiskType string
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk.(Default: data_disk).
    Duration double
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    Name string
    RdmaClusterId string
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    RebootInstanceForResizing bool
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    Tag string
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).
    AvailabilityZone string
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    DiskSize float64
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size.


    ChargeType string
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    DiskId string
    The ID of the resource disk.
    DiskType string
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk.(Default: data_disk).
    Duration float64
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    Name string
    RdmaClusterId string
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    RebootInstanceForResizing bool
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    Tag string
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).
    availabilityZone String
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    diskSize Double
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size.


    chargeType String
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    diskId String
    The ID of the resource disk.
    diskType String
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk.(Default: data_disk).
    duration Double
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    name String
    rdmaClusterId String
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    rebootInstanceForResizing Boolean
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    tag String
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).
    availabilityZone string
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    diskSize number
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size.


    chargeType string
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    diskId string
    The ID of the resource disk.
    diskType string
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk.(Default: data_disk).
    duration number
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    name string
    rdmaClusterId string
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    rebootInstanceForResizing boolean
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    tag string
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).
    availability_zone str
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    disk_size float
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size.


    charge_type str
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    disk_id str
    The ID of the resource disk.
    disk_type str
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk.(Default: data_disk).
    duration float
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    name str
    rdma_cluster_id str
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    reboot_instance_for_resizing bool
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    tag str
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).
    availabilityZone String
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    diskSize Number
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size.


    chargeType String
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    diskId String
    The ID of the resource disk.
    diskType String
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk.(Default: data_disk).
    duration Number
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    name String
    rdmaClusterId String
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    rebootInstanceForResizing Boolean
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    tag String
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).

    Outputs

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

    CreateTime string
    The time of creation of disk, formatted in RFC3339 time string.
    ExpireTime string
    The expiration time of disk, formatted in RFC3339 time string.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    CreateTime string
    The time of creation of disk, formatted in RFC3339 time string.
    ExpireTime string
    The expiration time of disk, formatted in RFC3339 time string.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    createTime String
    The time of creation of disk, formatted in RFC3339 time string.
    expireTime String
    The expiration time of disk, formatted in RFC3339 time string.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    createTime string
    The time of creation of disk, formatted in RFC3339 time string.
    expireTime string
    The expiration time of disk, formatted in RFC3339 time string.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    create_time str
    The time of creation of disk, formatted in RFC3339 time string.
    expire_time str
    The expiration time of disk, formatted in RFC3339 time string.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    createTime String
    The time of creation of disk, formatted in RFC3339 time string.
    expireTime String
    The expiration time of disk, formatted in RFC3339 time string.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.

    Look up Existing Disk Resource

    Get an existing Disk 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?: DiskState, opts?: CustomResourceOptions): Disk
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            availability_zone: Optional[str] = None,
            charge_type: Optional[str] = None,
            create_time: Optional[str] = None,
            disk_id: Optional[str] = None,
            disk_size: Optional[float] = None,
            disk_type: Optional[str] = None,
            duration: Optional[float] = None,
            expire_time: Optional[str] = None,
            name: Optional[str] = None,
            rdma_cluster_id: Optional[str] = None,
            reboot_instance_for_resizing: Optional[bool] = None,
            status: Optional[str] = None,
            tag: Optional[str] = None) -> Disk
    func GetDisk(ctx *Context, name string, id IDInput, state *DiskState, opts ...ResourceOption) (*Disk, error)
    public static Disk Get(string name, Input<string> id, DiskState? state, CustomResourceOptions? opts = null)
    public static Disk get(String name, Output<String> id, DiskState state, CustomResourceOptions options)
    resources:  _:    type: ucloud:Disk    get:      id: ${id}
    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:
    AvailabilityZone string
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    ChargeType string
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    CreateTime string
    The time of creation of disk, formatted in RFC3339 time string.
    DiskId string
    The ID of the resource disk.
    DiskSize double
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size.


    DiskType string
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk.(Default: data_disk).
    Duration double
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    ExpireTime string
    The expiration time of disk, formatted in RFC3339 time string.
    Name string
    RdmaClusterId string
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    RebootInstanceForResizing bool
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    Status string
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    Tag string
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).
    AvailabilityZone string
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    ChargeType string
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    CreateTime string
    The time of creation of disk, formatted in RFC3339 time string.
    DiskId string
    The ID of the resource disk.
    DiskSize float64
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size.


    DiskType string
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk.(Default: data_disk).
    Duration float64
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    ExpireTime string
    The expiration time of disk, formatted in RFC3339 time string.
    Name string
    RdmaClusterId string
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    RebootInstanceForResizing bool
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    Status string
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    Tag string
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).
    availabilityZone String
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    chargeType String
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    createTime String
    The time of creation of disk, formatted in RFC3339 time string.
    diskId String
    The ID of the resource disk.
    diskSize Double
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size.


    diskType String
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk.(Default: data_disk).
    duration Double
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    expireTime String
    The expiration time of disk, formatted in RFC3339 time string.
    name String
    rdmaClusterId String
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    rebootInstanceForResizing Boolean
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    status String
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    tag String
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).
    availabilityZone string
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    chargeType string
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    createTime string
    The time of creation of disk, formatted in RFC3339 time string.
    diskId string
    The ID of the resource disk.
    diskSize number
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size.


    diskType string
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk.(Default: data_disk).
    duration number
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    expireTime string
    The expiration time of disk, formatted in RFC3339 time string.
    name string
    rdmaClusterId string
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    rebootInstanceForResizing boolean
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    status string
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    tag string
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).
    availability_zone str
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    charge_type str
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    create_time str
    The time of creation of disk, formatted in RFC3339 time string.
    disk_id str
    The ID of the resource disk.
    disk_size float
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size.


    disk_type str
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk.(Default: data_disk).
    duration float
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    expire_time str
    The expiration time of disk, formatted in RFC3339 time string.
    name str
    rdma_cluster_id str
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    reboot_instance_for_resizing bool
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    status str
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    tag str
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).
    availabilityZone String
    Availability zone where cloud disk is located. Such as: "cn-bj2-02". You may refer to list of availability zone.
    chargeType String
    Charge type of disk. Possible values are: year as pay by year, month as pay by month, dynamic as pay by hour. (Default: month).
    createTime String
    The time of creation of disk, formatted in RFC3339 time string.
    diskId String
    The ID of the resource disk.
    diskSize Number
    The size of disk. Purchase the size of disk in GB. 20-8000 for a cloud disk, 20-8000 for SSD cloud disk . If the disk have attached to the instance, the instance will reboot automatically to make the change take effect when update the disk_size.


    diskType String
    The type of disk. Possible values are: data_diskas cloud disk, ssd_data_disk as ssd cloud disk, rssd_data_disk as RDMA-SSD cloud disk.(Default: data_disk).
    duration Number
    The duration that you will buy the resource. (Default: 1). It is not required when dynamic (pay by hour), the value is 0 when month(pay by month) and the disk will be vaild till the last day of that month.
    expireTime String
    The expiration time of disk, formatted in RFC3339 time string.
    name String
    rdmaClusterId String
    The RDMA Cluster ID of disk. It is mandatory if your disk type is rssd_data_disk and must be set to the same value as the UHost instance to attach to. If you don't specifiy this attribute while you are intended to use RSSD, the UHost instance creation has little chance to succeed. So make sure you set this attribute to the value you get from the response of UHost instance creation. For disk type other than rssd_data_disk, this attribute is ignored.
    rebootInstanceForResizing Boolean
    Whether the attached instance of the disk will be rebooted automatically to make the change take effect when update the disk_size. (Default: "true").
    status String
    The status of disk. Possible values are: Available, InUse, Detaching, Initializating, Failed, Cloning, Restoring, RestoreFailed.
    tag String
    A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default: Default).

    Import

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

    $ pulumi import ucloud:index/disk:Disk example bsm-abcdefg
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    ucloud ucloud/terraform-provider-ucloud
    License
    Notes
    This Pulumi package is based on the ucloud Terraform Provider.
    ucloud logo
    ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud