published on Saturday, Mar 14, 2026 by Pulumi
published on Saturday, Mar 14, 2026 by Pulumi
Provides a Simple Application Server Disk resource.
For information about Simple Application Server Disk and how to use it, see What is Disk.
NOTE: Available since v1.273.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const defaultV70JQf = new alicloud.simpleapplicationserver.Instance("defaultV70JQf", {
instanceName: "examplewujie",
status: "Running",
planId: "swas.s1.c2m2s50b3",
imageId: "21e9617bd4754f77a090d2fbc94916a4",
period: 1,
dataDiskSize: 0,
password: "@3612568Wj",
paymentType: "Subscription",
autoRenew: true,
autoRenewPeriod: 1,
});
const _default = new alicloud.simpleapplicationserver.Disk("default", {
diskSize: 20,
instanceId: defaultV70JQf.id,
remark: "example",
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default_v70_j_qf = alicloud.simpleapplicationserver.Instance("defaultV70JQf",
instance_name="examplewujie",
status="Running",
plan_id="swas.s1.c2m2s50b3",
image_id="21e9617bd4754f77a090d2fbc94916a4",
period=1,
data_disk_size=0,
password="@3612568Wj",
payment_type="Subscription",
auto_renew=True,
auto_renew_period=1)
default = alicloud.simpleapplicationserver.Disk("default",
disk_size=20,
instance_id=default_v70_j_qf.id,
remark="example")
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/simpleapplicationserver"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
defaultV70JQf, err := simpleapplicationserver.NewInstance(ctx, "defaultV70JQf", &simpleapplicationserver.InstanceArgs{
InstanceName: pulumi.String("examplewujie"),
Status: pulumi.String("Running"),
PlanId: pulumi.String("swas.s1.c2m2s50b3"),
ImageId: pulumi.String("21e9617bd4754f77a090d2fbc94916a4"),
Period: pulumi.Int(1),
DataDiskSize: pulumi.Int(0),
Password: pulumi.String("@3612568Wj"),
PaymentType: pulumi.String("Subscription"),
AutoRenew: pulumi.Bool(true),
AutoRenewPeriod: pulumi.Int(1),
})
if err != nil {
return err
}
_, err = simpleapplicationserver.NewDisk(ctx, "default", &simpleapplicationserver.DiskArgs{
DiskSize: pulumi.Int(20),
InstanceId: defaultV70JQf.ID(),
Remark: pulumi.String("example"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var defaultV70JQf = new AliCloud.SimpleApplicationServer.Instance("defaultV70JQf", new()
{
InstanceName = "examplewujie",
Status = "Running",
PlanId = "swas.s1.c2m2s50b3",
ImageId = "21e9617bd4754f77a090d2fbc94916a4",
Period = 1,
DataDiskSize = 0,
Password = "@3612568Wj",
PaymentType = "Subscription",
AutoRenew = true,
AutoRenewPeriod = 1,
});
var @default = new AliCloud.SimpleApplicationServer.Disk("default", new()
{
DiskSize = 20,
InstanceId = defaultV70JQf.Id,
Remark = "example",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.simpleapplicationserver.Instance;
import com.pulumi.alicloud.simpleapplicationserver.InstanceArgs;
import com.pulumi.alicloud.simpleapplicationserver.Disk;
import com.pulumi.alicloud.simpleapplicationserver.DiskArgs;
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 config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var defaultV70JQf = new Instance("defaultV70JQf", InstanceArgs.builder()
.instanceName("examplewujie")
.status("Running")
.planId("swas.s1.c2m2s50b3")
.imageId("21e9617bd4754f77a090d2fbc94916a4")
.period(1)
.dataDiskSize(0)
.password("@3612568Wj")
.paymentType("Subscription")
.autoRenew(true)
.autoRenewPeriod(1)
.build());
var default_ = new Disk("default", DiskArgs.builder()
.diskSize(20)
.instanceId(defaultV70JQf.id())
.remark("example")
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
defaultV70JQf:
type: alicloud:simpleapplicationserver:Instance
properties:
instanceName: examplewujie
status: Running
planId: swas.s1.c2m2s50b3
imageId: 21e9617bd4754f77a090d2fbc94916a4
period: '1'
dataDiskSize: '0'
password: '@3612568Wj'
paymentType: Subscription
autoRenew: true
autoRenewPeriod: '1'
default:
type: alicloud:simpleapplicationserver:Disk
properties:
diskSize: '20'
instanceId: ${defaultV70JQf.id}
remark: example
Deleting alicloud.simpleapplicationserver.Disk or removing it from your configuration
Terraform cannot destroy resource alicloud.simpleapplicationserver.Disk. Terraform will remove this resource from the state file, however resources may remain.
📚 Need more examples? VIEW MORE EXAMPLES
Create Disk Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Disk(name: string, args: DiskArgs, opts?: CustomResourceOptions);@overload
def Disk(resource_name: str,
args: DiskArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Disk(resource_name: str,
opts: Optional[ResourceOptions] = None,
disk_size: Optional[int] = None,
instance_id: Optional[str] = None,
remark: Optional[str] = None)func NewDisk(ctx *Context, name string, args DiskArgs, opts ...ResourceOption) (*Disk, error)public Disk(string name, DiskArgs args, CustomResourceOptions? opts = null)type: alicloud:simpleapplicationserver:Disk
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DiskArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DiskArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DiskArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DiskArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DiskArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var examplediskResourceResourceFromSimpleapplicationserverdisk = new AliCloud.SimpleApplicationServer.Disk("examplediskResourceResourceFromSimpleapplicationserverdisk", new()
{
DiskSize = 0,
InstanceId = "string",
Remark = "string",
});
example, err := simpleapplicationserver.NewDisk(ctx, "examplediskResourceResourceFromSimpleapplicationserverdisk", &simpleapplicationserver.DiskArgs{
DiskSize: pulumi.Int(0),
InstanceId: pulumi.String("string"),
Remark: pulumi.String("string"),
})
var examplediskResourceResourceFromSimpleapplicationserverdisk = new com.pulumi.alicloud.simpleapplicationserver.Disk("examplediskResourceResourceFromSimpleapplicationserverdisk", com.pulumi.alicloud.simpleapplicationserver.DiskArgs.builder()
.diskSize(0)
.instanceId("string")
.remark("string")
.build());
exampledisk_resource_resource_from_simpleapplicationserverdisk = alicloud.simpleapplicationserver.Disk("examplediskResourceResourceFromSimpleapplicationserverdisk",
disk_size=0,
instance_id="string",
remark="string")
const examplediskResourceResourceFromSimpleapplicationserverdisk = new alicloud.simpleapplicationserver.Disk("examplediskResourceResourceFromSimpleapplicationserverdisk", {
diskSize: 0,
instanceId: "string",
remark: "string",
});
type: alicloud:simpleapplicationserver:Disk
properties:
diskSize: 0
instanceId: string
remark: string
Disk Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Disk resource accepts the following input properties:
- Disk
Size int - disk size
- Instance
Id string - instance id
- Remark string
- Note information.
- Disk
Size int - disk size
- Instance
Id string - instance id
- Remark string
- Note information.
- disk
Size Integer - disk size
- instance
Id String - instance id
- remark String
- Note information.
- disk
Size number - disk size
- instance
Id string - instance id
- remark string
- Note information.
- disk_
size int - disk size
- instance_
id str - instance id
- remark str
- Note information.
- disk
Size Number - disk size
- instance
Id String - instance id
- remark String
- Note information.
Outputs
All input properties are implicitly available as output properties. Additionally, the Disk resource produces the following output properties:
- Create
Time string - The creation time of the resource.
- Disk
Name string - The name of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Region
Id string - The region ID of the resource.
- Create
Time string - The creation time of the resource.
- Disk
Name string - The name of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Region
Id string - The region ID of the resource.
- create
Time String - The creation time of the resource.
- disk
Name String - The name of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- region
Id String - The region ID of the resource.
- create
Time string - The creation time of the resource.
- disk
Name string - The name of the resource.
- id string
- The provider-assigned unique ID for this managed resource.
- region
Id string - The region ID of the resource.
- create_
time str - The creation time of the resource.
- disk_
name str - The name of the resource.
- id str
- The provider-assigned unique ID for this managed resource.
- region_
id str - The region ID of the resource.
- create
Time String - The creation time of the resource.
- disk
Name String - The name of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- region
Id String - The region ID of the resource.
Look up Existing Disk Resource
Get an existing Disk resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DiskState, opts?: CustomResourceOptions): Disk@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
disk_name: Optional[str] = None,
disk_size: Optional[int] = None,
instance_id: Optional[str] = None,
region_id: Optional[str] = None,
remark: Optional[str] = None) -> Diskfunc GetDisk(ctx *Context, name string, id IDInput, state *DiskState, opts ...ResourceOption) (*Disk, error)public static Disk Get(string name, Input<string> id, DiskState? state, CustomResourceOptions? opts = null)public static Disk get(String name, Output<String> id, DiskState state, CustomResourceOptions options)resources: _: type: alicloud:simpleapplicationserver:Disk get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Create
Time string - The creation time of the resource.
- Disk
Name string - The name of the resource.
- Disk
Size int - disk size
- Instance
Id string - instance id
- Region
Id string - The region ID of the resource.
- Remark string
- Note information.
- Create
Time string - The creation time of the resource.
- Disk
Name string - The name of the resource.
- Disk
Size int - disk size
- Instance
Id string - instance id
- Region
Id string - The region ID of the resource.
- Remark string
- Note information.
- create
Time String - The creation time of the resource.
- disk
Name String - The name of the resource.
- disk
Size Integer - disk size
- instance
Id String - instance id
- region
Id String - The region ID of the resource.
- remark String
- Note information.
- create
Time string - The creation time of the resource.
- disk
Name string - The name of the resource.
- disk
Size number - disk size
- instance
Id string - instance id
- region
Id string - The region ID of the resource.
- remark string
- Note information.
- create_
time str - The creation time of the resource.
- disk_
name str - The name of the resource.
- disk_
size int - disk size
- instance_
id str - instance id
- region_
id str - The region ID of the resource.
- remark str
- Note information.
- create
Time String - The creation time of the resource.
- disk
Name String - The name of the resource.
- disk
Size Number - disk size
- instance
Id String - instance id
- region
Id String - The region ID of the resource.
- remark String
- Note information.
Import
Simple Application Server Disk can be imported using the id, e.g.
$ pulumi import alicloud:simpleapplicationserver/disk:Disk example <disk_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
published on Saturday, Mar 14, 2026 by Pulumi
