get Ecs Disks
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
A collection of arguments for invoking getEcsDisks.
Return
A collection of values returned by getEcsDisks.
See also
Parameters
Other attribute values. Currently, only the incoming value of IOPS is supported, which means to query the IOPS upper limit of the current disk.
Query cloud disks based on the automatic snapshot policy ID.
Availability zone of the disk.
Disk category.
Indicates whether the automatic snapshot is deleted when the disk is released.
Indicates whether the disk is released together with the instance.
The disk name.
The disk type.
Specifies whether to check the validity of the request without actually making the request.request Default value: false. Valid values:
Whether the disk implements an automatic snapshot policy.
Whether the disk implements an automatic snapshot policy.
Whether it is shared block storage.
Indicate whether the disk is encrypted or not.
A list of Disk IDs.
The instance ID of the disk mount.
The kms key id.
A regex string to filter results by Disk name.
File name where to save data source results (after running pulumi preview
).
Payment method for disk.
Whether the disk is unmountable.
The Id of resource group.
Snapshot used to create the disk. It is null if no snapshot is used to create the disk.
Current status.
A map of tags assigned to the disk.
Disk type.
The zone id.
Return
A collection of values returned by getEcsDisks.
See also
Parameters
Builder for com.pulumi.alicloud.ecs.kotlin.inputs.GetEcsDisksPlainArgs.