Instance
Provides an RDS instance resource. A DB instance is an isolated database environment in the cloud. A DB instance can contain multiple user-created databases.
Example Usage
Create a RDS MySQL instance
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var config = new Config();
var name = config.Get("name") ?? "dbInstanceconfig";
var creation = config.Get("creation") ?? "Rds";
var defaultZones = Output.Create(AliCloud.GetZones.InvokeAsync(new AliCloud.GetZonesArgs
{
AvailableResourceCreation = creation,
}));
var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new AliCloud.Vpc.NetworkArgs
{
CidrBlock = "172.16.0.0/16",
});
var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new AliCloud.Vpc.SwitchArgs
{
AvailabilityZone = defaultZones.Apply(defaultZones => defaultZones.Zones[0].Id),
CidrBlock = "172.16.0.0/24",
VpcId = defaultNetwork.Id,
});
var defaultInstance = new AliCloud.Rds.Instance("defaultInstance", new AliCloud.Rds.InstanceArgs
{
Engine = "MySQL",
EngineVersion = "5.6",
InstanceChargeType = "Postpaid",
InstanceName = name,
InstanceStorage = 30,
InstanceType = "rds.mysql.s2.large",
MonitoringPeriod = 60,
VswitchId = defaultSwitch.Id,
});
}
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "dbInstanceconfig"
creation = config.get("creation")
if creation is None:
creation = "Rds"
default_zones = alicloud.get_zones(available_resource_creation=creation)
default_network = alicloud.vpc.Network("defaultNetwork", cidr_block="172.16.0.0/16")
default_switch = alicloud.vpc.Switch("defaultSwitch",
availability_zone=default_zones.zones[0]["id"],
cidr_block="172.16.0.0/24",
vpc_id=default_network.id)
default_instance = alicloud.rds.Instance("defaultInstance",
engine="MySQL",
engine_version="5.6",
instance_charge_type="Postpaid",
instance_name=name,
instance_storage="30",
instance_type="rds.mysql.s2.large",
monitoring_period="60",
vswitch_id=default_switch.id)import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "dbInstanceconfig";
const creation = config.get("creation") || "Rds";
const defaultZones = pulumi.output(alicloud.getZones({
availableResourceCreation: creation,
}, { async: true }));
const defaultNetwork = new alicloud.vpc.Network("default", {
cidrBlock: "172.16.0.0/16",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
availabilityZone: defaultZones.zones[0].id,
cidrBlock: "172.16.0.0/24",
vpcId: defaultNetwork.id,
});
const defaultInstance = new alicloud.rds.Instance("default", {
engine: "MySQL",
engineVersion: "5.6",
instanceChargeType: "Postpaid",
instanceName: name,
instanceStorage: 30,
instanceType: "rds.mysql.s2.large",
monitoringPeriod: 60,
vswitchId: defaultSwitch.id,
});Create a Instance Resource
new Instance(name: string, args: InstanceArgs, opts?: CustomResourceOptions);def Instance(resource_name, opts=None, auto_renew=None, auto_renew_period=None, auto_upgrade_minor_version=None, db_instance_storage_type=None, engine=None, engine_version=None, force_restart=None, instance_charge_type=None, instance_name=None, instance_storage=None, instance_type=None, maintain_time=None, monitoring_period=None, parameters=None, period=None, resource_group_id=None, security_group_id=None, security_group_ids=None, security_ip_mode=None, security_ips=None, sql_collector_config_value=None, sql_collector_status=None, tags=None, vswitch_id=None, zone_id=None, __props__=None);func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Instance Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Instance resource accepts the following input properties:
- Engine string
Database type. Value options: MySQL, SQLServer, PostgreSQL, and PPAS.
- Engine
Version string Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion.- Instance
Storage int User-defined DB instance storage space. Value range: - [5, 2000] for MySQL/PostgreSQL/PPAS HA dual node edition; - [20,1000] for MySQL 5.7 basic single node edition; - [10, 2000] for SQL Server 2008R2; - [20,2000] for SQL Server 2012 basic single node edition Increase progressively at a rate of 5 GB. For details, see Instance type table. Note: There is extra 5 GB storage for SQL Server Instance and it is not in specified
instance_storage.- Instance
Type string DB Instance type. For details, see Instance type table.
- Auto
Renew bool Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is
PrePaid. Default tofalse.- Auto
Renew intPeriod Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is
PrePaid. Valid value:[1~12], Default to 1.- Auto
Upgrade stringMinor Version The upgrade method to use. Valid values: - Auto: Instances are automatically upgraded to a higher minor version. - Manual: Instances are forcibly upgraded to a higher minor version when the current version is unpublished.
- Db
Instance stringStorage Type The storage type of the instance. Valid values: - local_ssd: specifies to use local SSDs. This value is recommended. - cloud_ssd: specifies to use standard SSDs. - cloud_essd: specifies to use enhanced SSDs (ESSDs). - cloud_essd2: specifies to use enhanced SSDs (ESSDs). - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
- Force
Restart bool Set it to true to make some parameter efficient when modifying them. Default to false.
- Instance
Charge stringType Valid values are
Prepaid,Postpaid, Default toPostpaid. Currently, the resource only supports PostPaid to PrePaid.- Instance
Name string The name of DB instance. It a string of 2 to 256 characters.
- Maintain
Time string Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
- Monitoring
Period int The monitoring frequency in seconds. Valid values are 5, 60, 300. Defaults to 300.
- Parameters
List<Pulumi.
Ali Cloud. Rds. Inputs. Instance Parameter Args> Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates .
- Period int
The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid. Valid values: [1~9], 12, 24, 36. Default to 1.- Resource
Group stringId The ID of resource group which the DB instance belongs.
- Security
Group stringId It has been deprecated from 1.69.0 and use
security_group_idsinstead.- Security
Group List<string>Ids , Available in 1.69.0+) The list IDs to join ECS Security Group. At most supports three security groups.
- Security
Ip stringMode Valid values are
normal,safety, Default tonormal. supportsafetyswitch to high security access mode- Security
Ips List<string> List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
- Sql
Collector intConfig Value The sql collector keep time of the instance. Valid values are
30,180,365,1095,1825, Default to30.- Sql
Collector stringStatus The sql collector status of the instance. Valid values are
Enabled,Disabled, Default toDisabled.- Dictionary<string, object>
A mapping of tags to assign to the resource. - Key: It can be up to 64 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It can be a null string.
- Vswitch
Id string The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
- Zone
Id string The Zone to launch the DB instance. From version 1.8.1, it supports multiple zone. If it is a multi-zone and
vswitch_idis specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmultito “true” in the data sourcealicloud..getZones.
- Engine string
Database type. Value options: MySQL, SQLServer, PostgreSQL, and PPAS.
- Engine
Version string Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion.- Instance
Storage int User-defined DB instance storage space. Value range: - [5, 2000] for MySQL/PostgreSQL/PPAS HA dual node edition; - [20,1000] for MySQL 5.7 basic single node edition; - [10, 2000] for SQL Server 2008R2; - [20,2000] for SQL Server 2012 basic single node edition Increase progressively at a rate of 5 GB. For details, see Instance type table. Note: There is extra 5 GB storage for SQL Server Instance and it is not in specified
instance_storage.- Instance
Type string DB Instance type. For details, see Instance type table.
- Auto
Renew bool Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is
PrePaid. Default tofalse.- Auto
Renew intPeriod Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is
PrePaid. Valid value:[1~12], Default to 1.- Auto
Upgrade stringMinor Version The upgrade method to use. Valid values: - Auto: Instances are automatically upgraded to a higher minor version. - Manual: Instances are forcibly upgraded to a higher minor version when the current version is unpublished.
- Db
Instance stringStorage Type The storage type of the instance. Valid values: - local_ssd: specifies to use local SSDs. This value is recommended. - cloud_ssd: specifies to use standard SSDs. - cloud_essd: specifies to use enhanced SSDs (ESSDs). - cloud_essd2: specifies to use enhanced SSDs (ESSDs). - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
- Force
Restart bool Set it to true to make some parameter efficient when modifying them. Default to false.
- Instance
Charge stringType Valid values are
Prepaid,Postpaid, Default toPostpaid. Currently, the resource only supports PostPaid to PrePaid.- Instance
Name string The name of DB instance. It a string of 2 to 256 characters.
- Maintain
Time string Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
- Monitoring
Period int The monitoring frequency in seconds. Valid values are 5, 60, 300. Defaults to 300.
- Parameters
[]Instance
Parameter Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates .
- Period int
The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid. Valid values: [1~9], 12, 24, 36. Default to 1.- Resource
Group stringId The ID of resource group which the DB instance belongs.
- Security
Group stringId It has been deprecated from 1.69.0 and use
security_group_idsinstead.- Security
Group []stringIds , Available in 1.69.0+) The list IDs to join ECS Security Group. At most supports three security groups.
- Security
Ip stringMode Valid values are
normal,safety, Default tonormal. supportsafetyswitch to high security access mode- Security
Ips []string List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
- Sql
Collector intConfig Value The sql collector keep time of the instance. Valid values are
30,180,365,1095,1825, Default to30.- Sql
Collector stringStatus The sql collector status of the instance. Valid values are
Enabled,Disabled, Default toDisabled.- map[string]interface{}
A mapping of tags to assign to the resource. - Key: It can be up to 64 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It can be a null string.
- Vswitch
Id string The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
- Zone
Id string The Zone to launch the DB instance. From version 1.8.1, it supports multiple zone. If it is a multi-zone and
vswitch_idis specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmultito “true” in the data sourcealicloud..getZones.
- engine string
Database type. Value options: MySQL, SQLServer, PostgreSQL, and PPAS.
- engine
Version string Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion.- instance
Storage number User-defined DB instance storage space. Value range: - [5, 2000] for MySQL/PostgreSQL/PPAS HA dual node edition; - [20,1000] for MySQL 5.7 basic single node edition; - [10, 2000] for SQL Server 2008R2; - [20,2000] for SQL Server 2012 basic single node edition Increase progressively at a rate of 5 GB. For details, see Instance type table. Note: There is extra 5 GB storage for SQL Server Instance and it is not in specified
instance_storage.- instance
Type string DB Instance type. For details, see Instance type table.
- auto
Renew boolean Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is
PrePaid. Default tofalse.- auto
Renew numberPeriod Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is
PrePaid. Valid value:[1~12], Default to 1.- auto
Upgrade stringMinor Version The upgrade method to use. Valid values: - Auto: Instances are automatically upgraded to a higher minor version. - Manual: Instances are forcibly upgraded to a higher minor version when the current version is unpublished.
- db
Instance stringStorage Type The storage type of the instance. Valid values: - local_ssd: specifies to use local SSDs. This value is recommended. - cloud_ssd: specifies to use standard SSDs. - cloud_essd: specifies to use enhanced SSDs (ESSDs). - cloud_essd2: specifies to use enhanced SSDs (ESSDs). - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
- force
Restart boolean Set it to true to make some parameter efficient when modifying them. Default to false.
- instance
Charge stringType Valid values are
Prepaid,Postpaid, Default toPostpaid. Currently, the resource only supports PostPaid to PrePaid.- instance
Name string The name of DB instance. It a string of 2 to 256 characters.
- maintain
Time string Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
- monitoring
Period number The monitoring frequency in seconds. Valid values are 5, 60, 300. Defaults to 300.
- parameters
Instance
Parameter[] Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates .
- period number
The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid. Valid values: [1~9], 12, 24, 36. Default to 1.- resource
Group stringId The ID of resource group which the DB instance belongs.
- security
Group stringId It has been deprecated from 1.69.0 and use
security_group_idsinstead.- security
Group string[]Ids , Available in 1.69.0+) The list IDs to join ECS Security Group. At most supports three security groups.
- security
Ip stringMode Valid values are
normal,safety, Default tonormal. supportsafetyswitch to high security access mode- security
Ips string[] List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
- sql
Collector numberConfig Value The sql collector keep time of the instance. Valid values are
30,180,365,1095,1825, Default to30.- sql
Collector stringStatus The sql collector status of the instance. Valid values are
Enabled,Disabled, Default toDisabled.- {[key: string]: any}
A mapping of tags to assign to the resource. - Key: It can be up to 64 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It can be a null string.
- vswitch
Id string The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
- zone
Id string The Zone to launch the DB instance. From version 1.8.1, it supports multiple zone. If it is a multi-zone and
vswitch_idis specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmultito “true” in the data sourcealicloud..getZones.
- engine str
Database type. Value options: MySQL, SQLServer, PostgreSQL, and PPAS.
- engine_
version str Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion.- instance_
storage float User-defined DB instance storage space. Value range: - [5, 2000] for MySQL/PostgreSQL/PPAS HA dual node edition; - [20,1000] for MySQL 5.7 basic single node edition; - [10, 2000] for SQL Server 2008R2; - [20,2000] for SQL Server 2012 basic single node edition Increase progressively at a rate of 5 GB. For details, see Instance type table. Note: There is extra 5 GB storage for SQL Server Instance and it is not in specified
instance_storage.- instance_
type str DB Instance type. For details, see Instance type table.
- auto_
renew bool Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is
PrePaid. Default tofalse.- auto_
renew_ floatperiod Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is
PrePaid. Valid value:[1~12], Default to 1.- auto_
upgrade_ strminor_ version The upgrade method to use. Valid values: - Auto: Instances are automatically upgraded to a higher minor version. - Manual: Instances are forcibly upgraded to a higher minor version when the current version is unpublished.
- db_
instance_ strstorage_ type The storage type of the instance. Valid values: - local_ssd: specifies to use local SSDs. This value is recommended. - cloud_ssd: specifies to use standard SSDs. - cloud_essd: specifies to use enhanced SSDs (ESSDs). - cloud_essd2: specifies to use enhanced SSDs (ESSDs). - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
- force_
restart bool Set it to true to make some parameter efficient when modifying them. Default to false.
- instance_
charge_ strtype Valid values are
Prepaid,Postpaid, Default toPostpaid. Currently, the resource only supports PostPaid to PrePaid.- instance_
name str The name of DB instance. It a string of 2 to 256 characters.
- maintain_
time str Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
- monitoring_
period float The monitoring frequency in seconds. Valid values are 5, 60, 300. Defaults to 300.
- parameters
List[Instance
Parameter] Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates .
- period float
The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid. Valid values: [1~9], 12, 24, 36. Default to 1.- resource_
group_ strid The ID of resource group which the DB instance belongs.
- security_
group_ strid It has been deprecated from 1.69.0 and use
security_group_idsinstead.- security_
group_ List[str]ids , Available in 1.69.0+) The list IDs to join ECS Security Group. At most supports three security groups.
- security_
ip_ strmode Valid values are
normal,safety, Default tonormal. supportsafetyswitch to high security access mode- security_
ips List[str] List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
- sql_
collector_ floatconfig_ value The sql collector keep time of the instance. Valid values are
30,180,365,1095,1825, Default to30.- sql_
collector_ strstatus The sql collector status of the instance. Valid values are
Enabled,Disabled, Default toDisabled.- Dict[str, Any]
A mapping of tags to assign to the resource. - Key: It can be up to 64 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It can be a null string.
- vswitch_
id str The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
- zone_
id str The Zone to launch the DB instance. From version 1.8.1, it supports multiple zone. If it is a multi-zone and
vswitch_idis specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmultito “true” in the data sourcealicloud..getZones.
Outputs
All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:
Look up an Existing Instance Resource
Get an existing Instance 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?: InstanceState, opts?: CustomResourceOptions): Instancestatic get(resource_name, id, opts=None, auto_renew=None, auto_renew_period=None, auto_upgrade_minor_version=None, connection_string=None, db_instance_storage_type=None, engine=None, engine_version=None, force_restart=None, instance_charge_type=None, instance_name=None, instance_storage=None, instance_type=None, maintain_time=None, monitoring_period=None, parameters=None, period=None, port=None, resource_group_id=None, security_group_id=None, security_group_ids=None, security_ip_mode=None, security_ips=None, sql_collector_config_value=None, sql_collector_status=None, tags=None, vswitch_id=None, zone_id=None, __props__=None);func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Auto
Renew bool Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is
PrePaid. Default tofalse.- Auto
Renew intPeriod Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is
PrePaid. Valid value:[1~12], Default to 1.- Auto
Upgrade stringMinor Version The upgrade method to use. Valid values: - Auto: Instances are automatically upgraded to a higher minor version. - Manual: Instances are forcibly upgraded to a higher minor version when the current version is unpublished.
- Connection
String string RDS database connection string.
- Db
Instance stringStorage Type The storage type of the instance. Valid values: - local_ssd: specifies to use local SSDs. This value is recommended. - cloud_ssd: specifies to use standard SSDs. - cloud_essd: specifies to use enhanced SSDs (ESSDs). - cloud_essd2: specifies to use enhanced SSDs (ESSDs). - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
- Engine string
Database type. Value options: MySQL, SQLServer, PostgreSQL, and PPAS.
- Engine
Version string Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion.- Force
Restart bool Set it to true to make some parameter efficient when modifying them. Default to false.
- Instance
Charge stringType Valid values are
Prepaid,Postpaid, Default toPostpaid. Currently, the resource only supports PostPaid to PrePaid.- Instance
Name string The name of DB instance. It a string of 2 to 256 characters.
- Instance
Storage int User-defined DB instance storage space. Value range: - [5, 2000] for MySQL/PostgreSQL/PPAS HA dual node edition; - [20,1000] for MySQL 5.7 basic single node edition; - [10, 2000] for SQL Server 2008R2; - [20,2000] for SQL Server 2012 basic single node edition Increase progressively at a rate of 5 GB. For details, see Instance type table. Note: There is extra 5 GB storage for SQL Server Instance and it is not in specified
instance_storage.- Instance
Type string DB Instance type. For details, see Instance type table.
- Maintain
Time string Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
- Monitoring
Period int The monitoring frequency in seconds. Valid values are 5, 60, 300. Defaults to 300.
- Parameters
List<Pulumi.
Ali Cloud. Rds. Inputs. Instance Parameter Args> Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates .
- Period int
The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid. Valid values: [1~9], 12, 24, 36. Default to 1.- Port string
RDS database connection port.
- Resource
Group stringId The ID of resource group which the DB instance belongs.
- Security
Group stringId It has been deprecated from 1.69.0 and use
security_group_idsinstead.- Security
Group List<string>Ids , Available in 1.69.0+) The list IDs to join ECS Security Group. At most supports three security groups.
- Security
Ip stringMode Valid values are
normal,safety, Default tonormal. supportsafetyswitch to high security access mode- Security
Ips List<string> List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
- Sql
Collector intConfig Value The sql collector keep time of the instance. Valid values are
30,180,365,1095,1825, Default to30.- Sql
Collector stringStatus The sql collector status of the instance. Valid values are
Enabled,Disabled, Default toDisabled.- Dictionary<string, object>
A mapping of tags to assign to the resource. - Key: It can be up to 64 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It can be a null string.
- Vswitch
Id string The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
- Zone
Id string The Zone to launch the DB instance. From version 1.8.1, it supports multiple zone. If it is a multi-zone and
vswitch_idis specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmultito “true” in the data sourcealicloud..getZones.
- Auto
Renew bool Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is
PrePaid. Default tofalse.- Auto
Renew intPeriod Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is
PrePaid. Valid value:[1~12], Default to 1.- Auto
Upgrade stringMinor Version The upgrade method to use. Valid values: - Auto: Instances are automatically upgraded to a higher minor version. - Manual: Instances are forcibly upgraded to a higher minor version when the current version is unpublished.
- Connection
String string RDS database connection string.
- Db
Instance stringStorage Type The storage type of the instance. Valid values: - local_ssd: specifies to use local SSDs. This value is recommended. - cloud_ssd: specifies to use standard SSDs. - cloud_essd: specifies to use enhanced SSDs (ESSDs). - cloud_essd2: specifies to use enhanced SSDs (ESSDs). - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
- Engine string
Database type. Value options: MySQL, SQLServer, PostgreSQL, and PPAS.
- Engine
Version string Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion.- Force
Restart bool Set it to true to make some parameter efficient when modifying them. Default to false.
- Instance
Charge stringType Valid values are
Prepaid,Postpaid, Default toPostpaid. Currently, the resource only supports PostPaid to PrePaid.- Instance
Name string The name of DB instance. It a string of 2 to 256 characters.
- Instance
Storage int User-defined DB instance storage space. Value range: - [5, 2000] for MySQL/PostgreSQL/PPAS HA dual node edition; - [20,1000] for MySQL 5.7 basic single node edition; - [10, 2000] for SQL Server 2008R2; - [20,2000] for SQL Server 2012 basic single node edition Increase progressively at a rate of 5 GB. For details, see Instance type table. Note: There is extra 5 GB storage for SQL Server Instance and it is not in specified
instance_storage.- Instance
Type string DB Instance type. For details, see Instance type table.
- Maintain
Time string Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
- Monitoring
Period int The monitoring frequency in seconds. Valid values are 5, 60, 300. Defaults to 300.
- Parameters
[]Instance
Parameter Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates .
- Period int
The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid. Valid values: [1~9], 12, 24, 36. Default to 1.- Port string
RDS database connection port.
- Resource
Group stringId The ID of resource group which the DB instance belongs.
- Security
Group stringId It has been deprecated from 1.69.0 and use
security_group_idsinstead.- Security
Group []stringIds , Available in 1.69.0+) The list IDs to join ECS Security Group. At most supports three security groups.
- Security
Ip stringMode Valid values are
normal,safety, Default tonormal. supportsafetyswitch to high security access mode- Security
Ips []string List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
- Sql
Collector intConfig Value The sql collector keep time of the instance. Valid values are
30,180,365,1095,1825, Default to30.- Sql
Collector stringStatus The sql collector status of the instance. Valid values are
Enabled,Disabled, Default toDisabled.- map[string]interface{}
A mapping of tags to assign to the resource. - Key: It can be up to 64 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It can be a null string.
- Vswitch
Id string The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
- Zone
Id string The Zone to launch the DB instance. From version 1.8.1, it supports multiple zone. If it is a multi-zone and
vswitch_idis specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmultito “true” in the data sourcealicloud..getZones.
- auto
Renew boolean Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is
PrePaid. Default tofalse.- auto
Renew numberPeriod Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is
PrePaid. Valid value:[1~12], Default to 1.- auto
Upgrade stringMinor Version The upgrade method to use. Valid values: - Auto: Instances are automatically upgraded to a higher minor version. - Manual: Instances are forcibly upgraded to a higher minor version when the current version is unpublished.
- connection
String string RDS database connection string.
- db
Instance stringStorage Type The storage type of the instance. Valid values: - local_ssd: specifies to use local SSDs. This value is recommended. - cloud_ssd: specifies to use standard SSDs. - cloud_essd: specifies to use enhanced SSDs (ESSDs). - cloud_essd2: specifies to use enhanced SSDs (ESSDs). - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
- engine string
Database type. Value options: MySQL, SQLServer, PostgreSQL, and PPAS.
- engine
Version string Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion.- force
Restart boolean Set it to true to make some parameter efficient when modifying them. Default to false.
- instance
Charge stringType Valid values are
Prepaid,Postpaid, Default toPostpaid. Currently, the resource only supports PostPaid to PrePaid.- instance
Name string The name of DB instance. It a string of 2 to 256 characters.
- instance
Storage number User-defined DB instance storage space. Value range: - [5, 2000] for MySQL/PostgreSQL/PPAS HA dual node edition; - [20,1000] for MySQL 5.7 basic single node edition; - [10, 2000] for SQL Server 2008R2; - [20,2000] for SQL Server 2012 basic single node edition Increase progressively at a rate of 5 GB. For details, see Instance type table. Note: There is extra 5 GB storage for SQL Server Instance and it is not in specified
instance_storage.- instance
Type string DB Instance type. For details, see Instance type table.
- maintain
Time string Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
- monitoring
Period number The monitoring frequency in seconds. Valid values are 5, 60, 300. Defaults to 300.
- parameters
Instance
Parameter[] Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates .
- period number
The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid. Valid values: [1~9], 12, 24, 36. Default to 1.- port string
RDS database connection port.
- resource
Group stringId The ID of resource group which the DB instance belongs.
- security
Group stringId It has been deprecated from 1.69.0 and use
security_group_idsinstead.- security
Group string[]Ids , Available in 1.69.0+) The list IDs to join ECS Security Group. At most supports three security groups.
- security
Ip stringMode Valid values are
normal,safety, Default tonormal. supportsafetyswitch to high security access mode- security
Ips string[] List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
- sql
Collector numberConfig Value The sql collector keep time of the instance. Valid values are
30,180,365,1095,1825, Default to30.- sql
Collector stringStatus The sql collector status of the instance. Valid values are
Enabled,Disabled, Default toDisabled.- {[key: string]: any}
A mapping of tags to assign to the resource. - Key: It can be up to 64 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It can be a null string.
- vswitch
Id string The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
- zone
Id string The Zone to launch the DB instance. From version 1.8.1, it supports multiple zone. If it is a multi-zone and
vswitch_idis specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmultito “true” in the data sourcealicloud..getZones.
- auto_
renew bool Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is
PrePaid. Default tofalse.- auto_
renew_ floatperiod Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is
PrePaid. Valid value:[1~12], Default to 1.- auto_
upgrade_ strminor_ version The upgrade method to use. Valid values: - Auto: Instances are automatically upgraded to a higher minor version. - Manual: Instances are forcibly upgraded to a higher minor version when the current version is unpublished.
- connection_
string str RDS database connection string.
- db_
instance_ strstorage_ type The storage type of the instance. Valid values: - local_ssd: specifies to use local SSDs. This value is recommended. - cloud_ssd: specifies to use standard SSDs. - cloud_essd: specifies to use enhanced SSDs (ESSDs). - cloud_essd2: specifies to use enhanced SSDs (ESSDs). - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
- engine str
Database type. Value options: MySQL, SQLServer, PostgreSQL, and PPAS.
- engine_
version str Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion.- force_
restart bool Set it to true to make some parameter efficient when modifying them. Default to false.
- instance_
charge_ strtype Valid values are
Prepaid,Postpaid, Default toPostpaid. Currently, the resource only supports PostPaid to PrePaid.- instance_
name str The name of DB instance. It a string of 2 to 256 characters.
- instance_
storage float User-defined DB instance storage space. Value range: - [5, 2000] for MySQL/PostgreSQL/PPAS HA dual node edition; - [20,1000] for MySQL 5.7 basic single node edition; - [10, 2000] for SQL Server 2008R2; - [20,2000] for SQL Server 2012 basic single node edition Increase progressively at a rate of 5 GB. For details, see Instance type table. Note: There is extra 5 GB storage for SQL Server Instance and it is not in specified
instance_storage.- instance_
type str DB Instance type. For details, see Instance type table.
- maintain_
time str Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
- monitoring_
period float The monitoring frequency in seconds. Valid values are 5, 60, 300. Defaults to 300.
- parameters
List[Instance
Parameter] Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates .
- period float
The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid. Valid values: [1~9], 12, 24, 36. Default to 1.- port str
RDS database connection port.
- resource_
group_ strid The ID of resource group which the DB instance belongs.
- security_
group_ strid It has been deprecated from 1.69.0 and use
security_group_idsinstead.- security_
group_ List[str]ids , Available in 1.69.0+) The list IDs to join ECS Security Group. At most supports three security groups.
- security_
ip_ strmode Valid values are
normal,safety, Default tonormal. supportsafetyswitch to high security access mode- security_
ips List[str] List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
- sql_
collector_ floatconfig_ value The sql collector keep time of the instance. Valid values are
30,180,365,1095,1825, Default to30.- sql_
collector_ strstatus The sql collector status of the instance. Valid values are
Enabled,Disabled, Default toDisabled.- Dict[str, Any]
A mapping of tags to assign to the resource. - Key: It can be up to 64 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It can be a null string.
- vswitch_
id str The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
- zone_
id str The Zone to launch the DB instance. From version 1.8.1, it supports multiple zone. If it is a multi-zone and
vswitch_idis specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmultito “true” in the data sourcealicloud..getZones.
Supporting Types
InstanceParameter
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.