DiskArgs

data class DiskArgs(val category: Output<String>? = null, val diskName: Output<String>? = null, val encrypted: Output<Boolean>? = null, val ensRegionId: Output<String>? = null, val kmsKeyId: Output<String>? = null, val paymentType: Output<String>? = null, val size: Output<Int>? = null, val snapshotId: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<DiskArgs>

Provides a ENS Disk resource. The disk. When you use it for the first time, please contact the product classmates to add a resource whitelist. For information about ENS Disk and how to use it, see What is Disk.

NOTE: Available since v1.213.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = new alicloud.ens.Disk("default", {
category: "cloud_ssd",
size: 20,
paymentType: "PayAsYouGo",
ensRegionId: "cn-chongqing-11",
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.ens.Disk("default",
category="cloud_ssd",
size=20,
payment_type="PayAsYouGo",
ens_region_id="cn-chongqing-11")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = new AliCloud.Ens.Disk("default", new()
{
Category = "cloud_ssd",
Size = 20,
PaymentType = "PayAsYouGo",
EnsRegionId = "cn-chongqing-11",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ens"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_, err := ens.NewDisk(ctx, "default", &ens.DiskArgs{
Category: pulumi.String("cloud_ssd"),
Size: pulumi.Int(20),
PaymentType: pulumi.String("PayAsYouGo"),
EnsRegionId: pulumi.String("cn-chongqing-11"),
})
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.ens.Disk;
import com.pulumi.alicloud.ens.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 config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var default_ = new Disk("default", DiskArgs.builder()
.category("cloud_ssd")
.size(20)
.paymentType("PayAsYouGo")
.ensRegionId("cn-chongqing-11")
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default:
type: alicloud:ens:Disk
properties:
category: cloud_ssd
size: '20'
paymentType: PayAsYouGo
ensRegionId: cn-chongqing-11

Import

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

$ pulumi import alicloud:ens/disk:Disk example <id>

Constructors

Link copied to clipboard
constructor(category: Output<String>? = null, diskName: Output<String>? = null, encrypted: Output<Boolean>? = null, ensRegionId: Output<String>? = null, kmsKeyId: Output<String>? = null, paymentType: Output<String>? = null, size: Output<Int>? = null, snapshotId: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

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

The category of the disk. Valid values: cloud_efficiency (high-efficiency cloud disk), cloud_ssd (full Flash cloud disk), local_hdd (local HDD), local_ssd (local ssd).

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

The name of the disk.

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

Specifies whether to encrypt the new system disk. Valid values: true, false(default).

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

The ID of the edge node.

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

The ID of the KMS key used by the cloud disk. If encrypted is set to true, the service default key is used when KMSKeyId is empty.

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

The billing method of the instance. Valid values: PayAsYouGo.

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

The size of the disk instance. Unit: GiB.

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

The ID of the snapshot used to create the cloud disk. The SnapshotId and Size parameters have the following limitations:

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

The label to which the instance is bound.

Functions

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