alicloud.rds.CustomDisk
Explore with Pulumi AI
Provides a RDS Custom Disk resource.
RDS User dedicated host disk.
For information about RDS Custom Disk and how to use it, see What is Custom Disk.
NOTE: Available since v1.247.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 regionId = config.get("regionId") || "cn-beijing";
const _default = new alicloud.rds.CustomDisk("default", {
description: "zcc测试用例",
zoneId: "cn-beijing-i",
size: 40,
performanceLevel: "PL1",
instanceChargeType: "Postpaid",
diskCategory: "cloud_essd",
diskName: "custom_disk_001",
autoRenew: false,
period: 1,
autoPay: true,
periodUnit: "1",
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
region_id = config.get("regionId")
if region_id is None:
region_id = "cn-beijing"
default = alicloud.rds.CustomDisk("default",
description="zcc测试用例",
zone_id="cn-beijing-i",
size=40,
performance_level="PL1",
instance_charge_type="Postpaid",
disk_category="cloud_essd",
disk_name="custom_disk_001",
auto_renew=False,
period=1,
auto_pay=True,
period_unit="1")
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/rds"
"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
}
regionId := "cn-beijing"
if param := cfg.Get("regionId"); param != "" {
regionId = param
}
_, err := rds.NewCustomDisk(ctx, "default", &rds.CustomDiskArgs{
Description: pulumi.String("zcc测试用例"),
ZoneId: pulumi.String("cn-beijing-i"),
Size: pulumi.Int(40),
PerformanceLevel: pulumi.String("PL1"),
InstanceChargeType: pulumi.String("Postpaid"),
DiskCategory: pulumi.String("cloud_essd"),
DiskName: pulumi.String("custom_disk_001"),
AutoRenew: pulumi.Bool(false),
Period: pulumi.Int(1),
AutoPay: pulumi.Bool(true),
PeriodUnit: pulumi.String("1"),
})
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 regionId = config.Get("regionId") ?? "cn-beijing";
var @default = new AliCloud.Rds.CustomDisk("default", new()
{
Description = "zcc测试用例",
ZoneId = "cn-beijing-i",
Size = 40,
PerformanceLevel = "PL1",
InstanceChargeType = "Postpaid",
DiskCategory = "cloud_essd",
DiskName = "custom_disk_001",
AutoRenew = false,
Period = 1,
AutoPay = true,
PeriodUnit = "1",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.rds.CustomDisk;
import com.pulumi.alicloud.rds.CustomDiskArgs;
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");
final var regionId = config.get("regionId").orElse("cn-beijing");
var default_ = new CustomDisk("default", CustomDiskArgs.builder()
.description("zcc测试用例")
.zoneId("cn-beijing-i")
.size(40)
.performanceLevel("PL1")
.instanceChargeType("Postpaid")
.diskCategory("cloud_essd")
.diskName("custom_disk_001")
.autoRenew(false)
.period(1)
.autoPay(true)
.periodUnit("1")
.build());
}
}
configuration:
name:
type: string
default: terraform-example
regionId:
type: string
default: cn-beijing
resources:
default:
type: alicloud:rds:CustomDisk
properties:
description: zcc测试用例
zoneId: cn-beijing-i
size: '40'
performanceLevel: PL1
instanceChargeType: Postpaid
diskCategory: cloud_essd
diskName: custom_disk_001
autoRenew: false
period: '1'
autoPay: true
periodUnit: '1'
Create CustomDisk Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CustomDisk(name: string, args: CustomDiskArgs, opts?: CustomResourceOptions);
@overload
def CustomDisk(resource_name: str,
args: CustomDiskArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CustomDisk(resource_name: str,
opts: Optional[ResourceOptions] = None,
disk_category: Optional[str] = None,
zone_id: Optional[str] = None,
size: Optional[int] = None,
instance_charge_type: Optional[str] = None,
disk_name: Optional[str] = None,
dry_run: Optional[bool] = None,
auto_pay: Optional[bool] = None,
performance_level: Optional[str] = None,
period: Optional[int] = None,
period_unit: Optional[str] = None,
description: Optional[str] = None,
snapshot_id: Optional[str] = None,
type: Optional[str] = None,
auto_renew: Optional[bool] = None)
func NewCustomDisk(ctx *Context, name string, args CustomDiskArgs, opts ...ResourceOption) (*CustomDisk, error)
public CustomDisk(string name, CustomDiskArgs args, CustomResourceOptions? opts = null)
public CustomDisk(String name, CustomDiskArgs args)
public CustomDisk(String name, CustomDiskArgs args, CustomResourceOptions options)
type: alicloud:rds:CustomDisk
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 CustomDiskArgs
- 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 CustomDiskArgs
- 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 CustomDiskArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CustomDiskArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CustomDiskArgs
- 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 customDiskResource = new AliCloud.Rds.CustomDisk("customDiskResource", new()
{
DiskCategory = "string",
ZoneId = "string",
Size = 0,
InstanceChargeType = "string",
DiskName = "string",
DryRun = false,
AutoPay = false,
PerformanceLevel = "string",
Period = 0,
PeriodUnit = "string",
Description = "string",
SnapshotId = "string",
Type = "string",
AutoRenew = false,
});
example, err := rds.NewCustomDisk(ctx, "customDiskResource", &rds.CustomDiskArgs{
DiskCategory: pulumi.String("string"),
ZoneId: pulumi.String("string"),
Size: pulumi.Int(0),
InstanceChargeType: pulumi.String("string"),
DiskName: pulumi.String("string"),
DryRun: pulumi.Bool(false),
AutoPay: pulumi.Bool(false),
PerformanceLevel: pulumi.String("string"),
Period: pulumi.Int(0),
PeriodUnit: pulumi.String("string"),
Description: pulumi.String("string"),
SnapshotId: pulumi.String("string"),
Type: pulumi.String("string"),
AutoRenew: pulumi.Bool(false),
})
var customDiskResource = new CustomDisk("customDiskResource", CustomDiskArgs.builder()
.diskCategory("string")
.zoneId("string")
.size(0)
.instanceChargeType("string")
.diskName("string")
.dryRun(false)
.autoPay(false)
.performanceLevel("string")
.period(0)
.periodUnit("string")
.description("string")
.snapshotId("string")
.type("string")
.autoRenew(false)
.build());
custom_disk_resource = alicloud.rds.CustomDisk("customDiskResource",
disk_category="string",
zone_id="string",
size=0,
instance_charge_type="string",
disk_name="string",
dry_run=False,
auto_pay=False,
performance_level="string",
period=0,
period_unit="string",
description="string",
snapshot_id="string",
type="string",
auto_renew=False)
const customDiskResource = new alicloud.rds.CustomDisk("customDiskResource", {
diskCategory: "string",
zoneId: "string",
size: 0,
instanceChargeType: "string",
diskName: "string",
dryRun: false,
autoPay: false,
performanceLevel: "string",
period: 0,
periodUnit: "string",
description: "string",
snapshotId: "string",
type: "string",
autoRenew: false,
});
type: alicloud:rds:CustomDisk
properties:
autoPay: false
autoRenew: false
description: string
diskCategory: string
diskName: string
dryRun: false
instanceChargeType: string
performanceLevel: string
period: 0
periodUnit: string
size: 0
snapshotId: string
type: string
zoneId: string
CustomDisk 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 CustomDisk resource accepts the following input properties:
- Disk
Category string - The type of the data disk. Value range:
- Size int
- Capacity size. Unit: GiB. You must pass in a parameter value for this parameter. Value range:
- Zone
Id string - The zone ID.
- Auto
Pay bool - Whether to pay automatically. Value range:
- Auto
Renew bool - Whether to automatically renew. This parameter is passed in only when you create a data disk. Valid values:
- Description string
- The disk description. It must be 2 to 256 characters in length and cannot start with 'http:// 'or 'https. Default value: empty.
- Disk
Name string - The disk name. It can be 2 to 128 characters in length. It supports letters in Unicode (including English, Chinese, and numbers). Can contain a colon (:), an underscore (_), a period (.), or a dash (-). Default value: empty.
- Dry
Run bool - Whether to pre-check the instance creation operation. Valid values:
- Instance
Charge stringType - The Payment type. Only
Postpaid
: Pay-As-You-Go is supported. - Performance
Level string When creating an ESSD cloud disk, set the performance level of the disk. Value range:
PL0
: The maximum random read/write IOPS 10000 for a single disk.PL1
(default): The maximum number of random read/write IOPS 50000 for a single disk.PL2
: maximum random read/write IOPS 100000 for a single disk.PL3
: The maximum random read/write IOPS 1 million for a single disk.
For more information about how to select an ESSD performance level, see ESSD cloud disk.
- Period int
- Reserved parameters, no need to fill in.
- Period
Unit string - Reserved parameters, no need to fill in.
- Snapshot
Id string - The snapshot used to create the cloud disk. Snapshots made on or before July 15, 2013 cannot be used to create cloud disks. The 'SnapshotId' parameter and the 'Size' parameter have the following limitations:
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is greater than the set 'Size' parameter value, the actual size of the cloud disk created is the size of the specified snapshot.
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is less than the set 'Size' parameter value, the size of the cloud disk created is the specified 'Size' parameter value.
- Snapshots are not supported for creating elastic temporary disks.
- Type string
- The method of expanding the disk. Value range: offline (default): offline expansion. After the expansion, the instance must be restarted to take effect. online: online expansion, which can be completed without restarting the instance.
- Disk
Category string - The type of the data disk. Value range:
- Size int
- Capacity size. Unit: GiB. You must pass in a parameter value for this parameter. Value range:
- Zone
Id string - The zone ID.
- Auto
Pay bool - Whether to pay automatically. Value range:
- Auto
Renew bool - Whether to automatically renew. This parameter is passed in only when you create a data disk. Valid values:
- Description string
- The disk description. It must be 2 to 256 characters in length and cannot start with 'http:// 'or 'https. Default value: empty.
- Disk
Name string - The disk name. It can be 2 to 128 characters in length. It supports letters in Unicode (including English, Chinese, and numbers). Can contain a colon (:), an underscore (_), a period (.), or a dash (-). Default value: empty.
- Dry
Run bool - Whether to pre-check the instance creation operation. Valid values:
- Instance
Charge stringType - The Payment type. Only
Postpaid
: Pay-As-You-Go is supported. - Performance
Level string When creating an ESSD cloud disk, set the performance level of the disk. Value range:
PL0
: The maximum random read/write IOPS 10000 for a single disk.PL1
(default): The maximum number of random read/write IOPS 50000 for a single disk.PL2
: maximum random read/write IOPS 100000 for a single disk.PL3
: The maximum random read/write IOPS 1 million for a single disk.
For more information about how to select an ESSD performance level, see ESSD cloud disk.
- Period int
- Reserved parameters, no need to fill in.
- Period
Unit string - Reserved parameters, no need to fill in.
- Snapshot
Id string - The snapshot used to create the cloud disk. Snapshots made on or before July 15, 2013 cannot be used to create cloud disks. The 'SnapshotId' parameter and the 'Size' parameter have the following limitations:
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is greater than the set 'Size' parameter value, the actual size of the cloud disk created is the size of the specified snapshot.
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is less than the set 'Size' parameter value, the size of the cloud disk created is the specified 'Size' parameter value.
- Snapshots are not supported for creating elastic temporary disks.
- Type string
- The method of expanding the disk. Value range: offline (default): offline expansion. After the expansion, the instance must be restarted to take effect. online: online expansion, which can be completed without restarting the instance.
- disk
Category String - The type of the data disk. Value range:
- size Integer
- Capacity size. Unit: GiB. You must pass in a parameter value for this parameter. Value range:
- zone
Id String - The zone ID.
- auto
Pay Boolean - Whether to pay automatically. Value range:
- auto
Renew Boolean - Whether to automatically renew. This parameter is passed in only when you create a data disk. Valid values:
- description String
- The disk description. It must be 2 to 256 characters in length and cannot start with 'http:// 'or 'https. Default value: empty.
- disk
Name String - The disk name. It can be 2 to 128 characters in length. It supports letters in Unicode (including English, Chinese, and numbers). Can contain a colon (:), an underscore (_), a period (.), or a dash (-). Default value: empty.
- dry
Run Boolean - Whether to pre-check the instance creation operation. Valid values:
- instance
Charge StringType - The Payment type. Only
Postpaid
: Pay-As-You-Go is supported. - performance
Level String When creating an ESSD cloud disk, set the performance level of the disk. Value range:
PL0
: The maximum random read/write IOPS 10000 for a single disk.PL1
(default): The maximum number of random read/write IOPS 50000 for a single disk.PL2
: maximum random read/write IOPS 100000 for a single disk.PL3
: The maximum random read/write IOPS 1 million for a single disk.
For more information about how to select an ESSD performance level, see ESSD cloud disk.
- period Integer
- Reserved parameters, no need to fill in.
- period
Unit String - Reserved parameters, no need to fill in.
- snapshot
Id String - The snapshot used to create the cloud disk. Snapshots made on or before July 15, 2013 cannot be used to create cloud disks. The 'SnapshotId' parameter and the 'Size' parameter have the following limitations:
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is greater than the set 'Size' parameter value, the actual size of the cloud disk created is the size of the specified snapshot.
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is less than the set 'Size' parameter value, the size of the cloud disk created is the specified 'Size' parameter value.
- Snapshots are not supported for creating elastic temporary disks.
- type String
- The method of expanding the disk. Value range: offline (default): offline expansion. After the expansion, the instance must be restarted to take effect. online: online expansion, which can be completed without restarting the instance.
- disk
Category string - The type of the data disk. Value range:
- size number
- Capacity size. Unit: GiB. You must pass in a parameter value for this parameter. Value range:
- zone
Id string - The zone ID.
- auto
Pay boolean - Whether to pay automatically. Value range:
- auto
Renew boolean - Whether to automatically renew. This parameter is passed in only when you create a data disk. Valid values:
- description string
- The disk description. It must be 2 to 256 characters in length and cannot start with 'http:// 'or 'https. Default value: empty.
- disk
Name string - The disk name. It can be 2 to 128 characters in length. It supports letters in Unicode (including English, Chinese, and numbers). Can contain a colon (:), an underscore (_), a period (.), or a dash (-). Default value: empty.
- dry
Run boolean - Whether to pre-check the instance creation operation. Valid values:
- instance
Charge stringType - The Payment type. Only
Postpaid
: Pay-As-You-Go is supported. - performance
Level string When creating an ESSD cloud disk, set the performance level of the disk. Value range:
PL0
: The maximum random read/write IOPS 10000 for a single disk.PL1
(default): The maximum number of random read/write IOPS 50000 for a single disk.PL2
: maximum random read/write IOPS 100000 for a single disk.PL3
: The maximum random read/write IOPS 1 million for a single disk.
For more information about how to select an ESSD performance level, see ESSD cloud disk.
- period number
- Reserved parameters, no need to fill in.
- period
Unit string - Reserved parameters, no need to fill in.
- snapshot
Id string - The snapshot used to create the cloud disk. Snapshots made on or before July 15, 2013 cannot be used to create cloud disks. The 'SnapshotId' parameter and the 'Size' parameter have the following limitations:
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is greater than the set 'Size' parameter value, the actual size of the cloud disk created is the size of the specified snapshot.
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is less than the set 'Size' parameter value, the size of the cloud disk created is the specified 'Size' parameter value.
- Snapshots are not supported for creating elastic temporary disks.
- type string
- The method of expanding the disk. Value range: offline (default): offline expansion. After the expansion, the instance must be restarted to take effect. online: online expansion, which can be completed without restarting the instance.
- disk_
category str - The type of the data disk. Value range:
- size int
- Capacity size. Unit: GiB. You must pass in a parameter value for this parameter. Value range:
- zone_
id str - The zone ID.
- auto_
pay bool - Whether to pay automatically. Value range:
- auto_
renew bool - Whether to automatically renew. This parameter is passed in only when you create a data disk. Valid values:
- description str
- The disk description. It must be 2 to 256 characters in length and cannot start with 'http:// 'or 'https. Default value: empty.
- disk_
name str - The disk name. It can be 2 to 128 characters in length. It supports letters in Unicode (including English, Chinese, and numbers). Can contain a colon (:), an underscore (_), a period (.), or a dash (-). Default value: empty.
- dry_
run bool - Whether to pre-check the instance creation operation. Valid values:
- instance_
charge_ strtype - The Payment type. Only
Postpaid
: Pay-As-You-Go is supported. - performance_
level str When creating an ESSD cloud disk, set the performance level of the disk. Value range:
PL0
: The maximum random read/write IOPS 10000 for a single disk.PL1
(default): The maximum number of random read/write IOPS 50000 for a single disk.PL2
: maximum random read/write IOPS 100000 for a single disk.PL3
: The maximum random read/write IOPS 1 million for a single disk.
For more information about how to select an ESSD performance level, see ESSD cloud disk.
- period int
- Reserved parameters, no need to fill in.
- period_
unit str - Reserved parameters, no need to fill in.
- snapshot_
id str - The snapshot used to create the cloud disk. Snapshots made on or before July 15, 2013 cannot be used to create cloud disks. The 'SnapshotId' parameter and the 'Size' parameter have the following limitations:
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is greater than the set 'Size' parameter value, the actual size of the cloud disk created is the size of the specified snapshot.
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is less than the set 'Size' parameter value, the size of the cloud disk created is the specified 'Size' parameter value.
- Snapshots are not supported for creating elastic temporary disks.
- type str
- The method of expanding the disk. Value range: offline (default): offline expansion. After the expansion, the instance must be restarted to take effect. online: online expansion, which can be completed without restarting the instance.
- disk
Category String - The type of the data disk. Value range:
- size Number
- Capacity size. Unit: GiB. You must pass in a parameter value for this parameter. Value range:
- zone
Id String - The zone ID.
- auto
Pay Boolean - Whether to pay automatically. Value range:
- auto
Renew Boolean - Whether to automatically renew. This parameter is passed in only when you create a data disk. Valid values:
- description String
- The disk description. It must be 2 to 256 characters in length and cannot start with 'http:// 'or 'https. Default value: empty.
- disk
Name String - The disk name. It can be 2 to 128 characters in length. It supports letters in Unicode (including English, Chinese, and numbers). Can contain a colon (:), an underscore (_), a period (.), or a dash (-). Default value: empty.
- dry
Run Boolean - Whether to pre-check the instance creation operation. Valid values:
- instance
Charge StringType - The Payment type. Only
Postpaid
: Pay-As-You-Go is supported. - performance
Level String When creating an ESSD cloud disk, set the performance level of the disk. Value range:
PL0
: The maximum random read/write IOPS 10000 for a single disk.PL1
(default): The maximum number of random read/write IOPS 50000 for a single disk.PL2
: maximum random read/write IOPS 100000 for a single disk.PL3
: The maximum random read/write IOPS 1 million for a single disk.
For more information about how to select an ESSD performance level, see ESSD cloud disk.
- period Number
- Reserved parameters, no need to fill in.
- period
Unit String - Reserved parameters, no need to fill in.
- snapshot
Id String - The snapshot used to create the cloud disk. Snapshots made on or before July 15, 2013 cannot be used to create cloud disks. The 'SnapshotId' parameter and the 'Size' parameter have the following limitations:
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is greater than the set 'Size' parameter value, the actual size of the cloud disk created is the size of the specified snapshot.
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is less than the set 'Size' parameter value, the size of the cloud disk created is the specified 'Size' parameter value.
- Snapshots are not supported for creating elastic temporary disks.
- type String
- The method of expanding the disk. Value range: offline (default): offline expansion. After the expansion, the instance must be restarted to take effect. online: online expansion, which can be completed without restarting the instance.
Outputs
All input properties are implicitly available as output properties. Additionally, the CustomDisk resource produces the following output properties:
- Create
Time string - Creation time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Region
Id string - The region ID. You can view the region ID through the DescribeRegions interface.
- Resource
Group stringId - The ID of the resource group to which the disk belongs.
- Status string
- Disk status. Value Description:_use: In use.
- Create
Time string - Creation time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Region
Id string - The region ID. You can view the region ID through the DescribeRegions interface.
- Resource
Group stringId - The ID of the resource group to which the disk belongs.
- Status string
- Disk status. Value Description:_use: In use.
- create
Time String - Creation time.
- id String
- The provider-assigned unique ID for this managed resource.
- region
Id String - The region ID. You can view the region ID through the DescribeRegions interface.
- resource
Group StringId - The ID of the resource group to which the disk belongs.
- status String
- Disk status. Value Description:_use: In use.
- create
Time string - Creation time.
- id string
- The provider-assigned unique ID for this managed resource.
- region
Id string - The region ID. You can view the region ID through the DescribeRegions interface.
- resource
Group stringId - The ID of the resource group to which the disk belongs.
- status string
- Disk status. Value Description:_use: In use.
- create_
time str - Creation time.
- id str
- The provider-assigned unique ID for this managed resource.
- region_
id str - The region ID. You can view the region ID through the DescribeRegions interface.
- resource_
group_ strid - The ID of the resource group to which the disk belongs.
- status str
- Disk status. Value Description:_use: In use.
- create
Time String - Creation time.
- id String
- The provider-assigned unique ID for this managed resource.
- region
Id String - The region ID. You can view the region ID through the DescribeRegions interface.
- resource
Group StringId - The ID of the resource group to which the disk belongs.
- status String
- Disk status. Value Description:_use: In use.
Look up Existing CustomDisk Resource
Get an existing CustomDisk 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?: CustomDiskState, opts?: CustomResourceOptions): CustomDisk
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auto_pay: Optional[bool] = None,
auto_renew: Optional[bool] = None,
create_time: Optional[str] = None,
description: Optional[str] = None,
disk_category: Optional[str] = None,
disk_name: Optional[str] = None,
dry_run: Optional[bool] = None,
instance_charge_type: Optional[str] = None,
performance_level: Optional[str] = None,
period: Optional[int] = None,
period_unit: Optional[str] = None,
region_id: Optional[str] = None,
resource_group_id: Optional[str] = None,
size: Optional[int] = None,
snapshot_id: Optional[str] = None,
status: Optional[str] = None,
type: Optional[str] = None,
zone_id: Optional[str] = None) -> CustomDisk
func GetCustomDisk(ctx *Context, name string, id IDInput, state *CustomDiskState, opts ...ResourceOption) (*CustomDisk, error)
public static CustomDisk Get(string name, Input<string> id, CustomDiskState? state, CustomResourceOptions? opts = null)
public static CustomDisk get(String name, Output<String> id, CustomDiskState state, CustomResourceOptions options)
resources: _: type: alicloud:rds:CustomDisk 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.
- Auto
Pay bool - Whether to pay automatically. Value range:
- Auto
Renew bool - Whether to automatically renew. This parameter is passed in only when you create a data disk. Valid values:
- Create
Time string - Creation time.
- Description string
- The disk description. It must be 2 to 256 characters in length and cannot start with 'http:// 'or 'https. Default value: empty.
- Disk
Category string - The type of the data disk. Value range:
- Disk
Name string - The disk name. It can be 2 to 128 characters in length. It supports letters in Unicode (including English, Chinese, and numbers). Can contain a colon (:), an underscore (_), a period (.), or a dash (-). Default value: empty.
- Dry
Run bool - Whether to pre-check the instance creation operation. Valid values:
- Instance
Charge stringType - The Payment type. Only
Postpaid
: Pay-As-You-Go is supported. - Performance
Level string When creating an ESSD cloud disk, set the performance level of the disk. Value range:
PL0
: The maximum random read/write IOPS 10000 for a single disk.PL1
(default): The maximum number of random read/write IOPS 50000 for a single disk.PL2
: maximum random read/write IOPS 100000 for a single disk.PL3
: The maximum random read/write IOPS 1 million for a single disk.
For more information about how to select an ESSD performance level, see ESSD cloud disk.
- Period int
- Reserved parameters, no need to fill in.
- Period
Unit string - Reserved parameters, no need to fill in.
- Region
Id string - The region ID. You can view the region ID through the DescribeRegions interface.
- Resource
Group stringId - The ID of the resource group to which the disk belongs.
- Size int
- Capacity size. Unit: GiB. You must pass in a parameter value for this parameter. Value range:
- Snapshot
Id string - The snapshot used to create the cloud disk. Snapshots made on or before July 15, 2013 cannot be used to create cloud disks. The 'SnapshotId' parameter and the 'Size' parameter have the following limitations:
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is greater than the set 'Size' parameter value, the actual size of the cloud disk created is the size of the specified snapshot.
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is less than the set 'Size' parameter value, the size of the cloud disk created is the specified 'Size' parameter value.
- Snapshots are not supported for creating elastic temporary disks.
- Status string
- Disk status. Value Description:_use: In use.
- Type string
- The method of expanding the disk. Value range: offline (default): offline expansion. After the expansion, the instance must be restarted to take effect. online: online expansion, which can be completed without restarting the instance.
- Zone
Id string - The zone ID.
- Auto
Pay bool - Whether to pay automatically. Value range:
- Auto
Renew bool - Whether to automatically renew. This parameter is passed in only when you create a data disk. Valid values:
- Create
Time string - Creation time.
- Description string
- The disk description. It must be 2 to 256 characters in length and cannot start with 'http:// 'or 'https. Default value: empty.
- Disk
Category string - The type of the data disk. Value range:
- Disk
Name string - The disk name. It can be 2 to 128 characters in length. It supports letters in Unicode (including English, Chinese, and numbers). Can contain a colon (:), an underscore (_), a period (.), or a dash (-). Default value: empty.
- Dry
Run bool - Whether to pre-check the instance creation operation. Valid values:
- Instance
Charge stringType - The Payment type. Only
Postpaid
: Pay-As-You-Go is supported. - Performance
Level string When creating an ESSD cloud disk, set the performance level of the disk. Value range:
PL0
: The maximum random read/write IOPS 10000 for a single disk.PL1
(default): The maximum number of random read/write IOPS 50000 for a single disk.PL2
: maximum random read/write IOPS 100000 for a single disk.PL3
: The maximum random read/write IOPS 1 million for a single disk.
For more information about how to select an ESSD performance level, see ESSD cloud disk.
- Period int
- Reserved parameters, no need to fill in.
- Period
Unit string - Reserved parameters, no need to fill in.
- Region
Id string - The region ID. You can view the region ID through the DescribeRegions interface.
- Resource
Group stringId - The ID of the resource group to which the disk belongs.
- Size int
- Capacity size. Unit: GiB. You must pass in a parameter value for this parameter. Value range:
- Snapshot
Id string - The snapshot used to create the cloud disk. Snapshots made on or before July 15, 2013 cannot be used to create cloud disks. The 'SnapshotId' parameter and the 'Size' parameter have the following limitations:
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is greater than the set 'Size' parameter value, the actual size of the cloud disk created is the size of the specified snapshot.
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is less than the set 'Size' parameter value, the size of the cloud disk created is the specified 'Size' parameter value.
- Snapshots are not supported for creating elastic temporary disks.
- Status string
- Disk status. Value Description:_use: In use.
- Type string
- The method of expanding the disk. Value range: offline (default): offline expansion. After the expansion, the instance must be restarted to take effect. online: online expansion, which can be completed without restarting the instance.
- Zone
Id string - The zone ID.
- auto
Pay Boolean - Whether to pay automatically. Value range:
- auto
Renew Boolean - Whether to automatically renew. This parameter is passed in only when you create a data disk. Valid values:
- create
Time String - Creation time.
- description String
- The disk description. It must be 2 to 256 characters in length and cannot start with 'http:// 'or 'https. Default value: empty.
- disk
Category String - The type of the data disk. Value range:
- disk
Name String - The disk name. It can be 2 to 128 characters in length. It supports letters in Unicode (including English, Chinese, and numbers). Can contain a colon (:), an underscore (_), a period (.), or a dash (-). Default value: empty.
- dry
Run Boolean - Whether to pre-check the instance creation operation. Valid values:
- instance
Charge StringType - The Payment type. Only
Postpaid
: Pay-As-You-Go is supported. - performance
Level String When creating an ESSD cloud disk, set the performance level of the disk. Value range:
PL0
: The maximum random read/write IOPS 10000 for a single disk.PL1
(default): The maximum number of random read/write IOPS 50000 for a single disk.PL2
: maximum random read/write IOPS 100000 for a single disk.PL3
: The maximum random read/write IOPS 1 million for a single disk.
For more information about how to select an ESSD performance level, see ESSD cloud disk.
- period Integer
- Reserved parameters, no need to fill in.
- period
Unit String - Reserved parameters, no need to fill in.
- region
Id String - The region ID. You can view the region ID through the DescribeRegions interface.
- resource
Group StringId - The ID of the resource group to which the disk belongs.
- size Integer
- Capacity size. Unit: GiB. You must pass in a parameter value for this parameter. Value range:
- snapshot
Id String - The snapshot used to create the cloud disk. Snapshots made on or before July 15, 2013 cannot be used to create cloud disks. The 'SnapshotId' parameter and the 'Size' parameter have the following limitations:
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is greater than the set 'Size' parameter value, the actual size of the cloud disk created is the size of the specified snapshot.
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is less than the set 'Size' parameter value, the size of the cloud disk created is the specified 'Size' parameter value.
- Snapshots are not supported for creating elastic temporary disks.
- status String
- Disk status. Value Description:_use: In use.
- type String
- The method of expanding the disk. Value range: offline (default): offline expansion. After the expansion, the instance must be restarted to take effect. online: online expansion, which can be completed without restarting the instance.
- zone
Id String - The zone ID.
- auto
Pay boolean - Whether to pay automatically. Value range:
- auto
Renew boolean - Whether to automatically renew. This parameter is passed in only when you create a data disk. Valid values:
- create
Time string - Creation time.
- description string
- The disk description. It must be 2 to 256 characters in length and cannot start with 'http:// 'or 'https. Default value: empty.
- disk
Category string - The type of the data disk. Value range:
- disk
Name string - The disk name. It can be 2 to 128 characters in length. It supports letters in Unicode (including English, Chinese, and numbers). Can contain a colon (:), an underscore (_), a period (.), or a dash (-). Default value: empty.
- dry
Run boolean - Whether to pre-check the instance creation operation. Valid values:
- instance
Charge stringType - The Payment type. Only
Postpaid
: Pay-As-You-Go is supported. - performance
Level string When creating an ESSD cloud disk, set the performance level of the disk. Value range:
PL0
: The maximum random read/write IOPS 10000 for a single disk.PL1
(default): The maximum number of random read/write IOPS 50000 for a single disk.PL2
: maximum random read/write IOPS 100000 for a single disk.PL3
: The maximum random read/write IOPS 1 million for a single disk.
For more information about how to select an ESSD performance level, see ESSD cloud disk.
- period number
- Reserved parameters, no need to fill in.
- period
Unit string - Reserved parameters, no need to fill in.
- region
Id string - The region ID. You can view the region ID through the DescribeRegions interface.
- resource
Group stringId - The ID of the resource group to which the disk belongs.
- size number
- Capacity size. Unit: GiB. You must pass in a parameter value for this parameter. Value range:
- snapshot
Id string - The snapshot used to create the cloud disk. Snapshots made on or before July 15, 2013 cannot be used to create cloud disks. The 'SnapshotId' parameter and the 'Size' parameter have the following limitations:
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is greater than the set 'Size' parameter value, the actual size of the cloud disk created is the size of the specified snapshot.
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is less than the set 'Size' parameter value, the size of the cloud disk created is the specified 'Size' parameter value.
- Snapshots are not supported for creating elastic temporary disks.
- status string
- Disk status. Value Description:_use: In use.
- type string
- The method of expanding the disk. Value range: offline (default): offline expansion. After the expansion, the instance must be restarted to take effect. online: online expansion, which can be completed without restarting the instance.
- zone
Id string - The zone ID.
- auto_
pay bool - Whether to pay automatically. Value range:
- auto_
renew bool - Whether to automatically renew. This parameter is passed in only when you create a data disk. Valid values:
- create_
time str - Creation time.
- description str
- The disk description. It must be 2 to 256 characters in length and cannot start with 'http:// 'or 'https. Default value: empty.
- disk_
category str - The type of the data disk. Value range:
- disk_
name str - The disk name. It can be 2 to 128 characters in length. It supports letters in Unicode (including English, Chinese, and numbers). Can contain a colon (:), an underscore (_), a period (.), or a dash (-). Default value: empty.
- dry_
run bool - Whether to pre-check the instance creation operation. Valid values:
- instance_
charge_ strtype - The Payment type. Only
Postpaid
: Pay-As-You-Go is supported. - performance_
level str When creating an ESSD cloud disk, set the performance level of the disk. Value range:
PL0
: The maximum random read/write IOPS 10000 for a single disk.PL1
(default): The maximum number of random read/write IOPS 50000 for a single disk.PL2
: maximum random read/write IOPS 100000 for a single disk.PL3
: The maximum random read/write IOPS 1 million for a single disk.
For more information about how to select an ESSD performance level, see ESSD cloud disk.
- period int
- Reserved parameters, no need to fill in.
- period_
unit str - Reserved parameters, no need to fill in.
- region_
id str - The region ID. You can view the region ID through the DescribeRegions interface.
- resource_
group_ strid - The ID of the resource group to which the disk belongs.
- size int
- Capacity size. Unit: GiB. You must pass in a parameter value for this parameter. Value range:
- snapshot_
id str - The snapshot used to create the cloud disk. Snapshots made on or before July 15, 2013 cannot be used to create cloud disks. The 'SnapshotId' parameter and the 'Size' parameter have the following limitations:
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is greater than the set 'Size' parameter value, the actual size of the cloud disk created is the size of the specified snapshot.
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is less than the set 'Size' parameter value, the size of the cloud disk created is the specified 'Size' parameter value.
- Snapshots are not supported for creating elastic temporary disks.
- status str
- Disk status. Value Description:_use: In use.
- type str
- The method of expanding the disk. Value range: offline (default): offline expansion. After the expansion, the instance must be restarted to take effect. online: online expansion, which can be completed without restarting the instance.
- zone_
id str - The zone ID.
- auto
Pay Boolean - Whether to pay automatically. Value range:
- auto
Renew Boolean - Whether to automatically renew. This parameter is passed in only when you create a data disk. Valid values:
- create
Time String - Creation time.
- description String
- The disk description. It must be 2 to 256 characters in length and cannot start with 'http:// 'or 'https. Default value: empty.
- disk
Category String - The type of the data disk. Value range:
- disk
Name String - The disk name. It can be 2 to 128 characters in length. It supports letters in Unicode (including English, Chinese, and numbers). Can contain a colon (:), an underscore (_), a period (.), or a dash (-). Default value: empty.
- dry
Run Boolean - Whether to pre-check the instance creation operation. Valid values:
- instance
Charge StringType - The Payment type. Only
Postpaid
: Pay-As-You-Go is supported. - performance
Level String When creating an ESSD cloud disk, set the performance level of the disk. Value range:
PL0
: The maximum random read/write IOPS 10000 for a single disk.PL1
(default): The maximum number of random read/write IOPS 50000 for a single disk.PL2
: maximum random read/write IOPS 100000 for a single disk.PL3
: The maximum random read/write IOPS 1 million for a single disk.
For more information about how to select an ESSD performance level, see ESSD cloud disk.
- period Number
- Reserved parameters, no need to fill in.
- period
Unit String - Reserved parameters, no need to fill in.
- region
Id String - The region ID. You can view the region ID through the DescribeRegions interface.
- resource
Group StringId - The ID of the resource group to which the disk belongs.
- size Number
- Capacity size. Unit: GiB. You must pass in a parameter value for this parameter. Value range:
- snapshot
Id String - The snapshot used to create the cloud disk. Snapshots made on or before July 15, 2013 cannot be used to create cloud disks. The 'SnapshotId' parameter and the 'Size' parameter have the following limitations:
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is greater than the set 'Size' parameter value, the actual size of the cloud disk created is the size of the specified snapshot.
- If the snapshot capacity corresponding to the 'SnapshotId' parameter is less than the set 'Size' parameter value, the size of the cloud disk created is the specified 'Size' parameter value.
- Snapshots are not supported for creating elastic temporary disks.
- status String
- Disk status. Value Description:_use: In use.
- type String
- The method of expanding the disk. Value range: offline (default): offline expansion. After the expansion, the instance must be restarted to take effect. online: online expansion, which can be completed without restarting the instance.
- zone
Id String - The zone ID.
Import
RDS Custom Disk can be imported using the id, e.g.
$ pulumi import alicloud:rds/customDisk:CustomDisk example <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
alicloud
Terraform Provider.