DiskArgs

data class DiskArgs(val advancedFeatures: Output<String>? = null, val availabilityZone: Output<String>? = null, val burstingEnabled: Output<Boolean>? = null, val category: Output<String>? = null, val deleteAutoSnapshot: Output<Boolean>? = null, val deleteWithInstance: Output<Boolean>? = null, val description: Output<String>? = null, val diskName: Output<String>? = null, val dryRun: Output<Boolean>? = null, val enableAutoSnapshot: Output<Boolean>? = null, val encryptAlgorithm: Output<String>? = null, val encrypted: Output<Boolean>? = null, val instanceId: Output<String>? = null, val kmsKeyId: Output<String>? = null, val multiAttach: Output<String>? = null, val name: Output<String>? = null, val paymentType: Output<String>? = null, val performanceLevel: Output<String>? = null, val provisionedIops: Output<Int>? = null, val resourceGroupId: Output<String>? = null, val size: Output<Int>? = null, val snapshotId: Output<String>? = null, val storageSetId: Output<String>? = null, val storageSetPartitionNumber: Output<Int>? = null, val tags: Output<Map<String, String>>? = null, val type: Output<String>? = null, val zoneId: Output<String>? = null) : ConvertibleToJava<DiskArgs>

Provides a ECS disk resource.

DEPRECATED: This resource has been renamed to alicloud.ecs.EcsDisk from version 1.122.0. NOTE: One of size or snapshot_id is required when specifying an ECS disk. If all of them be specified, size must more than the size of snapshot which snapshot_id represents. Currently, alicloud.ecs.Disk doesn'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",
})
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 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
})
}
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

Import

Cloud disk can be imported using the id, e.g.

$ pulumi import alicloud:ecs/disk:Disk example d-abc12345678

Constructors

Link copied to clipboard
constructor(advancedFeatures: Output<String>? = null, availabilityZone: Output<String>? = null, burstingEnabled: Output<Boolean>? = null, category: Output<String>? = null, deleteAutoSnapshot: Output<Boolean>? = null, deleteWithInstance: Output<Boolean>? = null, description: Output<String>? = null, diskName: Output<String>? = null, dryRun: Output<Boolean>? = null, enableAutoSnapshot: Output<Boolean>? = null, encryptAlgorithm: Output<String>? = null, encrypted: Output<Boolean>? = null, instanceId: Output<String>? = null, kmsKeyId: Output<String>? = null, multiAttach: Output<String>? = null, name: Output<String>? = null, paymentType: Output<String>? = null, performanceLevel: Output<String>? = null, provisionedIops: Output<Int>? = null, resourceGroupId: Output<String>? = null, size: Output<Int>? = null, snapshotId: Output<String>? = null, storageSetId: Output<String>? = null, storageSetPartitionNumber: Output<Int>? = null, tags: Output<Map<String, String>>? = null, type: Output<String>? = null, zoneId: Output<String>? = null)

Properties

Link copied to clipboard
val advancedFeatures: Output<String>? = null
Link copied to clipboard
val availabilityZone: Output<String>? = null

The Zone to create the disk in.

Link copied to clipboard
val burstingEnabled: Output<Boolean>? = null
Link copied to clipboard
val category: Output<String>? = null

Category of the disk. Valid values are cloud, cloud_efficiency, cloud_ssd, cloud_essd, cloud_essd_entry. Default is cloud_efficiency.

Link copied to clipboard
val deleteAutoSnapshot: Output<Boolean>? = null

Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.

Link copied to clipboard
val deleteWithInstance: Output<Boolean>? = null

Indicates whether the disk is released together with the instance: Default value: false.

Link copied to clipboard
val description: Output<String>? = null

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.

Link copied to clipboard
val diskName: Output<String>? = null
Link copied to clipboard
val dryRun: Output<Boolean>? = null
Link copied to clipboard
val enableAutoSnapshot: Output<Boolean>? = null

Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.

Link copied to clipboard
val encryptAlgorithm: Output<String>? = null
Link copied to clipboard
val encrypted: Output<Boolean>? = null

If true, the disk will be encrypted, conflict with snapshot_id.

Link copied to clipboard
val instanceId: Output<String>? = null
Link copied to clipboard
val kmsKeyId: Output<String>? = null

The ID of the KMS key corresponding to the data disk, The specified parameter Encrypted must be true when KmsKeyId is not empty.

Link copied to clipboard
val multiAttach: Output<String>? = null
Link copied to clipboard
val name: Output<String>? = null

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.

Link copied to clipboard
val paymentType: Output<String>? = null
Link copied to clipboard
val performanceLevel: Output<String>? = null

Specifies the performance level of an ESSD when you create the ESSD. Default value: PL1. Valid values:

Link copied to clipboard
val provisionedIops: Output<Int>? = null
Link copied to clipboard
val resourceGroupId: Output<String>? = null

The Id of resource group which the disk belongs.

Link copied to clipboard
val size: Output<Int>? = null

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.

Link copied to clipboard
val snapshotId: Output<String>? = null

A snapshot to base the disk off of. If the disk size required by snapshot is greater than size, the size will be ignored, conflict with encrypted.

Link copied to clipboard
val storageSetId: Output<String>? = null
Link copied to clipboard
val storageSetPartitionNumber: Output<Int>? = null
Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags to assign to the resource.

Link copied to clipboard
val type: Output<String>? = null
Link copied to clipboard
val zoneId: Output<String>? = null

Functions

Link copied to clipboard
open override fun toJava(): DiskArgs