Alibaba Cloud v3.87.0 published on Saturday, Oct 18, 2025 by Pulumi
alicloud.simpleapplicationserver.getServerDisks
This data source provides the Simple Application Server Disks of the current Alibaba Cloud user.
NOTE: Available in v1.143.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.simpleapplicationserver.getServerDisks({
ids: ["example_id"],
});
export const simpleApplicationServerDiskId1 = ids.then(ids => ids.disks?.[0]?.id);
const nameRegex = alicloud.simpleapplicationserver.getServerDisks({
nameRegex: "^my-Disk",
});
export const simpleApplicationServerDiskId2 = nameRegex.then(nameRegex => nameRegex.disks?.[0]?.id);
const status = alicloud.simpleapplicationserver.getServerDisks({
status: "In_use",
});
export const simpleApplicationServerDiskId3 = status.then(status => status.disks?.[0]?.id);
const instanceId = alicloud.simpleapplicationserver.getServerDisks({
instanceId: "example_value",
});
export const simpleApplicationServerDiskId4 = instanceId.then(instanceId => instanceId.disks?.[0]?.id);
const diskType = alicloud.simpleapplicationserver.getServerDisks({
diskType: "System",
});
export const simpleApplicationServerDiskId5 = diskType.then(diskType => diskType.disks?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.simpleapplicationserver.get_server_disks(ids=["example_id"])
pulumi.export("simpleApplicationServerDiskId1", ids.disks[0].id)
name_regex = alicloud.simpleapplicationserver.get_server_disks(name_regex="^my-Disk")
pulumi.export("simpleApplicationServerDiskId2", name_regex.disks[0].id)
status = alicloud.simpleapplicationserver.get_server_disks(status="In_use")
pulumi.export("simpleApplicationServerDiskId3", status.disks[0].id)
instance_id = alicloud.simpleapplicationserver.get_server_disks(instance_id="example_value")
pulumi.export("simpleApplicationServerDiskId4", instance_id.disks[0].id)
disk_type = alicloud.simpleapplicationserver.get_server_disks(disk_type="System")
pulumi.export("simpleApplicationServerDiskId5", disk_type.disks[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/simpleapplicationserver"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := simpleapplicationserver.GetServerDisks(ctx, &simpleapplicationserver.GetServerDisksArgs{
Ids: []string{
"example_id",
},
}, nil)
if err != nil {
return err
}
ctx.Export("simpleApplicationServerDiskId1", ids.Disks[0].Id)
nameRegex, err := simpleapplicationserver.GetServerDisks(ctx, &simpleapplicationserver.GetServerDisksArgs{
NameRegex: pulumi.StringRef("^my-Disk"),
}, nil)
if err != nil {
return err
}
ctx.Export("simpleApplicationServerDiskId2", nameRegex.Disks[0].Id)
status, err := simpleapplicationserver.GetServerDisks(ctx, &simpleapplicationserver.GetServerDisksArgs{
Status: pulumi.StringRef("In_use"),
}, nil)
if err != nil {
return err
}
ctx.Export("simpleApplicationServerDiskId3", status.Disks[0].Id)
instanceId, err := simpleapplicationserver.GetServerDisks(ctx, &simpleapplicationserver.GetServerDisksArgs{
InstanceId: pulumi.StringRef("example_value"),
}, nil)
if err != nil {
return err
}
ctx.Export("simpleApplicationServerDiskId4", instanceId.Disks[0].Id)
diskType, err := simpleapplicationserver.GetServerDisks(ctx, &simpleapplicationserver.GetServerDisksArgs{
DiskType: pulumi.StringRef("System"),
}, nil)
if err != nil {
return err
}
ctx.Export("simpleApplicationServerDiskId5", diskType.Disks[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.SimpleApplicationServer.GetServerDisks.Invoke(new()
{
Ids = new[]
{
"example_id",
},
});
var nameRegex = AliCloud.SimpleApplicationServer.GetServerDisks.Invoke(new()
{
NameRegex = "^my-Disk",
});
var status = AliCloud.SimpleApplicationServer.GetServerDisks.Invoke(new()
{
Status = "In_use",
});
var instanceId = AliCloud.SimpleApplicationServer.GetServerDisks.Invoke(new()
{
InstanceId = "example_value",
});
var diskType = AliCloud.SimpleApplicationServer.GetServerDisks.Invoke(new()
{
DiskType = "System",
});
return new Dictionary<string, object?>
{
["simpleApplicationServerDiskId1"] = ids.Apply(getServerDisksResult => getServerDisksResult.Disks[0]?.Id),
["simpleApplicationServerDiskId2"] = nameRegex.Apply(getServerDisksResult => getServerDisksResult.Disks[0]?.Id),
["simpleApplicationServerDiskId3"] = status.Apply(getServerDisksResult => getServerDisksResult.Disks[0]?.Id),
["simpleApplicationServerDiskId4"] = instanceId.Apply(getServerDisksResult => getServerDisksResult.Disks[0]?.Id),
["simpleApplicationServerDiskId5"] = diskType.Apply(getServerDisksResult => getServerDisksResult.Disks[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.simpleapplicationserver.SimpleapplicationserverFunctions;
import com.pulumi.alicloud.simpleapplicationserver.inputs.GetServerDisksArgs;
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 ids = SimpleapplicationserverFunctions.getServerDisks(GetServerDisksArgs.builder()
.ids("example_id")
.build());
ctx.export("simpleApplicationServerDiskId1", ids.disks()[0].id());
final var nameRegex = SimpleapplicationserverFunctions.getServerDisks(GetServerDisksArgs.builder()
.nameRegex("^my-Disk")
.build());
ctx.export("simpleApplicationServerDiskId2", nameRegex.disks()[0].id());
final var status = SimpleapplicationserverFunctions.getServerDisks(GetServerDisksArgs.builder()
.status("In_use")
.build());
ctx.export("simpleApplicationServerDiskId3", status.disks()[0].id());
final var instanceId = SimpleapplicationserverFunctions.getServerDisks(GetServerDisksArgs.builder()
.instanceId("example_value")
.build());
ctx.export("simpleApplicationServerDiskId4", instanceId.disks()[0].id());
final var diskType = SimpleapplicationserverFunctions.getServerDisks(GetServerDisksArgs.builder()
.diskType("System")
.build());
ctx.export("simpleApplicationServerDiskId5", diskType.disks()[0].id());
}
}
variables:
ids:
fn::invoke:
function: alicloud:simpleapplicationserver:getServerDisks
arguments:
ids:
- example_id
nameRegex:
fn::invoke:
function: alicloud:simpleapplicationserver:getServerDisks
arguments:
nameRegex: ^my-Disk
status:
fn::invoke:
function: alicloud:simpleapplicationserver:getServerDisks
arguments:
status: In_use
instanceId:
fn::invoke:
function: alicloud:simpleapplicationserver:getServerDisks
arguments:
instanceId: example_value
diskType:
fn::invoke:
function: alicloud:simpleapplicationserver:getServerDisks
arguments:
diskType: System
outputs:
simpleApplicationServerDiskId1: ${ids.disks[0].id}
simpleApplicationServerDiskId2: ${nameRegex.disks[0].id}
simpleApplicationServerDiskId3: ${status.disks[0].id}
simpleApplicationServerDiskId4: ${instanceId.disks[0].id}
simpleApplicationServerDiskId5: ${diskType.disks[0].id}
Using getServerDisks
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 getServerDisks(args: GetServerDisksArgs, opts?: InvokeOptions): Promise<GetServerDisksResult>
function getServerDisksOutput(args: GetServerDisksOutputArgs, opts?: InvokeOptions): Output<GetServerDisksResult>def get_server_disks(disk_type: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
instance_id: Optional[str] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetServerDisksResult
def get_server_disks_output(disk_type: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetServerDisksResult]func GetServerDisks(ctx *Context, args *GetServerDisksArgs, opts ...InvokeOption) (*GetServerDisksResult, error)
func GetServerDisksOutput(ctx *Context, args *GetServerDisksOutputArgs, opts ...InvokeOption) GetServerDisksResultOutput> Note: This function is named GetServerDisks in the Go SDK.
public static class GetServerDisks
{
public static Task<GetServerDisksResult> InvokeAsync(GetServerDisksArgs args, InvokeOptions? opts = null)
public static Output<GetServerDisksResult> Invoke(GetServerDisksInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetServerDisksResult> getServerDisks(GetServerDisksArgs args, InvokeOptions options)
public static Output<GetServerDisksResult> getServerDisks(GetServerDisksArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:simpleapplicationserver/getServerDisks:getServerDisks
arguments:
# arguments dictionaryThe following arguments are supported:
- Disk
Type string - The type of the disk. Possible values:
System,Data. - Ids List<string>
- A list of Disk IDs.
- Instance
Id string - The ID of the simple application server to which the disk is attached.
- Name
Regex string - A regex string to filter results by Disk name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Status string
- The status of the disk. Valid values:
ReIniting,Creating,In_Use,Available,Attaching,Detaching.
- Disk
Type string - The type of the disk. Possible values:
System,Data. - Ids []string
- A list of Disk IDs.
- Instance
Id string - The ID of the simple application server to which the disk is attached.
- Name
Regex string - A regex string to filter results by Disk name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Status string
- The status of the disk. Valid values:
ReIniting,Creating,In_Use,Available,Attaching,Detaching.
- disk
Type String - The type of the disk. Possible values:
System,Data. - ids List<String>
- A list of Disk IDs.
- instance
Id String - The ID of the simple application server to which the disk is attached.
- name
Regex String - A regex string to filter results by Disk name.
- output
File String - File name where to save data source results (after running
pulumi preview). - status String
- The status of the disk. Valid values:
ReIniting,Creating,In_Use,Available,Attaching,Detaching.
- disk
Type string - The type of the disk. Possible values:
System,Data. - ids string[]
- A list of Disk IDs.
- instance
Id string - The ID of the simple application server to which the disk is attached.
- name
Regex string - A regex string to filter results by Disk name.
- output
File string - File name where to save data source results (after running
pulumi preview). - status string
- The status of the disk. Valid values:
ReIniting,Creating,In_Use,Available,Attaching,Detaching.
- disk_
type str - The type of the disk. Possible values:
System,Data. - ids Sequence[str]
- A list of Disk IDs.
- instance_
id str - The ID of the simple application server to which the disk is attached.
- name_
regex str - A regex string to filter results by Disk name.
- output_
file str - File name where to save data source results (after running
pulumi preview). - status str
- The status of the disk. Valid values:
ReIniting,Creating,In_Use,Available,Attaching,Detaching.
- disk
Type String - The type of the disk. Possible values:
System,Data. - ids List<String>
- A list of Disk IDs.
- instance
Id String - The ID of the simple application server to which the disk is attached.
- name
Regex String - A regex string to filter results by Disk name.
- output
File String - File name where to save data source results (after running
pulumi preview). - status String
- The status of the disk. Valid values:
ReIniting,Creating,In_Use,Available,Attaching,Detaching.
getServerDisks Result
The following output properties are available:
- Disks
List<Pulumi.
Ali Cloud. Simple Application Server. Outputs. Get Server Disks Disk> - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Disk
Type string - Instance
Id string - Name
Regex string - Output
File string - Status string
- Disks
[]Get
Server Disks Disk - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Disk
Type string - Instance
Id string - Name
Regex string - Output
File string - Status string
- disks
List<Get
Server Disks Disk> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- disk
Type String - instance
Id String - name
Regex String - output
File String - status String
- disks
Get
Server Disks Disk[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- disk
Type string - instance
Id string - name
Regex string - output
File string - status string
- disks
Sequence[Get
Server Disks Disk] - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- disk_
type str - instance_
id str - name_
regex str - output_
file str - status str
- disks List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- disk
Type String - instance
Id String - name
Regex String - output
File String - status String
Supporting Types
GetServerDisksDisk
- Category string
- Disk type. Possible values:
ESSD,SSD. - Create
Time string - The time when the disk was created. The time follows the ISO 8601 standard in the
yyyy-MM-ddTHH:mm:ssZformat. The time is displayed in UTC. - Device string
- The device name of the disk on the simple application server.
- Disk
Id string - The first ID of the resource.
- Disk
Name string - The name of the resource.
- Disk
Type string - The type of the disk. Possible values:
System,Data. - Id string
- The ID of the Disk.
- Instance
Id string - Alibaba Cloud simple application server instance ID.
- Payment
Type string - The payment type of the resource. Valid values:
PayAsYouGo,Subscription. - Size int
- The size of the disk. Unit:
GB. - Status string
- The status of the disk. Valid values:
ReIniting,Creating,In_Use,Available,Attaching,Detaching.
- Category string
- Disk type. Possible values:
ESSD,SSD. - Create
Time string - The time when the disk was created. The time follows the ISO 8601 standard in the
yyyy-MM-ddTHH:mm:ssZformat. The time is displayed in UTC. - Device string
- The device name of the disk on the simple application server.
- Disk
Id string - The first ID of the resource.
- Disk
Name string - The name of the resource.
- Disk
Type string - The type of the disk. Possible values:
System,Data. - Id string
- The ID of the Disk.
- Instance
Id string - Alibaba Cloud simple application server instance ID.
- Payment
Type string - The payment type of the resource. Valid values:
PayAsYouGo,Subscription. - Size int
- The size of the disk. Unit:
GB. - Status string
- The status of the disk. Valid values:
ReIniting,Creating,In_Use,Available,Attaching,Detaching.
- category String
- Disk type. Possible values:
ESSD,SSD. - create
Time String - The time when the disk was created. The time follows the ISO 8601 standard in the
yyyy-MM-ddTHH:mm:ssZformat. The time is displayed in UTC. - device String
- The device name of the disk on the simple application server.
- disk
Id String - The first ID of the resource.
- disk
Name String - The name of the resource.
- disk
Type String - The type of the disk. Possible values:
System,Data. - id String
- The ID of the Disk.
- instance
Id String - Alibaba Cloud simple application server instance ID.
- payment
Type String - The payment type of the resource. Valid values:
PayAsYouGo,Subscription. - size Integer
- The size of the disk. Unit:
GB. - status String
- The status of the disk. Valid values:
ReIniting,Creating,In_Use,Available,Attaching,Detaching.
- category string
- Disk type. Possible values:
ESSD,SSD. - create
Time string - The time when the disk was created. The time follows the ISO 8601 standard in the
yyyy-MM-ddTHH:mm:ssZformat. The time is displayed in UTC. - device string
- The device name of the disk on the simple application server.
- disk
Id string - The first ID of the resource.
- disk
Name string - The name of the resource.
- disk
Type string - The type of the disk. Possible values:
System,Data. - id string
- The ID of the Disk.
- instance
Id string - Alibaba Cloud simple application server instance ID.
- payment
Type string - The payment type of the resource. Valid values:
PayAsYouGo,Subscription. - size number
- The size of the disk. Unit:
GB. - status string
- The status of the disk. Valid values:
ReIniting,Creating,In_Use,Available,Attaching,Detaching.
- category str
- Disk type. Possible values:
ESSD,SSD. - create_
time str - The time when the disk was created. The time follows the ISO 8601 standard in the
yyyy-MM-ddTHH:mm:ssZformat. The time is displayed in UTC. - device str
- The device name of the disk on the simple application server.
- disk_
id str - The first ID of the resource.
- disk_
name str - The name of the resource.
- disk_
type str - The type of the disk. Possible values:
System,Data. - id str
- The ID of the Disk.
- instance_
id str - Alibaba Cloud simple application server instance ID.
- payment_
type str - The payment type of the resource. Valid values:
PayAsYouGo,Subscription. - size int
- The size of the disk. Unit:
GB. - status str
- The status of the disk. Valid values:
ReIniting,Creating,In_Use,Available,Attaching,Detaching.
- category String
- Disk type. Possible values:
ESSD,SSD. - create
Time String - The time when the disk was created. The time follows the ISO 8601 standard in the
yyyy-MM-ddTHH:mm:ssZformat. The time is displayed in UTC. - device String
- The device name of the disk on the simple application server.
- disk
Id String - The first ID of the resource.
- disk
Name String - The name of the resource.
- disk
Type String - The type of the disk. Possible values:
System,Data. - id String
- The ID of the Disk.
- instance
Id String - Alibaba Cloud simple application server instance ID.
- payment
Type String - The payment type of the resource. Valid values:
PayAsYouGo,Subscription. - size Number
- The size of the disk. Unit:
GB. - status String
- The status of the disk. Valid values:
ReIniting,Creating,In_Use,Available,Attaching,Detaching.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
