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:
- Additional
Attributes List<string> - Auto
Snapshot stringPolicy Id  - Availability
Zone 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. - Delete
Auto boolSnapshot  - Delete
With boolInstance  - Disk
Name string - Disk
Type string - Dry
Run bool - Enable
Auto boolSnapshot  - Enable
Automated boolSnapshot Policy  - bool
 - Encrypted string
 - Indicate whether the disk is encrypted or not. Possible values: 
onandoff. - Ids List<string>
 - A list of disks IDs.
 - Instance
Id string - Filter the results by the specified ECS instance ID.
 - Kms
Key stringId  - Name
Regex string - A regex string to filter results by disk name.
 - Operation
Locks List<Pulumi.Ali Cloud. Ecs. Inputs. Get Disks Operation Lock>  - Output
File string - File name where to save data source results (after running 
pulumi preview). - Page
Number int - Page
Size int - Payment
Type string - Portable bool
 - Resource
Group stringId  - The Id of resource group which the disk belongs.
 - Snapshot
Id 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. - Zone
Id string 
- Additional
Attributes []string - Auto
Snapshot stringPolicy Id  - Availability
Zone 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. - Delete
Auto boolSnapshot  - Delete
With boolInstance  - Disk
Name string - Disk
Type string - Dry
Run bool - Enable
Auto boolSnapshot  - Enable
Automated boolSnapshot Policy  - bool
 - Encrypted string
 - Indicate whether the disk is encrypted or not. Possible values: 
onandoff. - Ids []string
 - A list of disks IDs.
 - Instance
Id string - Filter the results by the specified ECS instance ID.
 - Kms
Key stringId  - Name
Regex string - A regex string to filter results by disk name.
 - Operation
Locks []GetDisks Operation Lock  - Output
File string - File name where to save data source results (after running 
pulumi preview). - Page
Number int - Page
Size int - Payment
Type string - Portable bool
 - Resource
Group stringId  - The Id of resource group which the disk belongs.
 - Snapshot
Id 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. - Zone
Id string 
- additional
Attributes List<String> - auto
Snapshot StringPolicy Id  - availability
Zone 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. - delete
Auto BooleanSnapshot  - delete
With BooleanInstance  - disk
Name String - disk
Type String - dry
Run Boolean - enable
Auto BooleanSnapshot  - enable
Automated BooleanSnapshot Policy  - Boolean
 - encrypted String
 - Indicate whether the disk is encrypted or not. Possible values: 
onandoff. - ids List<String>
 - A list of disks IDs.
 - instance
Id String - Filter the results by the specified ECS instance ID.
 - kms
Key StringId  - name
Regex String - A regex string to filter results by disk name.
 - operation
Locks List<GetDisks Operation Lock>  - output
File String - File name where to save data source results (after running 
pulumi preview). - page
Number Integer - page
Size Integer - payment
Type String - portable Boolean
 - resource
Group StringId  - The Id of resource group which the disk belongs.
 - snapshot
Id 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. - zone
Id String 
- additional
Attributes string[] - auto
Snapshot stringPolicy Id  - availability
Zone 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. - delete
Auto booleanSnapshot  - delete
With booleanInstance  - disk
Name string - disk
Type string - dry
Run boolean - enable
Auto booleanSnapshot  - enable
Automated booleanSnapshot Policy  - boolean
 - encrypted string
 - Indicate whether the disk is encrypted or not. Possible values: 
onandoff. - ids string[]
 - A list of disks IDs.
 - instance
Id string - Filter the results by the specified ECS instance ID.
 - kms
Key stringId  - name
Regex string - A regex string to filter results by disk name.
 - operation
Locks GetDisks Operation Lock[]  - output
File string - File name where to save data source results (after running 
pulumi preview). - page
Number number - page
Size number - payment
Type string - portable boolean
 - resource
Group stringId  - The Id of resource group which the disk belongs.
 - snapshot
Id 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. - zone
Id 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 
- additional
Attributes List<String> - auto
Snapshot StringPolicy Id  - availability
Zone 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. - delete
Auto BooleanSnapshot  - delete
With BooleanInstance  - disk
Name String - disk
Type String - dry
Run Boolean - enable
Auto BooleanSnapshot  - enable
Automated BooleanSnapshot Policy  - Boolean
 - encrypted String
 - Indicate whether the disk is encrypted or not. Possible values: 
onandoff. - ids List<String>
 - A list of disks IDs.
 - instance
