alicloud.rds.Instance
Explore with Pulumi AI
Import
RDS instance can be imported using the id, e.g.
$ pulumi import alicloud:rds/instance:Instance example rm-abc12345678
Create Instance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Instance(name: string, args: InstanceArgs, opts?: CustomResourceOptions);
@overload
def Instance(resource_name: str,
args: InstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Instance(resource_name: str,
opts: Optional[ResourceOptions] = None,
engine: Optional[str] = None,
engine_version: Optional[str] = None,
instance_storage: Optional[int] = None,
instance_type: Optional[str] = None,
acl: Optional[str] = None,
auto_renew: Optional[bool] = None,
auto_renew_period: Optional[int] = None,
auto_upgrade_minor_version: Optional[str] = None,
babelfish_configs: Optional[Sequence[InstanceBabelfishConfigArgs]] = None,
babelfish_port: Optional[str] = None,
ca_type: Optional[str] = None,
category: Optional[str] = None,
client_ca_cert: Optional[str] = None,
client_ca_enabled: Optional[int] = None,
client_cert_revocation_list: Optional[str] = None,
client_crl_enabled: Optional[int] = None,
connection_string_prefix: Optional[str] = None,
db_instance_ip_array_attribute: Optional[str] = None,
db_instance_ip_array_name: Optional[str] = None,
db_instance_storage_type: Optional[str] = None,
db_is_ignore_case: Optional[bool] = None,
db_param_group_id: Optional[str] = None,
db_time_zone: Optional[str] = None,
deletion_protection: Optional[bool] = None,
direction: Optional[str] = None,
effective_time: Optional[str] = None,
encryption_key: Optional[str] = None,
force: Optional[str] = None,
force_restart: Optional[bool] = None,
fresh_white_list_readins: Optional[str] = None,
ha_config: Optional[str] = None,
instance_charge_type: Optional[str] = None,
instance_name: Optional[str] = None,
maintain_time: Optional[str] = None,
manual_ha_time: Optional[str] = None,
modify_mode: Optional[str] = None,
monitoring_period: Optional[int] = None,
node_id: Optional[str] = None,
parameters: Optional[Sequence[InstanceParameterArgs]] = None,
period: Optional[int] = None,
pg_hba_confs: Optional[Sequence[InstancePgHbaConfArgs]] = None,
port: Optional[str] = None,
private_ip_address: Optional[str] = None,
released_keep_policy: Optional[str] = None,
replication_acl: Optional[str] = None,
resource_group_id: Optional[str] = None,
role_arn: Optional[str] = None,
security_group_id: Optional[str] = None,
security_group_ids: Optional[Sequence[str]] = None,
security_ip_mode: Optional[str] = None,
security_ip_type: Optional[str] = None,
security_ips: Optional[Sequence[str]] = None,
server_cert: Optional[str] = None,
server_key: Optional[str] = None,
serverless_configs: Optional[Sequence[InstanceServerlessConfigArgs]] = None,
sql_collector_config_value: Optional[int] = None,
sql_collector_status: Optional[str] = None,
ssl_action: Optional[str] = None,
ssl_connection_string: Optional[str] = None,
storage_auto_scale: Optional[str] = None,
storage_threshold: Optional[int] = None,
storage_upper_bound: Optional[int] = None,
switch_time: Optional[str] = None,
tags: Optional[Mapping[str, Any]] = None,
target_minor_version: Optional[str] = None,
tcp_connection_type: Optional[str] = None,
tde_status: Optional[str] = None,
upgrade_db_instance_kernel_version: Optional[bool] = None,
upgrade_time: Optional[str] = None,
vpc_id: Optional[str] = None,
vswitch_id: Optional[str] = None,
whitelist_network_type: Optional[str] = None,
zone_id: Optional[str] = None,
zone_id_slave_a: Optional[str] = None)
func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)
public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)
public Instance(String name, InstanceArgs args)
public Instance(String name, InstanceArgs args, CustomResourceOptions options)
type: alicloud:rds:Instance
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 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.
- args InstanceArgs
- 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 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.
- name String
- The unique name of the resource.
- args InstanceArgs
- 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 exampleinstanceResourceResourceFromRdsinstance = new AliCloud.Rds.Instance("exampleinstanceResourceResourceFromRdsinstance", new()
{
Engine = "string",
EngineVersion = "string",
InstanceStorage = 0,
InstanceType = "string",
Acl = "string",
AutoRenew = false,
AutoRenewPeriod = 0,
AutoUpgradeMinorVersion = "string",
BabelfishConfigs = new[]
{
new AliCloud.Rds.Inputs.InstanceBabelfishConfigArgs
{
BabelfishEnabled = "string",
MasterUserPassword = "string",
MasterUsername = "string",
MigrationMode = "string",
},
},
BabelfishPort = "string",
CaType = "string",
Category = "string",
ClientCaCert = "string",
ClientCaEnabled = 0,
ClientCertRevocationList = "string",
ClientCrlEnabled = 0,
ConnectionStringPrefix = "string",
DbInstanceIpArrayAttribute = "string",
DbInstanceIpArrayName = "string",
DbInstanceStorageType = "string",
DbIsIgnoreCase = false,
DbParamGroupId = "string",
DbTimeZone = "string",
DeletionProtection = false,
Direction = "string",
EffectiveTime = "string",
EncryptionKey = "string",
Force = "string",
ForceRestart = false,
FreshWhiteListReadins = "string",
HaConfig = "string",
InstanceChargeType = "string",
InstanceName = "string",
MaintainTime = "string",
ManualHaTime = "string",
ModifyMode = "string",
MonitoringPeriod = 0,
NodeId = "string",
Parameters = new[]
{
new AliCloud.Rds.Inputs.InstanceParameterArgs
{
Name = "string",
Value = "string",
},
},
Period = 0,
PgHbaConfs = new[]
{
new AliCloud.Rds.Inputs.InstancePgHbaConfArgs
{
Address = "string",
Database = "string",
Method = "string",
PriorityId = 0,
Type = "string",
User = "string",
Mask = "string",
Option = "string",
},
},
Port = "string",
PrivateIpAddress = "string",
ReleasedKeepPolicy = "string",
ReplicationAcl = "string",
ResourceGroupId = "string",
RoleArn = "string",
SecurityGroupIds = new[]
{
"string",
},
SecurityIpMode = "string",
SecurityIpType = "string",
SecurityIps = new[]
{
"string",
},
ServerCert = "string",
ServerKey = "string",
ServerlessConfigs = new[]
{
new AliCloud.Rds.Inputs.InstanceServerlessConfigArgs
{
MaxCapacity = 0,
MinCapacity = 0,
AutoPause = false,
SwitchForce = false,
},
},
SqlCollectorConfigValue = 0,
SqlCollectorStatus = "string",
SslAction = "string",
SslConnectionString = "string",
StorageAutoScale = "string",
StorageThreshold = 0,
StorageUpperBound = 0,
SwitchTime = "string",
Tags =
{
{ "string", "any" },
},
TargetMinorVersion = "string",
TcpConnectionType = "string",
TdeStatus = "string",
UpgradeTime = "string",
VpcId = "string",
VswitchId = "string",
WhitelistNetworkType = "string",
ZoneId = "string",
ZoneIdSlaveA = "string",
});
example, err := rds.NewInstance(ctx, "exampleinstanceResourceResourceFromRdsinstance", &rds.InstanceArgs{
Engine: pulumi.String("string"),
EngineVersion: pulumi.String("string"),
InstanceStorage: pulumi.Int(0),
InstanceType: pulumi.String("string"),
Acl: pulumi.String("string"),
AutoRenew: pulumi.Bool(false),
AutoRenewPeriod: pulumi.Int(0),
AutoUpgradeMinorVersion: pulumi.String("string"),
BabelfishConfigs: rds.InstanceBabelfishConfigArray{
&rds.InstanceBabelfishConfigArgs{
BabelfishEnabled: pulumi.String("string"),
MasterUserPassword: pulumi.String("string"),
MasterUsername: pulumi.String("string"),
MigrationMode: pulumi.String("string"),
},
},
BabelfishPort: pulumi.String("string"),
CaType: pulumi.String("string"),
Category: pulumi.String("string"),
ClientCaCert: pulumi.String("string"),
ClientCaEnabled: pulumi.Int(0),
ClientCertRevocationList: pulumi.String("string"),
ClientCrlEnabled: pulumi.Int(0),
ConnectionStringPrefix: pulumi.String("string"),
DbInstanceIpArrayAttribute: pulumi.String("string"),
DbInstanceIpArrayName: pulumi.String("string"),
DbInstanceStorageType: pulumi.String("string"),
DbIsIgnoreCase: pulumi.Bool(false),
DbParamGroupId: pulumi.String("string"),
DbTimeZone: pulumi.String("string"),
DeletionProtection: pulumi.Bool(false),
Direction: pulumi.String("string"),
EffectiveTime: pulumi.String("string"),
EncryptionKey: pulumi.String("string"),
Force: pulumi.String("string"),
ForceRestart: pulumi.Bool(false),
FreshWhiteListReadins: pulumi.String("string"),
HaConfig: pulumi.String("string"),
InstanceChargeType: pulumi.String("string"),
InstanceName: pulumi.String("string"),
MaintainTime: pulumi.String("string"),
ManualHaTime: pulumi.String("string"),
ModifyMode: pulumi.String("string"),
MonitoringPeriod: pulumi.Int(0),
NodeId: pulumi.String("string"),
Parameters: rds.InstanceParameterArray{
&rds.InstanceParameterArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
Period: pulumi.Int(0),
PgHbaConfs: rds.InstancePgHbaConfArray{
&rds.InstancePgHbaConfArgs{
Address: pulumi.String("string"),
Database: pulumi.String("string"),
Method: pulumi.String("string"),
PriorityId: pulumi.Int(0),
Type: pulumi.String("string"),
User: pulumi.String("string"),
Mask: pulumi.String("string"),
Option: pulumi.String("string"),
},
},
Port: pulumi.String("string"),
PrivateIpAddress: pulumi.String("string"),
ReleasedKeepPolicy: pulumi.String("string"),
ReplicationAcl: pulumi.String("string"),
ResourceGroupId: pulumi.String("string"),
RoleArn: pulumi.String("string"),
SecurityGroupIds: pulumi.StringArray{
pulumi.String("string"),
},
SecurityIpMode: pulumi.String("string"),
SecurityIpType: pulumi.String("string"),
SecurityIps: pulumi.StringArray{
pulumi.String("string"),
},
ServerCert: pulumi.String("string"),
ServerKey: pulumi.String("string"),
ServerlessConfigs: rds.InstanceServerlessConfigArray{
&rds.InstanceServerlessConfigArgs{
MaxCapacity: pulumi.Float64(0),
MinCapacity: pulumi.Float64(0),
AutoPause: pulumi.Bool(false),
SwitchForce: pulumi.Bool(false),
},
},
SqlCollectorConfigValue: pulumi.Int(0),
SqlCollectorStatus: pulumi.String("string"),
SslAction: pulumi.String("string"),
SslConnectionString: pulumi.String("string"),
StorageAutoScale: pulumi.String("string"),
StorageThreshold: pulumi.Int(0),
StorageUpperBound: pulumi.Int(0),
SwitchTime: pulumi.String("string"),
Tags: pulumi.Map{
"string": pulumi.Any("any"),
},
TargetMinorVersion: pulumi.String("string"),
TcpConnectionType: pulumi.String("string"),
TdeStatus: pulumi.String("string"),
UpgradeTime: pulumi.String("string"),
VpcId: pulumi.String("string"),
VswitchId: pulumi.String("string"),
WhitelistNetworkType: pulumi.String("string"),
ZoneId: pulumi.String("string"),
ZoneIdSlaveA: pulumi.String("string"),
})
var exampleinstanceResourceResourceFromRdsinstance = new Instance("exampleinstanceResourceResourceFromRdsinstance", InstanceArgs.builder()
.engine("string")
.engineVersion("string")
.instanceStorage(0)
.instanceType("string")
.acl("string")
.autoRenew(false)
.autoRenewPeriod(0)
.autoUpgradeMinorVersion("string")
.babelfishConfigs(InstanceBabelfishConfigArgs.builder()
.babelfishEnabled("string")
.masterUserPassword("string")
.masterUsername("string")
.migrationMode("string")
.build())
.babelfishPort("string")
.caType("string")
.category("string")
.clientCaCert("string")
.clientCaEnabled(0)
.clientCertRevocationList("string")
.clientCrlEnabled(0)
.connectionStringPrefix("string")
.dbInstanceIpArrayAttribute("string")
.dbInstanceIpArrayName("string")
.dbInstanceStorageType("string")
.dbIsIgnoreCase(false)
.dbParamGroupId("string")
.dbTimeZone("string")
.deletionProtection(false)
.direction("string")
.effectiveTime("string")
.encryptionKey("string")
.force("string")
.forceRestart(false)
.freshWhiteListReadins("string")
.haConfig("string")
.instanceChargeType("string")
.instanceName("string")
.maintainTime("string")
.manualHaTime("string")
.modifyMode("string")
.monitoringPeriod(0)
.nodeId("string")
.parameters(InstanceParameterArgs.builder()
.name("string")
.value("string")
.build())
.period(0)
.pgHbaConfs(InstancePgHbaConfArgs.builder()
.address("string")
.database("string")
.method("string")
.priorityId(0)
.type("string")
.user("string")
.mask("string")
.option("string")
.build())
.port("string")
.privateIpAddress("string")
.releasedKeepPolicy("string")
.replicationAcl("string")
.resourceGroupId("string")
.roleArn("string")
.securityGroupIds("string")
.securityIpMode("string")
.securityIpType("string")
.securityIps("string")
.serverCert("string")
.serverKey("string")
.serverlessConfigs(InstanceServerlessConfigArgs.builder()
.maxCapacity(0)
.minCapacity(0)
.autoPause(false)
.switchForce(false)
.build())
.sqlCollectorConfigValue(0)
.sqlCollectorStatus("string")
.sslAction("string")
.sslConnectionString("string")
.storageAutoScale("string")
.storageThreshold(0)
.storageUpperBound(0)
.switchTime("string")
.tags(Map.of("string", "any"))
.targetMinorVersion("string")
.tcpConnectionType("string")
.tdeStatus("string")
.upgradeTime("string")
.vpcId("string")
.vswitchId("string")
.whitelistNetworkType("string")
.zoneId("string")
.zoneIdSlaveA("string")
.build());
exampleinstance_resource_resource_from_rdsinstance = alicloud.rds.Instance("exampleinstanceResourceResourceFromRdsinstance",
engine="string",
engine_version="string",
instance_storage=0,
instance_type="string",
acl="string",
auto_renew=False,
auto_renew_period=0,
auto_upgrade_minor_version="string",
babelfish_configs=[alicloud.rds.InstanceBabelfishConfigArgs(
babelfish_enabled="string",
master_user_password="string",
master_username="string",
migration_mode="string",
)],
babelfish_port="string",
ca_type="string",
category="string",
client_ca_cert="string",
client_ca_enabled=0,
client_cert_revocation_list="string",
client_crl_enabled=0,
connection_string_prefix="string",
db_instance_ip_array_attribute="string",
db_instance_ip_array_name="string",
db_instance_storage_type="string",
db_is_ignore_case=False,
db_param_group_id="string",
db_time_zone="string",
deletion_protection=False,
direction="string",
effective_time="string",
encryption_key="string",
force="string",
force_restart=False,
fresh_white_list_readins="string",
ha_config="string",
instance_charge_type="string",
instance_name="string",
maintain_time="string",
manual_ha_time="string",
modify_mode="string",
monitoring_period=0,
node_id="string",
parameters=[alicloud.rds.InstanceParameterArgs(
name="string",
value="string",
)],
period=0,
pg_hba_confs=[alicloud.rds.InstancePgHbaConfArgs(
address="string",
database="string",
method="string",
priority_id=0,
type="string",
user="string",
mask="string",
option="string",
)],
port="string",
private_ip_address="string",
released_keep_policy="string",
replication_acl="string",
resource_group_id="string",
role_arn="string",
security_group_ids=["string"],
security_ip_mode="string",
security_ip_type="string",
security_ips=["string"],
server_cert="string",
server_key="string",
serverless_configs=[alicloud.rds.InstanceServerlessConfigArgs(
max_capacity=0,
min_capacity=0,
auto_pause=False,
switch_force=False,
)],
sql_collector_config_value=0,
sql_collector_status="string",
ssl_action="string",
ssl_connection_string="string",
storage_auto_scale="string",
storage_threshold=0,
storage_upper_bound=0,
switch_time="string",
tags={
"string": "any",
},
target_minor_version="string",
tcp_connection_type="string",
tde_status="string",
upgrade_time="string",
vpc_id="string",
vswitch_id="string",
whitelist_network_type="string",
zone_id="string",
zone_id_slave_a="string")
const exampleinstanceResourceResourceFromRdsinstance = new alicloud.rds.Instance("exampleinstanceResourceResourceFromRdsinstance", {
engine: "string",
engineVersion: "string",
instanceStorage: 0,
instanceType: "string",
acl: "string",
autoRenew: false,
autoRenewPeriod: 0,
autoUpgradeMinorVersion: "string",
babelfishConfigs: [{
babelfishEnabled: "string",
masterUserPassword: "string",
masterUsername: "string",
migrationMode: "string",
}],
babelfishPort: "string",
caType: "string",
category: "string",
clientCaCert: "string",
clientCaEnabled: 0,
clientCertRevocationList: "string",
clientCrlEnabled: 0,
connectionStringPrefix: "string",
dbInstanceIpArrayAttribute: "string",
dbInstanceIpArrayName: "string",
dbInstanceStorageType: "string",
dbIsIgnoreCase: false,
dbParamGroupId: "string",
dbTimeZone: "string",
deletionProtection: false,
direction: "string",
effectiveTime: "string",
encryptionKey: "string",
force: "string",
forceRestart: false,
freshWhiteListReadins: "string",
haConfig: "string",
instanceChargeType: "string",
instanceName: "string",
maintainTime: "string",
manualHaTime: "string",
modifyMode: "string",
monitoringPeriod: 0,
nodeId: "string",
parameters: [{
name: "string",
value: "string",
}],
period: 0,
pgHbaConfs: [{
address: "string",
database: "string",
method: "string",
priorityId: 0,
type: "string",
user: "string",
mask: "string",
option: "string",
}],
port: "string",
privateIpAddress: "string",
releasedKeepPolicy: "string",
replicationAcl: "string",
resourceGroupId: "string",
roleArn: "string",
securityGroupIds: ["string"],
securityIpMode: "string",
securityIpType: "string",
securityIps: ["string"],
serverCert: "string",
serverKey: "string",
serverlessConfigs: [{
maxCapacity: 0,
minCapacity: 0,
autoPause: false,
switchForce: false,
}],
sqlCollectorConfigValue: 0,
sqlCollectorStatus: "string",
sslAction: "string",
sslConnectionString: "string",
storageAutoScale: "string",
storageThreshold: 0,
storageUpperBound: 0,
switchTime: "string",
tags: {
string: "any",
},
targetMinorVersion: "string",
tcpConnectionType: "string",
tdeStatus: "string",
upgradeTime: "string",
vpcId: "string",
vswitchId: "string",
whitelistNetworkType: "string",
zoneId: "string",
zoneIdSlaveA: "string",
});
type: alicloud:rds:Instance
properties:
acl: string
autoRenew: false
autoRenewPeriod: 0
autoUpgradeMinorVersion: string
babelfishConfigs:
- babelfishEnabled: string
masterUserPassword: string
masterUsername: string
migrationMode: string
babelfishPort: string
caType: string
category: string
clientCaCert: string
clientCaEnabled: 0
clientCertRevocationList: string
clientCrlEnabled: 0
connectionStringPrefix: string
dbInstanceIpArrayAttribute: string
dbInstanceIpArrayName: string
dbInstanceStorageType: string
dbIsIgnoreCase: false
dbParamGroupId: string
dbTimeZone: string
deletionProtection: false
direction: string
effectiveTime: string
encryptionKey: string
engine: string
engineVersion: string
force: string
forceRestart: false
freshWhiteListReadins: string
haConfig: string
instanceChargeType: string
instanceName: string
instanceStorage: 0
instanceType: string
maintainTime: string
manualHaTime: string
modifyMode: string
monitoringPeriod: 0
nodeId: string
parameters:
- name: string
value: string
period: 0
pgHbaConfs:
- address: string
database: string
mask: string
method: string
option: string
priorityId: 0
type: string
user: string
port: string
privateIpAddress: string
releasedKeepPolicy: string
replicationAcl: string
resourceGroupId: string
roleArn: string
securityGroupIds:
- string
securityIpMode: string
securityIpType: string
securityIps:
- string
serverCert: string
serverKey: string
serverlessConfigs:
- autoPause: false
maxCapacity: 0
minCapacity: 0
switchForce: false
sqlCollectorConfigValue: 0
sqlCollectorStatus: string
sslAction: string
sslConnectionString: string
storageAutoScale: string
storageThreshold: 0
storageUpperBound: 0
switchTime: string
tags:
string: any
targetMinorVersion: string
tcpConnectionType: string
tdeStatus: string
upgradeTime: string
vpcId: string
vswitchId: string
whitelistNetworkType: string
zoneId: string
zoneIdSlaveA: string
Instance Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Instance resource accepts the following input properties:
- Engine string
Database type. Value options: MySQL, SQLServer, PostgreSQL, MariaDB.
NOTE: When the 'engine_version' changes, it can be used as the target database version for the large version upgrade of RDS for MySQL instance.
- Engine
Version string - Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- MySQL: [ 5.5、5.6、5.7、8.0 ]
- SQLServer: [ 2008r2、08r2_ent_ha、2012、2012_ent_ha、2012_std_ha、2012_web、2014_std_ha、2016_ent_ha、2016_std_ha、2016_web、2017_std_ha、2017_ent、2019_std_ha、2019_ent ]
- PostgreSQL: [ 10.0、11.0、12.0、13.0、14.0、15.0 ]
- MariaDB: [ 10.3 ]
- Serverless
- MySQL: [ 5.7、8.0 ]
- SQLServer: [ 2016_std_sl、2017_std_sl、2019_std_sl ]
- PostgreSQL: [ 14.0 ]
- MariaDB does not support creating serverless instances.
- Instance
Storage int - User-defined DB instance storage space. Value range:
- [5, 2000] for MySQL/PostgreSQL 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.
- To create a serverless instance, please pass the following values:
- MySQL basic: mysql.n2.serverless.1c
- MySQL high availability: mysql.n2.serverless.2c
- SQLServer high availability: mssql.mem2.serverless.s2
- PostgreSQL basic: pg.n2.serverless.1c
NOTE: When
storage_auto_scale="Enable"
, do not performinstance_storage
check. whenstorage_auto_scale="Disable"
, if the instance itselfinstance_storage
has changed. You need to manually revise theinstance_storage
in the template value. Whenpayment_type="Serverless"
and when modifying, do not performinstance_storage
check. Otherwise, check.- Acl string
- The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- 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.
See more details and limitation.
- Babelfish
Configs List<Pulumi.Ali Cloud. Rds. Inputs. Instance Babelfish Config> The configuration of an ApsaraDB RDS for PostgreSQL instance for which Babelfish is enabled. See
babelfish_config
below.NOTE: This parameter takes effect only when you create an ApsaraDB RDS for PostgreSQL instance. For more information, see Introduction to Babelfish.
- Babelfish
Port string The TDS port of the instance for which Babelfish is enabled.
NOTE: This parameter applies only to ApsaraDB RDS for PostgreSQL instances. For more information about Babelfish for ApsaraDB RDS for PostgreSQL, see Introduction to Babelfish.
- Ca
Type string - The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. Value range:
- aliyun: a cloud certificate
- custom: a custom certificate
- Category string
The RDS edition of the instance. If you want to create a serverless instance, you must use this value. Valid values:
- Basic: Basic Edition.
- HighAvailability: High-availability Edition.
- AlwaysOn: Cluster Edition.
- Finance: Enterprise Edition.
- cluster: MySQL Cluster Edition. (Available since 1.202.0)
- serverless_basic: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.200.0)
- serverless_standard: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.204.0)
- serverless_ha: RDS Serverless High-availability Edition for SQL Server. (Available since 1.204.0)
NOTE:
zone_id_slave_a
andzone_id_slave_b
can specify slave zone ids when creating the high-availability or enterprise edition instances. Meanwhile,vswitch_id
needs to pass in the corresponding vswitch id to the slave zone by order (If thevswitch_id
is not specified, the classic network version will be created). For example,zone_id
= "zone-a" andzone_id_slave_a
= "zone-c",zone_id_slave_b
= "zone-b", then thevswitch_id
must be "vsw-zone-a,vsw-zone-c,vsw-zone-b". Of course, you can also choose automatic allocation , for example,zone_id
= "zone-a" andzone_id_slave_a
= "Auto",zone_id_slave_b
= "Auto", then thevswitch_id
must be "vsw-zone-a,Auto,Auto". The list contains up to 2 slave zone ids , separated by commas.- Client
Ca stringCert - The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter.
- Client
Ca intEnabled - Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. Valid values:
- 1: enables the public key
- 0: disables the public key
- Client
Cert stringRevocation List - The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter.
- Client
Crl intEnabled - Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- 1: enables the CRL
- 0: disables the CRL
- Connection
String stringPrefix The private connection string prefix. If you want to update public connection string prefix, please use resource alicloud.rds.Connection connection_prefix.
NOTE: The prefix must be 8 to 64 characters in length and can contain letters, digits, and hyphens (-). It cannot contain Chinese characters and special characters ~!#%^&*=+|{};:'",<>/?
- Db
Instance stringIp Array Attribute The attribute of the IP address whitelist. By default, this parameter is empty.
NOTE: The IP address whitelists that have the hidden attribute are not displayed in the ApsaraDB RDS console. These IP address whitelists are used to access Alibaba Cloud services, such as Data Transmission Service (DTS).
- Db
Instance stringIp Array Name The name of the IP address whitelist. Default value: Default.
NOTE: A maximum of 200 IP address whitelists can be configured for each instance.
- Db
Instance stringStorage Type - The storage type of the instance. Serverless instance, only
cloud_essd
can be selected. 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).
- general_essd: general essd.
- Db
Is boolIgnore Case - Specifies whether table names on the instance are case-sensitive. Valid values:
true
,false
. - Db
Param stringGroup Id - Parameter template ID. Only MySQL and PostgreSQL support this parameter. If this parameter is not specified, the default parameter template is used. You can also customize a parameter template and use it here.
- Db
Time stringZone The time zone of the instance. This parameter takes effect only when you set the
Engine
parameter to MySQL or PostgreSQL.- If you set the
Engine
parameter to MySQL. - This time zone of the instance is in UTC. Valid values: -12:59 to +13:00.
- You can specify this parameter when the instance is equipped with local SSDs. For example, you can specify the time zone to Asia/Hong_Kong. For more information about time zones, see Time zones.
- If you set the
Engine
parameter to PostgreSQL. - This time zone of the instance is not in UTC. For more information about time zones, see Time zones.
- You can specify this parameter only when the instance is equipped with standard SSDs or ESSDs.
NOTE: You can specify the time zone when you create a primary instance. You cannot specify the time zone when you create a read-only instance. Read-only instances inherit the time zone of their primary instance. If you do not specify this parameter, the system assigns the default time zone of the region where the instance resides.
- If you set the
- Deletion
Protection bool The switch of delete protection. Valid values:
- true: delete protect.
- false: no delete protect.
NOTE:
deletion_protection
is valid only when attributeinstance_charge_type
is set toPostpaid
orServerless
, supported engine type:MySQL
,PostgreSQL
,MariaDB
,MSSQL
.- Direction string
- The instance configuration type. Valid values: ["Up", "Down", "TempUpgrade", "Serverless"]
- Effective
Time string - The method to update the engine version and change. Default value: Immediate. Valid values:
- Immediate: The change immediately takes effect.
- MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.
- Encryption
Key string - The key id of the KMS. Used for encrypting a disk if not null. Only for PostgreSQL, MySQL and SQLServer.
- Force string
- Specifies whether to enable forcible switching. Valid values:
- Yes
- No
- Force
Restart bool - Set it to true to make some parameter efficient when modifying them. Default to false.
- Fresh
White stringList Readins - The read-only instances to which you want to synchronize the IP address whitelist.
- If the instance is attached with a read-only instance, you can use this parameter to synchronize the IP address whitelist to the read-only instance. If the instance is attached with multiple read-only instances, the read-only instances must be separated by commas (,).
- If the instance is not attached with a read-only instance, this parameter is empty.
- Ha
Config string The primary/secondary switchover mode of the instance. Default value: Auto. Valid values:
- Auto: The system automatically switches over services from the primary to secondary instances in the event of a fault.
- Manual: You must manually switch over services from the primary to secondary instances in the event of a fault.
NOTE: If you set this parameter to Manual, you must specify the ManualHATime parameter.
- Instance
Charge stringType - Valid values are
Prepaid
,Postpaid
,Serverless
, Default toPostpaid
. Currently, the resource only supports PostPaid to PrePaid. For more information, see Overview. - 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)
- Manual
Ha stringTime The time after when you want to enable automatic primary/secondary switchover. At most, you can set this parameter to 23:59:59 seven days later. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
NOTE: This parameter only takes effect when the HAConfig parameter is set to Manual.
- Modify
Mode string - The method that is used to modify the IP address whitelist. Default value: Cover. Valid values:
- Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist.
- Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist.
- Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block.
- Monitoring
Period int - The monitoring frequency in seconds. Valid values are 5, 10, 60, 300. Defaults to 300.
- Node
Id string - The globally unique identifier (GUID) of the secondary instance. You can call the DescribeDBInstanceHAConfig operation to query the GUID of the secondary instance.
- Parameters
List<Pulumi.
Ali Cloud. Rds. Inputs. 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 . See
parameters
below. - 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.NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- Pg
Hba List<Pulumi.Confs Ali Cloud. Rds. Inputs. Instance Pg Hba Conf> - The configuration of AD domain . See
pg_hba_conf
below. - Port string
- The private port of the database service. If you want to update public port, please use resource alicloud.rds.Connection port.
- Private
Ip stringAddress - The private IP address of the instance. The private IP address must be within the Classless Inter-Domain Routing (CIDR) block of the vSwitch that is specified by the VSwitchId parameter.
- Released
Keep stringPolicy The policy based on which ApsaraDB RDS retains archived backup files after the instance is released. Valid values:
- None: No archived backup files are retained.
- Lastest: Only the last archived backup file is retained.
- All: All the archived backup files are retained.
NOTE: This parameter is supported only when the instance runs the MySQL database engine.
- Replication
Acl string - The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- Resource
Group stringId - The ID of resource group which the DB instance belongs.
- Role
Arn string The Alibaba Cloud Resource Name (ARN) of the RAM role.
NOTE: This parameter is not required when you create an instance that runs MySQL, PostgreSQL, or SQL Server. You need to only specify the RoleARN parameter to create an instance that has cloud disk encryption enabled by using the obtained key ID. You can configure RAM authorization to require a RAM user to enable cloud disk encryption when the RAM user is used to create an instance. If cloud disk encryption is disabled during the instance creation, the creation operation fails. To complete the configuration, you can attach the following policy to the RAM user: {"Version":"1","Statement":[{"Effect":"Deny","Action":"rds:CreateDBInstance","Resource":"*","Condition":{"StringEquals":{"rds:DiskEncryptionRequired":"false"}}}]}
- Security
Group stringId - It has been deprecated from 1.69.0 and use
security_group_ids
instead. - Security
Group List<string>Ids - , Available since 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
. supportsafety
switch to high security access mode. - Security
Ip stringType - The type of IP address in the IP address whitelist.
- 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]).
- Server
Cert string - The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- Server
Key string - The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- Serverless
Configs List<Pulumi.Ali Cloud. Rds. Inputs. Instance Serverless Config> - The settings of the serverless instance. This parameter is required when you create a serverless instance. This parameter takes effect only when you create an ApsaraDB RDS for Serverless instance. See
serverless_config
below. - 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
. - Ssl
Action string Actions performed on SSL functions. Valid values:
Open
: turn on SSL encryption;Close
: turn off SSL encryption;Update
: update SSL certificate. See more engine and engineVersion limitation.NOTE: The attribute
ssl_action
will be ignored when settinginstance_charge_type = "Serverless"
for SQLServer, PostgreSQL or MariaDB.- Ssl
Connection stringString - The internal or public endpoint for which the server certificate needs to be created or updated.
- Storage
Auto stringScale Automatic storage space expansion switch. Valid values:
- Enable
- Disable
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable.
- Storage
Threshold int The threshold in percentage based on which an automatic storage expansion is triggered. If the available storage reaches the threshold, ApsaraDB RDS increases the storage capacity of the instance. Valid values: [10, 20, 30, 40, 50].
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable. The value must be greater than or equal to the total size of the current storage space of the instance.
- Storage
Upper intBound The upper limit of the total storage space for automatic expansion of the storage space, that is, automatic expansion will not cause the total storage space of the instance to exceed this value. Unit: GB. The value must be ≥0.
NOTE: Because of data backup and migration, change DB instance type and storage would cost 15~20 minutes. Please make full preparation before changing them.
- Switch
Time string The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when
target_minor_version
is changed. The time must be in UTC.NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.
- 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.
Note: From 1.63.0, the tag key and value are case sensitive. Before that, they are not case sensitive.
- Target
Minor stringVersion The minor engine version to which you want to update the instance. If you do not specify this parameter, the instance is updated to the latest minor engine version. You must specify the minor engine version in one of the following formats:
- PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
- MySQL: _. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions are supported:
- rds: The instance runs RDS Basic or High-availability Edition.
- xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition.
- xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition.
- SQLServer: . Example: 15.0.4073.23.
NOTE: For more information about minor engine versions, see Release notes of minor AliPG versions, Release notes of minor AliSQL versions, and Release notes of minor engine versions of ApsaraDB RDS for SQL Server.
- Tcp
Connection stringType - The availability check method of the instance. Valid values:
- SHORT: Alibaba Cloud uses short-lived connections to check the availability of the instance.
- LONG: Alibaba Cloud uses persistent connections to check the availability of the instance.
- Tde
Status string - The TDE(Transparent Data Encryption) status. After TDE is turned on, it cannot be turned off. See more engine and engineVersion limitation.
- Upgrade
Db boolInstance Kernel Version - Whether to upgrade a minor version of the kernel. Valid values:
- true: upgrade
- false: not to upgrade
- Upgrade
Time string - The method to update the minor engine version. Default value: Immediate. It is valid only when
target_minor_version
is changed. Valid values:- Immediate: The minor engine version is immediately updated.
- MaintainTime: The minor engine version is updated during the maintenance window. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime.
- SpecifyTime: The minor engine version is updated at the point in time you specify.
- Vpc
Id string The VPC ID of the instance.
NOTE: This parameter applies only to ApsaraDB RDS for MySQL instances. For more information about Upgrade the major engine version of an ApsaraDB RDS for MySQL instance, see Upgrade the major engine version of an RDS instance in the ApsaraDB RDS console.
- Vswitch
Id string - The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
- Whitelist
Network stringType The network type of the IP address whitelist. Default value: MIX. Valid values:
- Classic: classic network in enhanced whitelist mode
- VPC: virtual private cloud (VPC) in enhanced whitelist mode
- MIX: standard whitelist mode
NOTE: In standard whitelist mode, IP addresses and CIDR blocks can be added only to the default IP address whitelist. In enhanced whitelist mode, IP addresses and CIDR blocks can be added to both IP address whitelists of the classic network type and those of the VPC network type.
- 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_id
is specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmulti
to "true" in the data sourcealicloud.getZones
. - Zone
Id stringSlave A - The region ID of the secondary instance if you create a secondary instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
- Engine string
Database type. Value options: MySQL, SQLServer, PostgreSQL, MariaDB.
NOTE: When the 'engine_version' changes, it can be used as the target database version for the large version upgrade of RDS for MySQL instance.
- Engine
Version string - Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- MySQL: [ 5.5、5.6、5.7、8.0 ]
- SQLServer: [ 2008r2、08r2_ent_ha、2012、2012_ent_ha、2012_std_ha、2012_web、2014_std_ha、2016_ent_ha、2016_std_ha、2016_web、2017_std_ha、2017_ent、2019_std_ha、2019_ent ]
- PostgreSQL: [ 10.0、11.0、12.0、13.0、14.0、15.0 ]
- MariaDB: [ 10.3 ]
- Serverless
- MySQL: [ 5.7、8.0 ]
- SQLServer: [ 2016_std_sl、2017_std_sl、2019_std_sl ]
- PostgreSQL: [ 14.0 ]
- MariaDB does not support creating serverless instances.
- Instance
Storage int - User-defined DB instance storage space. Value range:
- [5, 2000] for MySQL/PostgreSQL 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.
- To create a serverless instance, please pass the following values:
- MySQL basic: mysql.n2.serverless.1c
- MySQL high availability: mysql.n2.serverless.2c
- SQLServer high availability: mssql.mem2.serverless.s2
- PostgreSQL basic: pg.n2.serverless.1c
NOTE: When
storage_auto_scale="Enable"
, do not performinstance_storage
check. whenstorage_auto_scale="Disable"
, if the instance itselfinstance_storage
has changed. You need to manually revise theinstance_storage
in the template value. Whenpayment_type="Serverless"
and when modifying, do not performinstance_storage
check. Otherwise, check.- Acl string
- The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- 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.
See more details and limitation.
- Babelfish
Configs []InstanceBabelfish Config Args The configuration of an ApsaraDB RDS for PostgreSQL instance for which Babelfish is enabled. See
babelfish_config
below.NOTE: This parameter takes effect only when you create an ApsaraDB RDS for PostgreSQL instance. For more information, see Introduction to Babelfish.
- Babelfish
Port string The TDS port of the instance for which Babelfish is enabled.
NOTE: This parameter applies only to ApsaraDB RDS for PostgreSQL instances. For more information about Babelfish for ApsaraDB RDS for PostgreSQL, see Introduction to Babelfish.
- Ca
Type string - The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. Value range:
- aliyun: a cloud certificate
- custom: a custom certificate
- Category string
The RDS edition of the instance. If you want to create a serverless instance, you must use this value. Valid values:
- Basic: Basic Edition.
- HighAvailability: High-availability Edition.
- AlwaysOn: Cluster Edition.
- Finance: Enterprise Edition.
- cluster: MySQL Cluster Edition. (Available since 1.202.0)
- serverless_basic: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.200.0)
- serverless_standard: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.204.0)
- serverless_ha: RDS Serverless High-availability Edition for SQL Server. (Available since 1.204.0)
NOTE:
zone_id_slave_a
andzone_id_slave_b
can specify slave zone ids when creating the high-availability or enterprise edition instances. Meanwhile,vswitch_id
needs to pass in the corresponding vswitch id to the slave zone by order (If thevswitch_id
is not specified, the classic network version will be created). For example,zone_id
= "zone-a" andzone_id_slave_a
= "zone-c",zone_id_slave_b
= "zone-b", then thevswitch_id
must be "vsw-zone-a,vsw-zone-c,vsw-zone-b". Of course, you can also choose automatic allocation , for example,zone_id
= "zone-a" andzone_id_slave_a
= "Auto",zone_id_slave_b
= "Auto", then thevswitch_id
must be "vsw-zone-a,Auto,Auto". The list contains up to 2 slave zone ids , separated by commas.- Client
Ca stringCert - The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter.
- Client
Ca intEnabled - Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. Valid values:
- 1: enables the public key
- 0: disables the public key
- Client
Cert stringRevocation List - The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter.
- Client
Crl intEnabled - Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- 1: enables the CRL
- 0: disables the CRL
- Connection
String stringPrefix The private connection string prefix. If you want to update public connection string prefix, please use resource alicloud.rds.Connection connection_prefix.
NOTE: The prefix must be 8 to 64 characters in length and can contain letters, digits, and hyphens (-). It cannot contain Chinese characters and special characters ~!#%^&*=+|{};:'",<>/?
- Db
Instance stringIp Array Attribute The attribute of the IP address whitelist. By default, this parameter is empty.
NOTE: The IP address whitelists that have the hidden attribute are not displayed in the ApsaraDB RDS console. These IP address whitelists are used to access Alibaba Cloud services, such as Data Transmission Service (DTS).
- Db
Instance stringIp Array Name The name of the IP address whitelist. Default value: Default.
NOTE: A maximum of 200 IP address whitelists can be configured for each instance.
- Db
Instance stringStorage Type - The storage type of the instance. Serverless instance, only
cloud_essd
can be selected. 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).
- general_essd: general essd.
- Db
Is boolIgnore Case - Specifies whether table names on the instance are case-sensitive. Valid values:
true
,false
. - Db
Param stringGroup Id - Parameter template ID. Only MySQL and PostgreSQL support this parameter. If this parameter is not specified, the default parameter template is used. You can also customize a parameter template and use it here.
- Db
Time stringZone The time zone of the instance. This parameter takes effect only when you set the
Engine
parameter to MySQL or PostgreSQL.- If you set the
Engine
parameter to MySQL. - This time zone of the instance is in UTC. Valid values: -12:59 to +13:00.
- You can specify this parameter when the instance is equipped with local SSDs. For example, you can specify the time zone to Asia/Hong_Kong. For more information about time zones, see Time zones.
- If you set the
Engine
parameter to PostgreSQL. - This time zone of the instance is not in UTC. For more information about time zones, see Time zones.
- You can specify this parameter only when the instance is equipped with standard SSDs or ESSDs.
NOTE: You can specify the time zone when you create a primary instance. You cannot specify the time zone when you create a read-only instance. Read-only instances inherit the time zone of their primary instance. If you do not specify this parameter, the system assigns the default time zone of the region where the instance resides.
- If you set the
- Deletion
Protection bool The switch of delete protection. Valid values:
- true: delete protect.
- false: no delete protect.
NOTE:
deletion_protection
is valid only when attributeinstance_charge_type
is set toPostpaid
orServerless
, supported engine type:MySQL
,PostgreSQL
,MariaDB
,MSSQL
.- Direction string
- The instance configuration type. Valid values: ["Up", "Down", "TempUpgrade", "Serverless"]
- Effective
Time string - The method to update the engine version and change. Default value: Immediate. Valid values:
- Immediate: The change immediately takes effect.
- MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.
- Encryption
Key string - The key id of the KMS. Used for encrypting a disk if not null. Only for PostgreSQL, MySQL and SQLServer.
- Force string
- Specifies whether to enable forcible switching. Valid values:
- Yes
- No
- Force
Restart bool - Set it to true to make some parameter efficient when modifying them. Default to false.
- Fresh
White stringList Readins - The read-only instances to which you want to synchronize the IP address whitelist.
- If the instance is attached with a read-only instance, you can use this parameter to synchronize the IP address whitelist to the read-only instance. If the instance is attached with multiple read-only instances, the read-only instances must be separated by commas (,).
- If the instance is not attached with a read-only instance, this parameter is empty.
- Ha
Config string The primary/secondary switchover mode of the instance. Default value: Auto. Valid values:
- Auto: The system automatically switches over services from the primary to secondary instances in the event of a fault.
- Manual: You must manually switch over services from the primary to secondary instances in the event of a fault.
NOTE: If you set this parameter to Manual, you must specify the ManualHATime parameter.
- Instance
Charge stringType - Valid values are
Prepaid
,Postpaid
,Serverless
, Default toPostpaid
. Currently, the resource only supports PostPaid to PrePaid. For more information, see Overview. - 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)
- Manual
Ha stringTime The time after when you want to enable automatic primary/secondary switchover. At most, you can set this parameter to 23:59:59 seven days later. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
NOTE: This parameter only takes effect when the HAConfig parameter is set to Manual.
- Modify
Mode string - The method that is used to modify the IP address whitelist. Default value: Cover. Valid values:
- Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist.
- Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist.
- Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block.
- Monitoring
Period int - The monitoring frequency in seconds. Valid values are 5, 10, 60, 300. Defaults to 300.
- Node
Id string - The globally unique identifier (GUID) of the secondary instance. You can call the DescribeDBInstanceHAConfig operation to query the GUID of the secondary instance.
- Parameters
[]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 . See
parameters
below. - 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.NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- Pg
Hba []InstanceConfs Pg Hba Conf Args - The configuration of AD domain . See
pg_hba_conf
below. - Port string
- The private port of the database service. If you want to update public port, please use resource alicloud.rds.Connection port.
- Private
Ip stringAddress - The private IP address of the instance. The private IP address must be within the Classless Inter-Domain Routing (CIDR) block of the vSwitch that is specified by the VSwitchId parameter.
- Released
Keep stringPolicy The policy based on which ApsaraDB RDS retains archived backup files after the instance is released. Valid values:
- None: No archived backup files are retained.
- Lastest: Only the last archived backup file is retained.
- All: All the archived backup files are retained.
NOTE: This parameter is supported only when the instance runs the MySQL database engine.
- Replication
Acl string - The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- Resource
Group stringId - The ID of resource group which the DB instance belongs.
- Role
Arn string The Alibaba Cloud Resource Name (ARN) of the RAM role.
NOTE: This parameter is not required when you create an instance that runs MySQL, PostgreSQL, or SQL Server. You need to only specify the RoleARN parameter to create an instance that has cloud disk encryption enabled by using the obtained key ID. You can configure RAM authorization to require a RAM user to enable cloud disk encryption when the RAM user is used to create an instance. If cloud disk encryption is disabled during the instance creation, the creation operation fails. To complete the configuration, you can attach the following policy to the RAM user: {"Version":"1","Statement":[{"Effect":"Deny","Action":"rds:CreateDBInstance","Resource":"*","Condition":{"StringEquals":{"rds:DiskEncryptionRequired":"false"}}}]}
- Security
Group stringId - It has been deprecated from 1.69.0 and use
security_group_ids
instead. - Security
Group []stringIds - , Available since 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
. supportsafety
switch to high security access mode. - Security
Ip stringType - The type of IP address in the IP address whitelist.
- 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]).
- Server
Cert string - The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- Server
Key string - The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- Serverless
Configs []InstanceServerless Config Args - The settings of the serverless instance. This parameter is required when you create a serverless instance. This parameter takes effect only when you create an ApsaraDB RDS for Serverless instance. See
serverless_config
below. - 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
. - Ssl
Action string Actions performed on SSL functions. Valid values:
Open
: turn on SSL encryption;Close
: turn off SSL encryption;Update
: update SSL certificate. See more engine and engineVersion limitation.NOTE: The attribute
ssl_action
will be ignored when settinginstance_charge_type = "Serverless"
for SQLServer, PostgreSQL or MariaDB.- Ssl
Connection stringString - The internal or public endpoint for which the server certificate needs to be created or updated.
- Storage
Auto stringScale Automatic storage space expansion switch. Valid values:
- Enable
- Disable
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable.
- Storage
Threshold int The threshold in percentage based on which an automatic storage expansion is triggered. If the available storage reaches the threshold, ApsaraDB RDS increases the storage capacity of the instance. Valid values: [10, 20, 30, 40, 50].
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable. The value must be greater than or equal to the total size of the current storage space of the instance.
- Storage
Upper intBound The upper limit of the total storage space for automatic expansion of the storage space, that is, automatic expansion will not cause the total storage space of the instance to exceed this value. Unit: GB. The value must be ≥0.
NOTE: Because of data backup and migration, change DB instance type and storage would cost 15~20 minutes. Please make full preparation before changing them.
- Switch
Time string The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when
target_minor_version
is changed. The time must be in UTC.NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.
- 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.
Note: From 1.63.0, the tag key and value are case sensitive. Before that, they are not case sensitive.
- Target
Minor stringVersion The minor engine version to which you want to update the instance. If you do not specify this parameter, the instance is updated to the latest minor engine version. You must specify the minor engine version in one of the following formats:
- PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
- MySQL: _. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions are supported:
- rds: The instance runs RDS Basic or High-availability Edition.
- xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition.
- xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition.
- SQLServer: . Example: 15.0.4073.23.
NOTE: For more information about minor engine versions, see Release notes of minor AliPG versions, Release notes of minor AliSQL versions, and Release notes of minor engine versions of ApsaraDB RDS for SQL Server.
- Tcp
Connection stringType - The availability check method of the instance. Valid values:
- SHORT: Alibaba Cloud uses short-lived connections to check the availability of the instance.
- LONG: Alibaba Cloud uses persistent connections to check the availability of the instance.
- Tde
Status string - The TDE(Transparent Data Encryption) status. After TDE is turned on, it cannot be turned off. See more engine and engineVersion limitation.
- Upgrade
Db boolInstance Kernel Version - Whether to upgrade a minor version of the kernel. Valid values:
- true: upgrade
- false: not to upgrade
- Upgrade
Time string - The method to update the minor engine version. Default value: Immediate. It is valid only when
target_minor_version
is changed. Valid values:- Immediate: The minor engine version is immediately updated.
- MaintainTime: The minor engine version is updated during the maintenance window. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime.
- SpecifyTime: The minor engine version is updated at the point in time you specify.
- Vpc
Id string The VPC ID of the instance.
NOTE: This parameter applies only to ApsaraDB RDS for MySQL instances. For more information about Upgrade the major engine version of an ApsaraDB RDS for MySQL instance, see Upgrade the major engine version of an RDS instance in the ApsaraDB RDS console.
- Vswitch
Id string - The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
- Whitelist
Network stringType The network type of the IP address whitelist. Default value: MIX. Valid values:
- Classic: classic network in enhanced whitelist mode
- VPC: virtual private cloud (VPC) in enhanced whitelist mode
- MIX: standard whitelist mode
NOTE: In standard whitelist mode, IP addresses and CIDR blocks can be added only to the default IP address whitelist. In enhanced whitelist mode, IP addresses and CIDR blocks can be added to both IP address whitelists of the classic network type and those of the VPC network type.
- 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_id
is specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmulti
to "true" in the data sourcealicloud.getZones
. - Zone
Id stringSlave A - The region ID of the secondary instance if you create a secondary instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
- engine String
Database type. Value options: MySQL, SQLServer, PostgreSQL, MariaDB.
NOTE: When the 'engine_version' changes, it can be used as the target database version for the large version upgrade of RDS for MySQL instance.
- engine
Version String - Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- MySQL: [ 5.5、5.6、5.7、8.0 ]
- SQLServer: [ 2008r2、08r2_ent_ha、2012、2012_ent_ha、2012_std_ha、2012_web、2014_std_ha、2016_ent_ha、2016_std_ha、2016_web、2017_std_ha、2017_ent、2019_std_ha、2019_ent ]
- PostgreSQL: [ 10.0、11.0、12.0、13.0、14.0、15.0 ]
- MariaDB: [ 10.3 ]
- Serverless
- MySQL: [ 5.7、8.0 ]
- SQLServer: [ 2016_std_sl、2017_std_sl、2019_std_sl ]
- PostgreSQL: [ 14.0 ]
- MariaDB does not support creating serverless instances.
- instance
Storage Integer - User-defined DB instance storage space. Value range:
- [5, 2000] for MySQL/PostgreSQL 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.
- To create a serverless instance, please pass the following values:
- MySQL basic: mysql.n2.serverless.1c
- MySQL high availability: mysql.n2.serverless.2c
- SQLServer high availability: mssql.mem2.serverless.s2
- PostgreSQL basic: pg.n2.serverless.1c
NOTE: When
storage_auto_scale="Enable"
, do not performinstance_storage
check. whenstorage_auto_scale="Disable"
, if the instance itselfinstance_storage
has changed. You need to manually revise theinstance_storage
in the template value. Whenpayment_type="Serverless"
and when modifying, do not performinstance_storage
check. Otherwise, check.- acl String
- The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- 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 IntegerPeriod - 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.
See more details and limitation.
- babelfish
Configs List<InstanceBabelfish Config> The configuration of an ApsaraDB RDS for PostgreSQL instance for which Babelfish is enabled. See
babelfish_config
below.NOTE: This parameter takes effect only when you create an ApsaraDB RDS for PostgreSQL instance. For more information, see Introduction to Babelfish.
- babelfish
Port String The TDS port of the instance for which Babelfish is enabled.
NOTE: This parameter applies only to ApsaraDB RDS for PostgreSQL instances. For more information about Babelfish for ApsaraDB RDS for PostgreSQL, see Introduction to Babelfish.
- ca
Type String - The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. Value range:
- aliyun: a cloud certificate
- custom: a custom certificate
- category String
The RDS edition of the instance. If you want to create a serverless instance, you must use this value. Valid values:
- Basic: Basic Edition.
- HighAvailability: High-availability Edition.
- AlwaysOn: Cluster Edition.
- Finance: Enterprise Edition.
- cluster: MySQL Cluster Edition. (Available since 1.202.0)
- serverless_basic: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.200.0)
- serverless_standard: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.204.0)
- serverless_ha: RDS Serverless High-availability Edition for SQL Server. (Available since 1.204.0)
NOTE:
zone_id_slave_a
andzone_id_slave_b
can specify slave zone ids when creating the high-availability or enterprise edition instances. Meanwhile,vswitch_id
needs to pass in the corresponding vswitch id to the slave zone by order (If thevswitch_id
is not specified, the classic network version will be created). For example,zone_id
= "zone-a" andzone_id_slave_a
= "zone-c",zone_id_slave_b
= "zone-b", then thevswitch_id
must be "vsw-zone-a,vsw-zone-c,vsw-zone-b". Of course, you can also choose automatic allocation , for example,zone_id
= "zone-a" andzone_id_slave_a
= "Auto",zone_id_slave_b
= "Auto", then thevswitch_id
must be "vsw-zone-a,Auto,Auto". The list contains up to 2 slave zone ids , separated by commas.- client
Ca StringCert - The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter.
- client
Ca IntegerEnabled - Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. Valid values:
- 1: enables the public key
- 0: disables the public key
- client
Cert StringRevocation List - The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter.
- client
Crl IntegerEnabled - Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- 1: enables the CRL
- 0: disables the CRL
- connection
String StringPrefix The private connection string prefix. If you want to update public connection string prefix, please use resource alicloud.rds.Connection connection_prefix.
NOTE: The prefix must be 8 to 64 characters in length and can contain letters, digits, and hyphens (-). It cannot contain Chinese characters and special characters ~!#%^&*=+|{};:'",<>/?
- db
Instance StringIp Array Attribute The attribute of the IP address whitelist. By default, this parameter is empty.
NOTE: The IP address whitelists that have the hidden attribute are not displayed in the ApsaraDB RDS console. These IP address whitelists are used to access Alibaba Cloud services, such as Data Transmission Service (DTS).
- db
Instance StringIp Array Name The name of the IP address whitelist. Default value: Default.
NOTE: A maximum of 200 IP address whitelists can be configured for each instance.
- db
Instance StringStorage Type - The storage type of the instance. Serverless instance, only
cloud_essd
can be selected. 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).
- general_essd: general essd.
- db
Is BooleanIgnore Case - Specifies whether table names on the instance are case-sensitive. Valid values:
true
,false
. - db
Param StringGroup Id - Parameter template ID. Only MySQL and PostgreSQL support this parameter. If this parameter is not specified, the default parameter template is used. You can also customize a parameter template and use it here.
- db
Time StringZone The time zone of the instance. This parameter takes effect only when you set the
Engine
parameter to MySQL or PostgreSQL.- If you set the
Engine
parameter to MySQL. - This time zone of the instance is in UTC. Valid values: -12:59 to +13:00.
- You can specify this parameter when the instance is equipped with local SSDs. For example, you can specify the time zone to Asia/Hong_Kong. For more information about time zones, see Time zones.
- If you set the
Engine
parameter to PostgreSQL. - This time zone of the instance is not in UTC. For more information about time zones, see Time zones.
- You can specify this parameter only when the instance is equipped with standard SSDs or ESSDs.
NOTE: You can specify the time zone when you create a primary instance. You cannot specify the time zone when you create a read-only instance. Read-only instances inherit the time zone of their primary instance. If you do not specify this parameter, the system assigns the default time zone of the region where the instance resides.
- If you set the
- deletion
Protection Boolean The switch of delete protection. Valid values:
- true: delete protect.
- false: no delete protect.
NOTE:
deletion_protection
is valid only when attributeinstance_charge_type
is set toPostpaid
orServerless
, supported engine type:MySQL
,PostgreSQL
,MariaDB
,MSSQL
.- direction String
- The instance configuration type. Valid values: ["Up", "Down", "TempUpgrade", "Serverless"]
- effective
Time String - The method to update the engine version and change. Default value: Immediate. Valid values:
- Immediate: The change immediately takes effect.
- MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.
- encryption
Key String - The key id of the KMS. Used for encrypting a disk if not null. Only for PostgreSQL, MySQL and SQLServer.
- force String
- Specifies whether to enable forcible switching. Valid values:
- Yes
- No
- force
Restart Boolean - Set it to true to make some parameter efficient when modifying them. Default to false.
- fresh
White StringList Readins - The read-only instances to which you want to synchronize the IP address whitelist.
- If the instance is attached with a read-only instance, you can use this parameter to synchronize the IP address whitelist to the read-only instance. If the instance is attached with multiple read-only instances, the read-only instances must be separated by commas (,).
- If the instance is not attached with a read-only instance, this parameter is empty.
- ha
Config String The primary/secondary switchover mode of the instance. Default value: Auto. Valid values:
- Auto: The system automatically switches over services from the primary to secondary instances in the event of a fault.
- Manual: You must manually switch over services from the primary to secondary instances in the event of a fault.
NOTE: If you set this parameter to Manual, you must specify the ManualHATime parameter.
- instance
Charge StringType - Valid values are
Prepaid
,Postpaid
,Serverless
, Default toPostpaid
. Currently, the resource only supports PostPaid to PrePaid. For more information, see Overview. - 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)
- manual
Ha StringTime The time after when you want to enable automatic primary/secondary switchover. At most, you can set this parameter to 23:59:59 seven days later. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
NOTE: This parameter only takes effect when the HAConfig parameter is set to Manual.
- modify
Mode String - The method that is used to modify the IP address whitelist. Default value: Cover. Valid values:
- Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist.
- Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist.
- Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block.
- monitoring
Period Integer - The monitoring frequency in seconds. Valid values are 5, 10, 60, 300. Defaults to 300.
- node
Id String - The globally unique identifier (GUID) of the secondary instance. You can call the DescribeDBInstanceHAConfig operation to query the GUID of the secondary instance.
- 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 . See
parameters
below. - period Integer
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.NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- pg
Hba List<InstanceConfs Pg Hba Conf> - The configuration of AD domain . See
pg_hba_conf
below. - port String
- The private port of the database service. If you want to update public port, please use resource alicloud.rds.Connection port.
- private
Ip StringAddress - The private IP address of the instance. The private IP address must be within the Classless Inter-Domain Routing (CIDR) block of the vSwitch that is specified by the VSwitchId parameter.
- released
Keep StringPolicy The policy based on which ApsaraDB RDS retains archived backup files after the instance is released. Valid values:
- None: No archived backup files are retained.
- Lastest: Only the last archived backup file is retained.
- All: All the archived backup files are retained.
NOTE: This parameter is supported only when the instance runs the MySQL database engine.
- replication
Acl String - The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- resource
Group StringId - The ID of resource group which the DB instance belongs.
- role
Arn String The Alibaba Cloud Resource Name (ARN) of the RAM role.
NOTE: This parameter is not required when you create an instance that runs MySQL, PostgreSQL, or SQL Server. You need to only specify the RoleARN parameter to create an instance that has cloud disk encryption enabled by using the obtained key ID. You can configure RAM authorization to require a RAM user to enable cloud disk encryption when the RAM user is used to create an instance. If cloud disk encryption is disabled during the instance creation, the creation operation fails. To complete the configuration, you can attach the following policy to the RAM user: {"Version":"1","Statement":[{"Effect":"Deny","Action":"rds:CreateDBInstance","Resource":"*","Condition":{"StringEquals":{"rds:DiskEncryptionRequired":"false"}}}]}
- security
Group StringId - It has been deprecated from 1.69.0 and use
security_group_ids
instead. - security
Group List<String>Ids - , Available since 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
. supportsafety
switch to high security access mode. - security
Ip StringType - The type of IP address in the IP address whitelist.
- 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]).
- server
Cert String - The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- server
Key String - The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- serverless
Configs List<InstanceServerless Config> - The settings of the serverless instance. This parameter is required when you create a serverless instance. This parameter takes effect only when you create an ApsaraDB RDS for Serverless instance. See
serverless_config
below. - sql
Collector IntegerConfig 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
. - ssl
Action String Actions performed on SSL functions. Valid values:
Open
: turn on SSL encryption;Close
: turn off SSL encryption;Update
: update SSL certificate. See more engine and engineVersion limitation.NOTE: The attribute
ssl_action
will be ignored when settinginstance_charge_type = "Serverless"
for SQLServer, PostgreSQL or MariaDB.- ssl
Connection StringString - The internal or public endpoint for which the server certificate needs to be created or updated.
- storage
Auto StringScale Automatic storage space expansion switch. Valid values:
- Enable
- Disable
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable.
- storage
Threshold Integer The threshold in percentage based on which an automatic storage expansion is triggered. If the available storage reaches the threshold, ApsaraDB RDS increases the storage capacity of the instance. Valid values: [10, 20, 30, 40, 50].
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable. The value must be greater than or equal to the total size of the current storage space of the instance.
- storage
Upper IntegerBound The upper limit of the total storage space for automatic expansion of the storage space, that is, automatic expansion will not cause the total storage space of the instance to exceed this value. Unit: GB. The value must be ≥0.
NOTE: Because of data backup and migration, change DB instance type and storage would cost 15~20 minutes. Please make full preparation before changing them.
- switch
Time String The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when
target_minor_version
is changed. The time must be in UTC.NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.
- Map<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.
Note: From 1.63.0, the tag key and value are case sensitive. Before that, they are not case sensitive.
- target
Minor StringVersion The minor engine version to which you want to update the instance. If you do not specify this parameter, the instance is updated to the latest minor engine version. You must specify the minor engine version in one of the following formats:
- PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
- MySQL: _. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions are supported:
- rds: The instance runs RDS Basic or High-availability Edition.
- xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition.
- xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition.
- SQLServer: . Example: 15.0.4073.23.
NOTE: For more information about minor engine versions, see Release notes of minor AliPG versions, Release notes of minor AliSQL versions, and Release notes of minor engine versions of ApsaraDB RDS for SQL Server.
- tcp
Connection StringType - The availability check method of the instance. Valid values:
- SHORT: Alibaba Cloud uses short-lived connections to check the availability of the instance.
- LONG: Alibaba Cloud uses persistent connections to check the availability of the instance.
- tde
Status String - The TDE(Transparent Data Encryption) status. After TDE is turned on, it cannot be turned off. See more engine and engineVersion limitation.
- upgrade
Db BooleanInstance Kernel Version - Whether to upgrade a minor version of the kernel. Valid values:
- true: upgrade
- false: not to upgrade
- upgrade
Time String - The method to update the minor engine version. Default value: Immediate. It is valid only when
target_minor_version
is changed. Valid values:- Immediate: The minor engine version is immediately updated.
- MaintainTime: The minor engine version is updated during the maintenance window. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime.
- SpecifyTime: The minor engine version is updated at the point in time you specify.
- vpc
Id String The VPC ID of the instance.
NOTE: This parameter applies only to ApsaraDB RDS for MySQL instances. For more information about Upgrade the major engine version of an ApsaraDB RDS for MySQL instance, see Upgrade the major engine version of an RDS instance in the ApsaraDB RDS console.
- vswitch
Id String - The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
- whitelist
Network StringType The network type of the IP address whitelist. Default value: MIX. Valid values:
- Classic: classic network in enhanced whitelist mode
- VPC: virtual private cloud (VPC) in enhanced whitelist mode
- MIX: standard whitelist mode
NOTE: In standard whitelist mode, IP addresses and CIDR blocks can be added only to the default IP address whitelist. In enhanced whitelist mode, IP addresses and CIDR blocks can be added to both IP address whitelists of the classic network type and those of the VPC network type.
- 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_id
is specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmulti
to "true" in the data sourcealicloud.getZones
. - zone
Id StringSlave A - The region ID of the secondary instance if you create a secondary instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
- engine string
Database type. Value options: MySQL, SQLServer, PostgreSQL, MariaDB.
NOTE: When the 'engine_version' changes, it can be used as the target database version for the large version upgrade of RDS for MySQL instance.
- engine
Version string - Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- MySQL: [ 5.5、5.6、5.7、8.0 ]
- SQLServer: [ 2008r2、08r2_ent_ha、2012、2012_ent_ha、2012_std_ha、2012_web、2014_std_ha、2016_ent_ha、2016_std_ha、2016_web、2017_std_ha、2017_ent、2019_std_ha、2019_ent ]
- PostgreSQL: [ 10.0、11.0、12.0、13.0、14.0、15.0 ]
- MariaDB: [ 10.3 ]
- Serverless
- MySQL: [ 5.7、8.0 ]
- SQLServer: [ 2016_std_sl、2017_std_sl、2019_std_sl ]
- PostgreSQL: [ 14.0 ]
- MariaDB does not support creating serverless instances.
- instance
Storage number - User-defined DB instance storage space. Value range:
- [5, 2000] for MySQL/PostgreSQL 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.
- To create a serverless instance, please pass the following values:
- MySQL basic: mysql.n2.serverless.1c
- MySQL high availability: mysql.n2.serverless.2c
- SQLServer high availability: mssql.mem2.serverless.s2
- PostgreSQL basic: pg.n2.serverless.1c
NOTE: When
storage_auto_scale="Enable"
, do not performinstance_storage
check. whenstorage_auto_scale="Disable"
, if the instance itselfinstance_storage
has changed. You need to manually revise theinstance_storage
in the template value. Whenpayment_type="Serverless"
and when modifying, do not performinstance_storage
check. Otherwise, check.- acl string
- The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- 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.
See more details and limitation.
- babelfish
Configs InstanceBabelfish Config[] The configuration of an ApsaraDB RDS for PostgreSQL instance for which Babelfish is enabled. See
babelfish_config
below.NOTE: This parameter takes effect only when you create an ApsaraDB RDS for PostgreSQL instance. For more information, see Introduction to Babelfish.
- babelfish
Port string The TDS port of the instance for which Babelfish is enabled.
NOTE: This parameter applies only to ApsaraDB RDS for PostgreSQL instances. For more information about Babelfish for ApsaraDB RDS for PostgreSQL, see Introduction to Babelfish.
- ca
Type string - The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. Value range:
- aliyun: a cloud certificate
- custom: a custom certificate
- category string
The RDS edition of the instance. If you want to create a serverless instance, you must use this value. Valid values:
- Basic: Basic Edition.
- HighAvailability: High-availability Edition.
- AlwaysOn: Cluster Edition.
- Finance: Enterprise Edition.
- cluster: MySQL Cluster Edition. (Available since 1.202.0)
- serverless_basic: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.200.0)
- serverless_standard: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.204.0)
- serverless_ha: RDS Serverless High-availability Edition for SQL Server. (Available since 1.204.0)
NOTE:
zone_id_slave_a
andzone_id_slave_b
can specify slave zone ids when creating the high-availability or enterprise edition instances. Meanwhile,vswitch_id
needs to pass in the corresponding vswitch id to the slave zone by order (If thevswitch_id
is not specified, the classic network version will be created). For example,zone_id
= "zone-a" andzone_id_slave_a
= "zone-c",zone_id_slave_b
= "zone-b", then thevswitch_id
must be "vsw-zone-a,vsw-zone-c,vsw-zone-b". Of course, you can also choose automatic allocation , for example,zone_id
= "zone-a" andzone_id_slave_a
= "Auto",zone_id_slave_b
= "Auto", then thevswitch_id
must be "vsw-zone-a,Auto,Auto". The list contains up to 2 slave zone ids , separated by commas.- client
Ca stringCert - The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter.
- client
Ca numberEnabled - Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. Valid values:
- 1: enables the public key
- 0: disables the public key
- client
Cert stringRevocation List - The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter.
- client
Crl numberEnabled - Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- 1: enables the CRL
- 0: disables the CRL
- connection
String stringPrefix The private connection string prefix. If you want to update public connection string prefix, please use resource alicloud.rds.Connection connection_prefix.
NOTE: The prefix must be 8 to 64 characters in length and can contain letters, digits, and hyphens (-). It cannot contain Chinese characters and special characters ~!#%^&*=+|{};:'",<>/?
- db
Instance stringIp Array Attribute The attribute of the IP address whitelist. By default, this parameter is empty.
NOTE: The IP address whitelists that have the hidden attribute are not displayed in the ApsaraDB RDS console. These IP address whitelists are used to access Alibaba Cloud services, such as Data Transmission Service (DTS).
- db
Instance stringIp Array Name The name of the IP address whitelist. Default value: Default.
NOTE: A maximum of 200 IP address whitelists can be configured for each instance.
- db
Instance stringStorage Type - The storage type of the instance. Serverless instance, only
cloud_essd
can be selected. 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).
- general_essd: general essd.
- db
Is booleanIgnore Case - Specifies whether table names on the instance are case-sensitive. Valid values:
true
,false
. - db
Param stringGroup Id - Parameter template ID. Only MySQL and PostgreSQL support this parameter. If this parameter is not specified, the default parameter template is used. You can also customize a parameter template and use it here.
- db
Time stringZone The time zone of the instance. This parameter takes effect only when you set the
Engine
parameter to MySQL or PostgreSQL.- If you set the
Engine
parameter to MySQL. - This time zone of the instance is in UTC. Valid values: -12:59 to +13:00.
- You can specify this parameter when the instance is equipped with local SSDs. For example, you can specify the time zone to Asia/Hong_Kong. For more information about time zones, see Time zones.
- If you set the
Engine
parameter to PostgreSQL. - This time zone of the instance is not in UTC. For more information about time zones, see Time zones.
- You can specify this parameter only when the instance is equipped with standard SSDs or ESSDs.
NOTE: You can specify the time zone when you create a primary instance. You cannot specify the time zone when you create a read-only instance. Read-only instances inherit the time zone of their primary instance. If you do not specify this parameter, the system assigns the default time zone of the region where the instance resides.
- If you set the
- deletion
Protection boolean The switch of delete protection. Valid values:
- true: delete protect.
- false: no delete protect.
NOTE:
deletion_protection
is valid only when attributeinstance_charge_type
is set toPostpaid
orServerless
, supported engine type:MySQL
,PostgreSQL
,MariaDB
,MSSQL
.- direction string
- The instance configuration type. Valid values: ["Up", "Down", "TempUpgrade", "Serverless"]
- effective
Time string - The method to update the engine version and change. Default value: Immediate. Valid values:
- Immediate: The change immediately takes effect.
- MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.
- encryption
Key string - The key id of the KMS. Used for encrypting a disk if not null. Only for PostgreSQL, MySQL and SQLServer.
- force string
- Specifies whether to enable forcible switching. Valid values:
- Yes
- No
- force
Restart boolean - Set it to true to make some parameter efficient when modifying them. Default to false.
- fresh
White stringList Readins - The read-only instances to which you want to synchronize the IP address whitelist.
- If the instance is attached with a read-only instance, you can use this parameter to synchronize the IP address whitelist to the read-only instance. If the instance is attached with multiple read-only instances, the read-only instances must be separated by commas (,).
- If the instance is not attached with a read-only instance, this parameter is empty.
- ha
Config string The primary/secondary switchover mode of the instance. Default value: Auto. Valid values:
- Auto: The system automatically switches over services from the primary to secondary instances in the event of a fault.
- Manual: You must manually switch over services from the primary to secondary instances in the event of a fault.
NOTE: If you set this parameter to Manual, you must specify the ManualHATime parameter.
- instance
Charge stringType - Valid values are
Prepaid
,Postpaid
,Serverless
, Default toPostpaid
. Currently, the resource only supports PostPaid to PrePaid. For more information, see Overview. - 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)
- manual
Ha stringTime The time after when you want to enable automatic primary/secondary switchover. At most, you can set this parameter to 23:59:59 seven days later. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
NOTE: This parameter only takes effect when the HAConfig parameter is set to Manual.
- modify
Mode string - The method that is used to modify the IP address whitelist. Default value: Cover. Valid values:
- Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist.
- Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist.
- Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block.
- monitoring
Period number - The monitoring frequency in seconds. Valid values are 5, 10, 60, 300. Defaults to 300.
- node
Id string - The globally unique identifier (GUID) of the secondary instance. You can call the DescribeDBInstanceHAConfig operation to query the GUID of the secondary instance.
- 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 . See
parameters
below. - 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.NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- pg
Hba InstanceConfs Pg Hba Conf[] - The configuration of AD domain . See
pg_hba_conf
below. - port string
- The private port of the database service. If you want to update public port, please use resource alicloud.rds.Connection port.
- private
Ip stringAddress - The private IP address of the instance. The private IP address must be within the Classless Inter-Domain Routing (CIDR) block of the vSwitch that is specified by the VSwitchId parameter.
- released
Keep stringPolicy The policy based on which ApsaraDB RDS retains archived backup files after the instance is released. Valid values:
- None: No archived backup files are retained.
- Lastest: Only the last archived backup file is retained.
- All: All the archived backup files are retained.
NOTE: This parameter is supported only when the instance runs the MySQL database engine.
- replication
Acl string - The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- resource
Group stringId - The ID of resource group which the DB instance belongs.
- role
Arn string The Alibaba Cloud Resource Name (ARN) of the RAM role.
NOTE: This parameter is not required when you create an instance that runs MySQL, PostgreSQL, or SQL Server. You need to only specify the RoleARN parameter to create an instance that has cloud disk encryption enabled by using the obtained key ID. You can configure RAM authorization to require a RAM user to enable cloud disk encryption when the RAM user is used to create an instance. If cloud disk encryption is disabled during the instance creation, the creation operation fails. To complete the configuration, you can attach the following policy to the RAM user: {"Version":"1","Statement":[{"Effect":"Deny","Action":"rds:CreateDBInstance","Resource":"*","Condition":{"StringEquals":{"rds:DiskEncryptionRequired":"false"}}}]}
- security
Group stringId - It has been deprecated from 1.69.0 and use
security_group_ids
instead. - security
Group string[]Ids - , Available since 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
. supportsafety
switch to high security access mode. - security
Ip stringType - The type of IP address in the IP address whitelist.
- 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]).
- server
Cert string - The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- server
Key string - The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- serverless
Configs InstanceServerless Config[] - The settings of the serverless instance. This parameter is required when you create a serverless instance. This parameter takes effect only when you create an ApsaraDB RDS for Serverless instance. See
serverless_config
below. - 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
. - ssl
Action string Actions performed on SSL functions. Valid values:
Open
: turn on SSL encryption;Close
: turn off SSL encryption;Update
: update SSL certificate. See more engine and engineVersion limitation.NOTE: The attribute
ssl_action
will be ignored when settinginstance_charge_type = "Serverless"
for SQLServer, PostgreSQL or MariaDB.- ssl
Connection stringString - The internal or public endpoint for which the server certificate needs to be created or updated.
- storage
Auto stringScale Automatic storage space expansion switch. Valid values:
- Enable
- Disable
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable.
- storage
Threshold number The threshold in percentage based on which an automatic storage expansion is triggered. If the available storage reaches the threshold, ApsaraDB RDS increases the storage capacity of the instance. Valid values: [10, 20, 30, 40, 50].
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable. The value must be greater than or equal to the total size of the current storage space of the instance.
- storage
Upper numberBound The upper limit of the total storage space for automatic expansion of the storage space, that is, automatic expansion will not cause the total storage space of the instance to exceed this value. Unit: GB. The value must be ≥0.
NOTE: Because of data backup and migration, change DB instance type and storage would cost 15~20 minutes. Please make full preparation before changing them.
- switch
Time string The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when
target_minor_version
is changed. The time must be in UTC.NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.
- {[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.
Note: From 1.63.0, the tag key and value are case sensitive. Before that, they are not case sensitive.
- target
Minor stringVersion The minor engine version to which you want to update the instance. If you do not specify this parameter, the instance is updated to the latest minor engine version. You must specify the minor engine version in one of the following formats:
- PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
- MySQL: _. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions are supported:
- rds: The instance runs RDS Basic or High-availability Edition.
- xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition.
- xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition.
- SQLServer: . Example: 15.0.4073.23.
NOTE: For more information about minor engine versions, see Release notes of minor AliPG versions, Release notes of minor AliSQL versions, and Release notes of minor engine versions of ApsaraDB RDS for SQL Server.
- tcp
Connection stringType - The availability check method of the instance. Valid values:
- SHORT: Alibaba Cloud uses short-lived connections to check the availability of the instance.
- LONG: Alibaba Cloud uses persistent connections to check the availability of the instance.
- tde
Status string - The TDE(Transparent Data Encryption) status. After TDE is turned on, it cannot be turned off. See more engine and engineVersion limitation.
- upgrade
Db booleanInstance Kernel Version - Whether to upgrade a minor version of the kernel. Valid values:
- true: upgrade
- false: not to upgrade
- upgrade
Time string - The method to update the minor engine version. Default value: Immediate. It is valid only when
target_minor_version
is changed. Valid values:- Immediate: The minor engine version is immediately updated.
- MaintainTime: The minor engine version is updated during the maintenance window. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime.
- SpecifyTime: The minor engine version is updated at the point in time you specify.
- vpc
Id string The VPC ID of the instance.
NOTE: This parameter applies only to ApsaraDB RDS for MySQL instances. For more information about Upgrade the major engine version of an ApsaraDB RDS for MySQL instance, see Upgrade the major engine version of an RDS instance in the ApsaraDB RDS console.
- vswitch
Id string - The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
- whitelist
Network stringType The network type of the IP address whitelist. Default value: MIX. Valid values:
- Classic: classic network in enhanced whitelist mode
- VPC: virtual private cloud (VPC) in enhanced whitelist mode
- MIX: standard whitelist mode
NOTE: In standard whitelist mode, IP addresses and CIDR blocks can be added only to the default IP address whitelist. In enhanced whitelist mode, IP addresses and CIDR blocks can be added to both IP address whitelists of the classic network type and those of the VPC network type.
- 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_id
is specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmulti
to "true" in the data sourcealicloud.getZones
. - zone
Id stringSlave A - The region ID of the secondary instance if you create a secondary instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
- engine str
Database type. Value options: MySQL, SQLServer, PostgreSQL, MariaDB.
NOTE: When the 'engine_version' changes, it can be used as the target database version for the large version upgrade of RDS for MySQL instance.
- engine_
version str - Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- MySQL: [ 5.5、5.6、5.7、8.0 ]
- SQLServer: [ 2008r2、08r2_ent_ha、2012、2012_ent_ha、2012_std_ha、2012_web、2014_std_ha、2016_ent_ha、2016_std_ha、2016_web、2017_std_ha、2017_ent、2019_std_ha、2019_ent ]
- PostgreSQL: [ 10.0、11.0、12.0、13.0、14.0、15.0 ]
- MariaDB: [ 10.3 ]
- Serverless
- MySQL: [ 5.7、8.0 ]
- SQLServer: [ 2016_std_sl、2017_std_sl、2019_std_sl ]
- PostgreSQL: [ 14.0 ]
- MariaDB does not support creating serverless instances.
- instance_
storage int - User-defined DB instance storage space. Value range:
- [5, 2000] for MySQL/PostgreSQL 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.
- To create a serverless instance, please pass the following values:
- MySQL basic: mysql.n2.serverless.1c
- MySQL high availability: mysql.n2.serverless.2c
- SQLServer high availability: mssql.mem2.serverless.s2
- PostgreSQL basic: pg.n2.serverless.1c
NOTE: When
storage_auto_scale="Enable"
, do not performinstance_storage
check. whenstorage_auto_scale="Disable"
, if the instance itselfinstance_storage
has changed. You need to manually revise theinstance_storage
in the template value. Whenpayment_type="Serverless"
and when modifying, do not performinstance_storage
check. Otherwise, check.- acl str
- The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- 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_ 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.
See more details and limitation.
- babelfish_
configs Sequence[InstanceBabelfish Config Args] The configuration of an ApsaraDB RDS for PostgreSQL instance for which Babelfish is enabled. See
babelfish_config
below.NOTE: This parameter takes effect only when you create an ApsaraDB RDS for PostgreSQL instance. For more information, see Introduction to Babelfish.
- babelfish_
port str The TDS port of the instance for which Babelfish is enabled.
NOTE: This parameter applies only to ApsaraDB RDS for PostgreSQL instances. For more information about Babelfish for ApsaraDB RDS for PostgreSQL, see Introduction to Babelfish.
- ca_
type str - The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. Value range:
- aliyun: a cloud certificate
- custom: a custom certificate
- category str
The RDS edition of the instance. If you want to create a serverless instance, you must use this value. Valid values:
- Basic: Basic Edition.
- HighAvailability: High-availability Edition.
- AlwaysOn: Cluster Edition.
- Finance: Enterprise Edition.
- cluster: MySQL Cluster Edition. (Available since 1.202.0)
- serverless_basic: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.200.0)
- serverless_standard: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.204.0)
- serverless_ha: RDS Serverless High-availability Edition for SQL Server. (Available since 1.204.0)
NOTE:
zone_id_slave_a
andzone_id_slave_b
can specify slave zone ids when creating the high-availability or enterprise edition instances. Meanwhile,vswitch_id
needs to pass in the corresponding vswitch id to the slave zone by order (If thevswitch_id
is not specified, the classic network version will be created). For example,zone_id
= "zone-a" andzone_id_slave_a
= "zone-c",zone_id_slave_b
= "zone-b", then thevswitch_id
must be "vsw-zone-a,vsw-zone-c,vsw-zone-b". Of course, you can also choose automatic allocation , for example,zone_id
= "zone-a" andzone_id_slave_a
= "Auto",zone_id_slave_b
= "Auto", then thevswitch_id
must be "vsw-zone-a,Auto,Auto". The list contains up to 2 slave zone ids , separated by commas.- client_
ca_ strcert - The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter.
- client_
ca_ intenabled - Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. Valid values:
- 1: enables the public key
- 0: disables the public key
- client_
cert_ strrevocation_ list - The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter.
- client_
crl_ intenabled - Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- 1: enables the CRL
- 0: disables the CRL
- connection_
string_ strprefix The private connection string prefix. If you want to update public connection string prefix, please use resource alicloud.rds.Connection connection_prefix.
NOTE: The prefix must be 8 to 64 characters in length and can contain letters, digits, and hyphens (-). It cannot contain Chinese characters and special characters ~!#%^&*=+|{};:'",<>/?
- db_
instance_ strip_ array_ attribute The attribute of the IP address whitelist. By default, this parameter is empty.
NOTE: The IP address whitelists that have the hidden attribute are not displayed in the ApsaraDB RDS console. These IP address whitelists are used to access Alibaba Cloud services, such as Data Transmission Service (DTS).
- db_
instance_ strip_ array_ name The name of the IP address whitelist. Default value: Default.
NOTE: A maximum of 200 IP address whitelists can be configured for each instance.
- db_
instance_ strstorage_ type - The storage type of the instance. Serverless instance, only
cloud_essd
can be selected. 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).
- general_essd: general essd.
- db_
is_ boolignore_ case - Specifies whether table names on the instance are case-sensitive. Valid values:
true
,false
. - db_
param_ strgroup_ id - Parameter template ID. Only MySQL and PostgreSQL support this parameter. If this parameter is not specified, the default parameter template is used. You can also customize a parameter template and use it here.
- db_
time_ strzone The time zone of the instance. This parameter takes effect only when you set the
Engine
parameter to MySQL or PostgreSQL.- If you set the
Engine
parameter to MySQL. - This time zone of the instance is in UTC. Valid values: -12:59 to +13:00.
- You can specify this parameter when the instance is equipped with local SSDs. For example, you can specify the time zone to Asia/Hong_Kong. For more information about time zones, see Time zones.
- If you set the
Engine
parameter to PostgreSQL. - This time zone of the instance is not in UTC. For more information about time zones, see Time zones.
- You can specify this parameter only when the instance is equipped with standard SSDs or ESSDs.
NOTE: You can specify the time zone when you create a primary instance. You cannot specify the time zone when you create a read-only instance. Read-only instances inherit the time zone of their primary instance. If you do not specify this parameter, the system assigns the default time zone of the region where the instance resides.
- If you set the
- deletion_
protection bool The switch of delete protection. Valid values:
- true: delete protect.
- false: no delete protect.
NOTE:
deletion_protection
is valid only when attributeinstance_charge_type
is set toPostpaid
orServerless
, supported engine type:MySQL
,PostgreSQL
,MariaDB
,MSSQL
.- direction str
- The instance configuration type. Valid values: ["Up", "Down", "TempUpgrade", "Serverless"]
- effective_
time str - The method to update the engine version and change. Default value: Immediate. Valid values:
- Immediate: The change immediately takes effect.
- MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.
- encryption_
key str - The key id of the KMS. Used for encrypting a disk if not null. Only for PostgreSQL, MySQL and SQLServer.
- force str
- Specifies whether to enable forcible switching. Valid values:
- Yes
- No
- force_
restart bool - Set it to true to make some parameter efficient when modifying them. Default to false.
- fresh_
white_ strlist_ readins - The read-only instances to which you want to synchronize the IP address whitelist.
- If the instance is attached with a read-only instance, you can use this parameter to synchronize the IP address whitelist to the read-only instance. If the instance is attached with multiple read-only instances, the read-only instances must be separated by commas (,).
- If the instance is not attached with a read-only instance, this parameter is empty.
- ha_
config str The primary/secondary switchover mode of the instance. Default value: Auto. Valid values:
- Auto: The system automatically switches over services from the primary to secondary instances in the event of a fault.
- Manual: You must manually switch over services from the primary to secondary instances in the event of a fault.
NOTE: If you set this parameter to Manual, you must specify the ManualHATime parameter.
- instance_
charge_ strtype - Valid values are
Prepaid
,Postpaid
,Serverless
, Default toPostpaid
. Currently, the resource only supports PostPaid to PrePaid. For more information, see Overview. - 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)
- manual_
ha_ strtime The time after when you want to enable automatic primary/secondary switchover. At most, you can set this parameter to 23:59:59 seven days later. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
NOTE: This parameter only takes effect when the HAConfig parameter is set to Manual.
- modify_
mode str - The method that is used to modify the IP address whitelist. Default value: Cover. Valid values:
- Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist.
- Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist.
- Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block.
- monitoring_
period int - The monitoring frequency in seconds. Valid values are 5, 10, 60, 300. Defaults to 300.
- node_
id str - The globally unique identifier (GUID) of the secondary instance. You can call the DescribeDBInstanceHAConfig operation to query the GUID of the secondary instance.
- parameters
Sequence[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 . See
parameters
below. - 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.NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- pg_
hba_ Sequence[Instanceconfs Pg Hba Conf Args] - The configuration of AD domain . See
pg_hba_conf
below. - port str
- The private port of the database service. If you want to update public port, please use resource alicloud.rds.Connection port.
- private_
ip_ straddress - The private IP address of the instance. The private IP address must be within the Classless Inter-Domain Routing (CIDR) block of the vSwitch that is specified by the VSwitchId parameter.
- released_
keep_ strpolicy The policy based on which ApsaraDB RDS retains archived backup files after the instance is released. Valid values:
- None: No archived backup files are retained.
- Lastest: Only the last archived backup file is retained.
- All: All the archived backup files are retained.
NOTE: This parameter is supported only when the instance runs the MySQL database engine.
- replication_
acl str - The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- resource_
group_ strid - The ID of resource group which the DB instance belongs.
- role_
arn str The Alibaba Cloud Resource Name (ARN) of the RAM role.
NOTE: This parameter is not required when you create an instance that runs MySQL, PostgreSQL, or SQL Server. You need to only specify the RoleARN parameter to create an instance that has cloud disk encryption enabled by using the obtained key ID. You can configure RAM authorization to require a RAM user to enable cloud disk encryption when the RAM user is used to create an instance. If cloud disk encryption is disabled during the instance creation, the creation operation fails. To complete the configuration, you can attach the following policy to the RAM user: {"Version":"1","Statement":[{"Effect":"Deny","Action":"rds:CreateDBInstance","Resource":"*","Condition":{"StringEquals":{"rds:DiskEncryptionRequired":"false"}}}]}
- security_
group_ strid - It has been deprecated from 1.69.0 and use
security_group_ids
instead. - security_
group_ Sequence[str]ids - , Available since 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
. supportsafety
switch to high security access mode. - security_
ip_ strtype - The type of IP address in the IP address whitelist.
- security_
ips Sequence[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]).
- server_
cert str - The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- server_
key str - The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- serverless_
configs Sequence[InstanceServerless Config Args] - The settings of the serverless instance. This parameter is required when you create a serverless instance. This parameter takes effect only when you create an ApsaraDB RDS for Serverless instance. See
serverless_config
below. - sql_
collector_ intconfig_ 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
. - ssl_
action str Actions performed on SSL functions. Valid values:
Open
: turn on SSL encryption;Close
: turn off SSL encryption;Update
: update SSL certificate. See more engine and engineVersion limitation.NOTE: The attribute
ssl_action
will be ignored when settinginstance_charge_type = "Serverless"
for SQLServer, PostgreSQL or MariaDB.- ssl_
connection_ strstring - The internal or public endpoint for which the server certificate needs to be created or updated.
- storage_
auto_ strscale Automatic storage space expansion switch. Valid values:
- Enable
- Disable
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable.
- storage_
threshold int The threshold in percentage based on which an automatic storage expansion is triggered. If the available storage reaches the threshold, ApsaraDB RDS increases the storage capacity of the instance. Valid values: [10, 20, 30, 40, 50].
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable. The value must be greater than or equal to the total size of the current storage space of the instance.
- storage_
upper_ intbound The upper limit of the total storage space for automatic expansion of the storage space, that is, automatic expansion will not cause the total storage space of the instance to exceed this value. Unit: GB. The value must be ≥0.
NOTE: Because of data backup and migration, change DB instance type and storage would cost 15~20 minutes. Please make full preparation before changing them.
- switch_
time str The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when
target_minor_version
is changed. The time must be in UTC.NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.
- Mapping[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.
Note: From 1.63.0, the tag key and value are case sensitive. Before that, they are not case sensitive.
- target_
minor_ strversion The minor engine version to which you want to update the instance. If you do not specify this parameter, the instance is updated to the latest minor engine version. You must specify the minor engine version in one of the following formats:
- PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
- MySQL: _. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions are supported:
- rds: The instance runs RDS Basic or High-availability Edition.
- xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition.
- xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition.
- SQLServer: . Example: 15.0.4073.23.
NOTE: For more information about minor engine versions, see Release notes of minor AliPG versions, Release notes of minor AliSQL versions, and Release notes of minor engine versions of ApsaraDB RDS for SQL Server.
- tcp_
connection_ strtype - The availability check method of the instance. Valid values:
- SHORT: Alibaba Cloud uses short-lived connections to check the availability of the instance.
- LONG: Alibaba Cloud uses persistent connections to check the availability of the instance.
- tde_
status str - The TDE(Transparent Data Encryption) status. After TDE is turned on, it cannot be turned off. See more engine and engineVersion limitation.
- upgrade_
db_ boolinstance_ kernel_ version - Whether to upgrade a minor version of the kernel. Valid values:
- true: upgrade
- false: not to upgrade
- upgrade_
time str - The method to update the minor engine version. Default value: Immediate. It is valid only when
target_minor_version
is changed. Valid values:- Immediate: The minor engine version is immediately updated.
- MaintainTime: The minor engine version is updated during the maintenance window. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime.
- SpecifyTime: The minor engine version is updated at the point in time you specify.
- vpc_
id str The VPC ID of the instance.
NOTE: This parameter applies only to ApsaraDB RDS for MySQL instances. For more information about Upgrade the major engine version of an ApsaraDB RDS for MySQL instance, see Upgrade the major engine version of an RDS instance in the ApsaraDB RDS console.
- vswitch_
id str - The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
- whitelist_
network_ strtype The network type of the IP address whitelist. Default value: MIX. Valid values:
- Classic: classic network in enhanced whitelist mode
- VPC: virtual private cloud (VPC) in enhanced whitelist mode
- MIX: standard whitelist mode
NOTE: In standard whitelist mode, IP addresses and CIDR blocks can be added only to the default IP address whitelist. In enhanced whitelist mode, IP addresses and CIDR blocks can be added to both IP address whitelists of the classic network type and those of the VPC network type.
- 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_id
is specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmulti
to "true" in the data sourcealicloud.getZones
. - zone_
id_ strslave_ a - The region ID of the secondary instance if you create a secondary instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
- engine String
Database type. Value options: MySQL, SQLServer, PostgreSQL, MariaDB.
NOTE: When the 'engine_version' changes, it can be used as the target database version for the large version upgrade of RDS for MySQL instance.
- engine
Version String - Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- MySQL: [ 5.5、5.6、5.7、8.0 ]
- SQLServer: [ 2008r2、08r2_ent_ha、2012、2012_ent_ha、2012_std_ha、2012_web、2014_std_ha、2016_ent_ha、2016_std_ha、2016_web、2017_std_ha、2017_ent、2019_std_ha、2019_ent ]
- PostgreSQL: [ 10.0、11.0、12.0、13.0、14.0、15.0 ]
- MariaDB: [ 10.3 ]
- Serverless
- MySQL: [ 5.7、8.0 ]
- SQLServer: [ 2016_std_sl、2017_std_sl、2019_std_sl ]
- PostgreSQL: [ 14.0 ]
- MariaDB does not support creating serverless instances.
- instance
Storage Number - User-defined DB instance storage space. Value range:
- [5, 2000] for MySQL/PostgreSQL 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.
- To create a serverless instance, please pass the following values:
- MySQL basic: mysql.n2.serverless.1c
- MySQL high availability: mysql.n2.serverless.2c
- SQLServer high availability: mssql.mem2.serverless.s2
- PostgreSQL basic: pg.n2.serverless.1c
NOTE: When
storage_auto_scale="Enable"
, do not performinstance_storage
check. whenstorage_auto_scale="Disable"
, if the instance itselfinstance_storage
has changed. You need to manually revise theinstance_storage
in the template value. Whenpayment_type="Serverless"
and when modifying, do not performinstance_storage
check. Otherwise, check.- acl String
- The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- 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.
See more details and limitation.
- babelfish
Configs List<Property Map> The configuration of an ApsaraDB RDS for PostgreSQL instance for which Babelfish is enabled. See
babelfish_config
below.NOTE: This parameter takes effect only when you create an ApsaraDB RDS for PostgreSQL instance. For more information, see Introduction to Babelfish.
- babelfish
Port String The TDS port of the instance for which Babelfish is enabled.
NOTE: This parameter applies only to ApsaraDB RDS for PostgreSQL instances. For more information about Babelfish for ApsaraDB RDS for PostgreSQL, see Introduction to Babelfish.
- ca
Type String - The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. Value range:
- aliyun: a cloud certificate
- custom: a custom certificate
- category String
The RDS edition of the instance. If you want to create a serverless instance, you must use this value. Valid values:
- Basic: Basic Edition.
- HighAvailability: High-availability Edition.
- AlwaysOn: Cluster Edition.
- Finance: Enterprise Edition.
- cluster: MySQL Cluster Edition. (Available since 1.202.0)
- serverless_basic: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.200.0)
- serverless_standard: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.204.0)
- serverless_ha: RDS Serverless High-availability Edition for SQL Server. (Available since 1.204.0)
NOTE:
zone_id_slave_a
andzone_id_slave_b
can specify slave zone ids when creating the high-availability or enterprise edition instances. Meanwhile,vswitch_id
needs to pass in the corresponding vswitch id to the slave zone by order (If thevswitch_id
is not specified, the classic network version will be created). For example,zone_id
= "zone-a" andzone_id_slave_a
= "zone-c",zone_id_slave_b
= "zone-b", then thevswitch_id
must be "vsw-zone-a,vsw-zone-c,vsw-zone-b". Of course, you can also choose automatic allocation , for example,zone_id
= "zone-a" andzone_id_slave_a
= "Auto",zone_id_slave_b
= "Auto", then thevswitch_id
must be "vsw-zone-a,Auto,Auto". The list contains up to 2 slave zone ids , separated by commas.- client
Ca StringCert - The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter.
- client
Ca NumberEnabled - Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. Valid values:
- 1: enables the public key
- 0: disables the public key
- client
Cert StringRevocation List - The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter.
- client
Crl NumberEnabled - Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- 1: enables the CRL
- 0: disables the CRL
- connection
String StringPrefix The private connection string prefix. If you want to update public connection string prefix, please use resource alicloud.rds.Connection connection_prefix.
NOTE: The prefix must be 8 to 64 characters in length and can contain letters, digits, and hyphens (-). It cannot contain Chinese characters and special characters ~!#%^&*=+|{};:'",<>/?
- db
Instance StringIp Array Attribute The attribute of the IP address whitelist. By default, this parameter is empty.
NOTE: The IP address whitelists that have the hidden attribute are not displayed in the ApsaraDB RDS console. These IP address whitelists are used to access Alibaba Cloud services, such as Data Transmission Service (DTS).
- db
Instance StringIp Array Name The name of the IP address whitelist. Default value: Default.
NOTE: A maximum of 200 IP address whitelists can be configured for each instance.
- db
Instance StringStorage Type - The storage type of the instance. Serverless instance, only
cloud_essd
can be selected. 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).
- general_essd: general essd.
- db
Is BooleanIgnore Case - Specifies whether table names on the instance are case-sensitive. Valid values:
true
,false
. - db
Param StringGroup Id - Parameter template ID. Only MySQL and PostgreSQL support this parameter. If this parameter is not specified, the default parameter template is used. You can also customize a parameter template and use it here.
- db
Time StringZone The time zone of the instance. This parameter takes effect only when you set the
Engine
parameter to MySQL or PostgreSQL.- If you set the
Engine
parameter to MySQL. - This time zone of the instance is in UTC. Valid values: -12:59 to +13:00.
- You can specify this parameter when the instance is equipped with local SSDs. For example, you can specify the time zone to Asia/Hong_Kong. For more information about time zones, see Time zones.
- If you set the
Engine
parameter to PostgreSQL. - This time zone of the instance is not in UTC. For more information about time zones, see Time zones.
- You can specify this parameter only when the instance is equipped with standard SSDs or ESSDs.
NOTE: You can specify the time zone when you create a primary instance. You cannot specify the time zone when you create a read-only instance. Read-only instances inherit the time zone of their primary instance. If you do not specify this parameter, the system assigns the default time zone of the region where the instance resides.
- If you set the
- deletion
Protection Boolean The switch of delete protection. Valid values:
- true: delete protect.
- false: no delete protect.
NOTE:
deletion_protection
is valid only when attributeinstance_charge_type
is set toPostpaid
orServerless
, supported engine type:MySQL
,PostgreSQL
,MariaDB
,MSSQL
.- direction String
- The instance configuration type. Valid values: ["Up", "Down", "TempUpgrade", "Serverless"]
- effective
Time String - The method to update the engine version and change. Default value: Immediate. Valid values:
- Immediate: The change immediately takes effect.
- MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.
- encryption
Key String - The key id of the KMS. Used for encrypting a disk if not null. Only for PostgreSQL, MySQL and SQLServer.
- force String
- Specifies whether to enable forcible switching. Valid values:
- Yes
- No
- force
Restart Boolean - Set it to true to make some parameter efficient when modifying them. Default to false.
- fresh
White StringList Readins - The read-only instances to which you want to synchronize the IP address whitelist.
- If the instance is attached with a read-only instance, you can use this parameter to synchronize the IP address whitelist to the read-only instance. If the instance is attached with multiple read-only instances, the read-only instances must be separated by commas (,).
- If the instance is not attached with a read-only instance, this parameter is empty.
- ha
Config String The primary/secondary switchover mode of the instance. Default value: Auto. Valid values:
- Auto: The system automatically switches over services from the primary to secondary instances in the event of a fault.
- Manual: You must manually switch over services from the primary to secondary instances in the event of a fault.
NOTE: If you set this parameter to Manual, you must specify the ManualHATime parameter.
- instance
Charge StringType - Valid values are
Prepaid
,Postpaid
,Serverless
, Default toPostpaid
. Currently, the resource only supports PostPaid to PrePaid. For more information, see Overview. - 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)
- manual
Ha StringTime The time after when you want to enable automatic primary/secondary switchover. At most, you can set this parameter to 23:59:59 seven days later. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
NOTE: This parameter only takes effect when the HAConfig parameter is set to Manual.
- modify
Mode String - The method that is used to modify the IP address whitelist. Default value: Cover. Valid values:
- Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist.
- Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist.
- Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block.
- monitoring
Period Number - The monitoring frequency in seconds. Valid values are 5, 10, 60, 300. Defaults to 300.
- node
Id String - The globally unique identifier (GUID) of the secondary instance. You can call the DescribeDBInstanceHAConfig operation to query the GUID of the secondary instance.
- parameters List<Property Map>
- Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates . See
parameters
below. - 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.NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- pg
Hba List<Property Map>Confs - The configuration of AD domain . See
pg_hba_conf
below. - port String
- The private port of the database service. If you want to update public port, please use resource alicloud.rds.Connection port.
- private
Ip StringAddress - The private IP address of the instance. The private IP address must be within the Classless Inter-Domain Routing (CIDR) block of the vSwitch that is specified by the VSwitchId parameter.
- released
Keep StringPolicy The policy based on which ApsaraDB RDS retains archived backup files after the instance is released. Valid values:
- None: No archived backup files are retained.
- Lastest: Only the last archived backup file is retained.
- All: All the archived backup files are retained.
NOTE: This parameter is supported only when the instance runs the MySQL database engine.
- replication
Acl String - The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- resource
Group StringId - The ID of resource group which the DB instance belongs.
- role
Arn String The Alibaba Cloud Resource Name (ARN) of the RAM role.
NOTE: This parameter is not required when you create an instance that runs MySQL, PostgreSQL, or SQL Server. You need to only specify the RoleARN parameter to create an instance that has cloud disk encryption enabled by using the obtained key ID. You can configure RAM authorization to require a RAM user to enable cloud disk encryption when the RAM user is used to create an instance. If cloud disk encryption is disabled during the instance creation, the creation operation fails. To complete the configuration, you can attach the following policy to the RAM user: {"Version":"1","Statement":[{"Effect":"Deny","Action":"rds:CreateDBInstance","Resource":"*","Condition":{"StringEquals":{"rds:DiskEncryptionRequired":"false"}}}]}
- security
Group StringId - It has been deprecated from 1.69.0 and use
security_group_ids
instead. - security
Group List<String>Ids - , Available since 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
. supportsafety
switch to high security access mode. - security
Ip StringType - The type of IP address in the IP address whitelist.
- 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]).
- server
Cert String - The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- server
Key String - The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- serverless
Configs List<Property Map> - The settings of the serverless instance. This parameter is required when you create a serverless instance. This parameter takes effect only when you create an ApsaraDB RDS for Serverless instance. See
serverless_config
below. - 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
. - ssl
Action String Actions performed on SSL functions. Valid values:
Open
: turn on SSL encryption;Close
: turn off SSL encryption;Update
: update SSL certificate. See more engine and engineVersion limitation.NOTE: The attribute
ssl_action
will be ignored when settinginstance_charge_type = "Serverless"
for SQLServer, PostgreSQL or MariaDB.- ssl
Connection StringString - The internal or public endpoint for which the server certificate needs to be created or updated.
- storage
Auto StringScale Automatic storage space expansion switch. Valid values:
- Enable
- Disable
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable.
- storage
Threshold Number The threshold in percentage based on which an automatic storage expansion is triggered. If the available storage reaches the threshold, ApsaraDB RDS increases the storage capacity of the instance. Valid values: [10, 20, 30, 40, 50].
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable. The value must be greater than or equal to the total size of the current storage space of the instance.
- storage
Upper NumberBound The upper limit of the total storage space for automatic expansion of the storage space, that is, automatic expansion will not cause the total storage space of the instance to exceed this value. Unit: GB. The value must be ≥0.
NOTE: Because of data backup and migration, change DB instance type and storage would cost 15~20 minutes. Please make full preparation before changing them.
- switch
Time String The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when
target_minor_version
is changed. The time must be in UTC.NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.
- Map<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.
Note: From 1.63.0, the tag key and value are case sensitive. Before that, they are not case sensitive.
- target
Minor StringVersion The minor engine version to which you want to update the instance. If you do not specify this parameter, the instance is updated to the latest minor engine version. You must specify the minor engine version in one of the following formats:
- PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
- MySQL: _. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions are supported:
- rds: The instance runs RDS Basic or High-availability Edition.
- xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition.
- xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition.
- SQLServer: . Example: 15.0.4073.23.
NOTE: For more information about minor engine versions, see Release notes of minor AliPG versions, Release notes of minor AliSQL versions, and Release notes of minor engine versions of ApsaraDB RDS for SQL Server.
- tcp
Connection StringType - The availability check method of the instance. Valid values:
- SHORT: Alibaba Cloud uses short-lived connections to check the availability of the instance.
- LONG: Alibaba Cloud uses persistent connections to check the availability of the instance.
- tde
Status String - The TDE(Transparent Data Encryption) status. After TDE is turned on, it cannot be turned off. See more engine and engineVersion limitation.
- upgrade
Db BooleanInstance Kernel Version - Whether to upgrade a minor version of the kernel. Valid values:
- true: upgrade
- false: not to upgrade
- upgrade
Time String - The method to update the minor engine version. Default value: Immediate. It is valid only when
target_minor_version
is changed. Valid values:- Immediate: The minor engine version is immediately updated.
- MaintainTime: The minor engine version is updated during the maintenance window. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime.
- SpecifyTime: The minor engine version is updated at the point in time you specify.
- vpc
Id String The VPC ID of the instance.
NOTE: This parameter applies only to ApsaraDB RDS for MySQL instances. For more information about Upgrade the major engine version of an ApsaraDB RDS for MySQL instance, see Upgrade the major engine version of an RDS instance in the ApsaraDB RDS console.
- vswitch
Id String - The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
- whitelist
Network StringType The network type of the IP address whitelist. Default value: MIX. Valid values:
- Classic: classic network in enhanced whitelist mode
- VPC: virtual private cloud (VPC) in enhanced whitelist mode
- MIX: standard whitelist mode
NOTE: In standard whitelist mode, IP addresses and CIDR blocks can be added only to the default IP address whitelist. In enhanced whitelist mode, IP addresses and CIDR blocks can be added to both IP address whitelists of the classic network type and those of the VPC network type.
- 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_id
is specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmulti
to "true" in the data sourcealicloud.getZones
. - zone
Id StringSlave A - The region ID of the secondary instance if you create a secondary instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
Outputs
All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:
- Connection
String string - RDS database connection string.
- Create
Time string - (Available since 1.204.1) The creation time of db instance.
- Db
Instance stringType - (Available since 1.197.0) The type of db instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ssl
Status string - Status of the SSL feature.
Yes
: SSL is turned on;No
: SSL is turned off. - Status string
- (Available since 1.204.1) The status of db instance.
- Connection
String string - RDS database connection string.
- Create
Time string - (Available since 1.204.1) The creation time of db instance.
- Db
Instance stringType - (Available since 1.197.0) The type of db instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ssl
Status string - Status of the SSL feature.
Yes
: SSL is turned on;No
: SSL is turned off. - Status string
- (Available since 1.204.1) The status of db instance.
- connection
String String - RDS database connection string.
- create
Time String - (Available since 1.204.1) The creation time of db instance.
- db
Instance StringType - (Available since 1.197.0) The type of db instance.
- id String
- The provider-assigned unique ID for this managed resource.
- ssl
Status String - Status of the SSL feature.
Yes
: SSL is turned on;No
: SSL is turned off. - status String
- (Available since 1.204.1) The status of db instance.
- connection
String string - RDS database connection string.
- create
Time string - (Available since 1.204.1) The creation time of db instance.
- db
Instance stringType - (Available since 1.197.0) The type of db instance.
- id string
- The provider-assigned unique ID for this managed resource.
- ssl
Status string - Status of the SSL feature.
Yes
: SSL is turned on;No
: SSL is turned off. - status string
- (Available since 1.204.1) The status of db instance.
- connection_
string str - RDS database connection string.
- create_
time str - (Available since 1.204.1) The creation time of db instance.
- db_
instance_ strtype - (Available since 1.197.0) The type of db instance.
- id str
- The provider-assigned unique ID for this managed resource.
- ssl_
status str - Status of the SSL feature.
Yes
: SSL is turned on;No
: SSL is turned off. - status str
- (Available since 1.204.1) The status of db instance.
- connection
String String - RDS database connection string.
- create
Time String - (Available since 1.204.1) The creation time of db instance.
- db
Instance StringType - (Available since 1.197.0) The type of db instance.
- id String
- The provider-assigned unique ID for this managed resource.
- ssl
Status String - Status of the SSL feature.
Yes
: SSL is turned on;No
: SSL is turned off. - status String
- (Available since 1.204.1) The status of db instance.
Look up 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): Instance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
acl: Optional[str] = None,
auto_renew: Optional[bool] = None,
auto_renew_period: Optional[int] = None,
auto_upgrade_minor_version: Optional[str] = None,
babelfish_configs: Optional[Sequence[InstanceBabelfishConfigArgs]] = None,
babelfish_port: Optional[str] = None,
ca_type: Optional[str] = None,
category: Optional[str] = None,
client_ca_cert: Optional[str] = None,
client_ca_enabled: Optional[int] = None,
client_cert_revocation_list: Optional[str] = None,
client_crl_enabled: Optional[int] = None,
connection_string: Optional[str] = None,
connection_string_prefix: Optional[str] = None,
create_time: Optional[str] = None,
db_instance_ip_array_attribute: Optional[str] = None,
db_instance_ip_array_name: Optional[str] = None,
db_instance_storage_type: Optional[str] = None,
db_instance_type: Optional[str] = None,
db_is_ignore_case: Optional[bool] = None,
db_param_group_id: Optional[str] = None,
db_time_zone: Optional[str] = None,
deletion_protection: Optional[bool] = None,
direction: Optional[str] = None,
effective_time: Optional[str] = None,
encryption_key: Optional[str] = None,
engine: Optional[str] = None,
engine_version: Optional[str] = None,
force: Optional[str] = None,
force_restart: Optional[bool] = None,
fresh_white_list_readins: Optional[str] = None,
ha_config: Optional[str] = None,
instance_charge_type: Optional[str] = None,
instance_name: Optional[str] = None,
instance_storage: Optional[int] = None,
instance_type: Optional[str] = None,
maintain_time: Optional[str] = None,
manual_ha_time: Optional[str] = None,
modify_mode: Optional[str] = None,
monitoring_period: Optional[int] = None,
node_id: Optional[str] = None,
parameters: Optional[Sequence[InstanceParameterArgs]] = None,
period: Optional[int] = None,
pg_hba_confs: Optional[Sequence[InstancePgHbaConfArgs]] = None,
port: Optional[str] = None,
private_ip_address: Optional[str] = None,
released_keep_policy: Optional[str] = None,
replication_acl: Optional[str] = None,
resource_group_id: Optional[str] = None,
role_arn: Optional[str] = None,
security_group_id: Optional[str] = None,
security_group_ids: Optional[Sequence[str]] = None,
security_ip_mode: Optional[str] = None,
security_ip_type: Optional[str] = None,
security_ips: Optional[Sequence[str]] = None,
server_cert: Optional[str] = None,
server_key: Optional[str] = None,
serverless_configs: Optional[Sequence[InstanceServerlessConfigArgs]] = None,
sql_collector_config_value: Optional[int] = None,
sql_collector_status: Optional[str] = None,
ssl_action: Optional[str] = None,
ssl_connection_string: Optional[str] = None,
ssl_status: Optional[str] = None,
status: Optional[str] = None,
storage_auto_scale: Optional[str] = None,
storage_threshold: Optional[int] = None,
storage_upper_bound: Optional[int] = None,
switch_time: Optional[str] = None,
tags: Optional[Mapping[str, Any]] = None,
target_minor_version: Optional[str] = None,
tcp_connection_type: Optional[str] = None,
tde_status: Optional[str] = None,
upgrade_db_instance_kernel_version: Optional[bool] = None,
upgrade_time: Optional[str] = None,
vpc_id: Optional[str] = None,
vswitch_id: Optional[str] = None,
whitelist_network_type: Optional[str] = None,
zone_id: Optional[str] = None,
zone_id_slave_a: Optional[str] = None) -> Instance
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)
public static Instance get(String name, Output<String> id, InstanceState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Acl string
- The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- 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.
See more details and limitation.
- Babelfish
Configs List<Pulumi.Ali Cloud. Rds. Inputs. Instance Babelfish Config> The configuration of an ApsaraDB RDS for PostgreSQL instance for which Babelfish is enabled. See
babelfish_config
below.NOTE: This parameter takes effect only when you create an ApsaraDB RDS for PostgreSQL instance. For more information, see Introduction to Babelfish.
- Babelfish
Port string The TDS port of the instance for which Babelfish is enabled.
NOTE: This parameter applies only to ApsaraDB RDS for PostgreSQL instances. For more information about Babelfish for ApsaraDB RDS for PostgreSQL, see Introduction to Babelfish.
- Ca
Type string - The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. Value range:
- aliyun: a cloud certificate
- custom: a custom certificate
- Category string
The RDS edition of the instance. If you want to create a serverless instance, you must use this value. Valid values:
- Basic: Basic Edition.
- HighAvailability: High-availability Edition.
- AlwaysOn: Cluster Edition.
- Finance: Enterprise Edition.
- cluster: MySQL Cluster Edition. (Available since 1.202.0)
- serverless_basic: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.200.0)
- serverless_standard: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.204.0)
- serverless_ha: RDS Serverless High-availability Edition for SQL Server. (Available since 1.204.0)
NOTE:
zone_id_slave_a
andzone_id_slave_b
can specify slave zone ids when creating the high-availability or enterprise edition instances. Meanwhile,vswitch_id
needs to pass in the corresponding vswitch id to the slave zone by order (If thevswitch_id
is not specified, the classic network version will be created). For example,zone_id
= "zone-a" andzone_id_slave_a
= "zone-c",zone_id_slave_b
= "zone-b", then thevswitch_id
must be "vsw-zone-a,vsw-zone-c,vsw-zone-b". Of course, you can also choose automatic allocation , for example,zone_id
= "zone-a" andzone_id_slave_a
= "Auto",zone_id_slave_b
= "Auto", then thevswitch_id
must be "vsw-zone-a,Auto,Auto". The list contains up to 2 slave zone ids , separated by commas.- Client
Ca stringCert - The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter.
- Client
Ca intEnabled - Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. Valid values:
- 1: enables the public key
- 0: disables the public key
- Client
Cert stringRevocation List - The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter.
- Client
Crl intEnabled - Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- 1: enables the CRL
- 0: disables the CRL
- Connection
String string - RDS database connection string.
- Connection
String stringPrefix The private connection string prefix. If you want to update public connection string prefix, please use resource alicloud.rds.Connection connection_prefix.
NOTE: The prefix must be 8 to 64 characters in length and can contain letters, digits, and hyphens (-). It cannot contain Chinese characters and special characters ~!#%^&*=+|{};:'",<>/?
- Create
Time string - (Available since 1.204.1) The creation time of db instance.
- Db
Instance stringIp Array Attribute The attribute of the IP address whitelist. By default, this parameter is empty.
NOTE: The IP address whitelists that have the hidden attribute are not displayed in the ApsaraDB RDS console. These IP address whitelists are used to access Alibaba Cloud services, such as Data Transmission Service (DTS).
- Db
Instance stringIp Array Name The name of the IP address whitelist. Default value: Default.
NOTE: A maximum of 200 IP address whitelists can be configured for each instance.
- Db
Instance stringStorage Type - The storage type of the instance. Serverless instance, only
cloud_essd
can be selected. 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).
- general_essd: general essd.
- Db
Instance stringType - (Available since 1.197.0) The type of db instance.
- Db
Is boolIgnore Case - Specifies whether table names on the instance are case-sensitive. Valid values:
true
,false
. - Db
Param stringGroup Id - Parameter template ID. Only MySQL and PostgreSQL support this parameter. If this parameter is not specified, the default parameter template is used. You can also customize a parameter template and use it here.
- Db
Time stringZone The time zone of the instance. This parameter takes effect only when you set the
Engine
parameter to MySQL or PostgreSQL.- If you set the
Engine
parameter to MySQL. - This time zone of the instance is in UTC. Valid values: -12:59 to +13:00.
- You can specify this parameter when the instance is equipped with local SSDs. For example, you can specify the time zone to Asia/Hong_Kong. For more information about time zones, see Time zones.
- If you set the
Engine
parameter to PostgreSQL. - This time zone of the instance is not in UTC. For more information about time zones, see Time zones.
- You can specify this parameter only when the instance is equipped with standard SSDs or ESSDs.
NOTE: You can specify the time zone when you create a primary instance. You cannot specify the time zone when you create a read-only instance. Read-only instances inherit the time zone of their primary instance. If you do not specify this parameter, the system assigns the default time zone of the region where the instance resides.
- If you set the
- Deletion
Protection bool The switch of delete protection. Valid values:
- true: delete protect.
- false: no delete protect.
NOTE:
deletion_protection
is valid only when attributeinstance_charge_type
is set toPostpaid
orServerless
, supported engine type:MySQL
,PostgreSQL
,MariaDB
,MSSQL
.- Direction string
- The instance configuration type. Valid values: ["Up", "Down", "TempUpgrade", "Serverless"]
- Effective
Time string - The method to update the engine version and change. Default value: Immediate. Valid values:
- Immediate: The change immediately takes effect.
- MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.
- Encryption
Key string - The key id of the KMS. Used for encrypting a disk if not null. Only for PostgreSQL, MySQL and SQLServer.
- Engine string
Database type. Value options: MySQL, SQLServer, PostgreSQL, MariaDB.
NOTE: When the 'engine_version' changes, it can be used as the target database version for the large version upgrade of RDS for MySQL instance.
- Engine
Version string - Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- MySQL: [ 5.5、5.6、5.7、8.0 ]
- SQLServer: [ 2008r2、08r2_ent_ha、2012、2012_ent_ha、2012_std_ha、2012_web、2014_std_ha、2016_ent_ha、2016_std_ha、2016_web、2017_std_ha、2017_ent、2019_std_ha、2019_ent ]
- PostgreSQL: [ 10.0、11.0、12.0、13.0、14.0、15.0 ]
- MariaDB: [ 10.3 ]
- Serverless
- MySQL: [ 5.7、8.0 ]
- SQLServer: [ 2016_std_sl、2017_std_sl、2019_std_sl ]
- PostgreSQL: [ 14.0 ]
- MariaDB does not support creating serverless instances.
- Force string
- Specifies whether to enable forcible switching. Valid values:
- Yes
- No
- Force
Restart bool - Set it to true to make some parameter efficient when modifying them. Default to false.
- Fresh
White stringList Readins - The read-only instances to which you want to synchronize the IP address whitelist.
- If the instance is attached with a read-only instance, you can use this parameter to synchronize the IP address whitelist to the read-only instance. If the instance is attached with multiple read-only instances, the read-only instances must be separated by commas (,).
- If the instance is not attached with a read-only instance, this parameter is empty.
- Ha
Config string The primary/secondary switchover mode of the instance. Default value: Auto. Valid values:
- Auto: The system automatically switches over services from the primary to secondary instances in the event of a fault.
- Manual: You must manually switch over services from the primary to secondary instances in the event of a fault.
NOTE: If you set this parameter to Manual, you must specify the ManualHATime parameter.
- Instance
Charge stringType - Valid values are
Prepaid
,Postpaid
,Serverless
, Default toPostpaid
. Currently, the resource only supports PostPaid to PrePaid. For more information, see Overview. - 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 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.
- To create a serverless instance, please pass the following values:
- MySQL basic: mysql.n2.serverless.1c
- MySQL high availability: mysql.n2.serverless.2c
- SQLServer high availability: mssql.mem2.serverless.s2
- PostgreSQL basic: pg.n2.serverless.1c
NOTE: When
storage_auto_scale="Enable"
, do not performinstance_storage
check. whenstorage_auto_scale="Disable"
, if the instance itselfinstance_storage
has changed. You need to manually revise theinstance_storage
in the template value. Whenpayment_type="Serverless"
and when modifying, do not performinstance_storage
check. Otherwise, check.- Maintain
Time string - Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
- Manual
Ha stringTime The time after when you want to enable automatic primary/secondary switchover. At most, you can set this parameter to 23:59:59 seven days later. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
NOTE: This parameter only takes effect when the HAConfig parameter is set to Manual.
- Modify
Mode string - The method that is used to modify the IP address whitelist. Default value: Cover. Valid values:
- Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist.
- Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist.
- Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block.
- Monitoring
Period int - The monitoring frequency in seconds. Valid values are 5, 10, 60, 300. Defaults to 300.
- Node
Id string - The globally unique identifier (GUID) of the secondary instance. You can call the DescribeDBInstanceHAConfig operation to query the GUID of the secondary instance.
- Parameters
List<Pulumi.
Ali Cloud. Rds. Inputs. 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 . See
parameters
below. - 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.NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- Pg
Hba List<Pulumi.Confs Ali Cloud. Rds. Inputs. Instance Pg Hba Conf> - The configuration of AD domain . See
pg_hba_conf
below. - Port string
- The private port of the database service. If you want to update public port, please use resource alicloud.rds.Connection port.
- Private
Ip stringAddress - The private IP address of the instance. The private IP address must be within the Classless Inter-Domain Routing (CIDR) block of the vSwitch that is specified by the VSwitchId parameter.
- Released
Keep stringPolicy The policy based on which ApsaraDB RDS retains archived backup files after the instance is released. Valid values:
- None: No archived backup files are retained.
- Lastest: Only the last archived backup file is retained.
- All: All the archived backup files are retained.
NOTE: This parameter is supported only when the instance runs the MySQL database engine.
- Replication
Acl string - The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- Resource
Group stringId - The ID of resource group which the DB instance belongs.
- Role
Arn string The Alibaba Cloud Resource Name (ARN) of the RAM role.
NOTE: This parameter is not required when you create an instance that runs MySQL, PostgreSQL, or SQL Server. You need to only specify the RoleARN parameter to create an instance that has cloud disk encryption enabled by using the obtained key ID. You can configure RAM authorization to require a RAM user to enable cloud disk encryption when the RAM user is used to create an instance. If cloud disk encryption is disabled during the instance creation, the creation operation fails. To complete the configuration, you can attach the following policy to the RAM user: {"Version":"1","Statement":[{"Effect":"Deny","Action":"rds:CreateDBInstance","Resource":"*","Condition":{"StringEquals":{"rds:DiskEncryptionRequired":"false"}}}]}
- Security
Group stringId - It has been deprecated from 1.69.0 and use
security_group_ids
instead. - Security
Group List<string>Ids - , Available since 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
. supportsafety
switch to high security access mode. - Security
Ip stringType - The type of IP address in the IP address whitelist.
- 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]).
- Server
Cert string - The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- Server
Key string - The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- Serverless
Configs List<Pulumi.Ali Cloud. Rds. Inputs. Instance Serverless Config> - The settings of the serverless instance. This parameter is required when you create a serverless instance. This parameter takes effect only when you create an ApsaraDB RDS for Serverless instance. See
serverless_config
below. - 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
. - Ssl
Action string Actions performed on SSL functions. Valid values:
Open
: turn on SSL encryption;Close
: turn off SSL encryption;Update
: update SSL certificate. See more engine and engineVersion limitation.NOTE: The attribute
ssl_action
will be ignored when settinginstance_charge_type = "Serverless"
for SQLServer, PostgreSQL or MariaDB.- Ssl
Connection stringString - The internal or public endpoint for which the server certificate needs to be created or updated.
- Ssl
Status string - Status of the SSL feature.
Yes
: SSL is turned on;No
: SSL is turned off. - Status string
- (Available since 1.204.1) The status of db instance.
- Storage
Auto stringScale Automatic storage space expansion switch. Valid values:
- Enable
- Disable
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable.
- Storage
Threshold int The threshold in percentage based on which an automatic storage expansion is triggered. If the available storage reaches the threshold, ApsaraDB RDS increases the storage capacity of the instance. Valid values: [10, 20, 30, 40, 50].
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable. The value must be greater than or equal to the total size of the current storage space of the instance.
- Storage
Upper intBound The upper limit of the total storage space for automatic expansion of the storage space, that is, automatic expansion will not cause the total storage space of the instance to exceed this value. Unit: GB. The value must be ≥0.
NOTE: Because of data backup and migration, change DB instance type and storage would cost 15~20 minutes. Please make full preparation before changing them.
- Switch
Time string The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when
target_minor_version
is changed. The time must be in UTC.NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.
- 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.
Note: From 1.63.0, the tag key and value are case sensitive. Before that, they are not case sensitive.
- Target
Minor stringVersion The minor engine version to which you want to update the instance. If you do not specify this parameter, the instance is updated to the latest minor engine version. You must specify the minor engine version in one of the following formats:
- PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
- MySQL: _. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions are supported:
- rds: The instance runs RDS Basic or High-availability Edition.
- xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition.
- xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition.
- SQLServer: . Example: 15.0.4073.23.
NOTE: For more information about minor engine versions, see Release notes of minor AliPG versions, Release notes of minor AliSQL versions, and Release notes of minor engine versions of ApsaraDB RDS for SQL Server.
- Tcp
Connection stringType - The availability check method of the instance. Valid values:
- SHORT: Alibaba Cloud uses short-lived connections to check the availability of the instance.
- LONG: Alibaba Cloud uses persistent connections to check the availability of the instance.
- Tde
Status string - The TDE(Transparent Data Encryption) status. After TDE is turned on, it cannot be turned off. See more engine and engineVersion limitation.
- Upgrade
Db boolInstance Kernel Version - Whether to upgrade a minor version of the kernel. Valid values:
- true: upgrade
- false: not to upgrade
- Upgrade
Time string - The method to update the minor engine version. Default value: Immediate. It is valid only when
target_minor_version
is changed. Valid values:- Immediate: The minor engine version is immediately updated.
- MaintainTime: The minor engine version is updated during the maintenance window. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime.
- SpecifyTime: The minor engine version is updated at the point in time you specify.
- Vpc
Id string The VPC ID of the instance.
NOTE: This parameter applies only to ApsaraDB RDS for MySQL instances. For more information about Upgrade the major engine version of an ApsaraDB RDS for MySQL instance, see Upgrade the major engine version of an RDS instance in the ApsaraDB RDS console.
- Vswitch
Id string - The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
- Whitelist
Network stringType The network type of the IP address whitelist. Default value: MIX. Valid values:
- Classic: classic network in enhanced whitelist mode
- VPC: virtual private cloud (VPC) in enhanced whitelist mode
- MIX: standard whitelist mode
NOTE: In standard whitelist mode, IP addresses and CIDR blocks can be added only to the default IP address whitelist. In enhanced whitelist mode, IP addresses and CIDR blocks can be added to both IP address whitelists of the classic network type and those of the VPC network type.
- 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_id
is specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmulti
to "true" in the data sourcealicloud.getZones
. - Zone
Id stringSlave A - The region ID of the secondary instance if you create a secondary instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
- Acl string
- The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- 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.
See more details and limitation.
- Babelfish
Configs []InstanceBabelfish Config Args The configuration of an ApsaraDB RDS for PostgreSQL instance for which Babelfish is enabled. See
babelfish_config
below.NOTE: This parameter takes effect only when you create an ApsaraDB RDS for PostgreSQL instance. For more information, see Introduction to Babelfish.
- Babelfish
Port string The TDS port of the instance for which Babelfish is enabled.
NOTE: This parameter applies only to ApsaraDB RDS for PostgreSQL instances. For more information about Babelfish for ApsaraDB RDS for PostgreSQL, see Introduction to Babelfish.
- Ca
Type string - The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. Value range:
- aliyun: a cloud certificate
- custom: a custom certificate
- Category string
The RDS edition of the instance. If you want to create a serverless instance, you must use this value. Valid values:
- Basic: Basic Edition.
- HighAvailability: High-availability Edition.
- AlwaysOn: Cluster Edition.
- Finance: Enterprise Edition.
- cluster: MySQL Cluster Edition. (Available since 1.202.0)
- serverless_basic: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.200.0)
- serverless_standard: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.204.0)
- serverless_ha: RDS Serverless High-availability Edition for SQL Server. (Available since 1.204.0)
NOTE:
zone_id_slave_a
andzone_id_slave_b
can specify slave zone ids when creating the high-availability or enterprise edition instances. Meanwhile,vswitch_id
needs to pass in the corresponding vswitch id to the slave zone by order (If thevswitch_id
is not specified, the classic network version will be created). For example,zone_id
= "zone-a" andzone_id_slave_a
= "zone-c",zone_id_slave_b
= "zone-b", then thevswitch_id
must be "vsw-zone-a,vsw-zone-c,vsw-zone-b". Of course, you can also choose automatic allocation , for example,zone_id
= "zone-a" andzone_id_slave_a
= "Auto",zone_id_slave_b
= "Auto", then thevswitch_id
must be "vsw-zone-a,Auto,Auto". The list contains up to 2 slave zone ids , separated by commas.- Client
Ca stringCert - The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter.
- Client
Ca intEnabled - Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. Valid values:
- 1: enables the public key
- 0: disables the public key
- Client
Cert stringRevocation List - The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter.
- Client
Crl intEnabled - Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- 1: enables the CRL
- 0: disables the CRL
- Connection
String string - RDS database connection string.
- Connection
String stringPrefix The private connection string prefix. If you want to update public connection string prefix, please use resource alicloud.rds.Connection connection_prefix.
NOTE: The prefix must be 8 to 64 characters in length and can contain letters, digits, and hyphens (-). It cannot contain Chinese characters and special characters ~!#%^&*=+|{};:'",<>/?
- Create
Time string - (Available since 1.204.1) The creation time of db instance.
- Db
Instance stringIp Array Attribute The attribute of the IP address whitelist. By default, this parameter is empty.
NOTE: The IP address whitelists that have the hidden attribute are not displayed in the ApsaraDB RDS console. These IP address whitelists are used to access Alibaba Cloud services, such as Data Transmission Service (DTS).
- Db
Instance stringIp Array Name The name of the IP address whitelist. Default value: Default.
NOTE: A maximum of 200 IP address whitelists can be configured for each instance.
- Db
Instance stringStorage Type - The storage type of the instance. Serverless instance, only
cloud_essd
can be selected. 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).
- general_essd: general essd.
- Db
Instance stringType - (Available since 1.197.0) The type of db instance.
- Db
Is boolIgnore Case - Specifies whether table names on the instance are case-sensitive. Valid values:
true
,false
. - Db
Param stringGroup Id - Parameter template ID. Only MySQL and PostgreSQL support this parameter. If this parameter is not specified, the default parameter template is used. You can also customize a parameter template and use it here.
- Db
Time stringZone The time zone of the instance. This parameter takes effect only when you set the
Engine
parameter to MySQL or PostgreSQL.- If you set the
Engine
parameter to MySQL. - This time zone of the instance is in UTC. Valid values: -12:59 to +13:00.
- You can specify this parameter when the instance is equipped with local SSDs. For example, you can specify the time zone to Asia/Hong_Kong. For more information about time zones, see Time zones.
- If you set the
Engine
parameter to PostgreSQL. - This time zone of the instance is not in UTC. For more information about time zones, see Time zones.
- You can specify this parameter only when the instance is equipped with standard SSDs or ESSDs.
NOTE: You can specify the time zone when you create a primary instance. You cannot specify the time zone when you create a read-only instance. Read-only instances inherit the time zone of their primary instance. If you do not specify this parameter, the system assigns the default time zone of the region where the instance resides.
- If you set the
- Deletion
Protection bool The switch of delete protection. Valid values:
- true: delete protect.
- false: no delete protect.
NOTE:
deletion_protection
is valid only when attributeinstance_charge_type
is set toPostpaid
orServerless
, supported engine type:MySQL
,PostgreSQL
,MariaDB
,MSSQL
.- Direction string
- The instance configuration type. Valid values: ["Up", "Down", "TempUpgrade", "Serverless"]
- Effective
Time string - The method to update the engine version and change. Default value: Immediate. Valid values:
- Immediate: The change immediately takes effect.
- MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.
- Encryption
Key string - The key id of the KMS. Used for encrypting a disk if not null. Only for PostgreSQL, MySQL and SQLServer.
- Engine string
Database type. Value options: MySQL, SQLServer, PostgreSQL, MariaDB.
NOTE: When the 'engine_version' changes, it can be used as the target database version for the large version upgrade of RDS for MySQL instance.
- Engine
Version string - Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- MySQL: [ 5.5、5.6、5.7、8.0 ]
- SQLServer: [ 2008r2、08r2_ent_ha、2012、2012_ent_ha、2012_std_ha、2012_web、2014_std_ha、2016_ent_ha、2016_std_ha、2016_web、2017_std_ha、2017_ent、2019_std_ha、2019_ent ]
- PostgreSQL: [ 10.0、11.0、12.0、13.0、14.0、15.0 ]
- MariaDB: [ 10.3 ]
- Serverless
- MySQL: [ 5.7、8.0 ]
- SQLServer: [ 2016_std_sl、2017_std_sl、2019_std_sl ]
- PostgreSQL: [ 14.0 ]
- MariaDB does not support creating serverless instances.
- Force string
- Specifies whether to enable forcible switching. Valid values:
- Yes
- No
- Force
Restart bool - Set it to true to make some parameter efficient when modifying them. Default to false.
- Fresh
White stringList Readins - The read-only instances to which you want to synchronize the IP address whitelist.
- If the instance is attached with a read-only instance, you can use this parameter to synchronize the IP address whitelist to the read-only instance. If the instance is attached with multiple read-only instances, the read-only instances must be separated by commas (,).
- If the instance is not attached with a read-only instance, this parameter is empty.
- Ha
Config string The primary/secondary switchover mode of the instance. Default value: Auto. Valid values:
- Auto: The system automatically switches over services from the primary to secondary instances in the event of a fault.
- Manual: You must manually switch over services from the primary to secondary instances in the event of a fault.
NOTE: If you set this parameter to Manual, you must specify the ManualHATime parameter.
- Instance
Charge stringType - Valid values are
Prepaid
,Postpaid
,Serverless
, Default toPostpaid
. Currently, the resource only supports PostPaid to PrePaid. For more information, see Overview. - 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 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.
- To create a serverless instance, please pass the following values:
- MySQL basic: mysql.n2.serverless.1c
- MySQL high availability: mysql.n2.serverless.2c
- SQLServer high availability: mssql.mem2.serverless.s2
- PostgreSQL basic: pg.n2.serverless.1c
NOTE: When
storage_auto_scale="Enable"
, do not performinstance_storage
check. whenstorage_auto_scale="Disable"
, if the instance itselfinstance_storage
has changed. You need to manually revise theinstance_storage
in the template value. Whenpayment_type="Serverless"
and when modifying, do not performinstance_storage
check. Otherwise, check.- Maintain
Time string - Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
- Manual
Ha stringTime The time after when you want to enable automatic primary/secondary switchover. At most, you can set this parameter to 23:59:59 seven days later. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
NOTE: This parameter only takes effect when the HAConfig parameter is set to Manual.
- Modify
Mode string - The method that is used to modify the IP address whitelist. Default value: Cover. Valid values:
- Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist.
- Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist.
- Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block.
- Monitoring
Period int - The monitoring frequency in seconds. Valid values are 5, 10, 60, 300. Defaults to 300.
- Node
Id string - The globally unique identifier (GUID) of the secondary instance. You can call the DescribeDBInstanceHAConfig operation to query the GUID of the secondary instance.
- Parameters
[]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 . See
parameters
below. - 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.NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- Pg
Hba []InstanceConfs Pg Hba Conf Args - The configuration of AD domain . See
pg_hba_conf
below. - Port string
- The private port of the database service. If you want to update public port, please use resource alicloud.rds.Connection port.
- Private
Ip stringAddress - The private IP address of the instance. The private IP address must be within the Classless Inter-Domain Routing (CIDR) block of the vSwitch that is specified by the VSwitchId parameter.
- Released
Keep stringPolicy The policy based on which ApsaraDB RDS retains archived backup files after the instance is released. Valid values:
- None: No archived backup files are retained.
- Lastest: Only the last archived backup file is retained.
- All: All the archived backup files are retained.
NOTE: This parameter is supported only when the instance runs the MySQL database engine.
- Replication
Acl string - The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- Resource
Group stringId - The ID of resource group which the DB instance belongs.
- Role
Arn string The Alibaba Cloud Resource Name (ARN) of the RAM role.
NOTE: This parameter is not required when you create an instance that runs MySQL, PostgreSQL, or SQL Server. You need to only specify the RoleARN parameter to create an instance that has cloud disk encryption enabled by using the obtained key ID. You can configure RAM authorization to require a RAM user to enable cloud disk encryption when the RAM user is used to create an instance. If cloud disk encryption is disabled during the instance creation, the creation operation fails. To complete the configuration, you can attach the following policy to the RAM user: {"Version":"1","Statement":[{"Effect":"Deny","Action":"rds:CreateDBInstance","Resource":"*","Condition":{"StringEquals":{"rds:DiskEncryptionRequired":"false"}}}]}
- Security
Group stringId - It has been deprecated from 1.69.0 and use
security_group_ids
instead. - Security
Group []stringIds - , Available since 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
. supportsafety
switch to high security access mode. - Security
Ip stringType - The type of IP address in the IP address whitelist.
- 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]).
- Server
Cert string - The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- Server
Key string - The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- Serverless
Configs []InstanceServerless Config Args - The settings of the serverless instance. This parameter is required when you create a serverless instance. This parameter takes effect only when you create an ApsaraDB RDS for Serverless instance. See
serverless_config
below. - 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
. - Ssl
Action string Actions performed on SSL functions. Valid values:
Open
: turn on SSL encryption;Close
: turn off SSL encryption;Update
: update SSL certificate. See more engine and engineVersion limitation.NOTE: The attribute
ssl_action
will be ignored when settinginstance_charge_type = "Serverless"
for SQLServer, PostgreSQL or MariaDB.- Ssl
Connection stringString - The internal or public endpoint for which the server certificate needs to be created or updated.
- Ssl
Status string - Status of the SSL feature.
Yes
: SSL is turned on;No
: SSL is turned off. - Status string
- (Available since 1.204.1) The status of db instance.
- Storage
Auto stringScale Automatic storage space expansion switch. Valid values:
- Enable
- Disable
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable.
- Storage
Threshold int The threshold in percentage based on which an automatic storage expansion is triggered. If the available storage reaches the threshold, ApsaraDB RDS increases the storage capacity of the instance. Valid values: [10, 20, 30, 40, 50].
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable. The value must be greater than or equal to the total size of the current storage space of the instance.
- Storage
Upper intBound The upper limit of the total storage space for automatic expansion of the storage space, that is, automatic expansion will not cause the total storage space of the instance to exceed this value. Unit: GB. The value must be ≥0.
NOTE: Because of data backup and migration, change DB instance type and storage would cost 15~20 minutes. Please make full preparation before changing them.
- Switch
Time string The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when
target_minor_version
is changed. The time must be in UTC.NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.
- 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.
Note: From 1.63.0, the tag key and value are case sensitive. Before that, they are not case sensitive.
- Target
Minor stringVersion The minor engine version to which you want to update the instance. If you do not specify this parameter, the instance is updated to the latest minor engine version. You must specify the minor engine version in one of the following formats:
- PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
- MySQL: _. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions are supported:
- rds: The instance runs RDS Basic or High-availability Edition.
- xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition.
- xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition.
- SQLServer: . Example: 15.0.4073.23.
NOTE: For more information about minor engine versions, see Release notes of minor AliPG versions, Release notes of minor AliSQL versions, and Release notes of minor engine versions of ApsaraDB RDS for SQL Server.
- Tcp
Connection stringType - The availability check method of the instance. Valid values:
- SHORT: Alibaba Cloud uses short-lived connections to check the availability of the instance.
- LONG: Alibaba Cloud uses persistent connections to check the availability of the instance.
- Tde
Status string - The TDE(Transparent Data Encryption) status. After TDE is turned on, it cannot be turned off. See more engine and engineVersion limitation.
- Upgrade
Db boolInstance Kernel Version - Whether to upgrade a minor version of the kernel. Valid values:
- true: upgrade
- false: not to upgrade
- Upgrade
Time string - The method to update the minor engine version. Default value: Immediate. It is valid only when
target_minor_version
is changed. Valid values:- Immediate: The minor engine version is immediately updated.
- MaintainTime: The minor engine version is updated during the maintenance window. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime.
- SpecifyTime: The minor engine version is updated at the point in time you specify.
- Vpc
Id string The VPC ID of the instance.
NOTE: This parameter applies only to ApsaraDB RDS for MySQL instances. For more information about Upgrade the major engine version of an ApsaraDB RDS for MySQL instance, see Upgrade the major engine version of an RDS instance in the ApsaraDB RDS console.
- Vswitch
Id string - The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
- Whitelist
Network stringType The network type of the IP address whitelist. Default value: MIX. Valid values:
- Classic: classic network in enhanced whitelist mode
- VPC: virtual private cloud (VPC) in enhanced whitelist mode
- MIX: standard whitelist mode
NOTE: In standard whitelist mode, IP addresses and CIDR blocks can be added only to the default IP address whitelist. In enhanced whitelist mode, IP addresses and CIDR blocks can be added to both IP address whitelists of the classic network type and those of the VPC network type.
- 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_id
is specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmulti
to "true" in the data sourcealicloud.getZones
. - Zone
Id stringSlave A - The region ID of the secondary instance if you create a secondary instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
- acl String
- The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- 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 IntegerPeriod - 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.
See more details and limitation.
- babelfish
Configs List<InstanceBabelfish Config> The configuration of an ApsaraDB RDS for PostgreSQL instance for which Babelfish is enabled. See
babelfish_config
below.NOTE: This parameter takes effect only when you create an ApsaraDB RDS for PostgreSQL instance. For more information, see Introduction to Babelfish.
- babelfish
Port String The TDS port of the instance for which Babelfish is enabled.
NOTE: This parameter applies only to ApsaraDB RDS for PostgreSQL instances. For more information about Babelfish for ApsaraDB RDS for PostgreSQL, see Introduction to Babelfish.
- ca
Type String - The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. Value range:
- aliyun: a cloud certificate
- custom: a custom certificate
- category String
The RDS edition of the instance. If you want to create a serverless instance, you must use this value. Valid values:
- Basic: Basic Edition.
- HighAvailability: High-availability Edition.
- AlwaysOn: Cluster Edition.
- Finance: Enterprise Edition.
- cluster: MySQL Cluster Edition. (Available since 1.202.0)
- serverless_basic: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.200.0)
- serverless_standard: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.204.0)
- serverless_ha: RDS Serverless High-availability Edition for SQL Server. (Available since 1.204.0)
NOTE:
zone_id_slave_a
andzone_id_slave_b
can specify slave zone ids when creating the high-availability or enterprise edition instances. Meanwhile,vswitch_id
needs to pass in the corresponding vswitch id to the slave zone by order (If thevswitch_id
is not specified, the classic network version will be created). For example,zone_id
= "zone-a" andzone_id_slave_a
= "zone-c",zone_id_slave_b
= "zone-b", then thevswitch_id
must be "vsw-zone-a,vsw-zone-c,vsw-zone-b". Of course, you can also choose automatic allocation , for example,zone_id
= "zone-a" andzone_id_slave_a
= "Auto",zone_id_slave_b
= "Auto", then thevswitch_id
must be "vsw-zone-a,Auto,Auto". The list contains up to 2 slave zone ids , separated by commas.- client
Ca StringCert - The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter.
- client
Ca IntegerEnabled - Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. Valid values:
- 1: enables the public key
- 0: disables the public key
- client
Cert StringRevocation List - The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter.
- client
Crl IntegerEnabled - Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- 1: enables the CRL
- 0: disables the CRL
- connection
String String - RDS database connection string.
- connection
String StringPrefix The private connection string prefix. If you want to update public connection string prefix, please use resource alicloud.rds.Connection connection_prefix.
NOTE: The prefix must be 8 to 64 characters in length and can contain letters, digits, and hyphens (-). It cannot contain Chinese characters and special characters ~!#%^&*=+|{};:'",<>/?
- create
Time String - (Available since 1.204.1) The creation time of db instance.
- db
Instance StringIp Array Attribute The attribute of the IP address whitelist. By default, this parameter is empty.
NOTE: The IP address whitelists that have the hidden attribute are not displayed in the ApsaraDB RDS console. These IP address whitelists are used to access Alibaba Cloud services, such as Data Transmission Service (DTS).
- db
Instance StringIp Array Name The name of the IP address whitelist. Default value: Default.
NOTE: A maximum of 200 IP address whitelists can be configured for each instance.
- db
Instance StringStorage Type - The storage type of the instance. Serverless instance, only
cloud_essd
can be selected. 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).
- general_essd: general essd.
- db
Instance StringType - (Available since 1.197.0) The type of db instance.
- db
Is BooleanIgnore Case - Specifies whether table names on the instance are case-sensitive. Valid values:
true
,false
. - db
Param StringGroup Id - Parameter template ID. Only MySQL and PostgreSQL support this parameter. If this parameter is not specified, the default parameter template is used. You can also customize a parameter template and use it here.
- db
Time StringZone The time zone of the instance. This parameter takes effect only when you set the
Engine
parameter to MySQL or PostgreSQL.- If you set the
Engine
parameter to MySQL. - This time zone of the instance is in UTC. Valid values: -12:59 to +13:00.
- You can specify this parameter when the instance is equipped with local SSDs. For example, you can specify the time zone to Asia/Hong_Kong. For more information about time zones, see Time zones.
- If you set the
Engine
parameter to PostgreSQL. - This time zone of the instance is not in UTC. For more information about time zones, see Time zones.
- You can specify this parameter only when the instance is equipped with standard SSDs or ESSDs.
NOTE: You can specify the time zone when you create a primary instance. You cannot specify the time zone when you create a read-only instance. Read-only instances inherit the time zone of their primary instance. If you do not specify this parameter, the system assigns the default time zone of the region where the instance resides.
- If you set the
- deletion
Protection Boolean The switch of delete protection. Valid values:
- true: delete protect.
- false: no delete protect.
NOTE:
deletion_protection
is valid only when attributeinstance_charge_type
is set toPostpaid
orServerless
, supported engine type:MySQL
,PostgreSQL
,MariaDB
,MSSQL
.- direction String
- The instance configuration type. Valid values: ["Up", "Down", "TempUpgrade", "Serverless"]
- effective
Time String - The method to update the engine version and change. Default value: Immediate. Valid values:
- Immediate: The change immediately takes effect.
- MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.
- encryption
Key String - The key id of the KMS. Used for encrypting a disk if not null. Only for PostgreSQL, MySQL and SQLServer.
- engine String
Database type. Value options: MySQL, SQLServer, PostgreSQL, MariaDB.
NOTE: When the 'engine_version' changes, it can be used as the target database version for the large version upgrade of RDS for MySQL instance.
- engine
Version String - Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- MySQL: [ 5.5、5.6、5.7、8.0 ]
- SQLServer: [ 2008r2、08r2_ent_ha、2012、2012_ent_ha、2012_std_ha、2012_web、2014_std_ha、2016_ent_ha、2016_std_ha、2016_web、2017_std_ha、2017_ent、2019_std_ha、2019_ent ]
- PostgreSQL: [ 10.0、11.0、12.0、13.0、14.0、15.0 ]
- MariaDB: [ 10.3 ]
- Serverless
- MySQL: [ 5.7、8.0 ]
- SQLServer: [ 2016_std_sl、2017_std_sl、2019_std_sl ]
- PostgreSQL: [ 14.0 ]
- MariaDB does not support creating serverless instances.
- force String
- Specifies whether to enable forcible switching. Valid values:
- Yes
- No
- force
Restart Boolean - Set it to true to make some parameter efficient when modifying them. Default to false.
- fresh
White StringList Readins - The read-only instances to which you want to synchronize the IP address whitelist.
- If the instance is attached with a read-only instance, you can use this parameter to synchronize the IP address whitelist to the read-only instance. If the instance is attached with multiple read-only instances, the read-only instances must be separated by commas (,).
- If the instance is not attached with a read-only instance, this parameter is empty.
- ha
Config String The primary/secondary switchover mode of the instance. Default value: Auto. Valid values:
- Auto: The system automatically switches over services from the primary to secondary instances in the event of a fault.
- Manual: You must manually switch over services from the primary to secondary instances in the event of a fault.
NOTE: If you set this parameter to Manual, you must specify the ManualHATime parameter.
- instance
Charge StringType - Valid values are
Prepaid
,Postpaid
,Serverless
, Default toPostpaid
. Currently, the resource only supports PostPaid to PrePaid. For more information, see Overview. - instance
Name String - The name of DB instance. It a string of 2 to 256 characters.
- instance
Storage Integer - User-defined DB instance storage space. Value range:
- [5, 2000] for MySQL/PostgreSQL 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.
- To create a serverless instance, please pass the following values:
- MySQL basic: mysql.n2.serverless.1c
- MySQL high availability: mysql.n2.serverless.2c
- SQLServer high availability: mssql.mem2.serverless.s2
- PostgreSQL basic: pg.n2.serverless.1c
NOTE: When
storage_auto_scale="Enable"
, do not performinstance_storage
check. whenstorage_auto_scale="Disable"
, if the instance itselfinstance_storage
has changed. You need to manually revise theinstance_storage
in the template value. Whenpayment_type="Serverless"
and when modifying, do not performinstance_storage
check. Otherwise, check.- maintain
Time String - Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
- manual
Ha StringTime The time after when you want to enable automatic primary/secondary switchover. At most, you can set this parameter to 23:59:59 seven days later. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
NOTE: This parameter only takes effect when the HAConfig parameter is set to Manual.
- modify
Mode String - The method that is used to modify the IP address whitelist. Default value: Cover. Valid values:
- Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist.
- Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist.
- Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block.
- monitoring
Period Integer - The monitoring frequency in seconds. Valid values are 5, 10, 60, 300. Defaults to 300.
- node
Id String - The globally unique identifier (GUID) of the secondary instance. You can call the DescribeDBInstanceHAConfig operation to query the GUID of the secondary instance.
- 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 . See
parameters
below. - period Integer
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.NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- pg
Hba List<InstanceConfs Pg Hba Conf> - The configuration of AD domain . See
pg_hba_conf
below. - port String
- The private port of the database service. If you want to update public port, please use resource alicloud.rds.Connection port.
- private
Ip StringAddress - The private IP address of the instance. The private IP address must be within the Classless Inter-Domain Routing (CIDR) block of the vSwitch that is specified by the VSwitchId parameter.
- released
Keep StringPolicy The policy based on which ApsaraDB RDS retains archived backup files after the instance is released. Valid values:
- None: No archived backup files are retained.
- Lastest: Only the last archived backup file is retained.
- All: All the archived backup files are retained.
NOTE: This parameter is supported only when the instance runs the MySQL database engine.
- replication
Acl String - The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- resource
Group StringId - The ID of resource group which the DB instance belongs.
- role
Arn String The Alibaba Cloud Resource Name (ARN) of the RAM role.
NOTE: This parameter is not required when you create an instance that runs MySQL, PostgreSQL, or SQL Server. You need to only specify the RoleARN parameter to create an instance that has cloud disk encryption enabled by using the obtained key ID. You can configure RAM authorization to require a RAM user to enable cloud disk encryption when the RAM user is used to create an instance. If cloud disk encryption is disabled during the instance creation, the creation operation fails. To complete the configuration, you can attach the following policy to the RAM user: {"Version":"1","Statement":[{"Effect":"Deny","Action":"rds:CreateDBInstance","Resource":"*","Condition":{"StringEquals":{"rds:DiskEncryptionRequired":"false"}}}]}
- security
Group StringId - It has been deprecated from 1.69.0 and use
security_group_ids
instead. - security
Group List<String>Ids - , Available since 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
. supportsafety
switch to high security access mode. - security
Ip StringType - The type of IP address in the IP address whitelist.
- 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]).
- server
Cert String - The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- server
Key String - The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- serverless
Configs List<InstanceServerless Config> - The settings of the serverless instance. This parameter is required when you create a serverless instance. This parameter takes effect only when you create an ApsaraDB RDS for Serverless instance. See
serverless_config
below. - sql
Collector IntegerConfig 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
. - ssl
Action String Actions performed on SSL functions. Valid values:
Open
: turn on SSL encryption;Close
: turn off SSL encryption;Update
: update SSL certificate. See more engine and engineVersion limitation.NOTE: The attribute
ssl_action
will be ignored when settinginstance_charge_type = "Serverless"
for SQLServer, PostgreSQL or MariaDB.- ssl
Connection StringString - The internal or public endpoint for which the server certificate needs to be created or updated.
- ssl
Status String - Status of the SSL feature.
Yes
: SSL is turned on;No
: SSL is turned off. - status String
- (Available since 1.204.1) The status of db instance.
- storage
Auto StringScale Automatic storage space expansion switch. Valid values:
- Enable
- Disable
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable.
- storage
Threshold Integer The threshold in percentage based on which an automatic storage expansion is triggered. If the available storage reaches the threshold, ApsaraDB RDS increases the storage capacity of the instance. Valid values: [10, 20, 30, 40, 50].
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable. The value must be greater than or equal to the total size of the current storage space of the instance.
- storage
Upper IntegerBound The upper limit of the total storage space for automatic expansion of the storage space, that is, automatic expansion will not cause the total storage space of the instance to exceed this value. Unit: GB. The value must be ≥0.
NOTE: Because of data backup and migration, change DB instance type and storage would cost 15~20 minutes. Please make full preparation before changing them.
- switch
Time String The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when
target_minor_version
is changed. The time must be in UTC.NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.
- Map<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.
Note: From 1.63.0, the tag key and value are case sensitive. Before that, they are not case sensitive.
- target
Minor StringVersion The minor engine version to which you want to update the instance. If you do not specify this parameter, the instance is updated to the latest minor engine version. You must specify the minor engine version in one of the following formats:
- PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
- MySQL: _. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions are supported:
- rds: The instance runs RDS Basic or High-availability Edition.
- xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition.
- xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition.
- SQLServer: . Example: 15.0.4073.23.
NOTE: For more information about minor engine versions, see Release notes of minor AliPG versions, Release notes of minor AliSQL versions, and Release notes of minor engine versions of ApsaraDB RDS for SQL Server.
- tcp
Connection StringType - The availability check method of the instance. Valid values:
- SHORT: Alibaba Cloud uses short-lived connections to check the availability of the instance.
- LONG: Alibaba Cloud uses persistent connections to check the availability of the instance.
- tde
Status String - The TDE(Transparent Data Encryption) status. After TDE is turned on, it cannot be turned off. See more engine and engineVersion limitation.
- upgrade
Db BooleanInstance Kernel Version - Whether to upgrade a minor version of the kernel. Valid values:
- true: upgrade
- false: not to upgrade
- upgrade
Time String - The method to update the minor engine version. Default value: Immediate. It is valid only when
target_minor_version
is changed. Valid values:- Immediate: The minor engine version is immediately updated.
- MaintainTime: The minor engine version is updated during the maintenance window. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime.
- SpecifyTime: The minor engine version is updated at the point in time you specify.
- vpc
Id String The VPC ID of the instance.
NOTE: This parameter applies only to ApsaraDB RDS for MySQL instances. For more information about Upgrade the major engine version of an ApsaraDB RDS for MySQL instance, see Upgrade the major engine version of an RDS instance in the ApsaraDB RDS console.
- vswitch
Id String - The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
- whitelist
Network StringType The network type of the IP address whitelist. Default value: MIX. Valid values:
- Classic: classic network in enhanced whitelist mode
- VPC: virtual private cloud (VPC) in enhanced whitelist mode
- MIX: standard whitelist mode
NOTE: In standard whitelist mode, IP addresses and CIDR blocks can be added only to the default IP address whitelist. In enhanced whitelist mode, IP addresses and CIDR blocks can be added to both IP address whitelists of the classic network type and those of the VPC network type.
- 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_id
is specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmulti
to "true" in the data sourcealicloud.getZones
. - zone
Id StringSlave A - The region ID of the secondary instance if you create a secondary instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
- acl string
- The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- 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.
See more details and limitation.
- babelfish
Configs InstanceBabelfish Config[] The configuration of an ApsaraDB RDS for PostgreSQL instance for which Babelfish is enabled. See
babelfish_config
below.NOTE: This parameter takes effect only when you create an ApsaraDB RDS for PostgreSQL instance. For more information, see Introduction to Babelfish.
- babelfish
Port string The TDS port of the instance for which Babelfish is enabled.
NOTE: This parameter applies only to ApsaraDB RDS for PostgreSQL instances. For more information about Babelfish for ApsaraDB RDS for PostgreSQL, see Introduction to Babelfish.
- ca
Type string - The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. Value range:
- aliyun: a cloud certificate
- custom: a custom certificate
- category string
The RDS edition of the instance. If you want to create a serverless instance, you must use this value. Valid values:
- Basic: Basic Edition.
- HighAvailability: High-availability Edition.
- AlwaysOn: Cluster Edition.
- Finance: Enterprise Edition.
- cluster: MySQL Cluster Edition. (Available since 1.202.0)
- serverless_basic: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.200.0)
- serverless_standard: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.204.0)
- serverless_ha: RDS Serverless High-availability Edition for SQL Server. (Available since 1.204.0)
NOTE:
zone_id_slave_a
andzone_id_slave_b
can specify slave zone ids when creating the high-availability or enterprise edition instances. Meanwhile,vswitch_id
needs to pass in the corresponding vswitch id to the slave zone by order (If thevswitch_id
is not specified, the classic network version will be created). For example,zone_id
= "zone-a" andzone_id_slave_a
= "zone-c",zone_id_slave_b
= "zone-b", then thevswitch_id
must be "vsw-zone-a,vsw-zone-c,vsw-zone-b". Of course, you can also choose automatic allocation , for example,zone_id
= "zone-a" andzone_id_slave_a
= "Auto",zone_id_slave_b
= "Auto", then thevswitch_id
must be "vsw-zone-a,Auto,Auto". The list contains up to 2 slave zone ids , separated by commas.- client
Ca stringCert - The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter.
- client
Ca numberEnabled - Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. Valid values:
- 1: enables the public key
- 0: disables the public key
- client
Cert stringRevocation List - The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter.
- client
Crl numberEnabled - Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- 1: enables the CRL
- 0: disables the CRL
- connection
String string - RDS database connection string.
- connection
String stringPrefix The private connection string prefix. If you want to update public connection string prefix, please use resource alicloud.rds.Connection connection_prefix.
NOTE: The prefix must be 8 to 64 characters in length and can contain letters, digits, and hyphens (-). It cannot contain Chinese characters and special characters ~!#%^&*=+|{};:'",<>/?
- create
Time string - (Available since 1.204.1) The creation time of db instance.
- db
Instance stringIp Array Attribute The attribute of the IP address whitelist. By default, this parameter is empty.
NOTE: The IP address whitelists that have the hidden attribute are not displayed in the ApsaraDB RDS console. These IP address whitelists are used to access Alibaba Cloud services, such as Data Transmission Service (DTS).
- db
Instance stringIp Array Name The name of the IP address whitelist. Default value: Default.
NOTE: A maximum of 200 IP address whitelists can be configured for each instance.
- db
Instance stringStorage Type - The storage type of the instance. Serverless instance, only
cloud_essd
can be selected. 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).
- general_essd: general essd.
- db
Instance stringType - (Available since 1.197.0) The type of db instance.
- db
Is booleanIgnore Case - Specifies whether table names on the instance are case-sensitive. Valid values:
true
,false
. - db
Param stringGroup Id - Parameter template ID. Only MySQL and PostgreSQL support this parameter. If this parameter is not specified, the default parameter template is used. You can also customize a parameter template and use it here.
- db
Time stringZone The time zone of the instance. This parameter takes effect only when you set the
Engine
parameter to MySQL or PostgreSQL.- If you set the
Engine
parameter to MySQL. - This time zone of the instance is in UTC. Valid values: -12:59 to +13:00.
- You can specify this parameter when the instance is equipped with local SSDs. For example, you can specify the time zone to Asia/Hong_Kong. For more information about time zones, see Time zones.
- If you set the
Engine
parameter to PostgreSQL. - This time zone of the instance is not in UTC. For more information about time zones, see Time zones.
- You can specify this parameter only when the instance is equipped with standard SSDs or ESSDs.
NOTE: You can specify the time zone when you create a primary instance. You cannot specify the time zone when you create a read-only instance. Read-only instances inherit the time zone of their primary instance. If you do not specify this parameter, the system assigns the default time zone of the region where the instance resides.
- If you set the
- deletion
Protection boolean The switch of delete protection. Valid values:
- true: delete protect.
- false: no delete protect.
NOTE:
deletion_protection
is valid only when attributeinstance_charge_type
is set toPostpaid
orServerless
, supported engine type:MySQL
,PostgreSQL
,MariaDB
,MSSQL
.- direction string
- The instance configuration type. Valid values: ["Up", "Down", "TempUpgrade", "Serverless"]
- effective
Time string - The method to update the engine version and change. Default value: Immediate. Valid values:
- Immediate: The change immediately takes effect.
- MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.
- encryption
Key string - The key id of the KMS. Used for encrypting a disk if not null. Only for PostgreSQL, MySQL and SQLServer.
- engine string
Database type. Value options: MySQL, SQLServer, PostgreSQL, MariaDB.
NOTE: When the 'engine_version' changes, it can be used as the target database version for the large version upgrade of RDS for MySQL instance.
- engine
Version string - Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- MySQL: [ 5.5、5.6、5.7、8.0 ]
- SQLServer: [ 2008r2、08r2_ent_ha、2012、2012_ent_ha、2012_std_ha、2012_web、2014_std_ha、2016_ent_ha、2016_std_ha、2016_web、2017_std_ha、2017_ent、2019_std_ha、2019_ent ]
- PostgreSQL: [ 10.0、11.0、12.0、13.0、14.0、15.0 ]
- MariaDB: [ 10.3 ]
- Serverless
- MySQL: [ 5.7、8.0 ]
- SQLServer: [ 2016_std_sl、2017_std_sl、2019_std_sl ]
- PostgreSQL: [ 14.0 ]
- MariaDB does not support creating serverless instances.
- force string
- Specifies whether to enable forcible switching. Valid values:
- Yes
- No
- force
Restart boolean - Set it to true to make some parameter efficient when modifying them. Default to false.
- fresh
White stringList Readins - The read-only instances to which you want to synchronize the IP address whitelist.
- If the instance is attached with a read-only instance, you can use this parameter to synchronize the IP address whitelist to the read-only instance. If the instance is attached with multiple read-only instances, the read-only instances must be separated by commas (,).
- If the instance is not attached with a read-only instance, this parameter is empty.
- ha
Config string The primary/secondary switchover mode of the instance. Default value: Auto. Valid values:
- Auto: The system automatically switches over services from the primary to secondary instances in the event of a fault.
- Manual: You must manually switch over services from the primary to secondary instances in the event of a fault.
NOTE: If you set this parameter to Manual, you must specify the ManualHATime parameter.
- instance
Charge stringType - Valid values are
Prepaid
,Postpaid
,Serverless
, Default toPostpaid
. Currently, the resource only supports PostPaid to PrePaid. For more information, see Overview. - 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 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.
- To create a serverless instance, please pass the following values:
- MySQL basic: mysql.n2.serverless.1c
- MySQL high availability: mysql.n2.serverless.2c
- SQLServer high availability: mssql.mem2.serverless.s2
- PostgreSQL basic: pg.n2.serverless.1c
NOTE: When
storage_auto_scale="Enable"
, do not performinstance_storage
check. whenstorage_auto_scale="Disable"
, if the instance itselfinstance_storage
has changed. You need to manually revise theinstance_storage
in the template value. Whenpayment_type="Serverless"
and when modifying, do not performinstance_storage
check. Otherwise, check.- maintain
Time string - Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
- manual
Ha stringTime The time after when you want to enable automatic primary/secondary switchover. At most, you can set this parameter to 23:59:59 seven days later. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
NOTE: This parameter only takes effect when the HAConfig parameter is set to Manual.
- modify
Mode string - The method that is used to modify the IP address whitelist. Default value: Cover. Valid values:
- Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist.
- Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist.
- Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block.
- monitoring
Period number - The monitoring frequency in seconds. Valid values are 5, 10, 60, 300. Defaults to 300.
- node
Id string - The globally unique identifier (GUID) of the secondary instance. You can call the DescribeDBInstanceHAConfig operation to query the GUID of the secondary instance.
- 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 . See
parameters
below. - 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.NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- pg
Hba InstanceConfs Pg Hba Conf[] - The configuration of AD domain . See
pg_hba_conf
below. - port string
- The private port of the database service. If you want to update public port, please use resource alicloud.rds.Connection port.
- private
Ip stringAddress - The private IP address of the instance. The private IP address must be within the Classless Inter-Domain Routing (CIDR) block of the vSwitch that is specified by the VSwitchId parameter.
- released
Keep stringPolicy The policy based on which ApsaraDB RDS retains archived backup files after the instance is released. Valid values:
- None: No archived backup files are retained.
- Lastest: Only the last archived backup file is retained.
- All: All the archived backup files are retained.
NOTE: This parameter is supported only when the instance runs the MySQL database engine.
- replication
Acl string - The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- resource
Group stringId - The ID of resource group which the DB instance belongs.
- role
Arn string The Alibaba Cloud Resource Name (ARN) of the RAM role.
NOTE: This parameter is not required when you create an instance that runs MySQL, PostgreSQL, or SQL Server. You need to only specify the RoleARN parameter to create an instance that has cloud disk encryption enabled by using the obtained key ID. You can configure RAM authorization to require a RAM user to enable cloud disk encryption when the RAM user is used to create an instance. If cloud disk encryption is disabled during the instance creation, the creation operation fails. To complete the configuration, you can attach the following policy to the RAM user: {"Version":"1","Statement":[{"Effect":"Deny","Action":"rds:CreateDBInstance","Resource":"*","Condition":{"StringEquals":{"rds:DiskEncryptionRequired":"false"}}}]}
- security
Group stringId - It has been deprecated from 1.69.0 and use
security_group_ids
instead. - security
Group string[]Ids - , Available since 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
. supportsafety
switch to high security access mode. - security
Ip stringType - The type of IP address in the IP address whitelist.
- 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]).
- server
Cert string - The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- server
Key string - The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- serverless
Configs InstanceServerless Config[] - The settings of the serverless instance. This parameter is required when you create a serverless instance. This parameter takes effect only when you create an ApsaraDB RDS for Serverless instance. See
serverless_config
below. - 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
. - ssl
Action string Actions performed on SSL functions. Valid values:
Open
: turn on SSL encryption;Close
: turn off SSL encryption;Update
: update SSL certificate. See more engine and engineVersion limitation.NOTE: The attribute
ssl_action
will be ignored when settinginstance_charge_type = "Serverless"
for SQLServer, PostgreSQL or MariaDB.- ssl
Connection stringString - The internal or public endpoint for which the server certificate needs to be created or updated.
- ssl
Status string - Status of the SSL feature.
Yes
: SSL is turned on;No
: SSL is turned off. - status string
- (Available since 1.204.1) The status of db instance.
- storage
Auto stringScale Automatic storage space expansion switch. Valid values:
- Enable
- Disable
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable.
- storage
Threshold number The threshold in percentage based on which an automatic storage expansion is triggered. If the available storage reaches the threshold, ApsaraDB RDS increases the storage capacity of the instance. Valid values: [10, 20, 30, 40, 50].
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable. The value must be greater than or equal to the total size of the current storage space of the instance.
- storage
Upper numberBound The upper limit of the total storage space for automatic expansion of the storage space, that is, automatic expansion will not cause the total storage space of the instance to exceed this value. Unit: GB. The value must be ≥0.
NOTE: Because of data backup and migration, change DB instance type and storage would cost 15~20 minutes. Please make full preparation before changing them.
- switch
Time string The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when
target_minor_version
is changed. The time must be in UTC.NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.
- {[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.
Note: From 1.63.0, the tag key and value are case sensitive. Before that, they are not case sensitive.
- target
Minor stringVersion The minor engine version to which you want to update the instance. If you do not specify this parameter, the instance is updated to the latest minor engine version. You must specify the minor engine version in one of the following formats:
- PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
- MySQL: _. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions are supported:
- rds: The instance runs RDS Basic or High-availability Edition.
- xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition.
- xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition.
- SQLServer: . Example: 15.0.4073.23.
NOTE: For more information about minor engine versions, see Release notes of minor AliPG versions, Release notes of minor AliSQL versions, and Release notes of minor engine versions of ApsaraDB RDS for SQL Server.
- tcp
Connection stringType - The availability check method of the instance. Valid values:
- SHORT: Alibaba Cloud uses short-lived connections to check the availability of the instance.
- LONG: Alibaba Cloud uses persistent connections to check the availability of the instance.
- tde
Status string - The TDE(Transparent Data Encryption) status. After TDE is turned on, it cannot be turned off. See more engine and engineVersion limitation.
- upgrade
Db booleanInstance Kernel Version - Whether to upgrade a minor version of the kernel. Valid values:
- true: upgrade
- false: not to upgrade
- upgrade
Time string - The method to update the minor engine version. Default value: Immediate. It is valid only when
target_minor_version
is changed. Valid values:- Immediate: The minor engine version is immediately updated.
- MaintainTime: The minor engine version is updated during the maintenance window. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime.
- SpecifyTime: The minor engine version is updated at the point in time you specify.
- vpc
Id string The VPC ID of the instance.
NOTE: This parameter applies only to ApsaraDB RDS for MySQL instances. For more information about Upgrade the major engine version of an ApsaraDB RDS for MySQL instance, see Upgrade the major engine version of an RDS instance in the ApsaraDB RDS console.
- vswitch
Id string - The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
- whitelist
Network stringType The network type of the IP address whitelist. Default value: MIX. Valid values:
- Classic: classic network in enhanced whitelist mode
- VPC: virtual private cloud (VPC) in enhanced whitelist mode
- MIX: standard whitelist mode
NOTE: In standard whitelist mode, IP addresses and CIDR blocks can be added only to the default IP address whitelist. In enhanced whitelist mode, IP addresses and CIDR blocks can be added to both IP address whitelists of the classic network type and those of the VPC network type.
- 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_id
is specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmulti
to "true" in the data sourcealicloud.getZones
. - zone
Id stringSlave A - The region ID of the secondary instance if you create a secondary instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
- acl str
- The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- 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_ 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.
See more details and limitation.
- babelfish_
configs Sequence[InstanceBabelfish Config Args] The configuration of an ApsaraDB RDS for PostgreSQL instance for which Babelfish is enabled. See
babelfish_config
below.NOTE: This parameter takes effect only when you create an ApsaraDB RDS for PostgreSQL instance. For more information, see Introduction to Babelfish.
- babelfish_
port str The TDS port of the instance for which Babelfish is enabled.
NOTE: This parameter applies only to ApsaraDB RDS for PostgreSQL instances. For more information about Babelfish for ApsaraDB RDS for PostgreSQL, see Introduction to Babelfish.
- ca_
type str - The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. Value range:
- aliyun: a cloud certificate
- custom: a custom certificate
- category str
The RDS edition of the instance. If you want to create a serverless instance, you must use this value. Valid values:
- Basic: Basic Edition.
- HighAvailability: High-availability Edition.
- AlwaysOn: Cluster Edition.
- Finance: Enterprise Edition.
- cluster: MySQL Cluster Edition. (Available since 1.202.0)
- serverless_basic: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.200.0)
- serverless_standard: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.204.0)
- serverless_ha: RDS Serverless High-availability Edition for SQL Server. (Available since 1.204.0)
NOTE:
zone_id_slave_a
andzone_id_slave_b
can specify slave zone ids when creating the high-availability or enterprise edition instances. Meanwhile,vswitch_id
needs to pass in the corresponding vswitch id to the slave zone by order (If thevswitch_id
is not specified, the classic network version will be created). For example,zone_id
= "zone-a" andzone_id_slave_a
= "zone-c",zone_id_slave_b
= "zone-b", then thevswitch_id
must be "vsw-zone-a,vsw-zone-c,vsw-zone-b". Of course, you can also choose automatic allocation , for example,zone_id
= "zone-a" andzone_id_slave_a
= "Auto",zone_id_slave_b
= "Auto", then thevswitch_id
must be "vsw-zone-a,Auto,Auto". The list contains up to 2 slave zone ids , separated by commas.- client_
ca_ strcert - The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter.
- client_
ca_ intenabled - Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. Valid values:
- 1: enables the public key
- 0: disables the public key
- client_
cert_ strrevocation_ list - The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter.
- client_
crl_ intenabled - Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- 1: enables the CRL
- 0: disables the CRL
- connection_
string str - RDS database connection string.
- connection_
string_ strprefix The private connection string prefix. If you want to update public connection string prefix, please use resource alicloud.rds.Connection connection_prefix.
NOTE: The prefix must be 8 to 64 characters in length and can contain letters, digits, and hyphens (-). It cannot contain Chinese characters and special characters ~!#%^&*=+|{};:'",<>/?
- create_
time str - (Available since 1.204.1) The creation time of db instance.
- db_
instance_ strip_ array_ attribute The attribute of the IP address whitelist. By default, this parameter is empty.
NOTE: The IP address whitelists that have the hidden attribute are not displayed in the ApsaraDB RDS console. These IP address whitelists are used to access Alibaba Cloud services, such as Data Transmission Service (DTS).
- db_
instance_ strip_ array_ name The name of the IP address whitelist. Default value: Default.
NOTE: A maximum of 200 IP address whitelists can be configured for each instance.
- db_
instance_ strstorage_ type - The storage type of the instance. Serverless instance, only
cloud_essd
can be selected. 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).
- general_essd: general essd.
- db_
instance_ strtype - (Available since 1.197.0) The type of db instance.
- db_
is_ boolignore_ case - Specifies whether table names on the instance are case-sensitive. Valid values:
true
,false
. - db_
param_ strgroup_ id - Parameter template ID. Only MySQL and PostgreSQL support this parameter. If this parameter is not specified, the default parameter template is used. You can also customize a parameter template and use it here.
- db_
time_ strzone The time zone of the instance. This parameter takes effect only when you set the
Engine
parameter to MySQL or PostgreSQL.- If you set the
Engine
parameter to MySQL. - This time zone of the instance is in UTC. Valid values: -12:59 to +13:00.
- You can specify this parameter when the instance is equipped with local SSDs. For example, you can specify the time zone to Asia/Hong_Kong. For more information about time zones, see Time zones.
- If you set the
Engine
parameter to PostgreSQL. - This time zone of the instance is not in UTC. For more information about time zones, see Time zones.
- You can specify this parameter only when the instance is equipped with standard SSDs or ESSDs.
NOTE: You can specify the time zone when you create a primary instance. You cannot specify the time zone when you create a read-only instance. Read-only instances inherit the time zone of their primary instance. If you do not specify this parameter, the system assigns the default time zone of the region where the instance resides.
- If you set the
- deletion_
protection bool The switch of delete protection. Valid values:
- true: delete protect.
- false: no delete protect.
NOTE:
deletion_protection
is valid only when attributeinstance_charge_type
is set toPostpaid
orServerless
, supported engine type:MySQL
,PostgreSQL
,MariaDB
,MSSQL
.- direction str
- The instance configuration type. Valid values: ["Up", "Down", "TempUpgrade", "Serverless"]
- effective_
time str - The method to update the engine version and change. Default value: Immediate. Valid values:
- Immediate: The change immediately takes effect.
- MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.
- encryption_
key str - The key id of the KMS. Used for encrypting a disk if not null. Only for PostgreSQL, MySQL and SQLServer.
- engine str
Database type. Value options: MySQL, SQLServer, PostgreSQL, MariaDB.
NOTE: When the 'engine_version' changes, it can be used as the target database version for the large version upgrade of RDS for MySQL instance.
- engine_
version str - Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- MySQL: [ 5.5、5.6、5.7、8.0 ]
- SQLServer: [ 2008r2、08r2_ent_ha、2012、2012_ent_ha、2012_std_ha、2012_web、2014_std_ha、2016_ent_ha、2016_std_ha、2016_web、2017_std_ha、2017_ent、2019_std_ha、2019_ent ]
- PostgreSQL: [ 10.0、11.0、12.0、13.0、14.0、15.0 ]
- MariaDB: [ 10.3 ]
- Serverless
- MySQL: [ 5.7、8.0 ]
- SQLServer: [ 2016_std_sl、2017_std_sl、2019_std_sl ]
- PostgreSQL: [ 14.0 ]
- MariaDB does not support creating serverless instances.
- force str
- Specifies whether to enable forcible switching. Valid values:
- Yes
- No
- force_
restart bool - Set it to true to make some parameter efficient when modifying them. Default to false.
- fresh_
white_ strlist_ readins - The read-only instances to which you want to synchronize the IP address whitelist.
- If the instance is attached with a read-only instance, you can use this parameter to synchronize the IP address whitelist to the read-only instance. If the instance is attached with multiple read-only instances, the read-only instances must be separated by commas (,).
- If the instance is not attached with a read-only instance, this parameter is empty.
- ha_
config str The primary/secondary switchover mode of the instance. Default value: Auto. Valid values:
- Auto: The system automatically switches over services from the primary to secondary instances in the event of a fault.
- Manual: You must manually switch over services from the primary to secondary instances in the event of a fault.
NOTE: If you set this parameter to Manual, you must specify the ManualHATime parameter.
- instance_
charge_ strtype - Valid values are
Prepaid
,Postpaid
,Serverless
, Default toPostpaid
. Currently, the resource only supports PostPaid to PrePaid. For more information, see Overview. - instance_
name str - 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 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.
- To create a serverless instance, please pass the following values:
- MySQL basic: mysql.n2.serverless.1c
- MySQL high availability: mysql.n2.serverless.2c
- SQLServer high availability: mssql.mem2.serverless.s2
- PostgreSQL basic: pg.n2.serverless.1c
NOTE: When
storage_auto_scale="Enable"
, do not performinstance_storage
check. whenstorage_auto_scale="Disable"
, if the instance itselfinstance_storage
has changed. You need to manually revise theinstance_storage
in the template value. Whenpayment_type="Serverless"
and when modifying, do not performinstance_storage
check. Otherwise, check.- maintain_
time str - Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
- manual_
ha_ strtime The time after when you want to enable automatic primary/secondary switchover. At most, you can set this parameter to 23:59:59 seven days later. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
NOTE: This parameter only takes effect when the HAConfig parameter is set to Manual.
- modify_
mode str - The method that is used to modify the IP address whitelist. Default value: Cover. Valid values:
- Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist.
- Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist.
- Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block.
- monitoring_
period int - The monitoring frequency in seconds. Valid values are 5, 10, 60, 300. Defaults to 300.
- node_
id str - The globally unique identifier (GUID) of the secondary instance. You can call the DescribeDBInstanceHAConfig operation to query the GUID of the secondary instance.
- parameters
Sequence[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 . See
parameters
below. - 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.NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- pg_
hba_ Sequence[Instanceconfs Pg Hba Conf Args] - The configuration of AD domain . See
pg_hba_conf
below. - port str
- The private port of the database service. If you want to update public port, please use resource alicloud.rds.Connection port.
- private_
ip_ straddress - The private IP address of the instance. The private IP address must be within the Classless Inter-Domain Routing (CIDR) block of the vSwitch that is specified by the VSwitchId parameter.
- released_
keep_ strpolicy The policy based on which ApsaraDB RDS retains archived backup files after the instance is released. Valid values:
- None: No archived backup files are retained.
- Lastest: Only the last archived backup file is retained.
- All: All the archived backup files are retained.
NOTE: This parameter is supported only when the instance runs the MySQL database engine.
- replication_
acl str - The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- resource_
group_ strid - The ID of resource group which the DB instance belongs.
- role_
arn str The Alibaba Cloud Resource Name (ARN) of the RAM role.
NOTE: This parameter is not required when you create an instance that runs MySQL, PostgreSQL, or SQL Server. You need to only specify the RoleARN parameter to create an instance that has cloud disk encryption enabled by using the obtained key ID. You can configure RAM authorization to require a RAM user to enable cloud disk encryption when the RAM user is used to create an instance. If cloud disk encryption is disabled during the instance creation, the creation operation fails. To complete the configuration, you can attach the following policy to the RAM user: {"Version":"1","Statement":[{"Effect":"Deny","Action":"rds:CreateDBInstance","Resource":"*","Condition":{"StringEquals":{"rds:DiskEncryptionRequired":"false"}}}]}
- security_
group_ strid - It has been deprecated from 1.69.0 and use
security_group_ids
instead. - security_
group_ Sequence[str]ids - , Available since 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
. supportsafety
switch to high security access mode. - security_
ip_ strtype - The type of IP address in the IP address whitelist.
- security_
ips Sequence[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]).
- server_
cert str - The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- server_
key str - The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- serverless_
configs Sequence[InstanceServerless Config Args] - The settings of the serverless instance. This parameter is required when you create a serverless instance. This parameter takes effect only when you create an ApsaraDB RDS for Serverless instance. See
serverless_config
below. - sql_
collector_ intconfig_ 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
. - ssl_
action str Actions performed on SSL functions. Valid values:
Open
: turn on SSL encryption;Close
: turn off SSL encryption;Update
: update SSL certificate. See more engine and engineVersion limitation.NOTE: The attribute
ssl_action
will be ignored when settinginstance_charge_type = "Serverless"
for SQLServer, PostgreSQL or MariaDB.- ssl_
connection_ strstring - The internal or public endpoint for which the server certificate needs to be created or updated.
- ssl_
status str - Status of the SSL feature.
Yes
: SSL is turned on;No
: SSL is turned off. - status str
- (Available since 1.204.1) The status of db instance.
- storage_
auto_ strscale Automatic storage space expansion switch. Valid values:
- Enable
- Disable
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable.
- storage_
threshold int The threshold in percentage based on which an automatic storage expansion is triggered. If the available storage reaches the threshold, ApsaraDB RDS increases the storage capacity of the instance. Valid values: [10, 20, 30, 40, 50].
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable. The value must be greater than or equal to the total size of the current storage space of the instance.
- storage_
upper_ intbound The upper limit of the total storage space for automatic expansion of the storage space, that is, automatic expansion will not cause the total storage space of the instance to exceed this value. Unit: GB. The value must be ≥0.
NOTE: Because of data backup and migration, change DB instance type and storage would cost 15~20 minutes. Please make full preparation before changing them.
- switch_
time str The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when
target_minor_version
is changed. The time must be in UTC.NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.
- Mapping[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.
Note: From 1.63.0, the tag key and value are case sensitive. Before that, they are not case sensitive.
- target_
minor_ strversion The minor engine version to which you want to update the instance. If you do not specify this parameter, the instance is updated to the latest minor engine version. You must specify the minor engine version in one of the following formats:
- PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
- MySQL: _. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions are supported:
- rds: The instance runs RDS Basic or High-availability Edition.
- xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition.
- xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition.
- SQLServer: . Example: 15.0.4073.23.
NOTE: For more information about minor engine versions, see Release notes of minor AliPG versions, Release notes of minor AliSQL versions, and Release notes of minor engine versions of ApsaraDB RDS for SQL Server.
- tcp_
connection_ strtype - The availability check method of the instance. Valid values:
- SHORT: Alibaba Cloud uses short-lived connections to check the availability of the instance.
- LONG: Alibaba Cloud uses persistent connections to check the availability of the instance.
- tde_
status str - The TDE(Transparent Data Encryption) status. After TDE is turned on, it cannot be turned off. See more engine and engineVersion limitation.
- upgrade_
db_ boolinstance_ kernel_ version - Whether to upgrade a minor version of the kernel. Valid values:
- true: upgrade
- false: not to upgrade
- upgrade_
time str - The method to update the minor engine version. Default value: Immediate. It is valid only when
target_minor_version
is changed. Valid values:- Immediate: The minor engine version is immediately updated.
- MaintainTime: The minor engine version is updated during the maintenance window. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime.
- SpecifyTime: The minor engine version is updated at the point in time you specify.
- vpc_
id str The VPC ID of the instance.
NOTE: This parameter applies only to ApsaraDB RDS for MySQL instances. For more information about Upgrade the major engine version of an ApsaraDB RDS for MySQL instance, see Upgrade the major engine version of an RDS instance in the ApsaraDB RDS console.
- vswitch_
id str - The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
- whitelist_
network_ strtype The network type of the IP address whitelist. Default value: MIX. Valid values:
- Classic: classic network in enhanced whitelist mode
- VPC: virtual private cloud (VPC) in enhanced whitelist mode
- MIX: standard whitelist mode
NOTE: In standard whitelist mode, IP addresses and CIDR blocks can be added only to the default IP address whitelist. In enhanced whitelist mode, IP addresses and CIDR blocks can be added to both IP address whitelists of the classic network type and those of the VPC network type.
- 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_id
is specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmulti
to "true" in the data sourcealicloud.getZones
. - zone_
id_ strslave_ a - The region ID of the secondary instance if you create a secondary instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
- acl String
- The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- 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.
See more details and limitation.
- babelfish
Configs List<Property Map> The configuration of an ApsaraDB RDS for PostgreSQL instance for which Babelfish is enabled. See
babelfish_config
below.NOTE: This parameter takes effect only when you create an ApsaraDB RDS for PostgreSQL instance. For more information, see Introduction to Babelfish.
- babelfish
Port String The TDS port of the instance for which Babelfish is enabled.
NOTE: This parameter applies only to ApsaraDB RDS for PostgreSQL instances. For more information about Babelfish for ApsaraDB RDS for PostgreSQL, see Introduction to Babelfish.
- ca
Type String - The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. Value range:
- aliyun: a cloud certificate
- custom: a custom certificate
- category String
The RDS edition of the instance. If you want to create a serverless instance, you must use this value. Valid values:
- Basic: Basic Edition.
- HighAvailability: High-availability Edition.
- AlwaysOn: Cluster Edition.
- Finance: Enterprise Edition.
- cluster: MySQL Cluster Edition. (Available since 1.202.0)
- serverless_basic: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.200.0)
- serverless_standard: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available since 1.204.0)
- serverless_ha: RDS Serverless High-availability Edition for SQL Server. (Available since 1.204.0)
NOTE:
zone_id_slave_a
andzone_id_slave_b
can specify slave zone ids when creating the high-availability or enterprise edition instances. Meanwhile,vswitch_id
needs to pass in the corresponding vswitch id to the slave zone by order (If thevswitch_id
is not specified, the classic network version will be created). For example,zone_id
= "zone-a" andzone_id_slave_a
= "zone-c",zone_id_slave_b
= "zone-b", then thevswitch_id
must be "vsw-zone-a,vsw-zone-c,vsw-zone-b". Of course, you can also choose automatic allocation , for example,zone_id
= "zone-a" andzone_id_slave_a
= "Auto",zone_id_slave_b
= "Auto", then thevswitch_id
must be "vsw-zone-a,Auto,Auto". The list contains up to 2 slave zone ids , separated by commas.- client
Ca StringCert - The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter.
- client
Ca NumberEnabled - Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. Valid values:
- 1: enables the public key
- 0: disables the public key
- client
Cert StringRevocation List - The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter.
- client
Crl NumberEnabled - Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- 1: enables the CRL
- 0: disables the CRL
- connection
String String - RDS database connection string.
- connection
String StringPrefix The private connection string prefix. If you want to update public connection string prefix, please use resource alicloud.rds.Connection connection_prefix.
NOTE: The prefix must be 8 to 64 characters in length and can contain letters, digits, and hyphens (-). It cannot contain Chinese characters and special characters ~!#%^&*=+|{};:'",<>/?
- create
Time String - (Available since 1.204.1) The creation time of db instance.
- db
Instance StringIp Array Attribute The attribute of the IP address whitelist. By default, this parameter is empty.
NOTE: The IP address whitelists that have the hidden attribute are not displayed in the ApsaraDB RDS console. These IP address whitelists are used to access Alibaba Cloud services, such as Data Transmission Service (DTS).
- db
Instance StringIp Array Name The name of the IP address whitelist. Default value: Default.
NOTE: A maximum of 200 IP address whitelists can be configured for each instance.
- db
Instance StringStorage Type - The storage type of the instance. Serverless instance, only
cloud_essd
can be selected. 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).
- general_essd: general essd.
- db
Instance StringType - (Available since 1.197.0) The type of db instance.
- db
Is BooleanIgnore Case - Specifies whether table names on the instance are case-sensitive. Valid values:
true
,false
. - db
Param StringGroup Id - Parameter template ID. Only MySQL and PostgreSQL support this parameter. If this parameter is not specified, the default parameter template is used. You can also customize a parameter template and use it here.
- db
Time StringZone The time zone of the instance. This parameter takes effect only when you set the
Engine
parameter to MySQL or PostgreSQL.- If you set the
Engine
parameter to MySQL. - This time zone of the instance is in UTC. Valid values: -12:59 to +13:00.
- You can specify this parameter when the instance is equipped with local SSDs. For example, you can specify the time zone to Asia/Hong_Kong. For more information about time zones, see Time zones.
- If you set the
Engine
parameter to PostgreSQL. - This time zone of the instance is not in UTC. For more information about time zones, see Time zones.
- You can specify this parameter only when the instance is equipped with standard SSDs or ESSDs.
NOTE: You can specify the time zone when you create a primary instance. You cannot specify the time zone when you create a read-only instance. Read-only instances inherit the time zone of their primary instance. If you do not specify this parameter, the system assigns the default time zone of the region where the instance resides.
- If you set the
- deletion
Protection Boolean The switch of delete protection. Valid values:
- true: delete protect.
- false: no delete protect.
NOTE:
deletion_protection
is valid only when attributeinstance_charge_type
is set toPostpaid
orServerless
, supported engine type:MySQL
,PostgreSQL
,MariaDB
,MSSQL
.- direction String
- The instance configuration type. Valid values: ["Up", "Down", "TempUpgrade", "Serverless"]
- effective
Time String - The method to update the engine version and change. Default value: Immediate. Valid values:
- Immediate: The change immediately takes effect.
- MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.
- encryption
Key String - The key id of the KMS. Used for encrypting a disk if not null. Only for PostgreSQL, MySQL and SQLServer.
- engine String
Database type. Value options: MySQL, SQLServer, PostgreSQL, MariaDB.
NOTE: When the 'engine_version' changes, it can be used as the target database version for the large version upgrade of RDS for MySQL instance.
- engine
Version String - Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- MySQL: [ 5.5、5.6、5.7、8.0 ]
- SQLServer: [ 2008r2、08r2_ent_ha、2012、2012_ent_ha、2012_std_ha、2012_web、2014_std_ha、2016_ent_ha、2016_std_ha、2016_web、2017_std_ha、2017_ent、2019_std_ha、2019_ent ]
- PostgreSQL: [ 10.0、11.0、12.0、13.0、14.0、15.0 ]
- MariaDB: [ 10.3 ]
- Serverless
- MySQL: [ 5.7、8.0 ]
- SQLServer: [ 2016_std_sl、2017_std_sl、2019_std_sl ]
- PostgreSQL: [ 14.0 ]
- MariaDB does not support creating serverless instances.
- force String
- Specifies whether to enable forcible switching. Valid values:
- Yes
- No
- force
Restart Boolean - Set it to true to make some parameter efficient when modifying them. Default to false.
- fresh
White StringList Readins - The read-only instances to which you want to synchronize the IP address whitelist.
- If the instance is attached with a read-only instance, you can use this parameter to synchronize the IP address whitelist to the read-only instance. If the instance is attached with multiple read-only instances, the read-only instances must be separated by commas (,).
- If the instance is not attached with a read-only instance, this parameter is empty.
- ha
Config String The primary/secondary switchover mode of the instance. Default value: Auto. Valid values:
- Auto: The system automatically switches over services from the primary to secondary instances in the event of a fault.
- Manual: You must manually switch over services from the primary to secondary instances in the event of a fault.
NOTE: If you set this parameter to Manual, you must specify the ManualHATime parameter.
- instance
Charge StringType - Valid values are
Prepaid
,Postpaid
,Serverless
, Default toPostpaid
. Currently, the resource only supports PostPaid to PrePaid. For more information, see Overview. - 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 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.
- To create a serverless instance, please pass the following values:
- MySQL basic: mysql.n2.serverless.1c
- MySQL high availability: mysql.n2.serverless.2c
- SQLServer high availability: mssql.mem2.serverless.s2
- PostgreSQL basic: pg.n2.serverless.1c
NOTE: When
storage_auto_scale="Enable"
, do not performinstance_storage
check. whenstorage_auto_scale="Disable"
, if the instance itselfinstance_storage
has changed. You need to manually revise theinstance_storage
in the template value. Whenpayment_type="Serverless"
and when modifying, do not performinstance_storage
check. Otherwise, check.- maintain
Time String - Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
- manual
Ha StringTime The time after when you want to enable automatic primary/secondary switchover. At most, you can set this parameter to 23:59:59 seven days later. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
NOTE: This parameter only takes effect when the HAConfig parameter is set to Manual.
- modify
Mode String - The method that is used to modify the IP address whitelist. Default value: Cover. Valid values:
- Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist.
- Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist.
- Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block.
- monitoring
Period Number - The monitoring frequency in seconds. Valid values are 5, 10, 60, 300. Defaults to 300.
- node
Id String - The globally unique identifier (GUID) of the secondary instance. You can call the DescribeDBInstanceHAConfig operation to query the GUID of the secondary instance.
- parameters List<Property Map>
- Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates . See
parameters
below. - 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.NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- pg
Hba List<Property Map>Confs - The configuration of AD domain . See
pg_hba_conf
below. - port String
- The private port of the database service. If you want to update public port, please use resource alicloud.rds.Connection port.
- private
Ip StringAddress - The private IP address of the instance. The private IP address must be within the Classless Inter-Domain Routing (CIDR) block of the vSwitch that is specified by the VSwitchId parameter.
- released
Keep StringPolicy The policy based on which ApsaraDB RDS retains archived backup files after the instance is released. Valid values:
- None: No archived backup files are retained.
- Lastest: Only the last archived backup file is retained.
- All: All the archived backup files are retained.
NOTE: This parameter is supported only when the instance runs the MySQL database engine.
- replication
Acl String - The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
- cert
- perfer
- verify-ca
- verify-full (supported only when the instance runs PostgreSQL 12 or later)
- resource
Group StringId - The ID of resource group which the DB instance belongs.
- role
Arn String The Alibaba Cloud Resource Name (ARN) of the RAM role.
NOTE: This parameter is not required when you create an instance that runs MySQL, PostgreSQL, or SQL Server. You need to only specify the RoleARN parameter to create an instance that has cloud disk encryption enabled by using the obtained key ID. You can configure RAM authorization to require a RAM user to enable cloud disk encryption when the RAM user is used to create an instance. If cloud disk encryption is disabled during the instance creation, the creation operation fails. To complete the configuration, you can attach the following policy to the RAM user: {"Version":"1","Statement":[{"Effect":"Deny","Action":"rds:CreateDBInstance","Resource":"*","Condition":{"StringEquals":{"rds:DiskEncryptionRequired":"false"}}}]}
- security
Group StringId - It has been deprecated from 1.69.0 and use
security_group_ids
instead. - security
Group List<String>Ids - , Available since 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
. supportsafety
switch to high security access mode. - security
Ip StringType - The type of IP address in the IP address whitelist.
- 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]).
- server
Cert String - The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- server
Key String - The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
- serverless
Configs List<Property Map> - The settings of the serverless instance. This parameter is required when you create a serverless instance. This parameter takes effect only when you create an ApsaraDB RDS for Serverless instance. See
serverless_config
below. - 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
. - ssl
Action String Actions performed on SSL functions. Valid values:
Open
: turn on SSL encryption;Close
: turn off SSL encryption;Update
: update SSL certificate. See more engine and engineVersion limitation.NOTE: The attribute
ssl_action
will be ignored when settinginstance_charge_type = "Serverless"
for SQLServer, PostgreSQL or MariaDB.- ssl
Connection StringString - The internal or public endpoint for which the server certificate needs to be created or updated.
- ssl
Status String - Status of the SSL feature.
Yes
: SSL is turned on;No
: SSL is turned off. - status String
- (Available since 1.204.1) The status of db instance.
- storage
Auto StringScale Automatic storage space expansion switch. Valid values:
- Enable
- Disable
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable.
- storage
Threshold Number The threshold in percentage based on which an automatic storage expansion is triggered. If the available storage reaches the threshold, ApsaraDB RDS increases the storage capacity of the instance. Valid values: [10, 20, 30, 40, 50].
NOTE: This parameter only takes effect when the StorageAutoScale parameter is set to Enable. The value must be greater than or equal to the total size of the current storage space of the instance.
- storage
Upper NumberBound The upper limit of the total storage space for automatic expansion of the storage space, that is, automatic expansion will not cause the total storage space of the instance to exceed this value. Unit: GB. The value must be ≥0.
NOTE: Because of data backup and migration, change DB instance type and storage would cost 15~20 minutes. Please make full preparation before changing them.
- switch
Time String The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when
target_minor_version
is changed. The time must be in UTC.NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.
- Map<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.
Note: From 1.63.0, the tag key and value are case sensitive. Before that, they are not case sensitive.
- target
Minor StringVersion The minor engine version to which you want to update the instance. If you do not specify this parameter, the instance is updated to the latest minor engine version. You must specify the minor engine version in one of the following formats:
- PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
- MySQL: _. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions are supported:
- rds: The instance runs RDS Basic or High-availability Edition.
- xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition.
- xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition.
- SQLServer: . Example: 15.0.4073.23.
NOTE: For more information about minor engine versions, see Release notes of minor AliPG versions, Release notes of minor AliSQL versions, and Release notes of minor engine versions of ApsaraDB RDS for SQL Server.
- tcp
Connection StringType - The availability check method of the instance. Valid values:
- SHORT: Alibaba Cloud uses short-lived connections to check the availability of the instance.
- LONG: Alibaba Cloud uses persistent connections to check the availability of the instance.
- tde
Status String - The TDE(Transparent Data Encryption) status. After TDE is turned on, it cannot be turned off. See more engine and engineVersion limitation.
- upgrade
Db BooleanInstance Kernel Version - Whether to upgrade a minor version of the kernel. Valid values:
- true: upgrade
- false: not to upgrade
- upgrade
Time String - The method to update the minor engine version. Default value: Immediate. It is valid only when
target_minor_version
is changed. Valid values:- Immediate: The minor engine version is immediately updated.
- MaintainTime: The minor engine version is updated during the maintenance window. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime.
- SpecifyTime: The minor engine version is updated at the point in time you specify.
- vpc
Id String The VPC ID of the instance.
NOTE: This parameter applies only to ApsaraDB RDS for MySQL instances. For more information about Upgrade the major engine version of an ApsaraDB RDS for MySQL instance, see Upgrade the major engine version of an RDS instance in the ApsaraDB RDS console.
- vswitch
Id String - The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
- whitelist
Network StringType The network type of the IP address whitelist. Default value: MIX. Valid values:
- Classic: classic network in enhanced whitelist mode
- VPC: virtual private cloud (VPC) in enhanced whitelist mode
- MIX: standard whitelist mode
NOTE: In standard whitelist mode, IP addresses and CIDR blocks can be added only to the default IP address whitelist. In enhanced whitelist mode, IP addresses and CIDR blocks can be added to both IP address whitelists of the classic network type and those of the VPC network type.
- 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_id
is specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmulti
to "true" in the data sourcealicloud.getZones
. - zone
Id StringSlave A - The region ID of the secondary instance if you create a secondary instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
Supporting Types
InstanceBabelfishConfig, InstanceBabelfishConfigArgs
- Babelfish
Enabled string - specifies whether to enable the Babelfish for the instance. If you set this parameter to true, you enable Babelfish for the instance. If you leave this parameter empty, you disable Babelfish for the instance.
- Master
User stringPassword - The password of the administrator account. The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. It must be 8 to 32 characters in length. The password can contain any of the following characters:! @ # $ % ^ & * () _ + - =
- Master
Username string - The name of the administrator account. The name can contain lowercase letters, digits, and underscores (_). It must start with a letter and end with a letter or digit. It can be up to 63 characters in length and cannot start with pg.
- Migration
Mode string - The migration mode of the instance. Valid values: single-db and multi-db.
- Babelfish
Enabled string - specifies whether to enable the Babelfish for the instance. If you set this parameter to true, you enable Babelfish for the instance. If you leave this parameter empty, you disable Babelfish for the instance.
- Master
User stringPassword - The password of the administrator account. The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. It must be 8 to 32 characters in length. The password can contain any of the following characters:! @ # $ % ^ & * () _ + - =
- Master
Username string - The name of the administrator account. The name can contain lowercase letters, digits, and underscores (_). It must start with a letter and end with a letter or digit. It can be up to 63 characters in length and cannot start with pg.
- Migration
Mode string - The migration mode of the instance. Valid values: single-db and multi-db.
- babelfish
Enabled String - specifies whether to enable the Babelfish for the instance. If you set this parameter to true, you enable Babelfish for the instance. If you leave this parameter empty, you disable Babelfish for the instance.
- master
User StringPassword - The password of the administrator account. The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. It must be 8 to 32 characters in length. The password can contain any of the following characters:! @ # $ % ^ & * () _ + - =
- master
Username String - The name of the administrator account. The name can contain lowercase letters, digits, and underscores (_). It must start with a letter and end with a letter or digit. It can be up to 63 characters in length and cannot start with pg.
- migration
Mode String - The migration mode of the instance. Valid values: single-db and multi-db.
- babelfish
Enabled string - specifies whether to enable the Babelfish for the instance. If you set this parameter to true, you enable Babelfish for the instance. If you leave this parameter empty, you disable Babelfish for the instance.
- master
User stringPassword - The password of the administrator account. The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. It must be 8 to 32 characters in length. The password can contain any of the following characters:! @ # $ % ^ & * () _ + - =
- master
Username string - The name of the administrator account. The name can contain lowercase letters, digits, and underscores (_). It must start with a letter and end with a letter or digit. It can be up to 63 characters in length and cannot start with pg.
- migration
Mode string - The migration mode of the instance. Valid values: single-db and multi-db.
- babelfish_
enabled str - specifies whether to enable the Babelfish for the instance. If you set this parameter to true, you enable Babelfish for the instance. If you leave this parameter empty, you disable Babelfish for the instance.
- master_
user_ strpassword - The password of the administrator account. The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. It must be 8 to 32 characters in length. The password can contain any of the following characters:! @ # $ % ^ & * () _ + - =
- master_
username str - The name of the administrator account. The name can contain lowercase letters, digits, and underscores (_). It must start with a letter and end with a letter or digit. It can be up to 63 characters in length and cannot start with pg.
- migration_
mode str - The migration mode of the instance. Valid values: single-db and multi-db.
- babelfish
Enabled String - specifies whether to enable the Babelfish for the instance. If you set this parameter to true, you enable Babelfish for the instance. If you leave this parameter empty, you disable Babelfish for the instance.
- master
User StringPassword - The password of the administrator account. The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. It must be 8 to 32 characters in length. The password can contain any of the following characters:! @ # $ % ^ & * () _ + - =
- master
Username String - The name of the administrator account. The name can contain lowercase letters, digits, and underscores (_). It must start with a letter and end with a letter or digit. It can be up to 63 characters in length and cannot start with pg.
- migration
Mode String - The migration mode of the instance. Valid values: single-db and multi-db.
InstanceParameter, InstanceParameterArgs
InstancePgHbaConf, InstancePgHbaConfArgs
- Address string
- The IP addresses from which the specified users can access the specified databases. If you set this parameter to 0.0.0.0/0, the specified users are allowed to access the specified databases from all IP addresses.
- Database string
- The name of the database that the specified users are allowed to access. If you set this parameter to all, the specified users are allowed to access all databases in the instance. If you specify multiple databases, separate the database names with commas (,).
- Method string
- The authentication method of Lightweight Directory Access Protocol (LDAP). Valid values:
trust
,reject
,scram-sha-256
,md5
,password
,gss
,sspi
,ldap
,radius
,cert
,pam
. - Priority
Id int - The priority of an AD domain. If you set this parameter to 0, the AD domain has the highest priority. Valid values: 0 to 10000. This parameter is used to identify each AD domain. When you add an AD domain, the value of the PriorityId parameter of the new AD domain cannot be the same as the value of the PriorityId parameter for any existing AD domain. When you modify or delete an AD domain, you must also modify or delete the value of the PriorityId parameter for this AD domain.
- Type string
The type of connection to the instance. Valid values:
- host: specifies to verify TCP/IP connections, including SSL connections and non-SSL connections.
- hostssl: specifies to verify only TCP/IP connections that are established over SSL connections.
- hostnossl: specifies to verify only TCP/IP connections that are established over non-SSL connections.
NOTE: You can set this parameter to hostssl only when SSL encryption is enabled for the instance. For more information, see Configure SSL encryption for an ApsaraDB RDS for PostgreSQL instance.
- User string
- The user that is allowed to access the instance. If you specify multiple users, separate the usernames with commas (,).
- Mask string
- The mask of the instance. If the value of the
Address
parameter is an IP address, you can use this parameter to specify the mask of the IP address. - Option string
- Optional. The value of this parameter is based on the value of the HbaItem.N.Method parameter. In this topic, LDAP is used as an example. You must configure this parameter. For more information, see Authentication Methods.
- Address string
- The IP addresses from which the specified users can access the specified databases. If you set this parameter to 0.0.0.0/0, the specified users are allowed to access the specified databases from all IP addresses.
- Database string
- The name of the database that the specified users are allowed to access. If you set this parameter to all, the specified users are allowed to access all databases in the instance. If you specify multiple databases, separate the database names with commas (,).
- Method string
- The authentication method of Lightweight Directory Access Protocol (LDAP). Valid values:
trust
,reject
,scram-sha-256
,md5
,password
,gss
,sspi
,ldap
,radius
,cert
,pam
. - Priority
Id int - The priority of an AD domain. If you set this parameter to 0, the AD domain has the highest priority. Valid values: 0 to 10000. This parameter is used to identify each AD domain. When you add an AD domain, the value of the PriorityId parameter of the new AD domain cannot be the same as the value of the PriorityId parameter for any existing AD domain. When you modify or delete an AD domain, you must also modify or delete the value of the PriorityId parameter for this AD domain.
- Type string
The type of connection to the instance. Valid values:
- host: specifies to verify TCP/IP connections, including SSL connections and non-SSL connections.
- hostssl: specifies to verify only TCP/IP connections that are established over SSL connections.
- hostnossl: specifies to verify only TCP/IP connections that are established over non-SSL connections.
NOTE: You can set this parameter to hostssl only when SSL encryption is enabled for the instance. For more information, see Configure SSL encryption for an ApsaraDB RDS for PostgreSQL instance.
- User string
- The user that is allowed to access the instance. If you specify multiple users, separate the usernames with commas (,).
- Mask string
- The mask of the instance. If the value of the
Address
parameter is an IP address, you can use this parameter to specify the mask of the IP address. - Option string
- Optional. The value of this parameter is based on the value of the HbaItem.N.Method parameter. In this topic, LDAP is used as an example. You must configure this parameter. For more information, see Authentication Methods.
- address String
- The IP addresses from which the specified users can access the specified databases. If you set this parameter to 0.0.0.0/0, the specified users are allowed to access the specified databases from all IP addresses.
- database String
- The name of the database that the specified users are allowed to access. If you set this parameter to all, the specified users are allowed to access all databases in the instance. If you specify multiple databases, separate the database names with commas (,).
- method String
- The authentication method of Lightweight Directory Access Protocol (LDAP). Valid values:
trust
,reject
,scram-sha-256
,md5
,password
,gss
,sspi
,ldap
,radius
,cert
,pam
. - priority
Id Integer - The priority of an AD domain. If you set this parameter to 0, the AD domain has the highest priority. Valid values: 0 to 10000. This parameter is used to identify each AD domain. When you add an AD domain, the value of the PriorityId parameter of the new AD domain cannot be the same as the value of the PriorityId parameter for any existing AD domain. When you modify or delete an AD domain, you must also modify or delete the value of the PriorityId parameter for this AD domain.
- type String
The type of connection to the instance. Valid values:
- host: specifies to verify TCP/IP connections, including SSL connections and non-SSL connections.
- hostssl: specifies to verify only TCP/IP connections that are established over SSL connections.
- hostnossl: specifies to verify only TCP/IP connections that are established over non-SSL connections.
NOTE: You can set this parameter to hostssl only when SSL encryption is enabled for the instance. For more information, see Configure SSL encryption for an ApsaraDB RDS for PostgreSQL instance.
- user String
- The user that is allowed to access the instance. If you specify multiple users, separate the usernames with commas (,).
- mask String
- The mask of the instance. If the value of the
Address
parameter is an IP address, you can use this parameter to specify the mask of the IP address. - option String
- Optional. The value of this parameter is based on the value of the HbaItem.N.Method parameter. In this topic, LDAP is used as an example. You must configure this parameter. For more information, see Authentication Methods.
- address string
- The IP addresses from which the specified users can access the specified databases. If you set this parameter to 0.0.0.0/0, the specified users are allowed to access the specified databases from all IP addresses.
- database string
- The name of the database that the specified users are allowed to access. If you set this parameter to all, the specified users are allowed to access all databases in the instance. If you specify multiple databases, separate the database names with commas (,).
- method string
- The authentication method of Lightweight Directory Access Protocol (LDAP). Valid values:
trust
,reject
,scram-sha-256
,md5
,password
,gss
,sspi
,ldap
,radius
,cert
,pam
. - priority
Id number - The priority of an AD domain. If you set this parameter to 0, the AD domain has the highest priority. Valid values: 0 to 10000. This parameter is used to identify each AD domain. When you add an AD domain, the value of the PriorityId parameter of the new AD domain cannot be the same as the value of the PriorityId parameter for any existing AD domain. When you modify or delete an AD domain, you must also modify or delete the value of the PriorityId parameter for this AD domain.
- type string
The type of connection to the instance. Valid values:
- host: specifies to verify TCP/IP connections, including SSL connections and non-SSL connections.
- hostssl: specifies to verify only TCP/IP connections that are established over SSL connections.
- hostnossl: specifies to verify only TCP/IP connections that are established over non-SSL connections.
NOTE: You can set this parameter to hostssl only when SSL encryption is enabled for the instance. For more information, see Configure SSL encryption for an ApsaraDB RDS for PostgreSQL instance.
- user string
- The user that is allowed to access the instance. If you specify multiple users, separate the usernames with commas (,).
- mask string
- The mask of the instance. If the value of the
Address
parameter is an IP address, you can use this parameter to specify the mask of the IP address. - option string
- Optional. The value of this parameter is based on the value of the HbaItem.N.Method parameter. In this topic, LDAP is used as an example. You must configure this parameter. For more information, see Authentication Methods.
- address str
- The IP addresses from which the specified users can access the specified databases. If you set this parameter to 0.0.0.0/0, the specified users are allowed to access the specified databases from all IP addresses.
- database str
- The name of the database that the specified users are allowed to access. If you set this parameter to all, the specified users are allowed to access all databases in the instance. If you specify multiple databases, separate the database names with commas (,).
- method str
- The authentication method of Lightweight Directory Access Protocol (LDAP). Valid values:
trust
,reject
,scram-sha-256
,md5
,password
,gss
,sspi
,ldap
,radius
,cert
,pam
. - priority_
id int - The priority of an AD domain. If you set this parameter to 0, the AD domain has the highest priority. Valid values: 0 to 10000. This parameter is used to identify each AD domain. When you add an AD domain, the value of the PriorityId parameter of the new AD domain cannot be the same as the value of the PriorityId parameter for any existing AD domain. When you modify or delete an AD domain, you must also modify or delete the value of the PriorityId parameter for this AD domain.
- type str
The type of connection to the instance. Valid values:
- host: specifies to verify TCP/IP connections, including SSL connections and non-SSL connections.
- hostssl: specifies to verify only TCP/IP connections that are established over SSL connections.
- hostnossl: specifies to verify only TCP/IP connections that are established over non-SSL connections.
NOTE: You can set this parameter to hostssl only when SSL encryption is enabled for the instance. For more information, see Configure SSL encryption for an ApsaraDB RDS for PostgreSQL instance.
- user str
- The user that is allowed to access the instance. If you specify multiple users, separate the usernames with commas (,).
- mask str
- The mask of the instance. If the value of the
Address
parameter is an IP address, you can use this parameter to specify the mask of the IP address. - option str
- Optional. The value of this parameter is based on the value of the HbaItem.N.Method parameter. In this topic, LDAP is used as an example. You must configure this parameter. For more information, see Authentication Methods.
- address String
- The IP addresses from which the specified users can access the specified databases. If you set this parameter to 0.0.0.0/0, the specified users are allowed to access the specified databases from all IP addresses.
- database String
- The name of the database that the specified users are allowed to access. If you set this parameter to all, the specified users are allowed to access all databases in the instance. If you specify multiple databases, separate the database names with commas (,).
- method String
- The authentication method of Lightweight Directory Access Protocol (LDAP). Valid values:
trust
,reject
,scram-sha-256
,md5
,password
,gss
,sspi
,ldap
,radius
,cert
,pam
. - priority
Id Number - The priority of an AD domain. If you set this parameter to 0, the AD domain has the highest priority. Valid values: 0 to 10000. This parameter is used to identify each AD domain. When you add an AD domain, the value of the PriorityId parameter of the new AD domain cannot be the same as the value of the PriorityId parameter for any existing AD domain. When you modify or delete an AD domain, you must also modify or delete the value of the PriorityId parameter for this AD domain.
- type String
The type of connection to the instance. Valid values:
- host: specifies to verify TCP/IP connections, including SSL connections and non-SSL connections.
- hostssl: specifies to verify only TCP/IP connections that are established over SSL connections.
- hostnossl: specifies to verify only TCP/IP connections that are established over non-SSL connections.
NOTE: You can set this parameter to hostssl only when SSL encryption is enabled for the instance. For more information, see Configure SSL encryption for an ApsaraDB RDS for PostgreSQL instance.
- user String
- The user that is allowed to access the instance. If you specify multiple users, separate the usernames with commas (,).
- mask String
- The mask of the instance. If the value of the
Address
parameter is an IP address, you can use this parameter to specify the mask of the IP address. - option String
- Optional. The value of this parameter is based on the value of the HbaItem.N.Method parameter. In this topic, LDAP is used as an example. You must configure this parameter. For more information, see Authentication Methods.
InstanceServerlessConfig, InstanceServerlessConfigArgs
- Max
Capacity double - The maximum number of RDS Capacity Units (RCUs). The value of this parameter must be greater than or equal to
min_capacity
and only supports passing integers. Valid values:- MySQL: 1~8
- SQLServer: 2~8
- PostgreSQL: 1~12
- Min
Capacity double - The minimum number of RCUs. The value of this parameter must be less than or equal to
max_capacity
. Valid values:- MySQL: 0.5~8
- SQLServer: 2~8 (Supports integers only).
- PostgreSQL: 0.5~12
- Auto
Pause bool - Switch
Force bool - Specifies whether to enable the forced scaling feature for the serverless instance. Valid values:
- true: enables the feature.
- false: disables the feature. This is the default value.
- Only MySQL Serverless instances need to set this parameter. After enabling this parameter, there will be a flash break within 1 minute when the instance is forced to expand or shrink. Please use it with caution according to the actual situation.
- The elastic scaling of an instance RCU usually takes effect immediately, but in some special circumstances (such as during large transaction execution), it is not possible to complete scaling immediately. In this case, this parameter can be enabled to force scaling.
- Max
Capacity float64 - The maximum number of RDS Capacity Units (RCUs). The value of this parameter must be greater than or equal to
min_capacity
and only supports passing integers. Valid values:- MySQL: 1~8
- SQLServer: 2~8
- PostgreSQL: 1~12
- Min
Capacity float64 - The minimum number of RCUs. The value of this parameter must be less than or equal to
max_capacity
. Valid values:- MySQL: 0.5~8
- SQLServer: 2~8 (Supports integers only).
- PostgreSQL: 0.5~12
- Auto
Pause bool - Switch
Force bool - Specifies whether to enable the forced scaling feature for the serverless instance. Valid values:
- true: enables the feature.
- false: disables the feature. This is the default value.
- Only MySQL Serverless instances need to set this parameter. After enabling this parameter, there will be a flash break within 1 minute when the instance is forced to expand or shrink. Please use it with caution according to the actual situation.
- The elastic scaling of an instance RCU usually takes effect immediately, but in some special circumstances (such as during large transaction execution), it is not possible to complete scaling immediately. In this case, this parameter can be enabled to force scaling.
- max
Capacity Double - The maximum number of RDS Capacity Units (RCUs). The value of this parameter must be greater than or equal to
min_capacity
and only supports passing integers. Valid values:- MySQL: 1~8
- SQLServer: 2~8
- PostgreSQL: 1~12
- min
Capacity Double - The minimum number of RCUs. The value of this parameter must be less than or equal to
max_capacity
. Valid values:- MySQL: 0.5~8
- SQLServer: 2~8 (Supports integers only).
- PostgreSQL: 0.5~12
- auto
Pause Boolean - switch
Force Boolean - Specifies whether to enable the forced scaling feature for the serverless instance. Valid values:
- true: enables the feature.
- false: disables the feature. This is the default value.
- Only MySQL Serverless instances need to set this parameter. After enabling this parameter, there will be a flash break within 1 minute when the instance is forced to expand or shrink. Please use it with caution according to the actual situation.
- The elastic scaling of an instance RCU usually takes effect immediately, but in some special circumstances (such as during large transaction execution), it is not possible to complete scaling immediately. In this case, this parameter can be enabled to force scaling.
- max
Capacity number - The maximum number of RDS Capacity Units (RCUs). The value of this parameter must be greater than or equal to
min_capacity
and only supports passing integers. Valid values:- MySQL: 1~8
- SQLServer: 2~8
- PostgreSQL: 1~12
- min
Capacity number - The minimum number of RCUs. The value of this parameter must be less than or equal to
max_capacity
. Valid values:- MySQL: 0.5~8
- SQLServer: 2~8 (Supports integers only).
- PostgreSQL: 0.5~12
- auto
Pause boolean - switch
Force boolean - Specifies whether to enable the forced scaling feature for the serverless instance. Valid values:
- true: enables the feature.
- false: disables the feature. This is the default value.
- Only MySQL Serverless instances need to set this parameter. After enabling this parameter, there will be a flash break within 1 minute when the instance is forced to expand or shrink. Please use it with caution according to the actual situation.
- The elastic scaling of an instance RCU usually takes effect immediately, but in some special circumstances (such as during large transaction execution), it is not possible to complete scaling immediately. In this case, this parameter can be enabled to force scaling.
- max_
capacity float - The maximum number of RDS Capacity Units (RCUs). The value of this parameter must be greater than or equal to
min_capacity
and only supports passing integers. Valid values:- MySQL: 1~8
- SQLServer: 2~8
- PostgreSQL: 1~12
- min_
capacity float - The minimum number of RCUs. The value of this parameter must be less than or equal to
max_capacity
. Valid values:- MySQL: 0.5~8
- SQLServer: 2~8 (Supports integers only).
- PostgreSQL: 0.5~12
- auto_
pause bool - switch_
force bool - Specifies whether to enable the forced scaling feature for the serverless instance. Valid values:
- true: enables the feature.
- false: disables the feature. This is the default value.
- Only MySQL Serverless instances need to set this parameter. After enabling this parameter, there will be a flash break within 1 minute when the instance is forced to expand or shrink. Please use it with caution according to the actual situation.
- The elastic scaling of an instance RCU usually takes effect immediately, but in some special circumstances (such as during large transaction execution), it is not possible to complete scaling immediately. In this case, this parameter can be enabled to force scaling.
- max
Capacity Number - The maximum number of RDS Capacity Units (RCUs). The value of this parameter must be greater than or equal to
min_capacity
and only supports passing integers. Valid values:- MySQL: 1~8
- SQLServer: 2~8
- PostgreSQL: 1~12
- min
Capacity Number - The minimum number of RCUs. The value of this parameter must be less than or equal to
max_capacity
. Valid values:- MySQL: 0.5~8
- SQLServer: 2~8 (Supports integers only).
- PostgreSQL: 0.5~12
- auto
Pause Boolean - switch
Force Boolean - Specifies whether to enable the forced scaling feature for the serverless instance. Valid values:
- true: enables the feature.
- false: disables the feature. This is the default value.
- Only MySQL Serverless instances need to set this parameter. After enabling this parameter, there will be a flash break within 1 minute when the instance is forced to expand or shrink. Please use it with caution according to the actual situation.
- The elastic scaling of an instance RCU usually takes effect immediately, but in some special circumstances (such as during large transaction execution), it is not possible to complete scaling immediately. In this case, this parameter can be enabled to force scaling.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.