getEcsDisks

This data source provides the Ecs Disks of the current Alibaba Cloud user.

NOTE: Available in v1.122.0+.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetEcsDisksArgs;
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 example = EcsFunctions.getEcsDisks(GetEcsDisksArgs.builder()
.ids("d-artgdsvdvxxxx")
.nameRegex("tf-test")
.build());
ctx.export("firstEcsDiskId", example.applyValue(getEcsDisksResult -> getEcsDisksResult.disks()[0].id()));
}
}

Return

A collection of values returned by getEcsDisks.

Parameters

argument

A collection of arguments for invoking getEcsDisks.


suspend fun getEcsDisks(additionalAttributes: List<String>? = null, autoSnapshotPolicyId: String? = null, availabilityZone: String? = null, category: String? = null, deleteAutoSnapshot: Boolean? = null, deleteWithInstance: Boolean? = null, diskName: String? = null, diskType: String? = null, dryRun: Boolean? = null, enableAutoSnapshot: Boolean? = null, enableAutomatedSnapshotPolicy: Boolean? = null, enableShared: Boolean? = null, encrypted: String? = null, ids: List<String>? = null, instanceId: String? = null, kmsKeyId: String? = null, nameRegex: String? = null, operationLocks: List<GetEcsDisksOperationLock>? = null, outputFile: String? = null, pageNumber: Int? = null, pageSize: Int? = null, paymentType: String? = null, portable: Boolean? = null, resourceGroupId: String? = null, snapshotId: String? = null, status: String? = null, tags: Map<String, Any>? = null, type: String? = null, zoneId: String? = null): GetEcsDisksResult

Return

A collection of values returned by getEcsDisks.

See also

Parameters

additionalAttributes

Other attribute values. Currently, only the incoming value of IOPS is supported, which means to query the IOPS upper limit of the current disk.

autoSnapshotPolicyId

Query cloud disks based on the automatic snapshot policy ID.

availabilityZone

Availability zone of the disk.

category

Disk category.

deleteAutoSnapshot

Indicates whether the automatic snapshot is deleted when the disk is released.

deleteWithInstance

Indicates whether the disk is released together with the instance.

diskName

The disk name.

diskType

The disk type.

dryRun

Specifies whether to check the validity of the request without actually making the request.request Default value: false. Valid values:

enableAutoSnapshot

Whether the disk implements an automatic snapshot policy.

enableAutomatedSnapshotPolicy

Whether the disk implements an automatic snapshot policy.

enableShared

Whether it is shared block storage.

encrypted

Indicate whether the disk is encrypted or not.

ids

A list of Disk IDs.

instanceId

The instance ID of the disk mount.

kmsKeyId

The kms key id.

nameRegex

A regex string to filter results by Disk name.

operationLocks
outputFile

File name where to save data source results (after running pulumi preview).

pageNumber
pageSize
paymentType

Payment method for disk.

portable

Whether the disk is unmountable.

resourceGroupId

The Id of resource group.

snapshotId

Snapshot used to create the disk. It is null if no snapshot is used to create the disk.

status

Current status.

tags

A map of tags assigned to the disk.

type

Disk type.

zoneId

The zone id.


suspend fun getEcsDisks(argument: suspend GetEcsDisksPlainArgsBuilder.() -> Unit): GetEcsDisksResult

Return

A collection of values returned by getEcsDisks.

See also

Parameters

argument

Builder for com.pulumi.alicloud.ecs.kotlin.inputs.GetEcsDisksPlainArgs.