Id String - Filter the results by the specified ECS instance ID.
 - kms
Key StringId  - name
Regex String - A regex string to filter results by disk name.
 - operation
Locks List<Property Map> - output
File String - File name where to save data source results (after running 
pulumi preview). - page
Number Number - page
Size Number - payment
Type String - portable Boolean
 - resource
Group StringId  - The Id of resource group which the disk belongs.
 - snapshot
Id 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. - zone
Id 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>
 - Total
Count int - Additional
Attributes List<string> - Auto
Snapshot stringPolicy Id  - Availability
Zone 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). - Delete
Auto boolSnapshot  - Delete
With boolInstance  - Disk
Name string - Disk
Type string - Dry
Run bool - Enable
Auto boolSnapshot  - Enable
Automated boolSnapshot Policy  - bool
 - Encrypted string
 - Indicate whether the disk is encrypted or not. Possible values: 
onandoff. - Instance
Id string - ID of the related instance. It is 
nullunless thestatusisIn_use. - Kms
Key stringId  - Name
Regex string - Operation
Locks List<Pulumi.Ali Cloud. Ecs. Outputs. Get Disks Operation Lock>  - Output
File string - Page
Number int - Page
Size int - Payment
Type string - Portable bool
 - Resource
Group stringId  - The Id of resource group.
 - Snapshot
Id 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. - Zone
Id string 
- Disks
[]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 []string
 - Names []string
 - Total
Count int - Additional
Attributes []string - Auto
Snapshot stringPolicy Id  - Availability
Zone 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). - Delete
Auto boolSnapshot  - Delete
With boolInstance  - Disk
Name string - Disk
Type string - Dry
Run bool - Enable
Auto boolSnapshot  - Enable
Automated boolSnapshot Policy  - bool
 - Encrypted string
 - Indicate whether the disk is encrypted or not. Possible values: 
onandoff. - Instance
Id string - ID of the related instance. It is 
nullunless thestatusisIn_use. - Kms
Key stringId  - Name
Regex string - Operation
Locks []GetDisks Operation Lock  - Output
File string - Page
Number int - Page
Size int - Payment
Type string - Portable bool
 - Resource
Group stringId  - The Id of resource group.
 - Snapshot
Id 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. - Zone
Id string 
- disks
List<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>
 - total
Count Integer - additional
Attributes List<String> - auto
Snapshot StringPolicy Id  - availability
Zone 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). - delete
Auto BooleanSnapshot  - delete
With BooleanInstance  - disk
Name String - disk
Type String - dry
Run Boolean - enable
Auto BooleanSnapshot  - enable
Automated BooleanSnapshot Policy  - Boolean
 - encrypted String
 - Indicate whether the disk is encrypted or not. Possible values: 
onandoff. - instance
Id String - ID of the related instance. It is 
nullunless thestatusisIn_use. - kms
Key StringId  - name
Regex String - operation
Locks List<GetDisks Operation Lock>  - output
File String - page
Number Integer - page
Size Integer - payment
Type String - portable Boolean
 - resource
Group StringId  - The Id of resource group.
 - snapshot
Id 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. - zone
Id String 
- disks
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 string[]
 - names string[]
 - total
Count number - additional
Attributes string[] - auto
Snapshot stringPolicy Id  - availability
Zone 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). - delete
Auto booleanSnapshot  - delete
With booleanInstance  - disk
Name string - disk
Type string - dry
Run boolean - enable
Auto booleanSnapshot  - enable
Automated booleanSnapshot Policy  - boolean
 - encrypted string
 - Indicate whether the disk is encrypted or not. Possible values: 
onandoff. - instance
Id string - ID of the related instance. It is 
nullunless thestatusisIn_use. - kms
Key stringId  - name
Regex string - operation
Locks GetDisks Operation Lock[]  - output
File string - page
Number number - page
Size number - payment
Type string - portable boolean
 - resource
Group stringId  - The Id of resource group.
 - snapshot
Id 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. - zone
Id string 
- disks
Sequence[Get
Disks 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>
 - total
Count Number - additional
Attributes List<String> - auto
Snapshot StringPolicy Id  - availability
Zone 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). - delete
Auto BooleanSnapshot  - delete
With BooleanInstance  - disk
Name String - disk
Type String - dry
Run Boolean - enable
Auto BooleanSnapshot  - enable
Automated BooleanSnapshot Policy  - Boolean
 - encrypted String
 - Indicate whether the disk is encrypted or not. Possible values: 
