getDisks

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var disksDs = Output.Create(AliCloud.Ecs.GetDisks.InvokeAsync(new AliCloud.Ecs.GetDisksArgs
        {
            NameRegex = "sample_disk",
        }));
        this.FirstDiskId = disksDs.Apply(disksDs => disksDs.Disks?[0]?.Id);
    }

    [Output("firstDiskId")]
    public Output<string> FirstDiskId { get; set; }
}
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
	})
}
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()));
    }
}
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)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const disksDs = pulumi.output(alicloud.ecs.getDisks({
    nameRegex: "sample_disk",
}));

export const firstDiskId = disksDs.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, Any]] = 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, Any]]] = 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)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:ecs/getDisks:getDisks
  arguments:
    # arguments dictionary

The following arguments are supported:

AdditionalAttributes List<string>
AutoSnapshotPolicyId string
AvailabilityZone string

Availability zone of the disk.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.122.0. New field 'zone_id' instead

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), and cloud_essd (ESSD cloud disk).

DeleteAutoSnapshot bool
DeleteWithInstance bool
DiskName string
DiskType string
DryRun bool
EnableAutoSnapshot bool
EnableAutomatedSnapshotPolicy bool
EnableShared bool
Encrypted string

Indicate whether the disk is encrypted or not. Possible values: on and off.

Ids List<string>

A list of disks IDs.

InstanceId string

Filter the results by the specified ECS instance ID.

KmsKeyId string
NameRegex string

A regex string to filter results by disk name.

OperationLocks List<Pulumi.AliCloud.Ecs.Inputs.GetDisksOperationLock>
OutputFile string
PageNumber int
PageSize int
PaymentType string
Portable bool
ResourceGroupId string

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, Creating and ReIniting.

