Class Disk
Inherited Members
Namespace: Pulumi.AliCloud.Ecs
Assembly: Pulumi.AliCloud.dll
Syntax
public class Disk : CustomResource
Constructors
View SourceDisk(String, DiskArgs, CustomResourceOptions)
Create a Disk resource with the given unique name, arguments, and options.
Declaration
public Disk(string name, DiskArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| DiskArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAvailabilityZone
The Zone to create the disk in.
Declaration
public Output<string> AvailabilityZone { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Category
Category of the disk. Valid values are cloud, cloud_efficiency, cloud_ssd, cloud_essd. Default is cloud_efficiency.
Declaration
public Output<string> Category { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DeleteAutoSnapshot
Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
Declaration
public Output<bool?> DeleteAutoSnapshot { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
DeleteWithInstance
Indicates whether the disk is released together with the instance: Default value: false.
Declaration
public Output<bool?> DeleteWithInstance { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Description
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.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
EnableAutoSnapshot
Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
Declaration
public Output<bool?> EnableAutoSnapshot { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Encrypted
If true, the disk will be encrypted, conflict with snapshot_id.
Declaration
public Output<bool?> Encrypted { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Name
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.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ResourceGroupId
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. Recommendcloud_efficiencyandcloud_ssddisk.
Declaration
public Output<string> ResourceGroupId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Size
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.
Declaration
public Output<int> Size { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
SnapshotId
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.
Declaration
public Output<string> SnapshotId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Status
The disk status.
Declaration
public Output<string> Status { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
A mapping of tags to assign to the resource.
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
Methods
View SourceGet(String, Input<String>, DiskState, CustomResourceOptions)
Get an existing Disk resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Disk Get(string name, Input<string> id, DiskState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| DiskState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Disk |