alicloud.ecs.Disk
Explore with Pulumi AI
Provides a ECS disk resource.
DEPRECATED: This resource has been renamed to alicloud.ecs.EcsDisk from version 1.122.0.
NOTE: One of
sizeorsnapshot_idis required when specifying an ECS disk. If all of them be specified,sizemust more than the size of snapshot whichsnapshot_idrepresents. Currently,alicloud.ecs.Diskdoesn’t resize disk.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Create a new ECS disk.
const ecsDisk = new alicloud.ecs.Disk("ecs_disk", {
    availabilityZone: "cn-beijing-b",
    name: "New-disk",
    description: "Hello ecs disk.",
    category: "cloud_efficiency",
    size: 30,
    encrypted: true,
    kmsKeyId: "2a6767f0-a16c-4679-a60f-13bf*****",
    tags: {
        Name: "TerraformTest",
    },
});
import pulumi
import pulumi_alicloud as alicloud
# Create a new ECS disk.
ecs_disk = alicloud.ecs.Disk("ecs_disk",
    availability_zone="cn-beijing-b",
    name="New-disk",
    description="Hello ecs disk.",
    category="cloud_efficiency",
    size=30,
    encrypted=True,
    kms_key_id="2a6767f0-a16c-4679-a60f-13bf*****",
    tags={
        "Name": "TerraformTest",
    })