Tags Dictionary<string, object>

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 = pulumi.output(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 Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var disksDs = Output.Create(AliCloud.Ecs.GetDisks.InvokeAsync(new AliCloud.Ecs.GetDisksArgs
        {
            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
Type string

Disk type. Possible values: system and data.

Deprecated:

Field 'type' has been deprecated from provider version 1.122.0. New field 'disk_type' instead.

ZoneId string
AdditionalAttributes []string
AutoSnapshotPolicyId string
AvailabilityZone string

Availability zone of the disk.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.122.0. New field 'zone_id' instead

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), and cloud_essd (ESSD cloud disk).

DeleteAutoSnapshot bool
DeleteWithInstance bool
DiskName string
DiskType string
DryRun bool
EnableAutoSnapshot bool
EnableAutomatedSnapshotPolicy bool
EnableShared bool
Encrypted string

Indicate whether the disk is encrypted or not. Possible values: on and off.

Ids []string

A list of disks IDs.

InstanceId string

Filter the results by the specified ECS instance ID.

KmsKeyId string
NameRegex string

A regex string to filter results by disk name.

OperationLocks []GetDisksOperationLock
OutputFile string
PageNumber int
PageSize int
PaymentType string
Portable bool
ResourceGroupId string

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, Creating and ReIniting.

Tags map[string]interface{}

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 = pulumi.output(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 Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var disksDs = Output.Create(AliCloud.Ecs.GetDisks.InvokeAsync(new AliCloud.Ecs.GetDisksArgs
        {
            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
Type string

Disk type. Possible values: system and data.

Deprecated:

Field 'type' has been deprecated from provider version 1.122.0. New field 'disk_type' instead.

ZoneId string
additionalAttributes List<String>
autoSnapshotPolicyId String
availabilityZone String

Availability zone of the disk.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.122.0. New field 'zone_id' instead

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), and cloud_essd (ESSD cloud disk).

deleteAutoSnapshot Boolean
deleteWithInstance Boolean
diskName String
diskType String
dryRun Boolean
enableAutoSnapshot Boolean
enableAutomatedSnapshotPolicy Boolean
enableShared Boolean
encrypted String

Indicate whether the disk is encrypted or not. Possible values: on and off.

ids List<String>

A list of disks IDs.

instanceId String

Filter the results by the specified ECS instance ID.

kmsKeyId String
nameRegex String

A regex string to filter results by disk name.

operationLocks List<GetDisksOperationLock>
outputFile String
pageNumber Integer
pageSize Integer
paymentType String
portable Boolean
resourceGroupId String

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, Creating and ReIniting.

tags Map<String,Object>

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 = pulumi.output(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 Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var disksDs = Output.Create(AliCloud.Ecs.GetDisks.InvokeAsync(new AliCloud.Ecs.GetDisksArgs
        {
            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
type String

Disk type. Possible values: system and data.

Deprecated:

Field 'type' has been deprecated from provider version 1.122.0. New field 'disk_type' instead.

zoneId String
additionalAttributes string[]
autoSnapshotPolicyId string
availabilityZone string

Availability zone of the disk.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.122.0. New field 'zone_id' instead

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), and cloud_essd (ESSD cloud disk).

deleteAutoSnapshot boolean
deleteWithInstance boolean
diskName string
diskType string
dryRun boolean
enableAutoSnapshot boolean
enableAutomatedSnapshotPolicy boolean
enableShared boolean
encrypted string

Indicate whether the disk is encrypted or not. Possible values: on and off.

ids string[]

A list of disks IDs.

instanceId string

Filter the results by the specified ECS instance ID.

kmsKeyId string
nameRegex string

A regex string to filter results by disk name.

operationLocks GetDisksOperationLock[]
outputFile string
pageNumber number
pageSize number
paymentType string
portable boolean
resourceGroupId string

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, Creating and ReIniting.

tags {[key: string]: any}

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 = pulumi.output(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 Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var disksDs = Output.Create(AliCloud.Ecs.GetDisks.InvokeAsync(new AliCloud.Ecs.GetDisksArgs
        {
            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
type string

Disk type. Possible values: system and data.

Deprecated:

Field 'type' has been deprecated from provider version 1.122.0. New field 'disk_type' instead.

zoneId string
additional_attributes Sequence[str]
auto_snapshot_policy_id str
availability_zone str

Availability zone of the disk.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.122.0. New field 'zone_id' instead

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), and cloud_essd (ESSD cloud disk).

delete_auto_snapshot bool
delete_with_instance bool
disk_name str
disk_type str
dry_run bool
enable_auto_snapshot bool
enable_automated_snapshot_policy bool
enable_shared bool
encrypted str

Indicate whether the disk is encrypted or not. Possible values: on and off.

ids Sequence[str]

A list of disks IDs.

instance_id str

Filter the results by the specified ECS instance ID.

kms_key_id str
name_regex str

A regex string to filter results by disk name.

operation_locks Sequence[GetDisksOperationLock]
output_file str
page_number int
page_size int
payment_type str
portable bool
resource_group_id str

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, Creating and ReIniting.

tags Mapping[str, Any]

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 = pulumi.output(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 Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var disksDs = Output.Create(AliCloud.Ecs.GetDisks.InvokeAsync(new AliCloud.Ecs.GetDisksArgs
        {
            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
type str

Disk type. Possible values: system and data.

Deprecated:

Field 'type' has been deprecated from provider version 1.122.0. New field 'disk_type' instead.

zone_id str
additionalAttributes List<String>
autoSnapshotPolicyId String
availabilityZone String

Availability zone of the disk.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.122.0. New field 'zone_id' instead

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), and cloud_essd (ESSD cloud disk).

deleteAutoSnapshot Boolean
deleteWithInstance Boolean
diskName String
diskType String
dryRun Boolean
enableAutoSnapshot Boolean
enableAutomatedSnapshotPolicy Boolean
enableShared Boolean
encrypted String

Indicate whether the disk is encrypted or not. Possible values: on and off.

ids List<String>

A list of disks IDs.

instanceId String

Filter the results by the specified ECS instance ID.

kmsKeyId String
nameRegex String

A regex string to filter results by disk name.

operationLocks List<Property Map>
outputFile String
pageNumber Number
pageSize Number
paymentType String
portable Boolean
resourceGroupId String

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, Creating and ReIniting.

tags Map<Any>

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 = pulumi.output(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 Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var disksDs = Output.Create(AliCloud.Ecs.GetDisks.InvokeAsync(new AliCloud.Ecs.GetDisksArgs
        {
            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
type String

Disk type. Possible values: system and data.

Deprecated:

Field 'type' has been deprecated from provider version 1.122.0. New field 'disk_type' instead.

zoneId String

getDisks Result

The following output properties are available:

Disks List<Pulumi.AliCloud.Ecs.Outputs.GetDisksDisk>

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>
AutoSnapshotPolicyId string
AvailabilityZone string

Availability zone of the disk.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.122.0. New field 'zone_id' instead

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), and cloud_essd (ESSD cloud disk).

DeleteAutoSnapshot bool
DeleteWithInstance bool
DiskName string
DiskType string
DryRun bool
EnableAutoSnapshot bool
EnableAutomatedSnapshotPolicy bool
EnableShared bool
Encrypted string

Indicate whether the disk is encrypted or not. Possible values: on and off.

InstanceId string

ID of the related instance. It is null unless the status is In_use.

KmsKeyId string
NameRegex string
OperationLocks List<Pulumi.AliCloud.Ecs.Outputs.GetDisksOperationLock>
OutputFile string
PageNumber int
PageSize int
PaymentType string
Portable bool
ResourceGroupId string

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, Creating and ReIniting.

Tags Dictionary<string, object>

A map of tags assigned to the disk.

Type string

Disk type. Possible values: system and data.

Deprecated:

Field 'type' has been deprecated from provider version 1.122.0. New field 'disk_type' instead.

ZoneId string
Disks []GetDisksDisk

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
AutoSnapshotPolicyId string
AvailabilityZone string

Availability zone of the disk.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.122.0. New field 'zone_id' instead

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), and cloud_essd (ESSD cloud disk).

DeleteAutoSnapshot bool
DeleteWithInstance bool
DiskName string
DiskType string
DryRun bool
EnableAutoSnapshot bool
EnableAutomatedSnapshotPolicy bool
EnableShared bool
Encrypted string

Indicate whether the disk is encrypted or not. Possible values: on and off.

InstanceId string

ID of the related instance. It is null unless the status is In_use.

KmsKeyId string
NameRegex string
OperationLocks []GetDisksOperationLock
OutputFile string
PageNumber int
PageSize int
PaymentType string
Portable bool
ResourceGroupId string

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, Creating and ReIniting.

Tags map[string]interface{}

A map of tags assigned to the disk.

Type string

Disk type. Possible values: system and data.

Deprecated:

Field 'type' has been deprecated from provider version 1.122.0. New field 'disk_type' instead.

ZoneId string
disks List<GetDisksDisk>

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>
autoSnapshotPolicyId String
availabilityZone String

Availability zone of the disk.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.122.0. New field 'zone_id' instead

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), and cloud_essd (ESSD cloud disk).

deleteAutoSnapshot Boolean
deleteWithInstance Boolean
diskName String
diskType String
dryRun Boolean
enableAutoSnapshot Boolean
enableAutomatedSnapshotPolicy Boolean
enableShared Boolean
encrypted String

Indicate whether the disk is encrypted or not. Possible values: on and off.

instanceId String

ID of the related instance. It is null unless the status is In_use.

kmsKeyId String
nameRegex String
operationLocks List<GetDisksOperationLock>
outputFile String
pageNumber Integer
pageSize Integer
paymentType String
portable Boolean
resourceGroupId String

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, Creating and ReIniting.

tags Map<String,Object>

A map of tags assigned to the disk.

type String

Disk type. Possible values: system and data.

Deprecated:

Field 'type' has been deprecated from provider version 1.122.0. New field 'disk_type' instead.

zoneId String
disks GetDisksDisk[]

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[]
autoSnapshotPolicyId string
availabilityZone string

Availability zone of the disk.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.122.0. New field 'zone_id' instead

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), and cloud_essd (ESSD cloud disk).

deleteAutoSnapshot boolean
deleteWithInstance boolean
diskName string
diskType string
dryRun boolean
enableAutoSnapshot boolean
enableAutomatedSnapshotPolicy boolean
enableShared boolean
encrypted string

Indicate whether the disk is encrypted or not. Possible values: on and off.

instanceId string

ID of the related instance. It is null unless the status is In_use.

kmsKeyId string
nameRegex string
operationLocks GetDisksOperationLock[]
outputFile string
pageNumber number
pageSize number
paymentType string
portable boolean
resourceGroupId string

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, Creating and ReIniting.

tags {[key: string]: any}

A map of tags assigned to the disk.

type string

Disk type. Possible values: system and data.

Deprecated:

Field 'type' has been deprecated from provider version 1.122.0. New field 'disk_type' instead.

zoneId string
disks Sequence[GetDisksDisk]

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_policy_id str
availability_zone str

Availability zone of the disk.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.122.0. New field 'zone_id' instead

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), and cloud_essd (ESSD cloud disk).

delete_auto_snapshot bool
delete_with_instance bool
disk_name str
disk_type str
dry_run bool
enable_auto_snapshot bool
enable_automated_snapshot_policy bool
enable_shared bool
encrypted str

Indicate whether the disk is encrypted or not. Possible values: on and off.

instance_id str

ID of the related instance. It is null unless the status is In_use.

kms_key_id str
name_regex str
operation_locks Sequence[GetDisksOperationLock]
output_file str
page_number int
page_size int
payment_type str
portable bool
resource_group_id str

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, Creating and ReIniting.

tags Mapping[str, Any]

A map of tags assigned to the disk.

type str

Disk type. Possible values: system and data.

Deprecated:

Field 'type' has been deprecated from provider version 1.122.0. New field 'disk_type' instead.

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>
autoSnapshotPolicyId String
availabilityZone String

Availability zone of the disk.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.122.0. New field 'zone_id' instead

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), and cloud_essd (ESSD cloud disk).

deleteAutoSnapshot Boolean
deleteWithInstance Boolean
diskName String
diskType String
dryRun Boolean
enableAutoSnapshot Boolean
enableAutomatedSnapshotPolicy Boolean
enableShared Boolean
encrypted String

Indicate whether the disk is encrypted or not. Possible values: on and off.

instanceId String

ID of the related instance. It is null unless the status is In_use.

kmsKeyId String
nameRegex String
operationLocks List<Property Map>
outputFile String
pageNumber Number
pageSize Number
paymentType String
portable Boolean
resourceGroupId String

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, Creating and ReIniting.

tags Map<Any>

A map of tags assigned to the disk.

type String

Disk type. Possible values: system and data.

Deprecated:

Field 'type' has been deprecated from provider version 1.122.0. New field 'disk_type' instead.

zoneId String

Supporting Types

GetDisksDisk

AttachedTime string

Disk attachment time.

AutoSnapshotPolicyId string
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), and cloud_essd (ESSD cloud disk).

CreationTime string

Disk creation time.

DeleteAutoSnapshot bool
DeleteWithInstance bool
Description string

Disk description.

DetachedTime string

Disk detachment time.

Device string
DiskId string
DiskName string
DiskType string
EnableAutoSnapshot bool
EnableAutomatedSnapshotPolicy bool
Encrypted string

Indicate whether the disk is encrypted or not. Possible values: on and off.

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
KmsKeyId string
MountInstanceNum int
MountInstances List<Pulumi.AliCloud.Ecs.Inputs.GetDisksDiskMountInstance>
Name string

Disk name.

OperationLocks List<Pulumi.AliCloud.Ecs.Inputs.GetDisksDiskOperationLock>
PaymentType string
PerformanceLevel string
Portable bool
ProductCode string
RegionId string

Region ID the disk belongs to.

ResourceGroupId string

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, Creating and ReIniting.

Tags Dictionary<string, object>

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 = pulumi.output(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 Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var disksDs = Output.Create(AliCloud.Ecs.GetDisks.InvokeAsync(new AliCloud.Ecs.GetDisksArgs
        {
            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
Type string

Disk type. Possible values: system and data.

ZoneId string
AttachedTime string

Disk attachment time.

AutoSnapshotPolicyId string
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), and cloud_essd (ESSD cloud disk).

CreationTime string

Disk creation time.

DeleteAutoSnapshot bool
DeleteWithInstance bool
Description string

Disk description.

DetachedTime string

Disk detachment time.

Device string
DiskId string
DiskName string
DiskType string
EnableAutoSnapshot bool
EnableAutomatedSnapshotPolicy bool
Encrypted string

Indicate whether the disk is encrypted or not. Possible values: on and off.

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
KmsKeyId string
MountInstanceNum int
MountInstances []GetDisksDiskMountInstance
Name string

Disk name.

OperationLocks []GetDisksDiskOperationLock
PaymentType string
PerformanceLevel string
Portable bool
ProductCode string
RegionId string

Region ID the disk belongs to.

ResourceGroupId string

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, Creating and ReIniting.

Tags map[string]interface{}

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 = pulumi.output(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 Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var disksDs = Output.Create(AliCloud.Ecs.GetDisks.InvokeAsync(new AliCloud.Ecs.GetDisksArgs
        {
            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
Type string

Disk type. Possible values: system and data.

ZoneId string
attachedTime String

Disk attachment time.

autoSnapshotPolicyId String
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), and cloud_essd (ESSD cloud disk).

creationTime String

Disk creation time.

deleteAutoSnapshot Boolean
deleteWithInstance Boolean
description String

Disk description.

detachedTime String

Disk detachment time.

device String
diskId String
diskName String
diskType String
enableAutoSnapshot Boolean
enableAutomatedSnapshotPolicy Boolean
encrypted String

Indicate whether the disk is encrypted or not. Possible values: on and off.

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
kmsKeyId String
mountInstanceNum Integer
mountInstances List<GetDisksDiskMountInstance>
name String

Disk name.

operationLocks List<GetDisksDiskOperationLock>
paymentType String
performanceLevel String
portable Boolean
productCode String
regionId String

Region ID the disk belongs to.

resourceGroupId String

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, Creating and ReIniting.

tags Map<String,Object>

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 = pulumi.output(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 Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var disksDs = Output.Create(AliCloud.Ecs.GetDisks.InvokeAsync(new AliCloud.Ecs.GetDisksArgs
        {
            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
type String

Disk type. Possible values: system and data.

zoneId String
attachedTime string

Disk attachment time.

autoSnapshotPolicyId string
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), and cloud_essd (ESSD cloud disk).

creationTime string

Disk creation time.

deleteAutoSnapshot boolean
deleteWithInstance boolean
description string

Disk description.

detachedTime string

Disk detachment time.

device string
diskId string
diskName string
diskType string
enableAutoSnapshot boolean
enableAutomatedSnapshotPolicy boolean
encrypted string

Indicate whether the disk is encrypted or not. Possible values: on and off.

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
kmsKeyId string
mountInstanceNum number
mountInstances GetDisksDiskMountInstance[]
name string

Disk name.

operationLocks GetDisksDiskOperationLock[]
paymentType string
performanceLevel string
portable boolean
productCode string
regionId string

Region ID the disk belongs to.

resourceGroupId string

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, Creating and ReIniting.

tags {[key: string]: any}

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 = pulumi.output(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 Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var disksDs = Output.Create(AliCloud.Ecs.GetDisks.InvokeAsync(new AliCloud.Ecs.GetDisksArgs
        {
            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
type string

Disk type. Possible values: system and data.

zoneId string
attached_time str

Disk attachment time.

auto_snapshot_policy_id str
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), and cloud_essd (ESSD cloud disk).

creation_time str

Disk creation time.

delete_auto_snapshot bool
delete_with_instance bool
description str

Disk description.

detached_time str

Disk detachment time.

device str
disk_id str
disk_name str
disk_type str
enable_auto_snapshot bool
enable_automated_snapshot_policy bool
encrypted str

Indicate whether the disk is encrypted or not. Possible values: on and off.

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_id str
mount_instance_num int
mount_instances Sequence[GetDisksDiskMountInstance]
name str

Disk name.

operation_locks Sequence[GetDisksDiskOperationLock]
payment_type str
performance_level str
portable bool
product_code str
region_id str

Region ID the disk belongs to.

resource_group_id str

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, Creating and ReIniting.

tags Mapping[str, Any]

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 = pulumi.output(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 Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var disksDs = Output.Create(AliCloud.Ecs.GetDisks.InvokeAsync(new AliCloud.Ecs.GetDisksArgs
        {
            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
type str

Disk type. Possible values: system and data.

zone_id str
attachedTime String

Disk attachment time.

autoSnapshotPolicyId String
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), and cloud_essd (ESSD cloud disk).

creationTime String

Disk creation time.

deleteAutoSnapshot Boolean
deleteWithInstance Boolean
description String

Disk description.

detachedTime String

Disk detachment time.

device String
diskId String
diskName String
diskType String
enableAutoSnapshot Boolean
enableAutomatedSnapshotPolicy Boolean
encrypted String

Indicate whether the disk is encrypted or not. Possible values: on and off.

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
kmsKeyId String
mountInstanceNum Number
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.

resourceGroupId String

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, Creating and ReIniting.

tags Map<Any>

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 = pulumi.output(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 Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var disksDs = Output.Create(AliCloud.Ecs.GetDisks.InvokeAsync(new AliCloud.Ecs.GetDisksArgs
        {
            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
type String

Disk type. Possible values: system and data.

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
lockReason String

GetDisksOperationLock

LockReason string
LockReason string
lockReason String
lockReason string
lockReason String

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.