alicloud.ecs.getDisks
Explore with Pulumi AI
DEPRECATED: This datasource has been renamed to alicloud.ecs.getEcsDisks from version 1.122.0.
This data source provides the disks of the current Alibaba Cloud user.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const disksDs = alicloud.ecs.getDisks({
    nameRegex: "sample_disk",
});
export const firstDiskId = disksDs.then(disksDs => disksDs.disks?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
disks_ds = alicloud.ecs.get_disks(name_regex="sample_disk")
pulumi.export("firstDiskId", disks_ds.disks[0].id)
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 {
		disksDs, err := ecs.GetDisks(ctx, &ecs.GetDisksArgs{
			NameRegex: pulumi.StringRef("sample_disk"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstDiskId", disksDs.Disks[0].Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() => 
{
    var disksDs = AliCloud.Ecs.GetDisks.Invoke(new()
    {
        NameRegex = "sample_disk",
    });
    return new Dictionary<string, object?>
    {
        ["firstDiskId"] = disksDs.Apply(getDisksResult => getDisksResult.Disks[0]?.Id),
    };
});
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.GetDisksArgs;
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 disksDs = EcsFunctions.getDisks(GetDisksArgs.builder()
            .nameRegex("sample_disk")
            .build());
        ctx.export("firstDiskId", disksDs.applyValue(getDisksResult -> getDisksResult.disks()[0].id()));
    }
}
variables:
  disksDs:
    fn::invoke:
      function: alicloud:ecs:getDisks
      arguments:
        nameRegex: sample_disk
outputs:
  firstDiskId: ${disksDs.disks[0].id}
Using getDisks
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDisks(args: GetDisksArgs, opts?: InvokeOptions): Promise<GetDisksResult>
function getDisksOutput(args: GetDisksOutputArgs, opts?: InvokeOptions): Output<GetDisksResult>def get_disks(additional_attributes: Optional[Sequence[str]] = None,
              auto_snapshot_policy_id: Optional[str] = None,
              availability_zone: Optional[str] = None,
              category: Optional[str] = None,
              delete_auto_snapshot: Optional[bool] = None,
              delete_with_instance: Optional[bool] = None,
              disk_name: Optional[str] = None,
              disk_type: Optional[str] = None,
              dry_run: Optional[bool] = None,
              enable_auto_snapshot: Optional[bool] = None,
              enable_automated_snapshot_policy: Optional[bool] = None,
              enable_shared: Optional[bool] = None,
              encrypted: Optional[str] = None,
              ids: Optional[Sequence[str]] = None,
              instance_id: Optional[str] = None,
              kms_key_id: Optional[str] = None,
              name_regex: Optional[str] = None,
              operation_locks: Optional[Sequence[GetDisksOperationLock]] = None,
              output_file: Optional[str] = None,
              page_number: Optional[int] = None,
              page_size: Optional[int] = None,
              payment_type: Optional[str] = None,
              portable: Optional[bool] = None,
              resource_group_id: Optional[str] = None,
              snapshot_id: Optional[str] = None,
              status: Optional[str] = None,
              tags: Optional[Mapping[str, str]] = None,
              type: Optional[str] = None,
              zone_id: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetDisksResult
def get_disks_output(additional_attributes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
              auto_snapshot_policy_id: Optional[pulumi.Input[str]] = None,
              availability_zone: Optional[pulumi.Input[str]] = None,
              category: Optional[pulumi.Input[str]] = None,
              delete_auto_snapshot: Optional[pulumi.Input[bool]] = None,
              delete_with_instance: Optional[pulumi.Input[bool]] = None,
              disk_name: Optional[pulumi.Input[str]] = None,
              disk_type: Optional[pulumi.Input[str]] = None,
              dry_run: Optional[pulumi.Input[bool]] = None,
              enable_auto_snapshot: Optional[pulumi.Input[bool]] = None,
              enable_automated_snapshot_policy: Optional[pulumi.Input[bool]] = None,
              enable_shared: Optional[pulumi.Input[bool]] = None,
              encrypted: Optional[pulumi.Input[str]] = None,
              ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
              instance_id: Optional[pulumi.Input[str]] = None,
              kms_key_id: Optional[pulumi.Input[str]] = None,
              name_regex: Optional[pulumi.Input[str]] = None,
              operation_locks: Optional[pulumi.Input[Sequence[pulumi.Input[GetDisksOperationLockArgs]]]] = None,
              output_file: Optional[pulumi.Input[str]] = None,
              page_number: Optional[pulumi.Input[int]] = None,
              page_size: Optional[pulumi.Input[int]] = None,
              payment_type: Optional[pulumi.Input[str]] = None,
              portable: Optional[pulumi.Input[bool]] = None,
              resource_group_id: Optional[pulumi.Input[str]] = None,
              snapshot_id: Optional[pulumi.Input[str]] = None,
              status: Optional[pulumi.Input[str]] = None,
              tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
              type: Optional[pulumi.Input[str]] = None,
              zone_id: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetDisksResult]func GetDisks(ctx *Context, args *GetDisksArgs, opts ...InvokeOption) (*GetDisksResult, error)
func GetDisksOutput(ctx *Context, args *GetDisksOutputArgs, opts ...InvokeOption) GetDisksResultOutput> Note: This function is named GetDisks in the Go SDK.
public static class GetDisks 
{
    public static Task<GetDisksResult> InvokeAsync(GetDisksArgs args, InvokeOptions? opts = null)
    public static Output<GetDisksResult> Invoke(GetDisksInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDisksResult> getDisks(GetDisksArgs args, InvokeOptions options)
public static Output<GetDisksResult> getDisks(GetDisksArgs args, InvokeOptions options)
fn::invoke:
  function: alicloud:ecs/getDisks:getDisks
  arguments:
    # arguments dictionaryThe following arguments are supported:
- AdditionalAttributes List<string>
- AutoSnapshot stringPolicy Id 
- AvailabilityZone string
- Availability zone of the disk.
- Category string
- Disk category. Possible values: cloud(basic cloud disk),cloud_efficiency(ultra cloud disk),ephemeral_ssd(local SSD cloud disk),cloud_ssd(SSD cloud disk), andcloud_essd(ESSD cloud disk),cloud_essd_entry.
- DeleteAuto boolSnapshot 
- DeleteWith boolInstance 
- DiskName string
- DiskType string
- DryRun bool
- EnableAuto boolSnapshot 
- EnableAutomated boolSnapshot Policy 
- bool
- Encrypted string
- Indicate whether the disk is encrypted or not. Possible values: onandoff.
- Ids List<string>
- A list of disks IDs.
- InstanceId string
- Filter the results by the specified ECS instance ID.
- KmsKey stringId 
- NameRegex string
- A regex string to filter results by disk name.
- OperationLocks List<Pulumi.Ali Cloud. Ecs. Inputs. Get Disks Operation Lock> 
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- PageNumber int
- PageSize int
- PaymentType string
- Portable bool
- ResourceGroup stringId 
- The Id of resource group which the disk belongs.
- SnapshotId string
- Snapshot used to create the disk. It is null if no snapshot is used to create the disk.
- Status string
- Current status. Possible values: In_use,Available,Attaching,Detaching,CreatingandReIniting.
- Dictionary<string, string>
- A map of tags assigned to the disks. It must be in the format:import * as pulumi from "@pulumi/pulumi"; import * as alicloud from "@pulumi/alicloud";const disksDs = alicloud.ecs.getDisks({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, }); import pulumi import pulumi_alicloud as alicloud disks_ds = alicloud.ecs.get_disks(tags={ "tagKey1": "tagValue1", "tagKey2": "tagValue2", })using System.Collections.Generic; using System.Linq; using Pulumi; using AliCloud = Pulumi.AliCloud; return await Deployment.RunAsync(() => { var disksDs = AliCloud.Ecs.GetDisks.Invoke(new() { Tags = { { "tagKey1", "tagValue1" }, { "tagKey2", "tagValue2" }, }, }); });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 { _, err := ecs.GetDisks(ctx, &ecs.GetDisksArgs{ Tags: map[string]interface{}{ "tagKey1": "tagValue1", "tagKey2": "tagValue2", }, }, nil) 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.EcsFunctions; import com.pulumi.alicloud.ecs.inputs.GetDisksArgs; 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 disksDs = EcsFunctions.getDisks(GetDisksArgs.builder() .tags(Map.ofEntries( Map.entry("tagKey1", "tagValue1"), Map.entry("tagKey2", "tagValue2") )) .build()); } }variables: disksDs: fn::invoke: function: alicloud:ecs:getDisks arguments: tags: tagKey1: tagValue1 tagKey2: tagValue2
- title="Optional, Deprecated"> <span id="type_csharp">- Type string 
- Disk type. Possible values: systemanddata.
- ZoneId string
- AdditionalAttributes []string
- AutoSnapshot stringPolicy Id 
- AvailabilityZone string
- Availability zone of the disk.
- Category string
- Disk category. Possible values: cloud(basic cloud disk),cloud_efficiency(ultra cloud disk),ephemeral_ssd(local SSD cloud disk),cloud_ssd(SSD cloud disk), andcloud_essd(ESSD cloud disk),cloud_essd_entry.
- DeleteAuto boolSnapshot 
- DeleteWith boolInstance 
- DiskName string
- DiskType string
- DryRun bool
- EnableAuto boolSnapshot 
- EnableAutomated boolSnapshot Policy 
- bool
- Encrypted string
- Indicate whether the disk is encrypted or not. Possible values: onandoff.
- Ids []string
- A list of disks IDs.
- InstanceId string
- Filter the results by the specified ECS instance ID.
- KmsKey stringId 
- NameRegex string
- A regex string to filter results by disk name.
- OperationLocks []GetDisks Operation Lock 
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- PageNumber int
- PageSize int
- PaymentType string
- Portable bool
- ResourceGroup stringId 
- The Id of resource group which the disk belongs.
- SnapshotId string
- Snapshot used to create the disk. It is null if no snapshot is used to create the disk.
- Status string
- Current status. Possible values: In_use,Available,Attaching,Detaching,CreatingandReIniting.
- map[string]string
- A map of tags assigned to the disks. It must be in the format:import * as pulumi from "@pulumi/pulumi"; import * as alicloud from "@pulumi/alicloud";const disksDs = alicloud.ecs.getDisks({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, }); import pulumi import pulumi_alicloud as alicloud disks_ds = alicloud.ecs.get_disks(tags={ "tagKey1": "tagValue1", "tagKey2": "tagValue2", })using System.Collections.Generic; using System.Linq; using Pulumi; using AliCloud = Pulumi.AliCloud; return await Deployment.RunAsync(() => { var disksDs = AliCloud.Ecs.GetDisks.Invoke(new() { Tags = { { "tagKey1", "tagValue1" }, { "tagKey2", "tagValue2" }, }, }); });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 { _, err := ecs.GetDisks(ctx, &ecs.GetDisksArgs{ Tags: map[string]interface{}{ "tagKey1": "tagValue1", "tagKey2": "tagValue2", }, }, nil) 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.EcsFunctions; import com.pulumi.alicloud.ecs.inputs.GetDisksArgs; 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 disksDs = EcsFunctions.getDisks(GetDisksArgs.builder() .tags(Map.ofEntries( Map.entry("tagKey1", "tagValue1"), Map.entry("tagKey2", "tagValue2") )) .build()); } }variables: disksDs: fn::invoke: function: alicloud:ecs:getDisks arguments: tags: tagKey1: tagValue1 tagKey2: tagValue2
- title="Optional, Deprecated"> <span id="type_go">- Type string 
- Disk type. Possible values: systemanddata.
- ZoneId string
- additionalAttributes List<String>
- autoSnapshot StringPolicy Id 
- availabilityZone String
- Availability zone of the disk.
- category String
- Disk category. Possible values: cloud(basic cloud disk),cloud_efficiency(ultra cloud disk),ephemeral_ssd(local SSD cloud disk),cloud_ssd(SSD cloud disk), andcloud_essd(ESSD cloud disk),cloud_essd_entry.
- deleteAuto BooleanSnapshot 
- deleteWith BooleanInstance 
- diskName String
- diskType String
- dryRun Boolean
- enableAuto BooleanSnapshot 
- enableAutomated BooleanSnapshot Policy 
- Boolean
- encrypted String
- Indicate whether the disk is encrypted or not. Possible values: onandoff.
- ids List<String>
- A list of disks IDs.
- instanceId String
- Filter the results by the specified ECS instance ID.
- kmsKey StringId 
- nameRegex String
- A regex string to filter results by disk name.
- operationLocks List<GetDisks Operation Lock> 
- outputFile String
- File name where to save data source results (after running pulumi preview).
- pageNumber Integer
- pageSize Integer
- paymentType String
- portable Boolean
- resourceGroup StringId 
- The Id of resource group which the disk belongs.
- snapshotId String
- Snapshot used to create the disk. It is null if no snapshot is used to create the disk.
- status String
- Current status. Possible values: In_use,Available,Attaching,Detaching,CreatingandReIniting.
- Map<String,String>
- A map of tags assigned to the disks. It must be in the format:import * as pulumi from "@pulumi/pulumi"; import * as alicloud from "@pulumi/alicloud";const disksDs = alicloud.ecs.getDisks({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, }); import pulumi import pulumi_alicloud as alicloud disks_ds = alicloud.ecs.get_disks(tags={ "tagKey1": "tagValue1", "tagKey2": "tagValue2", })using System.Collections.Generic; using System.Linq; using Pulumi; using AliCloud = Pulumi.AliCloud; return await Deployment.RunAsync(() => { var disksDs = AliCloud.Ecs.GetDisks.Invoke(new() { Tags = { { "tagKey1", "tagValue1" }, { "tagKey2", "tagValue2" }, }, }); });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 { _, err := ecs.GetDisks(ctx, &ecs.GetDisksArgs{ Tags: map[string]interface{}{ "tagKey1": "tagValue1", "tagKey2": "tagValue2", }, }, nil) 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.EcsFunctions; import com.pulumi.alicloud.ecs.inputs.GetDisksArgs; 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 disksDs = EcsFunctions.getDisks(GetDisksArgs.builder() .tags(Map.ofEntries( Map.entry("tagKey1", "tagValue1"), Map.entry("tagKey2", "tagValue2") )) .build()); } }variables: disksDs: fn::invoke: function: alicloud:ecs:getDisks arguments: tags: tagKey1: tagValue1 tagKey2: tagValue2
- title="Optional, Deprecated"> <span id="type_java">- type String 
- Disk type. Possible values: systemanddata.
- zoneId String
- additionalAttributes string[]
- autoSnapshot stringPolicy Id 
- availabilityZone string
- Availability zone of the disk.
- category string
- Disk category. Possible values: cloud(basic cloud disk),cloud_efficiency(ultra cloud disk),ephemeral_ssd(local SSD cloud disk),cloud_ssd(SSD cloud disk), andcloud_essd(ESSD cloud disk),cloud_essd_entry.
- deleteAuto booleanSnapshot 
- deleteWith booleanInstance 
- diskName string
- diskType string
- dryRun boolean
- enableAuto booleanSnapshot 
- enableAutomated booleanSnapshot Policy 
- boolean
- encrypted string
- Indicate whether the disk is encrypted or not. Possible values: onandoff.
- ids string[]
- A list of disks IDs.
- instanceId string
- Filter the results by the specified ECS instance ID.
- kmsKey stringId 
- nameRegex string
- A regex string to filter results by disk name.
- operationLocks GetDisks Operation Lock[] 
- outputFile string
- File name where to save data source results (after running pulumi preview).
- pageNumber number
- pageSize number
- paymentType string
- portable boolean
- resourceGroup stringId 
- The Id of resource group which the disk belongs.
- snapshotId string
- Snapshot used to create the disk. It is null if no snapshot is used to create the disk.
- status string
- Current status. Possible values: In_use,Available,Attaching,Detaching,CreatingandReIniting.
- {[key: string]: string}
- A map of tags assigned to the disks. It must be in the format:import * as pulumi from "@pulumi/pulumi"; import * as alicloud from "@pulumi/alicloud";const disksDs = alicloud.ecs.getDisks({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, }); import pulumi import pulumi_alicloud as alicloud disks_ds = alicloud.ecs.get_disks(tags={ "tagKey1": "tagValue1", "tagKey2": "tagValue2", })using System.Collections.Generic; using System.Linq; using Pulumi; using AliCloud = Pulumi.AliCloud; return await Deployment.RunAsync(() => { var disksDs = AliCloud.Ecs.GetDisks.Invoke(new() { Tags = { { "tagKey1", "tagValue1" }, { "tagKey2", "tagValue2" }, }, }); });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 { _, err := ecs.GetDisks(ctx, &ecs.GetDisksArgs{ Tags: map[string]interface{}{ "tagKey1": "tagValue1", "tagKey2": "tagValue2", }, }, nil) 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.EcsFunctions; import com.pulumi.alicloud.ecs.inputs.GetDisksArgs; 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 disksDs = EcsFunctions.getDisks(GetDisksArgs.builder() .tags(Map.ofEntries( Map.entry("tagKey1", "tagValue1"), Map.entry("tagKey2", "tagValue2") )) .build()); } }variables: disksDs: fn::invoke: function: alicloud:ecs:getDisks arguments: tags: tagKey1: tagValue1 tagKey2: tagValue2
- title="Optional, Deprecated"> <span id="type_nodejs">- type string 
- Disk type. Possible values: systemanddata.
- zoneId string
- additional_attributes Sequence[str]
- auto_snapshot_ strpolicy_ id 
- availability_zone str
- Availability zone of the disk.
- category str
- Disk category. Possible values: cloud(basic cloud disk),cloud_efficiency(ultra cloud disk),ephemeral_ssd(local SSD cloud disk),cloud_ssd(SSD cloud disk), andcloud_essd(ESSD cloud disk),cloud_essd_entry.
- delete_auto_ boolsnapshot 
- delete_with_ boolinstance 
- disk_name str
- disk_type str
- dry_run bool
- enable_auto_ boolsnapshot 
- enable_automated_ boolsnapshot_ policy 
- bool
- encrypted str
- Indicate whether the disk is encrypted or not. Possible values: onandoff.
- ids Sequence[str]
- A list of disks IDs.
- instance_id str
- Filter the results by the specified ECS instance ID.
- kms_key_ strid 
- name_regex str
- A regex string to filter results by disk name.
- operation_locks Sequence[GetDisks Operation Lock] 
- output_file str
- File name where to save data source results (after running pulumi preview).
- page_number int
- page_size int
- payment_type str
- portable bool
- resource_group_ strid 
- The Id of resource group which the disk belongs.
- snapshot_id str
- Snapshot used to create the disk. It is null if no snapshot is used to create the disk.
- status str
- Current status. Possible values: In_use,Available,Attaching,Detaching,CreatingandReIniting.
- Mapping[str, str]
- A map of tags assigned to the disks. It must be in the format:import * as pulumi from "@pulumi/pulumi"; import * as alicloud from "@pulumi/alicloud";const disksDs = alicloud.ecs.getDisks({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, }); import pulumi import pulumi_alicloud as alicloud disks_ds = alicloud.ecs.get_disks(tags={ "tagKey1": "tagValue1", "tagKey2": "tagValue2", })using System.Collections.Generic; using System.Linq; using Pulumi; using AliCloud = Pulumi.AliCloud; return await Deployment.RunAsync(() => { var disksDs = AliCloud.Ecs.GetDisks.Invoke(new() { Tags = { { "tagKey1", "tagValue1" }, { "tagKey2", "tagValue2" }, }, }); });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 { _, err := ecs.GetDisks(ctx, &ecs.GetDisksArgs{ Tags: map[string]interface{}{ "tagKey1": "tagValue1", "tagKey2": "tagValue2", }, }, nil) 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.EcsFunctions; import com.pulumi.alicloud.ecs.inputs.GetDisksArgs; 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 disksDs = EcsFunctions.getDisks(GetDisksArgs.builder() .tags(Map.ofEntries( Map.entry("tagKey1", "tagValue1"), Map.entry("tagKey2", "tagValue2") )) .build()); } }variables: disksDs: fn::invoke: function: alicloud:ecs:getDisks arguments: tags: tagKey1: tagValue1 tagKey2: tagValue2
- title="Optional, Deprecated"> <span id="type_python">- type str 
- Disk type. Possible values: systemanddata.
- zone_id str
- additionalAttributes List<String>
- autoSnapshot StringPolicy Id 
- availabilityZone String
- Availability zone of the disk.
- category String
- Disk category. Possible values: cloud(basic cloud disk),cloud_efficiency(ultra cloud disk),ephemeral_ssd(local SSD cloud disk),cloud_ssd(SSD cloud disk), andcloud_essd(ESSD cloud disk),cloud_essd_entry.
- deleteAuto BooleanSnapshot 
- deleteWith BooleanInstance 
- diskName String
- diskType String
- dryRun Boolean
- enableAuto BooleanSnapshot 
- enableAutomated BooleanSnapshot Policy 
- Boolean
- encrypted String
- Indicate whether the disk is encrypted or not. Possible values: onandoff.
- ids List<String>
- A list of disks IDs.
- instanceId String
- Filter the results by the specified ECS instance ID.
- kmsKey StringId 
- nameRegex String
- A regex string to filter results by disk name.
- operationLocks List<Property Map>
- outputFile String
- File name where to save data source results (after running pulumi preview).
- pageNumber Number
- pageSize Number
- paymentType String
- portable Boolean
- resourceGroup StringId 
- The Id of resource group which the disk belongs.
- snapshotId String
- Snapshot used to create the disk. It is null if no snapshot is used to create the disk.
- status String
- Current status. Possible values: In_use,Available,Attaching,Detaching,CreatingandReIniting.
- Map<String>
- A map of tags assigned to the disks. It must be in the format:import * as pulumi from "@pulumi/pulumi"; import * as alicloud from "@pulumi/alicloud";const disksDs = alicloud.ecs.getDisks({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, }); import pulumi import pulumi_alicloud as alicloud disks_ds = alicloud.ecs.get_disks(tags={ "tagKey1": "tagValue1", "tagKey2": "tagValue2", })using System.Collections.Generic; using System.Linq; using Pulumi; using AliCloud = Pulumi.AliCloud; return await Deployment.RunAsync(() => { var disksDs = AliCloud.Ecs.GetDisks.Invoke(new() { Tags = { { "tagKey1", "tagValue1" }, { "tagKey2", "tagValue2" }, }, }); });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 { _, err := ecs.GetDisks(ctx, &ecs.GetDisksArgs{ Tags: map[string]interface{}{ "tagKey1": "tagValue1", "tagKey2": "tagValue2", }, }, nil) 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.EcsFunctions; import com.pulumi.alicloud.ecs.inputs.GetDisksArgs; 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 disksDs = EcsFunctions.getDisks(GetDisksArgs.builder() .tags(Map.ofEntries( Map.entry("tagKey1", "tagValue1"), Map.entry("tagKey2", "tagValue2") )) .build()); } }variables: disksDs: fn::invoke: function: alicloud:ecs:getDisks arguments: tags: tagKey1: tagValue1 tagKey2: tagValue2
- title="Optional, Deprecated"> <span id="type_yaml">- type String 
- Disk type. Possible values: systemanddata.
- zoneId String
getDisks Result
The following output properties are available:
- Disks
List<Pulumi.Ali Cloud. Ecs. Outputs. Get Disks Disk> 
- A list of disks. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- TotalCount int
- AdditionalAttributes List<string>
- AutoSnapshot stringPolicy Id 
- AvailabilityZone string
- Availability zone of the disk.
- Category string
- Disk category. Possible values: cloud(basic cloud disk),cloud_efficiency(ultra cloud disk),ephemeral_ssd(local SSD cloud disk),cloud_ssd(SSD cloud disk), andcloud_essd(ESSD cloud disk).
- DeleteAuto boolSnapshot 
- DeleteWith boolInstance 
- DiskName string
- DiskType string
- DryRun bool
- EnableAuto boolSnapshot 
- EnableAutomated boolSnapshot Policy 
- bool
- Encrypted string
- Indicate whether the disk is encrypted or not. Possible values: onandoff.
- InstanceId string
- ID of the related instance. It is nullunless thestatusisIn_use.
- KmsKey stringId 
- NameRegex string
- OperationLocks List<Pulumi.Ali Cloud. Ecs. Outputs. Get Disks Operation Lock> 
- OutputFile string
- PageNumber int
- PageSize int
- PaymentType string
- Portable bool
- ResourceGroup stringId 
- The Id of resource group.
- SnapshotId string
- Snapshot used to create the disk. It is null if no snapshot is used to create the disk.
- Status string
- Current status. Possible values: In_use,Available,Attaching,Detaching,CreatingandReIniting.
- Dictionary<string, string>
- A map of tags assigned to the disk.
- Type string
- Disk type. Possible values: systemanddata.
- ZoneId string
- Disks
[]GetDisks Disk 
- A list of disks. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- TotalCount int
- AdditionalAttributes []string
- AutoSnapshot stringPolicy Id 
- AvailabilityZone string
- Availability zone of the disk.
- Category string
- Disk category. Possible values: cloud(basic cloud disk),cloud_efficiency(ultra cloud disk),ephemeral_ssd(local SSD cloud disk),cloud_ssd(SSD cloud disk), andcloud_essd(ESSD cloud disk).
- DeleteAuto boolSnapshot 
- DeleteWith boolInstance 
- DiskName string
- DiskType string
- DryRun bool
- EnableAuto boolSnapshot 
- EnableAutomated boolSnapshot Policy 
- bool
- Encrypted string
- Indicate whether the disk is encrypted or not. Possible values: onandoff.
- InstanceId string
- ID of the related instance. It is nullunless thestatusisIn_use.
- KmsKey stringId 
- NameRegex string
- OperationLocks []GetDisks Operation Lock 
- OutputFile string
- PageNumber int
- PageSize int
- PaymentType string
- Portable bool
- ResourceGroup stringId 
- The Id of resource group.
- SnapshotId string
- Snapshot used to create the disk. It is null if no snapshot is used to create the disk.
- Status string
- Current status. Possible values: In_use,Available,Attaching,Detaching,CreatingandReIniting.
- map[string]string
- A map of tags assigned to the disk.
- Type string
- Disk type. Possible values: systemanddata.
- ZoneId string
- disks
List<GetDisks Disk> 
- A list of disks. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- totalCount Integer
- additionalAttributes List<String>
- autoSnapshot StringPolicy Id 
- availabilityZone String
- Availability zone of the disk.
- category String
- Disk category. Possible values: cloud(basic cloud disk),cloud_efficiency(ultra cloud disk),ephemeral_ssd(local SSD cloud disk),cloud_ssd(SSD cloud disk), andcloud_essd(ESSD cloud disk).
- deleteAuto BooleanSnapshot 
- deleteWith BooleanInstance 
- diskName String
- diskType String
- dryRun Boolean
- enableAuto BooleanSnapshot 
- enableAutomated BooleanSnapshot Policy 
- Boolean
- encrypted String
- Indicate whether the disk is encrypted or not. Possible values: onandoff.
- instanceId String
- ID of the related instance. It is nullunless thestatusisIn_use.
- kmsKey StringId 
- nameRegex String
- operationLocks List<GetDisks Operation Lock> 
- outputFile String
- pageNumber Integer
- pageSize Integer
- paymentType String
- portable Boolean
- resourceGroup StringId 
- The Id of resource group.
- snapshotId String
- Snapshot used to create the disk. It is null if no snapshot is used to create the disk.
- status String
- Current status. Possible values: In_use,Available,Attaching,Detaching,CreatingandReIniting.
- Map<String,String>
- A map of tags assigned to the disk.
- type String
- Disk type. Possible values: systemanddata.
- zoneId String
- disks
GetDisks Disk[] 
- A list of disks. Each element contains the following attributes:
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- totalCount number
- additionalAttributes string[]
- autoSnapshot stringPolicy Id 
- availabilityZone string
- Availability zone of the disk.
- category string
- Disk category. Possible values: cloud(basic cloud disk),cloud_efficiency(ultra cloud disk),ephemeral_ssd(local SSD cloud disk),cloud_ssd(SSD cloud disk), andcloud_essd(ESSD cloud disk).
- deleteAuto booleanSnapshot 
- deleteWith booleanInstance 
- diskName string
- diskType string
- dryRun boolean
- enableAuto booleanSnapshot 
- enableAutomated booleanSnapshot Policy 
- boolean
- encrypted string
- Indicate whether the disk is encrypted or not. Possible values: onandoff.
- instanceId string
- ID of the related instance. It is nullunless thestatusisIn_use.
- kmsKey stringId 
- nameRegex string
- operationLocks GetDisks Operation Lock[] 
- outputFile string
- pageNumber number
- pageSize number
- paymentType string
- portable boolean
- resourceGroup stringId 
- The Id of resource group.
- snapshotId string
- Snapshot used to create the disk. It is null if no snapshot is used to create the disk.
- status string
- Current status. Possible values: In_use,Available,Attaching,Detaching,CreatingandReIniting.
- {[key: string]: string}
- A map of tags assigned to the disk.
- type string
- Disk type. Possible values: systemanddata.
- zoneId string
- disks
Sequence[GetDisks Disk] 
- A list of disks. Each element contains the following attributes:
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- total_count int
- additional_attributes Sequence[str]
- auto_snapshot_ strpolicy_ id 
- availability_zone str
- Availability zone of the disk.
- category str
- Disk category. Possible values: cloud(basic cloud disk),cloud_efficiency(ultra cloud disk),ephemeral_ssd(local SSD cloud disk),cloud_ssd(SSD cloud disk), andcloud_essd(ESSD cloud disk).
- delete_auto_ boolsnapshot 
- delete_with_ boolinstance 
- disk_name str
- disk_type str
- dry_run bool
- enable_auto_ boolsnapshot 
- enable_automated_ boolsnapshot_ policy 
- bool
- encrypted str
- Indicate whether the disk is encrypted or not. Possible values: onandoff.
- instance_id str
- ID of the related instance. It is nullunless thestatusisIn_use.
- kms_key_ strid 
- name_regex str
- operation_locks Sequence[GetDisks Operation Lock] 
- output_file str
- page_number int
- page_size int
- payment_type str
- portable bool
- resource_group_ strid 
- The Id of resource group.
- snapshot_id str
- Snapshot used to create the disk. It is null if no snapshot is used to create the disk.
- status str
- Current status. Possible values: In_use,Available,Attaching,Detaching,CreatingandReIniting.
- Mapping[str, str]
- A map of tags assigned to the disk.
- type str
- Disk type. Possible values: systemanddata.
- zone_id str
- disks List<Property Map>
- A list of disks. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- totalCount Number
- additionalAttributes List<String>
- autoSnapshot StringPolicy Id 
- availabilityZone String
- Availability zone of the disk.
- category String
- Disk category. Possible values: cloud(basic cloud disk),cloud_efficiency(ultra cloud disk),ephemeral_ssd(local SSD cloud disk),cloud_ssd(SSD cloud disk), andcloud_essd(ESSD cloud disk).
- deleteAuto BooleanSnapshot 
- deleteWith BooleanInstance 
- diskName String
- diskType String
- dryRun Boolean
- enableAuto BooleanSnapshot 
- enableAutomated BooleanSnapshot Policy 
- Boolean
- encrypted String
- Indicate whether the disk is encrypted or not. Possible values: onandoff.
- instanceId String
- ID of the related instance. It is nullunless thestatusisIn_use.
- kmsKey StringId 
- nameRegex String
- operationLocks List<Property Map>
- outputFile String
- pageNumber Number
- pageSize Number
- paymentType String
- portable Boolean
- resourceGroup StringId 
- The Id of resource group.
- snapshotId String
- Snapshot used to create the disk. It is null if no snapshot is used to create the disk.
- status String
- Current status. Possible values: In_use,Available,Attaching,Detaching,CreatingandReIniting.
- Map<String>
- A map of tags assigned to the disk.
- type String
- Disk type. Possible values: systemanddata.
- zoneId String
Supporting Types
GetDisksDisk  
- AttachedTime string
- Disk attachment time.
- AutoSnapshot stringPolicy Id 
- AvailabilityZone string
- Availability zone of the disk.
- Category string
- Disk category. Possible values: cloud(basic cloud disk),cloud_efficiency(ultra cloud disk),ephemeral_ssd(local SSD cloud disk),cloud_ssd(SSD cloud disk), andcloud_essd(ESSD cloud disk),cloud_essd_entry.
- CreationTime string
- Disk creation time.
- DeleteAuto boolSnapshot 
- DeleteWith boolInstance 
- Description string
- Disk description.
- DetachedTime string
- Disk detachment time.
- Device string
- DiskId string
- DiskName string
- DiskType string
- EnableAuto boolSnapshot 
- EnableAutomated boolSnapshot Policy 
- Encrypted string
- Indicate whether the disk is encrypted or not. Possible values: onandoff.
- ExpirationTime string
- Disk expiration time.
- ExpiredTime string
- Id string
- ID of the disk.
- ImageId string
- ID of the image from which the disk is created. It is null unless the disk is created using an image.
- InstanceId string
- Filter the results by the specified ECS instance ID.
- Iops int
- IopsRead int
- IopsWrite int
- KmsKey stringId 
- MountInstance intNum 
- MountInstances List<Pulumi.Ali Cloud. Ecs. Inputs. Get Disks Disk Mount Instance> 
- Name string
- Disk name.
- OperationLocks List<Pulumi.Ali Cloud. Ecs. Inputs. Get Disks Disk Operation Lock> 
- PaymentType string
- PerformanceLevel string
- Portable bool
- ProductCode string
- RegionId string
- Region ID the disk belongs to.
- ResourceGroup stringId 
- The Id of resource group which the disk belongs.
- Size int
- Disk size in GiB.
- SnapshotId string
- Snapshot used to create the disk. It is null if no snapshot is used to create the disk.
- Status string
- Current status. Possible values: In_use,Available,Attaching,Detaching,CreatingandReIniting.
- Dictionary<string, string>
- A map of tags assigned to the disks. It must be in the format:import * as pulumi from "@pulumi/pulumi"; import * as alicloud from "@pulumi/alicloud";const disksDs = alicloud.ecs.getDisks({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, }); import pulumi import pulumi_alicloud as alicloud disks_ds = alicloud.ecs.get_disks(tags={ "tagKey1": "tagValue1", "tagKey2": "tagValue2", })using System.Collections.Generic; using System.Linq; using Pulumi; using AliCloud = Pulumi.AliCloud; return await Deployment.RunAsync(() => { var disksDs = AliCloud.Ecs.GetDisks.Invoke(new() { Tags = { { "tagKey1", "tagValue1" }, { "tagKey2", "tagValue2" }, }, }); });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 { _, err := ecs.GetDisks(ctx, &ecs.GetDisksArgs{ Tags: map[string]interface{}{ "tagKey1": "tagValue1", "tagKey2": "tagValue2", }, }, nil) 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.EcsFunctions; import com.pulumi.alicloud.ecs.inputs.GetDisksArgs; 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 disksDs = EcsFunctions.getDisks(GetDisksArgs.builder() .tags(Map.ofEntries( Map.entry("tagKey1", "tagValue1"), Map.entry("tagKey2", "tagValue2") )) .build()); } }variables: disksDs: fn::invoke: function: alicloud:ecs:getDisks arguments: tags: tagKey1: tagValue1 tagKey2: tagValue2
- title="Required"> <span id="type_csharp">- Type string 
- Disk type. Possible values: systemanddata.
- ZoneId string
- AttachedTime string
- Disk attachment time.
- AutoSnapshot stringPolicy Id 
- AvailabilityZone string
- Availability zone of the disk.
- Category string
- Disk category. Possible values: cloud(basic cloud disk),cloud_efficiency(ultra cloud disk),ephemeral_ssd(local SSD cloud disk),cloud_ssd(SSD cloud disk), andcloud_essd(ESSD cloud disk),cloud_essd_entry.
- CreationTime string
- Disk creation time.
- DeleteAuto boolSnapshot 
- DeleteWith boolInstance 
- Description string
- Disk description.
- DetachedTime string
- Disk detachment time.
- Device string
- DiskId string
- DiskName string
- DiskType string
- EnableAuto boolSnapshot 
- EnableAutomated boolSnapshot Policy 
- Encrypted string
- Indicate whether the disk is encrypted or not. Possible values: onandoff.
- ExpirationTime string
- Disk expiration time.
- ExpiredTime string
- Id string
- ID of the disk.
- ImageId string
- ID of the image from which the disk is created. It is null unless the disk is created using an image.
- InstanceId string
- Filter the results by the specified ECS instance ID.
- Iops int
- IopsRead int
- IopsWrite int
- KmsKey stringId 
- MountInstance intNum 
- MountInstances []GetDisks Disk Mount Instance 
- Name string
- Disk name.
- OperationLocks []GetDisks Disk Operation Lock 
- PaymentType string
- PerformanceLevel string
- Portable bool
- ProductCode string
- RegionId string
- Region ID the disk belongs to.
- ResourceGroup stringId 
- The Id of resource group which the disk belongs.
- Size int
- Disk size in GiB.
- SnapshotId string
- Snapshot used to create the disk. It is null if no snapshot is used to create the disk.
- Status string
- Current status. Possible values: In_use,Available,Attaching,Detaching,CreatingandReIniting.
- map[string]string
- A map of tags assigned to the disks. It must be in the format:import * as pulumi from "@pulumi/pulumi"; import * as alicloud from "@pulumi/alicloud";const disksDs = alicloud.ecs.getDisks({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, }); import pulumi import pulumi_alicloud as alicloud disks_ds = alicloud.ecs.get_disks(tags={ "tagKey1": "tagValue1", "tagKey2": "tagValue2", })using System.Collections.Generic; using System.Linq; using Pulumi; using AliCloud = Pulumi.AliCloud; return await Deployment.RunAsync(() => { var disksDs = AliCloud.Ecs.GetDisks.Invoke(new() { Tags = { { "tagKey1", "tagValue1" }, { "tagKey2", "tagValue2" }, }, }); });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 { _, err := ecs.GetDisks(ctx, &ecs.GetDisksArgs{ Tags: map[string]interface{}{ "tagKey1": "tagValue1", "tagKey2": "tagValue2", }, }, nil) 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.EcsFunctions; import com.pulumi.alicloud.ecs.inputs.GetDisksArgs; 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 disksDs = EcsFunctions.getDisks(GetDisksArgs.builder() .tags(Map.ofEntries( Map.entry("tagKey1", "tagValue1"), Map.entry("tagKey2", "tagValue2") )) .build()); } }variables: disksDs: fn::invoke: function: alicloud:ecs:getDisks arguments: tags: tagKey1: tagValue1 tagKey2: tagValue2
- title="Required"> <span id="type_go">- Type string 
- Disk type. Possible values: systemanddata.
- ZoneId string
- attachedTime String
- Disk attachment time.
- autoSnapshot StringPolicy Id 
- availabilityZone String
- Availability zone of the disk.
- category String
- Disk category. Possible values: cloud(basic cloud disk),cloud_efficiency(ultra cloud disk),ephemeral_ssd(local SSD cloud disk),cloud_ssd(SSD cloud disk), andcloud_essd(ESSD cloud disk),cloud_essd_entry.
- creationTime String
- Disk creation time.
- deleteAuto BooleanSnapshot 
- deleteWith BooleanInstance 
- description String
- Disk description.
- detachedTime String
- Disk detachment time.
- device String
- diskId String
- diskName String
- diskType String
- enableAuto BooleanSnapshot 
- enableAutomated BooleanSnapshot Policy 
- encrypted String
- Indicate whether the disk is encrypted or not. Possible values: onandoff.
- expirationTime String
- Disk expiration time.
- expiredTime String
- id String
- ID of the disk.
- imageId String
- ID of the image from which the disk is created. It is null unless the disk is created using an image.
- instanceId String
- Filter the results by the specified ECS instance ID.
- iops Integer
- iopsRead Integer
- iopsWrite Integer
- kmsKey StringId 
- mountInstance IntegerNum 
- mountInstances List<GetDisks Disk Mount Instance> 
- name String
- Disk name.
- operationLocks List<GetDisks Disk Operation Lock> 
- paymentType String
- performanceLevel String
- portable Boolean
- productCode String
- regionId String
- Region ID the disk belongs to.
- resourceGroup StringId 
- The Id of resource group which the disk belongs.
- size Integer
- Disk size in GiB.
- snapshotId String
- Snapshot used to create the disk. It is null if no snapshot is used to create the disk.
- status String
- Current status. Possible values: In_use,Available,Attaching,Detaching,CreatingandReIniting.
- Map<String,String>
- A map of tags assigned to the disks. It must be in the format:import * as pulumi from "@pulumi/pulumi"; import * as alicloud from "@pulumi/alicloud";const disksDs = alicloud.ecs.getDisks({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, }); import pulumi import pulumi_alicloud as alicloud disks_ds = alicloud.ecs.get_disks(tags={ "tagKey1": "tagValue1", "tagKey2": "tagValue2", })using System.Collections.Generic; using System.Linq; using Pulumi; using AliCloud = Pulumi.AliCloud; return await Deployment.RunAsync(() => { var disksDs = AliCloud.Ecs.GetDisks.Invoke(new() { Tags = { { "tagKey1", "tagValue1" }, { "tagKey2", "tagValue2" }, }, }); });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 { _, err := ecs.GetDisks(ctx, &ecs.GetDisksArgs{ Tags: map[string]interface{}{ "tagKey1": "tagValue1", "tagKey2": "tagValue2", }, }, nil) 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.EcsFunctions; import com.pulumi.alicloud.ecs.inputs.GetDisksArgs; 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 disksDs = EcsFunctions.getDisks(GetDisksArgs.builder() .tags(Map.ofEntries( Map.entry("tagKey1", "tagValue1"), Map.entry("tagKey2", "tagValue2") )) .build()); } }variables: disksDs: fn::invoke: function: alicloud:ecs:getDisks arguments: tags: tagKey1: tagValue1 tagKey2: tagValue2
- title="Required"> <span id="type_java">- type String 
- Disk type. Possible values: systemanddata.
- zoneId String
- attachedTime string
- Disk attachment time.
- autoSnapshot stringPolicy Id 
- availabilityZone string
- Availability zone of the disk.
- category string
- Disk category. Possible values: cloud(basic cloud disk),cloud_efficiency(ultra cloud disk),ephemeral_ssd(local SSD cloud disk),cloud_ssd(SSD cloud disk), andcloud_essd(ESSD cloud disk),cloud_essd_entry.
- creationTime string
- Disk creation time.
- deleteAuto booleanSnapshot 
- deleteWith booleanInstance 
- description string
- Disk description.
- detachedTime string
- Disk detachment time.
- device string
- diskId string
- diskName string
- diskType string
- enableAuto booleanSnapshot 
- enableAutomated booleanSnapshot Policy 
- encrypted string
- Indicate whether the disk is encrypted or not. Possible values: onandoff.
- expirationTime string
- Disk expiration time.
- expiredTime string
- id string
- ID of the disk.
- imageId string
- ID of the image from which the disk is created. It is null unless the disk is created using an image.
- instanceId string
- Filter the results by the specified ECS instance ID.
- iops number
- iopsRead number
- iopsWrite number
- kmsKey stringId 
- mountInstance numberNum 
- mountInstances GetDisks Disk Mount Instance[] 
- name string
- Disk name.
- operationLocks GetDisks Disk Operation Lock[] 
- paymentType string
- performanceLevel string
- portable boolean
- productCode string
- regionId string
- Region ID the disk belongs to.
- resourceGroup stringId 
- The Id of resource group which the disk belongs.
- size number
- Disk size in GiB.
- snapshotId string
- Snapshot used to create the disk. It is null if no snapshot is used to create the disk.
- status string
- Current status. Possible values: In_use,Available,Attaching,Detaching,CreatingandReIniting.
- {[key: string]: string}
- A map of tags assigned to the disks. It must be in the format:import * as pulumi from "@pulumi/pulumi"; import * as alicloud from "@pulumi/alicloud";const disksDs = alicloud.ecs.getDisks({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, }); import pulumi import pulumi_alicloud as alicloud disks_ds = alicloud.ecs.get_disks(tags={ "tagKey1": "tagValue1", "tagKey2": "tagValue2", })using System.Collections.Generic; using System.Linq; using Pulumi; using AliCloud = Pulumi.AliCloud; return await Deployment.RunAsync(() => { var disksDs = AliCloud.Ecs.GetDisks.Invoke(new() { Tags = { { "tagKey1", "tagValue1" }, { "tagKey2", "tagValue2" }, }, }); });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 { _, err := ecs.GetDisks(ctx, &ecs.GetDisksArgs{ Tags: map[string]interface{}{ "tagKey1": "tagValue1", "tagKey2": "tagValue2", }, }, nil) 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.EcsFunctions; import com.pulumi.alicloud.ecs.inputs.GetDisksArgs; 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 disksDs = EcsFunctions.getDisks(GetDisksArgs.builder() .tags(Map.ofEntries( Map.entry("tagKey1", "tagValue1"), Map.entry("tagKey2", "tagValue2") )) .build()); } }variables: disksDs: fn::invoke: function: alicloud:ecs:getDisks arguments: tags: tagKey1: tagValue1 tagKey2: tagValue2
- title="Required"> <span id="type_nodejs">- type string 
- Disk type. Possible values: systemanddata.
- zoneId string
- attached_time str
- Disk attachment time.
- auto_snapshot_ strpolicy_ id 
- availability_zone str
- Availability zone of the disk.
- category str
- Disk category. Possible values: cloud(basic cloud disk),cloud_efficiency(ultra cloud disk),ephemeral_ssd(local SSD cloud disk),cloud_ssd(SSD cloud disk), andcloud_essd(ESSD cloud disk),cloud_essd_entry.
- creation_time str
- Disk creation time.
- delete_auto_ boolsnapshot 
- delete_with_ boolinstance 
- description str
- Disk description.
- detached_time str
- Disk detachment time.
- device str
- disk_id str
- disk_name str
- disk_type str
- enable_auto_ boolsnapshot 
- enable_automated_ boolsnapshot_ policy 
- encrypted str
- Indicate whether the disk is encrypted or not. Possible values: onandoff.
- expiration_time str
- Disk expiration time.
- expired_time str
- id str
- ID of the disk.
- image_id str
- ID of the image from which the disk is created. It is null unless the disk is created using an image.
- instance_id str
- Filter the results by the specified ECS instance ID.
- iops int
- iops_read int
- iops_write int
- kms_key_ strid 
- mount_instance_ intnum 
- mount_instances Sequence[GetDisks Disk Mount Instance] 
- name str
- Disk name.
- operation_locks Sequence[GetDisks Disk Operation Lock] 
- payment_type str
- performance_level str
- portable bool
- product_code str
- region_id str
- Region ID the disk belongs to.
- resource_group_ strid 
- The Id of resource group which the disk belongs.
- size int
- Disk size in GiB.
- snapshot_id str
- Snapshot used to create the disk. It is null if no snapshot is used to create the disk.
- status str
- Current status. Possible values: In_use,Available,Attaching,Detaching,CreatingandReIniting.
- Mapping[str, str]
- A map of tags assigned to the disks. It must be in the format:import * as pulumi from "@pulumi/pulumi"; import * as alicloud from "@pulumi/alicloud";const disksDs = alicloud.ecs.getDisks({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, }); import pulumi import pulumi_alicloud as alicloud disks_ds = alicloud.ecs.get_disks(tags={ "tagKey1": "tagValue1", "tagKey2": "tagValue2", })using System.Collections.Generic; using System.Linq; using Pulumi; using AliCloud = Pulumi.AliCloud; return await Deployment.RunAsync(() => { var disksDs = AliCloud.Ecs.GetDisks.Invoke(new() { Tags = { { "tagKey1", "tagValue1" }, { "tagKey2", "tagValue2" }, }, }); });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 { _, err := ecs.GetDisks(ctx, &ecs.GetDisksArgs{ Tags: map[string]interface{}{ "tagKey1": "tagValue1", "tagKey2": "tagValue2", }, }, nil) 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.EcsFunctions; import com.pulumi.alicloud.ecs.inputs.GetDisksArgs; 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 disksDs = EcsFunctions.getDisks(GetDisksArgs.builder() .tags(Map.ofEntries( Map.entry("tagKey1", "tagValue1"), Map.entry("tagKey2", "tagValue2") )) .build()); } }variables: disksDs: fn::invoke: function: alicloud:ecs:getDisks arguments: tags: tagKey1: tagValue1 tagKey2: tagValue2
- title="Required"> <span id="type_python">- type str 
- Disk type. Possible values: systemanddata.
- zone_id str
- attachedTime String
- Disk attachment time.
- autoSnapshot StringPolicy Id 
- availabilityZone String
- Availability zone of the disk.
- category String
- Disk category. Possible values: cloud(basic cloud disk),cloud_efficiency(ultra cloud disk),ephemeral_ssd(local SSD cloud disk),cloud_ssd(SSD cloud disk), andcloud_essd(ESSD cloud disk),cloud_essd_entry.
- creationTime String
- Disk creation time.
- deleteAuto BooleanSnapshot 
- deleteWith BooleanInstance 
- description String
- Disk description.
- detachedTime String
- Disk detachment time.
- device String
- diskId String
- diskName String
- diskType String
- enableAuto BooleanSnapshot 
- enableAutomated BooleanSnapshot Policy 
- encrypted String
- Indicate whether the disk is encrypted or not. Possible values: onandoff.
- expirationTime String
- Disk expiration time.
- expiredTime String
- id String
- ID of the disk.
- imageId String
- ID of the image from which the disk is created. It is null unless the disk is created using an image.
- instanceId String
- Filter the results by the specified ECS instance ID.
- iops Number
- iopsRead Number
- iopsWrite Number
- kmsKey StringId 
- mountInstance NumberNum 
- mountInstances List<Property Map>
- name String
- Disk name.
- operationLocks List<Property Map>
- paymentType String
- performanceLevel String
- portable Boolean
- productCode String
- regionId String
- Region ID the disk belongs to.
- resourceGroup StringId 
- The Id of resource group which the disk belongs.
- size Number
- Disk size in GiB.
- snapshotId String
- Snapshot used to create the disk. It is null if no snapshot is used to create the disk.
- status String
- Current status. Possible values: In_use,Available,Attaching,Detaching,CreatingandReIniting.
- Map<String>
- A map of tags assigned to the disks. It must be in the format:import * as pulumi from "@pulumi/pulumi"; import * as alicloud from "@pulumi/alicloud";const disksDs = alicloud.ecs.getDisks({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, }); import pulumi import pulumi_alicloud as alicloud disks_ds = alicloud.ecs.get_disks(tags={ "tagKey1": "tagValue1", "tagKey2": "tagValue2", })using System.Collections.Generic; using System.Linq; using Pulumi; using AliCloud = Pulumi.AliCloud; return await Deployment.RunAsync(() => { var disksDs = AliCloud.Ecs.GetDisks.Invoke(new() { Tags = { { "tagKey1", "tagValue1" }, { "tagKey2", "tagValue2" }, }, }); });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 { _, err := ecs.GetDisks(ctx, &ecs.GetDisksArgs{ Tags: map[string]interface{}{ "tagKey1": "tagValue1", "tagKey2": "tagValue2", }, }, nil) 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.EcsFunctions; import com.pulumi.alicloud.ecs.inputs.GetDisksArgs; 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 disksDs = EcsFunctions.getDisks(GetDisksArgs.builder() .tags(Map.ofEntries( Map.entry("tagKey1", "tagValue1"), Map.entry("tagKey2", "tagValue2") )) .build()); } }variables: disksDs: fn::invoke: function: alicloud:ecs:getDisks arguments: tags: tagKey1: tagValue1 tagKey2: tagValue2
- title="Required"> <span id="type_yaml">- type String 
- Disk type. Possible values: systemanddata.
- zoneId String
GetDisksDiskMountInstance    
- AttachedTime string
- Disk attachment time.
- Device string
- InstanceId string
- Filter the results by the specified ECS instance ID.
- AttachedTime string
- Disk attachment time.
- Device string
- InstanceId string
- Filter the results by the specified ECS instance ID.
- attachedTime String
- Disk attachment time.
- device String
- instanceId String
- Filter the results by the specified ECS instance ID.
- attachedTime string
- Disk attachment time.
- device string
- instanceId string
- Filter the results by the specified ECS instance ID.
- attached_time str
- Disk attachment time.
- device str
- instance_id str
- Filter the results by the specified ECS instance ID.
- attachedTime String
- Disk attachment time.
- device String
- instanceId String
- Filter the results by the specified ECS instance ID.
GetDisksDiskOperationLock    
- LockReason string
- LockReason string
- lockReason String
- lockReason string
- lock_reason str
- lockReason String
GetDisksOperationLock   
- LockReason string
- LockReason string
- lockReason String
- lockReason string
- lock_reason str
- lockReason String
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.