onandoff. - instance
Id String - ID of the related instance. It is 
nullunless thestatusisIn_use. - kms
Key StringId  - name
Regex String - operation
Locks List<Property Map> - output
File String - page
Number Number - page
Size Number - payment
Type String - portable Boolean
 - resource
Group StringId  - The Id of resource group.
 - snapshot
Id 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. - zone
Id String 
Supporting Types
GetDisksDisk  
- Attached
Time string - Disk attachment time.
 - Auto
Snapshot stringPolicy Id  - Availability
Zone 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. - Creation
Time string - Disk creation time.
 - Delete
Auto boolSnapshot  - Delete
With boolInstance  - Description string
 - Disk description.
 - Detached
Time string - Disk detachment time.
 - Device string
 - Disk
Id string - Disk
Name string - Disk
Type string - Enable
Auto boolSnapshot  - Enable
Automated boolSnapshot Policy  - Encrypted string
 - Indicate whether the disk is encrypted or not. Possible values: 
onandoff. - Expiration
Time string - Disk expiration time.
 - Expired
Time string - Id string
 - ID of the disk.
 - Image
Id string - ID of the image from which the disk is created. It is null unless the disk is created using an image.
 - Instance
Id string - Filter the results by the specified ECS instance ID.
 - Iops int
 - Iops
Read int - Iops
Write int - Kms
Key stringId  - Mount
Instance intNum  - Mount
Instances List<Pulumi.Ali Cloud. Ecs. Inputs. Get Disks Disk Mount Instance>  - Name string
 - Disk name.
 - Operation
Locks List<Pulumi.Ali Cloud. Ecs. Inputs. Get Disks Disk Operation Lock>  - Payment
Type string - Performance
Level string - Portable bool
 - Product
Code string - Region
Id string - Region ID the disk belongs to.
 - Resource
Group stringId  - The Id of resource group which the disk belongs.
 - Size int
 - Disk size in GiB.
 - Snapshot
Id 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. - Zone
Id string 
- Attached
Time string - Disk attachment time.
 - Auto
Snapshot stringPolicy Id  - Availability
Zone 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. - Creation
Time string - Disk creation time.
 - Delete
Auto boolSnapshot  - Delete
With boolInstance  - Description string
 - Disk description.
 - Detached
Time string - Disk detachment time.
 - Device string
 - Disk
Id string - Disk
Name string - Disk
Type string - Enable
Auto boolSnapshot  - Enable
Automated boolSnapshot Policy  - Encrypted string
 - Indicate whether the disk is encrypted or not. Possible values: 
onandoff. - Expiration
Time string - Disk expiration time.
 - Expired
Time string - Id string
 - ID of the disk.
 - Image
Id string - ID of the image from which the disk is created. It is null unless the disk is created using an image.
 - Instance
Id string - Filter the results by the specified ECS instance ID.
 - Iops int
 - Iops
Read int - Iops
Write int - Kms
Key stringId  - Mount
Instance intNum  - Mount
Instances []GetDisks Disk Mount Instance  - Name string
 - Disk name.
 - Operation
Locks []GetDisks Disk Operation Lock  - Payment
Type string - Performance
Level string - Portable bool
 - Product
Code string - Region
Id string - Region ID the disk belongs to.
 - Resource
Group stringId  - The Id of resource group which the disk belongs.
 - Size int
 - Disk size in GiB.
 - Snapshot
Id 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. - Zone
Id string 
- attached
Time String - Disk attachment time.
 - auto
Snapshot StringPolicy Id  - availability
Zone 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. - creation
Time String - Disk creation time.
 - delete
Auto BooleanSnapshot  - delete
With BooleanInstance  - description String
 - Disk description.
 - detached
Time String - Disk detachment time.
 - device String
 - disk
Id String - disk
Name String - disk
Type String - enable
Auto BooleanSnapshot  - enable
Automated BooleanSnapshot Policy  - encrypted String
 - Indicate whether the disk is encrypted or not. Possible values: 
onandoff. - expiration
Time String - Disk expiration time.
 - expired
Time String - id String
 - ID of the disk.
 - image
Id String - ID of the image from which the disk is created. It is null unless the disk is created using an image.
 - instance
Id String - Filter the results by the specified ECS instance ID.
 - iops Integer
 - iops