package main
import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create a new ECS disk.
		_, err := ecs.NewDisk(ctx, "ecs_disk", &ecs.DiskArgs{
			AvailabilityZone: pulumi.String("cn-beijing-b"),
			Name:             pulumi.String("New-disk"),
			Description:      pulumi.String("Hello ecs disk."),
			Category:         pulumi.String("cloud_efficiency"),
			Size:             pulumi.Int(30),
			Encrypted:        pulumi.Bool(true),
			KmsKeyId:         pulumi.String("2a6767f0-a16c-4679-a60f-13bf*****"),
			Tags: pulumi.StringMap{
				"Name": pulumi.String("TerraformTest"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() => 
{
    // Create a new ECS disk.
    var ecsDisk = new AliCloud.Ecs.Disk("ecs_disk", new()
    {
        AvailabilityZone = "cn-beijing-b",
        Name = "New-disk",
        Description = "Hello ecs disk.",
        Category = "cloud_efficiency",
        Size = 30,
        Encrypted = true,
        KmsKeyId = "2a6767f0-a16c-4679-a60f-13bf*****",
        Tags = 
        {
            { "Name", "TerraformTest" },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.Disk;
import com.pulumi.alicloud.ecs.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) {
        // Create a new ECS disk.
        var ecsDisk = new Disk("ecsDisk", DiskArgs.builder()
            .availabilityZone("cn-beijing-b")
            .name("New-disk")
            .description("Hello ecs disk.")
            .category("cloud_efficiency")
            .size("30")
            .encrypted(true)
            .kmsKeyId("2a6767f0-a16c-4679-a60f-13bf*****")
            .tags(Map.of("Name", "TerraformTest"))
            .build());
    }
}
resources:
  # Create a new ECS disk.
  ecsDisk:
    type: alicloud:ecs:Disk
    name: ecs_disk
    properties:
      availabilityZone: cn-beijing-b
      name: New-disk
      description: Hello ecs disk.
      category: cloud_efficiency
      size: '30'
      encrypted: true
      kmsKeyId: 2a6767f0-a16c-4679-a60f-13bf*****
      tags:
        Name: TerraformTest
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: Optional[DiskArgs] = None,
         opts: Optional[ResourceOptions] = None)
@overload
def Disk(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         advanced_features: Optional[str] = None,
         availability_zone: Optional[str] = None,
         category: Optional[str] = None,
         delete_auto_snapshot: Optional[bool] = None,
         delete_with_instance: Optional[bool] = None,
         description: Optional[str] = None,
         disk_name: Optional[str] = None,
         dry_run: Optional[bool] = None,
         enable_auto_snapshot: Optional[bool] = None,
         encrypt_algorithm: Optional[str] = None,
         encrypted: Optional[bool] = None,
         instance_id: Optional[str] = None,
         kms_key_id: Optional[str] = None,
         name: Optional[str] = None,
         payment_type: Optional[str] = None,
         performance_level: Optional[str] = None,
         resource_group_id: Optional[str] = None,
         size: Optional[int] = None,
         snapshot_id: Optional[str] = None,
         storage_set_id: Optional[str] = None,
         storage_set_partition_number: Optional[int] = None,
         tags: Optional[Mapping[str, str]] = None,
         type: Optional[str] = None,
         zone_id: Optional[str] = None)func NewDisk(ctx *Context, name string, args *DiskArgs, opts ...ResourceOption) (*Disk, error)public Disk(string name, DiskArgs? args = null, CustomResourceOptions? opts = null)type: alicloud:ecs: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 AliCloud.Ecs.Disk("diskResource", new()
{
    AdvancedFeatures = "string",
    Category = "string",
    DeleteAutoSnapshot = false,
    DeleteWithInstance = false,
    Description = "string",
    DiskName = "string",
    DryRun = false,
    EnableAutoSnapshot = false,
    EncryptAlgorithm = "string",
    Encrypted = false,
    InstanceId = "string",
    KmsKeyId = "string",
    PaymentType = "string",
    PerformanceLevel = "string",
    ResourceGroupId = "string",
    Size = 0,
    SnapshotId = "string",
    StorageSetId = "string",
    StorageSetPartitionNumber = 0,
    Tags = 
    {
        { "string", "string" },
    },
    Type = "string",
    ZoneId = "string",
});
example, err := ecs.NewDisk(ctx, "diskResource", &ecs.DiskArgs{
	AdvancedFeatures:          pulumi.String("string"),
	Category:                  pulumi.String("string"),
	DeleteAutoSnapshot:        pulumi.Bool(false),
	DeleteWithInstance:        pulumi.Bool(false),
	Description:               pulumi.String("string"),
	DiskName:                  pulumi.String("string"),
	DryRun:                    pulumi.Bool(false),
	EnableAutoSnapshot:        pulumi.Bool(false),
	EncryptAlgorithm:          pulumi.String("string"),
	Encrypted:                 pulumi.Bool(false),
	InstanceId:                pulumi.String("string"),
	KmsKeyId:                  pulumi.String("string"),
	PaymentType:               pulumi.String("string"),
	PerformanceLevel:          pulumi.String("string"),
	ResourceGroupId:           pulumi.String("string"),
	Size:                      pulumi.Int(0),
	SnapshotId:                pulumi.String("string"),
	StorageSetId:              pulumi.String("string"),
	StorageSetPartitionNumber: pulumi.Int(0),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Type:   pulumi.String("string"),
	ZoneId: pulumi.String("string"),
})
var diskResource = new Disk("diskResource", DiskArgs.builder()
    .advancedFeatures("string")
    .category("string")
    .deleteAutoSnapshot(false)
    .deleteWithInstance(false)
    .description("string")
    .diskName("string")
    .dryRun(false)
    .enableAutoSnapshot(false)
    .encryptAlgorithm("string")
    .encrypted(false)
    .instanceId("string")
    .kmsKeyId("string")
    .paymentType("string")
    .performanceLevel("string")
    .resourceGroupId("string")
    .size(0)
    .snapshotId("string")
    .storageSetId("string")
    .storageSetPartitionNumber(0)
    .tags(Map.of("string", "string"))
    .type("string")
    .zoneId("string")
    .build());
disk_resource = alicloud.ecs.Disk("diskResource",
    advanced_features="string",
    category="string",
    delete_auto_snapshot=False,
    delete_with_instance=False,
    description="string",
    disk_name="string",
    dry_run=False,
    enable_auto_snapshot=False,
    encrypt_algorithm="string",
    encrypted=False,
    instance_id="string",
    kms_key_id="string",
    payment_type="string",
    performance_level="string",
    resource_group_id="string",
    size=0,
    snapshot_id="string",
    storage_set_id="string",
    storage_set_partition_number=0,
    tags={
        "string": "string",
    },
    type="string",
    zone_id="string")
const diskResource = new alicloud.ecs.Disk("diskResource", {
    advancedFeatures: "string",
    category: "string",
    deleteAutoSnapshot: false,
    deleteWithInstance: false,
    description: "string",
    diskName: "string",
    dryRun: false,
    enableAutoSnapshot: false,
    encryptAlgorithm: "string",
    encrypted: false,
    instanceId: "string",
    kmsKeyId: "string",
    paymentType: "string",
    performanceLevel: "string",
    resourceGroupId: "string",
    size: 0,
    snapshotId: "string",
    storageSetId: "string",
    storageSetPartitionNumber: 0,
    tags: {
        string: "string",
    },
    type: "string",
    zoneId: "string",
});
type: alicloud:ecs:Disk
properties:
    advancedFeatures: string
    category: string
    deleteAutoSnapshot: false
    deleteWithInstance: false
    description: string
    diskName: string
    dryRun: false
    enableAutoSnapshot: false
    encryptAlgorithm: string
    encrypted: false
    instanceId: string
    kmsKeyId: string
    paymentType: string
    performanceLevel: string
    resourceGroupId: string
    size: 0
    snapshotId: string
    storageSetId: string
    storageSetPartitionNumber: 0
    tags:
        string: string
    type: string
    zoneId: 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
The Disk resource accepts the following input properties:
- AdvancedFeatures string
- AvailabilityZone string
- The Zone to create the disk in.
- Category string
- Category of the disk. Valid values are cloud,cloud_efficiency,cloud_ssd,cloud_essd,cloud_essd_entry. Default iscloud_efficiency.
- DeleteAuto boolSnapshot 
- Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
- DeleteWith boolInstance 
- Indicates whether the disk is released together with the instance: Default value: false.
- Description string
- Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- DiskName string
- DryRun bool
- EnableAuto boolSnapshot 
- Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
- EncryptAlgorithm string
- Encrypted bool
- If true, the disk will be encrypted, conflict with snapshot_id.
- InstanceId string
- KmsKey stringId 
- The ID of the KMS key corresponding to the data disk, The specified parameter Encryptedmust betruewhen KmsKeyId is not empty.
- Name string
- Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
- PaymentType string
- PerformanceLevel string
- Specifies the performance level of an ESSD when you create the ESSD. Default value: PL1. Valid values:- PL1: A single ESSD delivers up to 50,000 random read/write IOPS.
- PL2: A single ESSD delivers up to 100,000 random read/write IOPS.
- PL3: A single ESSD delivers up to 1,000,000 random read/write IOPS.
 
- ResourceGroup stringId 
- The Id of resource group which the disk belongs. - NOTE: Disk category - cloudhas been outdated and it only can be used none I/O Optimized ECS instances. Recommend- cloud_efficiencyand- cloud_ssddisk.
- Size int
- The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error InvalidDiskSize.TooSmall.
- SnapshotId string
- A snapshot to base the disk off of. If the disk size required by snapshot is greater than size, thesizewill be ignored, conflict withencrypted.
- StorageSet stringId 
- StorageSet intPartition Number 
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Type string
- ZoneId string
- AdvancedFeatures string
- AvailabilityZone string
- The Zone to create the disk in.
- Category string
- Category of the disk. Valid values are cloud,cloud_efficiency,cloud_ssd,cloud_essd,cloud_essd_entry. Default iscloud_efficiency.
- DeleteAuto boolSnapshot 
- Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
- DeleteWith boolInstance 
- Indicates whether the disk is released together with the instance: Default value: false.
- Description string
- Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- DiskName string
- DryRun bool
- EnableAuto boolSnapshot 
- Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
- EncryptAlgorithm string
- Encrypted bool
- If true, the disk will be encrypted, conflict with snapshot_id.
- InstanceId string
- KmsKey stringId 
- The ID of the KMS key corresponding to the data disk, The specified parameter Encryptedmust betruewhen KmsKeyId is not empty.
- Name string
- Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
- PaymentType string
- PerformanceLevel string
- Specifies the performance level of an ESSD when you create the ESSD. Default value: PL1. Valid values:- PL1: A single ESSD delivers up to 50,000 random read/write IOPS.
- PL2: A single ESSD delivers up to 100,000 random read/write IOPS.
- PL3: A single ESSD delivers up to 1,000,000 random read/write IOPS.
 
- ResourceGroup stringId 
- The Id of resource group which the disk belongs. - NOTE: Disk category - cloudhas been outdated and it only can be used none I/O Optimized ECS instances. Recommend- cloud_efficiencyand- cloud_ssddisk.
- Size int
- The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error InvalidDiskSize.TooSmall.
- SnapshotId string
- A snapshot to base the disk off of. If the disk size required by snapshot is greater than size, thesizewill be ignored, conflict withencrypted.
- StorageSet stringId 
- StorageSet intPartition Number 
- map[string]string
- A mapping of tags to assign to the resource.
- Type string
- ZoneId string
- advancedFeatures String
- availabilityZone String
- The Zone to create the disk in.
- category String
- Category of the disk. Valid values are cloud,cloud_efficiency,cloud_ssd,cloud_essd,cloud_essd_entry. Default iscloud_efficiency.
- deleteAuto BooleanSnapshot 
- Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
- deleteWith BooleanInstance 
- Indicates whether the disk is released together with the instance: Default value: false.
- description String
- Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- diskName String
- dryRun Boolean
- enableAuto BooleanSnapshot 
- Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
- encryptAlgorithm String
- encrypted Boolean
- If true, the disk will be encrypted, conflict with snapshot_id.
- instanceId String
- kmsKey StringId 
- The ID of the KMS key corresponding to the data disk, The specified parameter Encryptedmust betruewhen KmsKeyId is not empty.
- name String
- Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
- paymentType String
- performanceLevel String
- Specifies the performance level of an ESSD when you create the ESSD. Default value: PL1. Valid values:- PL1: A single ESSD delivers up to 50,000 random read/write IOPS.
- PL2: A single ESSD delivers up to 100,000 random read/write IOPS.
- PL3: A single ESSD delivers up to 1,000,000 random read/write IOPS.
 
- resourceGroup StringId 
- The Id of resource group which the disk belongs. - NOTE: Disk category - cloudhas been outdated and it only can be used none I/O Optimized ECS instances. Recommend- cloud_efficiencyand- cloud_ssddisk.
- size Integer
- The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error InvalidDiskSize.TooSmall.
- snapshotId String
- A snapshot to base the disk off of. If the disk size required by snapshot is greater than size, thesizewill be ignored, conflict withencrypted.
- storageSet StringId 
- storageSet IntegerPartition Number 
- Map<String,String>
- A mapping of tags to assign to the resource.
- type String
- zoneId String
- advancedFeatures string
- availabilityZone string
- The Zone to create the disk in.
- category string
- Category of the disk. Valid values are cloud,cloud_efficiency,cloud_ssd,cloud_essd,cloud_essd_entry. Default iscloud_efficiency.
- deleteAuto booleanSnapshot 
- Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
- deleteWith booleanInstance 
- Indicates whether the disk is released together with the instance: Default value: false.
- description string
- Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- diskName string
- dryRun boolean
- enableAuto booleanSnapshot 
- Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
- encryptAlgorithm string
- encrypted boolean
- If true, the disk will be encrypted, conflict with snapshot_id.
- instanceId string
- kmsKey stringId 
- The ID of the KMS key corresponding to the data disk, The specified parameter Encryptedmust betruewhen KmsKeyId is not empty.
- name string
- Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
- paymentType string
- performanceLevel string
- Specifies the performance level of an ESSD when you create the ESSD. Default value: PL1. Valid values:- PL1: A single ESSD delivers up to 50,000 random read/write IOPS.
- PL2: A single ESSD delivers up to 100,000 random read/write IOPS.
- PL3: A single ESSD delivers up to 1,000,000 random read/write IOPS.
 
- resourceGroup stringId 
- The Id of resource group which the disk belongs. - NOTE: Disk category - cloudhas been outdated and it only can be used none I/O Optimized ECS instances. Recommend- cloud_efficiencyand- cloud_ssddisk.
- size number
- The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error InvalidDiskSize.TooSmall.
- snapshotId string
- A snapshot to base the disk off of. If the disk size required by snapshot is greater than size, thesizewill be ignored, conflict withencrypted.
- storageSet stringId 
- storageSet numberPartition Number 
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- type string
- zoneId string
- advanced_features str
- availability_zone str
- The Zone to create the disk in.
- category str
- Category of the disk. Valid values are cloud,cloud_efficiency,cloud_ssd,cloud_essd,cloud_essd_entry. Default iscloud_efficiency.
- delete_auto_ boolsnapshot 
- Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
- delete_with_ boolinstance 
- Indicates whether the disk is released together with the instance: Default value: false.
- description str
- Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- disk_name str
- dry_run bool
- enable_auto_ boolsnapshot 
- Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
- encrypt_algorithm str
- encrypted bool
- If true, the disk will be encrypted, conflict with snapshot_id.
- instance_id str
- kms_key_ strid 
- The ID of the KMS key corresponding to the data disk, The specified parameter Encryptedmust betruewhen KmsKeyId is not empty.
- name str
- Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
- payment_type str
- performance_level str
- Specifies the performance level of an ESSD when you create the ESSD. Default value: PL1. Valid values:- PL1: A single ESSD delivers up to 50,000 random read/write IOPS.
- PL2: A single ESSD delivers up to 100,000 random read/write IOPS.
- PL3: A single ESSD delivers up to 1,000,000 random read/write IOPS.
 
- resource_group_ strid 
- The Id of resource group which the disk belongs. - NOTE: Disk category - cloudhas been outdated and it only can be used none I/O Optimized ECS instances. Recommend- cloud_efficiencyand- cloud_ssddisk.
- size int
- The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error InvalidDiskSize.TooSmall.
- snapshot_id str
- A snapshot to base the disk off of. If the disk size required by snapshot is greater than size, thesizewill be ignored, conflict withencrypted.
- storage_set_ strid 
- storage_set_ intpartition_ number 
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- type str
- zone_id str
- advancedFeatures String
- availabilityZone String
- The Zone to create the disk in.
- category String
- Category of the disk. Valid values are cloud,cloud_efficiency,cloud_ssd,cloud_essd,cloud_essd_entry. Default iscloud_efficiency.
- deleteAuto BooleanSnapshot 
- Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
- deleteWith BooleanInstance 
- Indicates whether the disk is released together with the instance: Default value: false.
- description String
- Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- diskName String
- dryRun Boolean
- enableAuto BooleanSnapshot 
- Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
- encryptAlgorithm String
- encrypted Boolean
- If true, the disk will be encrypted, conflict with snapshot_id.
- instanceId String
- kmsKey StringId 
- The ID of the KMS key corresponding to the data disk, The specified parameter Encryptedmust betruewhen KmsKeyId is not empty.
- name String
- Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
- paymentType String
- performanceLevel String
- Specifies the performance level of an ESSD when you create the ESSD. Default value: PL1. Valid values:- PL1: A single ESSD delivers up to 50,000 random read/write IOPS.
- PL2: A single ESSD delivers up to 100,000 random read/write IOPS.
- PL3: A single ESSD delivers up to 1,000,000 random read/write IOPS.
 
- resourceGroup StringId 
- The Id of resource group which the disk belongs. - NOTE: Disk category - cloudhas been outdated and it only can be used none I/O Optimized ECS instances. Recommend- cloud_efficiencyand- cloud_ssddisk.
- size Number
- The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error InvalidDiskSize.TooSmall.
- snapshotId String
- A snapshot to base the disk off of. If the disk size required by snapshot is greater than size, thesizewill be ignored, conflict withencrypted.
- storageSet StringId 
- storageSet NumberPartition Number 
- Map<String>
- A mapping of tags to assign to the resource.
- type String
- zoneId String
Outputs
All input properties are implicitly available as output properties. Additionally, the Disk resource produces the following output properties:
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,
        advanced_features: Optional[str] = None,
        availability_zone: Optional[str] = None,
        category: Optional[str] = None,
        delete_auto_snapshot: Optional[bool] = None,
        delete_with_instance: Optional[bool] = None,
        description: Optional[str] = None,
        disk_name: Optional[str] = None,
        dry_run: Optional[bool] = None,
        enable_auto_snapshot: Optional[bool] = None,
        encrypt_algorithm: Optional[str] = None,
        encrypted: Optional[bool] = None,
        instance_id: Optional[str] = None,
        kms_key_id: Optional[str] = None,
        name: Optional[str] = None,
        payment_type: Optional[str] = None,
        performance_level: Optional[str] = None,
        resource_group_id: Optional[str] = None,
        size: Optional[int] = None,
        snapshot_id: Optional[str] = None,
        status: Optional[str] = None,
        storage_set_id: Optional[str] = None,
        storage_set_partition_number: Optional[int] = None,
        tags: Optional[Mapping[str, str]] = None,
        type: Optional[str] = None,
        zone_id: Optional[str] = None) -> Diskfunc 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)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.
- AdvancedFeatures string
- AvailabilityZone string
- The Zone to create the disk in.
- Category string
- Category of the disk. Valid values are cloud,cloud_efficiency,cloud_ssd,cloud_essd,cloud_essd_entry. Default iscloud_efficiency.
- DeleteAuto boolSnapshot 
- Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
- DeleteWith boolInstance 
- Indicates whether the disk is released together with the instance: Default value: false.
- Description string
- Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- DiskName string
- DryRun bool
- EnableAuto boolSnapshot 
- Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
- EncryptAlgorithm string
- Encrypted bool
- If true, the disk will be encrypted, conflict with snapshot_id.
- InstanceId string
- KmsKey stringId 
- The ID of the KMS key corresponding to the data disk, The specified parameter Encryptedmust betruewhen KmsKeyId is not empty.
- Name string
- Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
- PaymentType string
- PerformanceLevel string
- Specifies the performance level of an ESSD when you create the ESSD. Default value: PL1. Valid values:- PL1: A single ESSD delivers up to 50,000 random read/write IOPS.
- PL2: A single ESSD delivers up to 100,000 random read/write IOPS.
- PL3: A single ESSD delivers up to 1,000,000 random read/write IOPS.
 
- ResourceGroup stringId 
- The Id of resource group which the disk belongs. - NOTE: Disk category - cloudhas been outdated and it only can be used none I/O Optimized ECS instances. Recommend- cloud_efficiencyand- cloud_ssddisk.
- Size int
- The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error InvalidDiskSize.TooSmall.
- SnapshotId string
- A snapshot to base the disk off of. If the disk size required by snapshot is greater than size, thesizewill be ignored, conflict withencrypted.
- Status string
- The disk status.
- StorageSet stringId 
- StorageSet intPartition Number 
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Type string
- ZoneId string
- AdvancedFeatures string
- AvailabilityZone string
- The Zone to create the disk in.
- Category string
- Category of the disk. Valid values are cloud,cloud_efficiency,cloud_ssd,cloud_essd,cloud_essd_entry. Default iscloud_efficiency.
- DeleteAuto boolSnapshot 
- Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
- DeleteWith boolInstance 
- Indicates whether the disk is released together with the instance: Default value: false.
- Description string
- Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- DiskName string
- DryRun bool
- EnableAuto boolSnapshot 
- Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
- EncryptAlgorithm string
- Encrypted bool
- If true, the disk will be encrypted, conflict with snapshot_id.
- InstanceId string
- KmsKey stringId 
- The ID of the KMS key corresponding to the data disk, The specified parameter Encryptedmust betruewhen KmsKeyId is not empty.
- Name string
- Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
- PaymentType string
- PerformanceLevel string
- Specifies the performance level of an ESSD when you create the ESSD. Default value: PL1. Valid values:- PL1: A single ESSD delivers up to 50,000 random read/write IOPS.
- PL2: A single ESSD delivers up to 100,000 random read/write IOPS.
- PL3: A single ESSD delivers up to 1,000,000 random read/write IOPS.
 
- ResourceGroup stringId 
- The Id of resource group which the disk belongs. - NOTE: Disk category - cloudhas been outdated and it only can be used none I/O Optimized ECS instances. Recommend- cloud_efficiencyand- cloud_ssddisk.
- Size int
- The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error InvalidDiskSize.TooSmall.
- SnapshotId string
- A snapshot to base the disk off of. If the disk size required by snapshot is greater than size, thesizewill be ignored, conflict withencrypted.
- Status string
- The disk status.
- StorageSet stringId 
- StorageSet intPartition Number 
- map[string]string
- A mapping of tags to assign to the resource.
- Type string
- ZoneId string
- advancedFeatures String
- availabilityZone String
- The Zone to create the disk in.
- category String
- Category of the disk. Valid values are cloud,cloud_efficiency,cloud_ssd,cloud_essd,cloud_essd_entry. Default iscloud_efficiency.
- deleteAuto BooleanSnapshot 
- Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
- deleteWith BooleanInstance 
- Indicates whether the disk is released together with the instance: Default value: false.
- description String
- Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- diskName String
- dryRun Boolean
- enableAuto BooleanSnapshot 
- Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
- encryptAlgorithm String
- encrypted Boolean
- If true, the disk will be encrypted, conflict with snapshot_id.
- instanceId String
- kmsKey StringId 
- The ID of the KMS key corresponding to the data disk, The specified parameter Encryptedmust betruewhen KmsKeyId is not empty.
- name String
- Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
- paymentType String
- performanceLevel String
- Specifies the performance level of an ESSD when you create the ESSD. Default value: PL1. Valid values:- PL1: A single ESSD delivers up to 50,000 random read/write IOPS.
- PL2: A single ESSD delivers up to 100,000 random read/write IOPS.
- PL3: A single ESSD delivers up to 1,000,000 random read/write IOPS.
 
- resourceGroup StringId 
- The Id of resource group which the disk belongs. - NOTE: Disk category - cloudhas been outdated and it only can be used none I/O Optimized ECS instances. Recommend- cloud_efficiencyand- cloud_ssddisk.
- size Integer
- The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error InvalidDiskSize.TooSmall.
- snapshotId String
- A snapshot to base the disk off of. If the disk size required by snapshot is greater than size, thesizewill be ignored, conflict withencrypted.
- status String
- The disk status.
- storageSet StringId 
- storageSet IntegerPartition Number 
- Map<String,String>
- A mapping of tags to assign to the resource.
- type String
- zoneId String
- advancedFeatures string
- availabilityZone string
- The Zone to create the disk in.
- category string
- Category of the disk. Valid values are cloud,cloud_efficiency,cloud_ssd,cloud_essd,cloud_essd_entry. Default iscloud_efficiency.
- deleteAuto booleanSnapshot 
- Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
- deleteWith booleanInstance 
- Indicates whether the disk is released together with the instance: Default value: false.
- description string
- Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- diskName string
- dryRun boolean
- enableAuto booleanSnapshot 
- Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
- encryptAlgorithm string
- encrypted boolean
- If true, the disk will be encrypted, conflict with snapshot_id.
- instanceId string
- kmsKey stringId 
- The ID of the KMS key corresponding to the data disk, The specified parameter Encryptedmust betruewhen KmsKeyId is not empty.
- name string
- Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
- paymentType string
- performanceLevel string
- Specifies the performance level of an ESSD when you create the ESSD. Default value: PL1. Valid values:- PL1: A single ESSD delivers up to 50,000 random read/write IOPS.
- PL2: A single ESSD delivers up to 100,000 random read/write IOPS.
- PL3: A single ESSD delivers up to 1,000,000 random read/write IOPS.
 
- resourceGroup stringId 
- The Id of resource group which the disk belongs. - NOTE: Disk category - cloudhas been outdated and it only can be used none I/O Optimized ECS instances. Recommend- cloud_efficiencyand- cloud_ssddisk.
- size number
- The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error InvalidDiskSize.TooSmall.
- snapshotId string
- A snapshot to base the disk off of. If the disk size required by snapshot is greater than size, thesizewill be ignored, conflict withencrypted.
- status string
- The disk status.
- storageSet stringId 
- storageSet numberPartition Number 
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- type string
- zoneId string
- advanced_features str
- availability_zone str
- The Zone to create the disk in.
- category str
- Category of the disk. Valid values are cloud,cloud_efficiency,cloud_ssd,cloud_essd,cloud_essd_entry. Default iscloud_efficiency.
- delete_auto_ boolsnapshot 
- Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
- delete_with_ boolinstance 
- Indicates whether the disk is released together with the instance: Default value: false.
- description str
- Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- disk_name str
- dry_run bool
- enable_auto_ boolsnapshot 
- Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
- encrypt_algorithm str
- encrypted bool
- If true, the disk will be encrypted, conflict with snapshot_id.
- instance_id str
- kms_key_ strid 
- The ID of the KMS key corresponding to the data disk, The specified parameter Encryptedmust betruewhen KmsKeyId is not empty.
- name str
- Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
- payment_type str
- performance_level str
- Specifies the performance level of an ESSD when you create the ESSD. Default value: PL1. Valid values:- PL1: A single ESSD delivers up to 50,000 random read/write IOPS.
- PL2: A single ESSD delivers up to 100,000 random read/write IOPS.
- PL3: A single ESSD delivers up to 1,000,000 random read/write IOPS.
 
- resource_group_ strid 
- The Id of resource group which the disk belongs. - NOTE: Disk category - cloudhas been outdated and it only can be used none I/O Optimized ECS instances. Recommend- cloud_efficiencyand- cloud_ssddisk.
- size int
- The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error InvalidDiskSize.TooSmall.
- snapshot_id str
- A snapshot to base the disk off of. If the disk size required by snapshot is greater than size, thesizewill be ignored, conflict withencrypted.
- status str
- The disk status.
- storage_set_ strid 
- storage_set_ intpartition_ number 
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- type str
- zone_id str
- advancedFeatures String
- availabilityZone String
- The Zone to create the disk in.
- category String
- Category of the disk. Valid values are cloud,cloud_efficiency,cloud_ssd,cloud_essd,cloud_essd_entry. Default iscloud_efficiency.
- deleteAuto BooleanSnapshot 
- Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
- deleteWith BooleanInstance 
- Indicates whether the disk is released together with the instance: Default value: false.
- description String
- Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- diskName String
- dryRun Boolean
- enableAuto BooleanSnapshot 
- Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
- encryptAlgorithm String
- encrypted Boolean
- If true, the disk will be encrypted, conflict with snapshot_id.
- instanceId String
- kmsKey StringId 
- The ID of the KMS key corresponding to the data disk, The specified parameter Encryptedmust betruewhen KmsKeyId is not empty.
- name String
- Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
- paymentType String
- performanceLevel String
- Specifies the performance level of an ESSD when you create the ESSD. Default value: PL1. Valid values:- PL1: A single ESSD delivers up to 50,000 random read/write IOPS.
- PL2: A single ESSD delivers up to 100,000 random read/write IOPS.
- PL3: A single ESSD delivers up to 1,000,000 random read/write IOPS.
 
- resourceGroup StringId 
- The Id of resource group which the disk belongs. - NOTE: Disk category - cloudhas been outdated and it only can be used none I/O Optimized ECS instances. Recommend- cloud_efficiencyand- cloud_ssddisk.
- size Number
- The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error InvalidDiskSize.TooSmall.
- snapshotId String
- A snapshot to base the disk off of. If the disk size required by snapshot is greater than size, thesizewill be ignored, conflict withencrypted.
- status String
- The disk status.
- storageSet StringId 
- storageSet NumberPartition Number 
- Map<String>
- A mapping of tags to assign to the resource.
- type String
- zoneId String
Import
Cloud disk can be imported using the id, e.g.
$ pulumi import alicloud:ecs/disk:Disk example d-abc12345678
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.