Read Integer - iops
Write Integer - kms
Key StringId  - mount
Instance IntegerNum  - mount
Instances List<GetDisks Disk Mount Instance>  - name String
 - Disk name.
 - operation
Locks List<GetDisks Disk Operation Lock>  - payment
Type String - performance
Level String - portable Boolean
 - product
Code String - region
Id String - Region ID the disk belongs to.
 - resource
Group StringId  - The Id of resource group which the disk belongs.
 - size Integer
 - Disk size in GiB.
 - snapshot
Id 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. - zone
Id String 
- attached
Time string - Disk attachment time.
 - auto
Snapshot stringPolicy Id  - availability
Zone 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. - creation
Time string - Disk creation time.
 - delete
Auto booleanSnapshot  - delete
With booleanInstance  - description string
 - Disk description.
 - detached
Time string - Disk detachment time.
 - device string
 - disk
Id string - disk
Name string - disk
Type string - enable
Auto booleanSnapshot  - enable
Automated booleanSnapshot Policy  - encrypted string
 - Indicate whether the disk is encrypted or not. Possible values: 
onandoff. - expiration
Time string - Disk expiration time.
 - expired
Time string - id string
 - ID of the disk.
 - image
Id string - ID of the image from which the disk is created. It is null unless the disk is created using an image.
 - instance
Id string - Filter the results by the specified ECS instance ID.
 - iops number
 - iops
Read number - iops
Write number - kms
Key stringId  - mount
Instance numberNum  - mount
Instances GetDisks Disk Mount Instance[]  - name string
 - Disk name.
 - operation
Locks GetDisks Disk Operation Lock[]  - payment
Type string - performance
Level string - portable boolean
 - product
Code string - region
Id string - Region ID the disk belongs to.
 - resource
Group stringId  - The Id of resource group which the disk belongs.
 - size number
 - Disk size in GiB.
 - snapshot
Id 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. - zone
Id 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 
- attached
Time String - Disk attachment time.
 - auto
Snapshot StringPolicy Id  - availability
Zone 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. - creation
Time String - Disk creation time.
 - delete
Auto BooleanSnapshot  - delete
With BooleanInstance  - description String
 - Disk description.
 - detached
Time String - Disk detachment time.
 - device String
 - disk
Id String - disk
Name String - disk
Type String - enable
Auto BooleanSnapshot  - enable
Automated BooleanSnapshot Policy  - encrypted String
 - Indicate whether the disk is encrypted or not. Possible values: 
onandoff. - expiration
Time String - Disk expiration time.
 - expired
Time String - id String
 - ID of the disk.
 - image
Id String - ID of the image from which the disk is created. It is null unless the disk is created using an image.
 - instance
Id String - Filter the results by the specified ECS instance ID.
 - iops Number
 - iops
Read Number - iops
Write Number - kms
Key StringId  - mount
Instance NumberNum  - mount
Instances List<Property Map> - name String
 - Disk name.
 - operation
Locks List<Property Map> - payment
Type String - performance
Level String - portable Boolean
 - product
Code String - region
Id String - Region ID the disk belongs to.
 - resource
Group StringId  - The Id of resource group which the disk belongs.
 - size Number
 - Disk size in GiB.
 - snapshot
Id 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. - zone
Id String 
GetDisksDiskMountInstance    
- Attached
Time string - Disk attachment time.
 - Device string
 - Instance
Id string - Filter the results by the specified ECS instance ID.
 
- Attached
Time string - Disk attachment time.
 - Device string
 - Instance
Id string - Filter the results by the specified ECS instance ID.
 
- attached
Time String - Disk attachment time.
 - device String
 - instance
Id String - Filter the results by the specified ECS instance ID.
 
- attached
Time string - Disk attachment time.
 - device string
 - instance
Id 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.
 
- attached
Time String - Disk attachment time.
 - device String
 - instance
Id String - Filter the results by the specified ECS instance ID.
 
GetDisksDiskOperationLock    
- Lock
Reason string 
- Lock
Reason string 
- lock
Reason String 
- lock
Reason string 
- lock_
reason str 
- lock
Reason String 
GetDisksOperationLock   
- Lock
Reason string 
- Lock
Reason string 
- lock
Reason String 
- lock
Reason string 
- lock_
reason str 
- lock
Reason String 
Package Details
- Repository
 - Alibaba Cloud pulumi/pulumi-alicloud
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
alicloudTerraform Provider.