This page documents the language specification for the alicloud package. If you're looking for help working with the inputs, outputs, or functions of alicloud resources in a Pulumi program, please see the resource documentation for examples and API reference.
rds¶
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-alicloud repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-alicloud repo.
- class
pulumi_alicloud.rds.Account(resource_name, opts=None, description=None, instance_id=None, kms_encrypted_password=None, kms_encryption_context=None, name=None, password=None, type=None, __props__=None, __name__=None, __opts__=None)¶ Provides an RDS account resource and used to manage databases.
import pulumi import pulumi_alicloud as alicloud config = pulumi.Config() creation = config.get("creation") if creation is None: creation = "Rds" name = config.get("name") if name is None: name = "dbaccountmysql" default_zones = alicloud.get_zones(available_resource_creation=creation) default_network = alicloud.vpc.Network("defaultNetwork", cidr_block="172.16.0.0/16") default_switch = alicloud.vpc.Switch("defaultSwitch", availability_zone=default_zones.zones[0]["id"], cidr_block="172.16.0.0/24", vpc_id=default_network.id) instance = alicloud.rds.Instance("instance", engine="MySQL", engine_version="5.6", instance_name=name, instance_storage="10", instance_type="rds.mysql.s1.small", vswitch_id=default_switch.id) account = alicloud.rds.Account("account", instance_id=instance.id, password="Test12345")
- Parameters
resource*name (str) –
The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – Database description. It cannot begin with https://. It must start with a Chinese character or English letter. It can include Chinese and English characters, underlines (*), hyphens (-), and numbers. The length may be 2-256 characters.
instance_id (pulumi.Input[str]) – The Id of instance in which account belongs.
kms_encrypted_password (pulumi.Input[str]) – An KMS encrypts password used to a db account. If the
passwordis filled in, this field will be ignored.kms_encryption_context (pulumi.Input[dict]) – An KMS encryption context used to decrypt
kms_encrypted_passwordbefore creating or updating a db account withkms_encrypted_password. See Encryption Context. It is valid whenkms_encrypted_passwordis set.name (pulumi.Input[str]) – Operation account requiring a uniqueness check. It may consist of lower case letters, numbers, and underlines, and must start with a letter and have no more than 16 characters.
password (pulumi.Input[str]) – Operation password. It may consist of letters, digits, or underlines, with a length of 6 to 32 characters. You have to specify one of
passwordandkms_encrypted_passwordfields.type (pulumi.Input[str]) – Privilege type of account.
- Normal: Common privilege. - Super: High privilege.
description: pulumi.Output[str] = None¶Database description. It cannot begin with https://. It must start with a Chinese character or English letter. It can include Chinese and English characters, underlines (_), hyphens (-), and numbers. The length may be 2-256 characters.
instance_id: pulumi.Output[str] = None¶The Id of instance in which account belongs.
kms_encrypted_password: pulumi.Output[str] = None¶An KMS encrypts password used to a db account. If the
passwordis filled in, this field will be ignored.
kms_encryption_context: pulumi.Output[dict] = None¶An KMS encryption context used to decrypt
kms_encrypted_passwordbefore creating or updating a db account withkms_encrypted_password. See Encryption Context. It is valid whenkms_encrypted_passwordis set.
name: pulumi.Output[str] = None¶Operation account requiring a uniqueness check. It may consist of lower case letters, numbers, and underlines, and must start with a letter and have no more than 16 characters.
password: pulumi.Output[str] = None¶Operation password. It may consist of letters, digits, or underlines, with a length of 6 to 32 characters. You have to specify one of
passwordandkms_encrypted_passwordfields.
type: pulumi.Output[str] = None¶Privilege type of account.
Normal: Common privilege.
Super: High privilege.
- static
get(resource_name, id, opts=None, description=None, instance_id=None, kms_encrypted_password=None, kms_encryption_context=None, name=None, password=None, type=None)¶ Get an existing Account resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource*name (str) –
The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – Database description. It cannot begin with https://. It must start with a Chinese character or English letter. It can include Chinese and English characters, underlines (*), hyphens (-), and numbers. The length may be 2-256 characters.
instance_id (pulumi.Input[str]) – The Id of instance in which account belongs.
kms_encrypted_password (pulumi.Input[str]) – An KMS encrypts password used to a db account. If the
passwordis filled in, this field will be ignored.kms_encryption_context (pulumi.Input[dict]) –
An KMS encryption context used to decrypt
kms_encrypted_passwordbefore creating or updating a db account withkms_encrypted_password. See Encryption Context. It is valid whenkms_encrypted_passwordis set.name (pulumi.Input[str]) – Operation account requiring a uniqueness check. It may consist of lower case letters, numbers, and underlines, and must start with a letter and have no more than 16 characters.
password (pulumi.Input[str]) – Operation password. It may consist of letters, digits, or underlines, with a length of 6 to 32 characters. You have to specify one of
passwordandkms_encrypted_passwordfields.type (pulumi.Input[str]) – Privilege type of account.
- Normal: Common privilege. - Super: High privilege.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.rds.AccountPrivilege(resource_name, opts=None, account_name=None, db_names=None, instance_id=None, privilege=None, __props__=None, __name__=None, __opts__=None)¶ Create a AccountPrivilege resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] account_name: A specified account name. :param pulumi.Input[list] db_names: List of specified database name. :param pulumi.Input[str] instance_id: The Id of instance in which account belongs. :param pulumi.Input[str] privilege: The privilege of one account access database. Valid values:
- ReadOnly: This value is only for MySQL, MariaDB and SQL Server - ReadWrite: This value is only for MySQL, MariaDB and SQL Server - DDLOnly: (Available in 1.64.0+) This value is only for MySQL and MariaDB - DMLOnly: (Available in 1.64.0+) This value is only for MySQL and MariaDB - DBOwner: (Available in 1.64.0+) This value is only for SQL Server and PostgreSQL.
account_name: pulumi.Output[str] = None¶A specified account name.
db_names: pulumi.Output[list] = None¶List of specified database name.
instance_id: pulumi.Output[str] = None¶The Id of instance in which account belongs.
privilege: pulumi.Output[str] = None¶The privilege of one account access database. Valid values:
ReadOnly: This value is only for MySQL, MariaDB and SQL Server
ReadWrite: This value is only for MySQL, MariaDB and SQL Server
DDLOnly: (Available in 1.64.0+) This value is only for MySQL and MariaDB
DMLOnly: (Available in 1.64.0+) This value is only for MySQL and MariaDB
DBOwner: (Available in 1.64.0+) This value is only for SQL Server and PostgreSQL.
- static
get(resource_name, id, opts=None, account_name=None, db_names=None, instance_id=None, privilege=None)¶ Get an existing AccountPrivilege resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
account_name (pulumi.Input[str]) – A specified account name.
db_names (pulumi.Input[list]) – List of specified database name.
instance_id (pulumi.Input[str]) – The Id of instance in which account belongs.
privilege (pulumi.Input[str]) – The privilege of one account access database. Valid values:
- ReadOnly: This value is only for MySQL, MariaDB and SQL Server - ReadWrite: This value is only for MySQL, MariaDB and SQL Server - DDLOnly: (Available in 1.64.0+) This value is only for MySQL and MariaDB - DMLOnly: (Available in 1.64.0+) This value is only for MySQL and MariaDB - DBOwner: (Available in 1.64.0+) This value is only for SQL Server and PostgreSQL.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.rds.AwaitableGetInstanceClassesResult(category=None, db_instance_class=None, engine=None, engine_version=None, id=None, ids=None, instance_charge_type=None, instance_classes=None, multi_zone=None, output_file=None, sorted_by=None, storage_type=None, zone_id=None)¶
- class
pulumi_alicloud.rds.AwaitableGetInstanceEnginesResult(engine=None, engine_version=None, id=None, instance_charge_type=None, instance_engines=None, multi_zone=None, output_file=None, zone_id=None)¶
- class
pulumi_alicloud.rds.AwaitableGetInstancesResult(connection_mode=None, db_type=None, engine=None, id=None, ids=None, instances=None, name_regex=None, names=None, output_file=None, status=None, tags=None, vpc_id=None, vswitch_id=None)¶
- class
pulumi_alicloud.rds.AwaitableGetZonesResult(id=None, ids=None, instance_charge_type=None, multi=None, output_file=None, zones=None)¶
- class
pulumi_alicloud.rds.BackupPolicy(resource_name, opts=None, archive_backup_keep_count=None, archive_backup_keep_policy=None, archive_backup_retention_period=None, backup_periods=None, backup_retention_period=None, backup_time=None, compress_type=None, enable_backup_log=None, high_space_usage_protection=None, instance_id=None, local_log_retention_hours=None, local_log_retention_space=None, log_backup=None, log_backup_frequency=None, log_backup_retention_period=None, log_retention_period=None, preferred_backup_periods=None, preferred_backup_time=None, retention_period=None, __props__=None, __name__=None, __opts__=None)¶ Provides an RDS instance backup policy resource and used to configure instance backup policy.
NOTE: Each DB instance has a backup policy and it will be set default values when destroying the resource.
import pulumi import pulumi_alicloud as alicloud config = pulumi.Config() creation = config.get("creation") if creation is None: creation = "Rds" name = config.get("name") if name is None: name = "dbbackuppolicybasic" default_zones = alicloud.get_zones(available_resource_creation=creation) default_network = alicloud.vpc.Network("defaultNetwork", cidr_block="172.16.0.0/16") default_switch = alicloud.vpc.Switch("defaultSwitch", availability_zone=default_zones.zones[0]["id"], cidr_block="172.16.0.0/24", vpc_id=default_network.id) instance = alicloud.rds.Instance("instance", engine="MySQL", engine_version="5.6", instance_name=name, instance_storage="10", instance_type="rds.mysql.s1.small", vswitch_id=default_switch.id) policy = alicloud.rds.BackupPolicy("policy", instance_id=instance.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
archive_backup_keep_count (pulumi.Input[float]) – Instance archive backup keep count. Valid when the
enable_backup_logistrueand instance is mysql local disk. Whenarchive_backup_keep_policyisByMonthValid values: [1-31]. Whenarchive_backup_keep_policyisByWeekValid values: [1-7].archive_backup_keep_policy (pulumi.Input[str]) – Instance archive backup keep policy. Valid when the
enable_backup_logistrueand instance is mysql local disk. Valid values areByMonth,Disable,KeepAll.archive_backup_retention_period (pulumi.Input[float]) – Instance archive backup retention days. Valid when the
enable_backup_logistrueand instance is mysql local disk. Valid values: [30-1095], andarchive_backup_retention_periodmust larger thanbackup_retention_period730.backup_periods (pulumi.Input[list]) – It has been deprecated from version 1.69.0, and use field ‘preferred_backup_period’ instead.
backup_retention_period (pulumi.Input[float]) – Instance backup retention days. Valid values: [7-730]. Default to 7. But mysql local disk is unlimited.
backup_time (pulumi.Input[str]) – It has been deprecated from version 1.69.0, and use field ‘preferred_backup_time’ instead.
compress_type (pulumi.Input[str]) – The compress type of instance policy. Valid values are
1,4,8.enable_backup_log (pulumi.Input[bool]) – Whether to backup instance log. Valid values are
true,false, Default totrue. Note: The ‘Basic Edition’ category Rds instance does not support setting log backup. What is Basic Edition.high_space_usage_protection (pulumi.Input[str]) – Instance high space usage protection policy. Valid when the
enable_backup_logistrue. Valid values areEnable,Disable.instance_id (pulumi.Input[str]) – The Id of instance that can run database.
local_log_retention_hours (pulumi.Input[float]) – Instance log backup local retention hours. Valid when the
enable_backup_logistrue. Valid values: [0-7*24].local_log_retention_space (pulumi.Input[float]) – Instance log backup local retention space. Valid when the
enable_backup_logistrue. Valid values: [5-50].log_backup (pulumi.Input[bool]) – It has been deprecated from version 1.68.0, and use field ‘enable_backup_log’ instead.
log_backup_frequency (pulumi.Input[str]) – Instance log backup frequency. Valid when the instance engine is
SQLServer. Valid values areLogInterval.log_backup_retention_period (pulumi.Input[float]) – Instance log backup retention days. Valid when the
enable_backup_logis1. Valid values: [7-730]. Default to 7. It cannot be larger thanbackup_retention_period.log_retention_period (pulumi.Input[float]) – It has been deprecated from version 1.69.0, and use field ‘log_backup_retention_period’ instead.
preferred_backup_periods (pulumi.Input[list]) – DB Instance backup period. Please set at least two days to ensure backing up at least twice a week. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]. Default to [“Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, “Saturday”, “Sunday”].
preferred_backup_time (pulumi.Input[str]) – DB instance backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to “02:00Z-03:00Z”. China time is 8 hours behind it.
retention_period (pulumi.Input[float]) – It has been deprecated from version 1.69.0, and use field ‘backup_retention_period’ instead.
archive_backup_keep_count: pulumi.Output[float] = None¶Instance archive backup keep count. Valid when the
enable_backup_logistrueand instance is mysql local disk. Whenarchive_backup_keep_policyisByMonthValid values: [1-31]. Whenarchive_backup_keep_policyisByWeekValid values: [1-7].
archive_backup_keep_policy: pulumi.Output[str] = None¶Instance archive backup keep policy. Valid when the
enable_backup_logistrueand instance is mysql local disk. Valid values areByMonth,Disable,KeepAll.
archive_backup_retention_period: pulumi.Output[float] = None¶Instance archive backup retention days. Valid when the
enable_backup_logistrueand instance is mysql local disk. Valid values: [30-1095], andarchive_backup_retention_periodmust larger thanbackup_retention_period730.
backup_periods: pulumi.Output[list] = None¶It has been deprecated from version 1.69.0, and use field ‘preferred_backup_period’ instead.
backup_retention_period: pulumi.Output[float] = None¶Instance backup retention days. Valid values: [7-730]. Default to 7. But mysql local disk is unlimited.
backup_time: pulumi.Output[str] = None¶It has been deprecated from version 1.69.0, and use field ‘preferred_backup_time’ instead.
compress_type: pulumi.Output[str] = None¶The compress type of instance policy. Valid values are
1,4,8.
enable_backup_log: pulumi.Output[bool] = None¶Whether to backup instance log. Valid values are
true,false, Default totrue. Note: The ‘Basic Edition’ category Rds instance does not support setting log backup. What is Basic Edition.
high_space_usage_protection: pulumi.Output[str] = None¶Instance high space usage protection policy. Valid when the
enable_backup_logistrue. Valid values areEnable,Disable.
instance_id: pulumi.Output[str] = None¶The Id of instance that can run database.
local_log_retention_hours: pulumi.Output[float] = None¶Instance log backup local retention hours. Valid when the
enable_backup_logistrue. Valid values: [0-7*24].
local_log_retention_space: pulumi.Output[float] = None¶Instance log backup local retention space. Valid when the
enable_backup_logistrue. Valid values: [5-50].
log_backup: pulumi.Output[bool] = None¶It has been deprecated from version 1.68.0, and use field ‘enable_backup_log’ instead.
log_backup_frequency: pulumi.Output[str] = None¶Instance log backup frequency. Valid when the instance engine is
SQLServer. Valid values areLogInterval.
log_backup_retention_period: pulumi.Output[float] = None¶Instance log backup retention days. Valid when the
enable_backup_logis1. Valid values: [7-730]. Default to 7. It cannot be larger thanbackup_retention_period.
log_retention_period: pulumi.Output[float] = None¶It has been deprecated from version 1.69.0, and use field ‘log_backup_retention_period’ instead.
preferred_backup_periods: pulumi.Output[list] = None¶DB Instance backup period. Please set at least two days to ensure backing up at least twice a week. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]. Default to [“Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, “Saturday”, “Sunday”].
preferred_backup_time: pulumi.Output[str] = None¶DB instance backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to “02:00Z-03:00Z”. China time is 8 hours behind it.
retention_period: pulumi.Output[float] = None¶It has been deprecated from version 1.69.0, and use field ‘backup_retention_period’ instead.
- static
get(resource_name, id, opts=None, archive_backup_keep_count=None, archive_backup_keep_policy=None, archive_backup_retention_period=None, backup_periods=None, backup_retention_period=None, backup_time=None, compress_type=None, enable_backup_log=None, high_space_usage_protection=None, instance_id=None, local_log_retention_hours=None, local_log_retention_space=None, log_backup=None, log_backup_frequency=None, log_backup_retention_period=None, log_retention_period=None, preferred_backup_periods=None, preferred_backup_time=None, retention_period=None)¶ Get an existing BackupPolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
archive_backup_keep_count (pulumi.Input[float]) – Instance archive backup keep count. Valid when the
enable_backup_logistrueand instance is mysql local disk. Whenarchive_backup_keep_policyisByMonthValid values: [1-31]. Whenarchive_backup_keep_policyisByWeekValid values: [1-7].archive_backup_keep_policy (pulumi.Input[str]) – Instance archive backup keep policy. Valid when the
enable_backup_logistrueand instance is mysql local disk. Valid values areByMonth,Disable,KeepAll.archive_backup_retention_period (pulumi.Input[float]) – Instance archive backup retention days. Valid when the
enable_backup_logistrueand instance is mysql local disk. Valid values: [30-1095], andarchive_backup_retention_periodmust larger thanbackup_retention_period730.backup_periods (pulumi.Input[list]) – It has been deprecated from version 1.69.0, and use field ‘preferred_backup_period’ instead.
backup_retention_period (pulumi.Input[float]) – Instance backup retention days. Valid values: [7-730]. Default to 7. But mysql local disk is unlimited.
backup_time (pulumi.Input[str]) – It has been deprecated from version 1.69.0, and use field ‘preferred_backup_time’ instead.
compress_type (pulumi.Input[str]) – The compress type of instance policy. Valid values are
1,4,8.enable_backup_log (pulumi.Input[bool]) –
Whether to backup instance log. Valid values are
true,false, Default totrue. Note: The ‘Basic Edition’ category Rds instance does not support setting log backup. What is Basic Edition.high_space_usage_protection (pulumi.Input[str]) – Instance high space usage protection policy. Valid when the
enable_backup_logistrue. Valid values areEnable,Disable.instance_id (pulumi.Input[str]) – The Id of instance that can run database.
local_log_retention_hours (pulumi.Input[float]) – Instance log backup local retention hours. Valid when the
enable_backup_logistrue. Valid values: [0-7*24].local_log_retention_space (pulumi.Input[float]) – Instance log backup local retention space. Valid when the
enable_backup_logistrue. Valid values: [5-50].log_backup (pulumi.Input[bool]) – It has been deprecated from version 1.68.0, and use field ‘enable_backup_log’ instead.
log_backup_frequency (pulumi.Input[str]) – Instance log backup frequency. Valid when the instance engine is
SQLServer. Valid values areLogInterval.log_backup_retention_period (pulumi.Input[float]) – Instance log backup retention days. Valid when the
enable_backup_logis1. Valid values: [7-730]. Default to 7. It cannot be larger thanbackup_retention_period.log_retention_period (pulumi.Input[float]) – It has been deprecated from version 1.69.0, and use field ‘log_backup_retention_period’ instead.
preferred_backup_periods (pulumi.Input[list]) – DB Instance backup period. Please set at least two days to ensure backing up at least twice a week. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]. Default to [“Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, “Saturday”, “Sunday”].
preferred_backup_time (pulumi.Input[str]) – DB instance backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to “02:00Z-03:00Z”. China time is 8 hours behind it.
retention_period (pulumi.Input[float]) – It has been deprecated from version 1.69.0, and use field ‘backup_retention_period’ instead.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.rds.Connection(resource_name, opts=None, connection_prefix=None, instance_id=None, port=None, __props__=None, __name__=None, __opts__=None)¶ Provides an RDS connection resource to allocate an Internet connection string for RDS instance.
- NOTE: Each RDS instance will allocate a intranet connnection string automatically and its prifix is RDS instance ID.
To avoid unnecessary conflict, please specified a internet connection prefix before applying the resource.
import pulumi import pulumi_alicloud as alicloud config = pulumi.Config() creation = config.get("creation") if creation is None: creation = "Rds" name = config.get("name") if name is None: name = "dbconnectionbasic" default_zones = alicloud.get_zones(available_resource_creation=creation) default_network = alicloud.vpc.Network("defaultNetwork", cidr_block="172.16.0.0/16") default_switch = alicloud.vpc.Switch("defaultSwitch", availability_zone=default_zones.zones[0]["id"], cidr_block="172.16.0.0/24", vpc_id=default_network.id) instance = alicloud.rds.Instance("instance", engine="MySQL", engine_version="5.6", instance_name=name, instance_storage="10", instance_type="rds.mysql.t1.small", vswitch_id=default_switch.id) foo = alicloud.rds.Connection("foo", connection_prefix="testabc", instance_id=instance.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
connection_prefix (pulumi.Input[str]) – Prefix of an Internet connection string. It must be checked for uniqueness. It may consist of lowercase letters, numbers, and underlines, and must start with a letter and have no more than 30 characters. Default to
+ ‘tf’. instance_id (pulumi.Input[str]) – The Id of instance that can run database.
port (pulumi.Input[str]) – Internet connection port. Valid value: [3001-3999]. Default to 3306.
connection_prefix: pulumi.Output[str] = None¶Prefix of an Internet connection string. It must be checked for uniqueness. It may consist of lowercase letters, numbers, and underlines, and must start with a letter and have no more than 30 characters. Default to
+ ‘tf’.
connection_string: pulumi.Output[str] = None¶Connection instance string.
instance_id: pulumi.Output[str] = None¶The Id of instance that can run database.
ip_address: pulumi.Output[str] = None¶The ip address of connection string.
port: pulumi.Output[str] = None¶Internet connection port. Valid value: [3001-3999]. Default to 3306.
- static
get(resource_name, id, opts=None, connection_prefix=None, connection_string=None, instance_id=None, ip_address=None, port=None)¶ Get an existing Connection resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
connection_prefix (pulumi.Input[str]) – Prefix of an Internet connection string. It must be checked for uniqueness. It may consist of lowercase letters, numbers, and underlines, and must start with a letter and have no more than 30 characters. Default to
+ ‘tf’. connection_string (pulumi.Input[str]) – Connection instance string.
instance_id (pulumi.Input[str]) – The Id of instance that can run database.
ip_address (pulumi.Input[str]) – The ip address of connection string.
port (pulumi.Input[str]) – Internet connection port. Valid value: [3001-3999]. Default to 3306.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.rds.Database(resource_name, opts=None, character_set=None, description=None, instance_id=None, name=None, __props__=None, __name__=None, __opts__=None)¶ Provides an RDS database resource. A DB database deployed in a DB instance. A DB instance can own multiple databases.
NOTE: This resource does not support creating ‘PPAS’ database. You have to login RDS instance to create manually.
import pulumi import pulumi_alicloud as alicloud config = pulumi.Config() creation = config.get("creation") if creation is None: creation = "Rds" name = config.get("name") if name is None: name = "dbdatabasebasic" default_zones = alicloud.get_zones(available_resource_creation=creation) default_network = alicloud.vpc.Network("defaultNetwork", cidr_block="172.16.0.0/16") default_switch = alicloud.vpc.Switch("defaultSwitch", availability_zone=default_zones.zones[0]["id"], cidr_block="172.16.0.0/24", vpc_id=default_network.id) instance = alicloud.rds.Instance("instance", engine="MySQL", engine_version="5.6", instance_name=name, instance_storage="10", instance_type="rds.mysql.s1.small", vswitch_id=default_switch.id) default_database = alicloud.rds.Database("defaultDatabase", instance_id=instance.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
character_set (pulumi.Input[str]) – Character set. The value range is limited to the following:
- MySQL: [ utf8, gbk, latin1, utf8mb4 ] \(`utf8mb4` only supports versions 5.5 and 5.6\). - SQLServer: [ Chinese_PRC_CI_AS, Chinese_PRC_CS_AS, SQL_Latin1_General_CP1_CI_AS, SQL_Latin1_General_CP1_CS_AS, Chinese_PRC_BIN ] - PostgreSQL: [ KOI8U、UTF8、WIN866、WIN874、WIN1250、WIN1251、WIN1252、WIN1253、WIN1254、WIN1255、WIN1256、WIN1257、WIN1258、EUC_CN、EUC_KR、EUC_TW、EUC_JP、EUC_JIS_2004、KOI8R、MULE_INTERNAL、LATIN1、LATIN2、LATIN3、LATIN4、LATIN5、LATIN6、LATIN7、LATIN8、LATIN9、LATIN10、ISO_8859_5、ISO_8859_6、ISO_8859_7、ISO_8859_8、SQL_ASCII ]
- Parameters
description (pulumi.Input[str]) – Database description. It cannot begin with https://. It must start with a Chinese character or English letter. It can include Chinese and English characters, underlines (_), hyphens (-), and numbers. The length may be 2-256 characters.
instance_id (pulumi.Input[str]) – The Id of instance that can run database.
name (pulumi.Input[str]) – Name of the database requiring a uniqueness check. It may consist of lower case letters, numbers, and underlines, and must start with a letter and have no more than 64 characters.
character_set: pulumi.Output[str] = None¶Character set. The value range is limited to the following:
MySQL: [ utf8, gbk, latin1, utf8mb4 ] (
utf8mb4only supports versions 5.5 and 5.6).SQLServer: [ Chinese_PRC_CI_AS, Chinese_PRC_CS_AS, SQL_Latin1_General_CP1_CI_AS, SQL_Latin1_General_CP1_CS_AS, Chinese_PRC_BIN ]
PostgreSQL: [ KOI8U、UTF8、WIN866、WIN874、WIN1250、WIN1251、WIN1252、WIN1253、WIN1254、WIN1255、WIN1256、WIN1257、WIN1258、EUC_CN、EUC_KR、EUC_TW、EUC_JP、EUC_JIS_2004、KOI8R、MULE_INTERNAL、LATIN1、LATIN2、LATIN3、LATIN4、LATIN5、LATIN6、LATIN7、LATIN8、LATIN9、LATIN10、ISO_8859_5、ISO_8859_6、ISO_8859_7、ISO_8859_8、SQL_ASCII ]
description: pulumi.Output[str] = None¶Database description. It cannot begin with https://. It must start with a Chinese character or English letter. It can include Chinese and English characters, underlines (_), hyphens (-), and numbers. The length may be 2-256 characters.
instance_id: pulumi.Output[str] = None¶The Id of instance that can run database.
name: pulumi.Output[str] = None¶Name of the database requiring a uniqueness check. It may consist of lower case letters, numbers, and underlines, and must start with a letter and have no more than 64 characters.
- static
get(resource_name, id, opts=None, character_set=None, description=None, instance_id=None, name=None)¶ Get an existing Database resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
character_set (pulumi.Input[str]) – Character set. The value range is limited to the following:
- MySQL: [ utf8, gbk, latin1, utf8mb4 ] \(`utf8mb4` only supports versions 5.5 and 5.6\). - SQLServer: [ Chinese_PRC_CI_AS, Chinese_PRC_CS_AS, SQL_Latin1_General_CP1_CI_AS, SQL_Latin1_General_CP1_CS_AS, Chinese_PRC_BIN ] - PostgreSQL: [ KOI8U、UTF8、WIN866、WIN874、WIN1250、WIN1251、WIN1252、WIN1253、WIN1254、WIN1255、WIN1256、WIN1257、WIN1258、EUC_CN、EUC_KR、EUC_TW、EUC_JP、EUC_JIS_2004、KOI8R、MULE_INTERNAL、LATIN1、LATIN2、LATIN3、LATIN4、LATIN5、LATIN6、LATIN7、LATIN8、LATIN9、LATIN10、ISO_8859_5、ISO_8859_6、ISO_8859_7、ISO_8859_8、SQL_ASCII ]
- Parameters
description (pulumi.Input[str]) – Database description. It cannot begin with https://. It must start with a Chinese character or English letter. It can include Chinese and English characters, underlines (_), hyphens (-), and numbers. The length may be 2-256 characters.
instance_id (pulumi.Input[str]) – The Id of instance that can run database.
name (pulumi.Input[str]) – Name of the database requiring a uniqueness check. It may consist of lower case letters, numbers, and underlines, and must start with a letter and have no more than 64 characters.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.rds.GetInstanceClassesResult(category=None, db_instance_class=None, engine=None, engine_version=None, id=None, ids=None, instance_charge_type=None, instance_classes=None, multi_zone=None, output_file=None, sorted_by=None, storage_type=None, zone_id=None)¶ A collection of values returned by getInstanceClasses.
id= None¶The provider-assigned unique ID for this managed resource.
ids= None¶(Available in 1.60.0+) A list of Rds instance class codes.
instance_classes= None¶A list of Rds available resource. Each element contains the following attributes:
- class
pulumi_alicloud.rds.GetInstanceEnginesResult(engine=None, engine_version=None, id=None, instance_charge_type=None, instance_engines=None, multi_zone=None, output_file=None, zone_id=None)¶ A collection of values returned by getInstanceEngines.
engine= None¶Database type.
engine_version= None¶DB Instance version.
id= None¶The provider-assigned unique ID for this managed resource.
instance_engines= None¶A list of Rds available resource. Each element contains the following attributes:
- class
pulumi_alicloud.rds.GetInstancesResult(connection_mode=None, db_type=None, engine=None, id=None, ids=None, instances=None, name_regex=None, names=None, output_file=None, status=None, tags=None, vpc_id=None, vswitch_id=None)¶ A collection of values returned by getInstances.
connection_mode= None¶Standardfor standard access mode andSafefor high security access mode.
db_type= None¶Primaryfor primary instance,Readonlyfor read-only instance,Guardfor disaster recovery instance, andTempfor temporary instance.
engine= None¶Database type. Options are
MySQL,SQLServer,PostgreSQLandPPAS. If no value is specified, all types are returned.
id= None¶The provider-assigned unique ID for this managed resource.
ids= None¶A list of RDS instance IDs.
instances= None¶A list of RDS instances. Each element contains the following attributes:
names= None¶A list of RDS instance names.
status= None¶Status of the instance.
vpc_id= None¶ID of the VPC the instance belongs to.
vswitch_id= None¶ID of the VSwitch the instance belongs to.
- class
pulumi_alicloud.rds.GetZonesResult(id=None, ids=None, instance_charge_type=None, multi=None, output_file=None, zones=None)¶ A collection of values returned by getZones.
id= None¶The provider-assigned unique ID for this managed resource.
ids= None¶A list of zone IDs.
zones= None¶A list of availability zones. Each element contains the following attributes:
- class
pulumi_alicloud.rds.Instance(resource_name, opts=None, auto_renew=None, auto_renew_period=None, auto_upgrade_minor_version=None, db_instance_storage_type=None, engine=None, engine_version=None, force_restart=None, instance_charge_type=None, instance_name=None, instance_storage=None, instance_type=None, maintain_time=None, monitoring_period=None, parameters=None, period=None, resource_group_id=None, security_group_id=None, security_group_ids=None, security_ip_mode=None, security_ips=None, sql_collector_config_value=None, sql_collector_status=None, tags=None, vswitch_id=None, zone_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides an RDS instance resource. A DB instance is an isolated database environment in the cloud. A DB instance can contain multiple user-created databases.
import pulumi import pulumi_alicloud as alicloud config = pulumi.Config() name = config.get("name") if name is None: name = "dbInstanceconfig" creation = config.get("creation") if creation is None: creation = "Rds" default_zones = alicloud.get_zones(available_resource_creation=creation) default_network = alicloud.vpc.Network("defaultNetwork", cidr_block="172.16.0.0/16") default_switch = alicloud.vpc.Switch("defaultSwitch", availability_zone=default_zones.zones[0]["id"], cidr_block="172.16.0.0/24", vpc_id=default_network.id) default_instance = alicloud.rds.Instance("defaultInstance", engine="MySQL", engine_version="5.6", instance_charge_type="Postpaid", instance_name=name, instance_storage="30", instance_type="rds.mysql.s2.large", monitoring_period="60", vswitch_id=default_switch.id)
import pulumi import pulumi_alicloud as alicloud default_network = alicloud.vpc.Network("defaultNetwork", cidr_block="172.16.0.0/16") default_switch = alicloud.vpc.Switch("defaultSwitch", availability_zone=data[".getZones"]["default"]["zones"][0]["id"], cidr_block="172.16.0.0/24", vpc_id=default_network.id) default_instance = alicloud.rds.Instance("defaultInstance", db_instance_class="rds.mysql.t1.small", db_instance_storage="10", engine="MySQL", engine_version="5.6", parameters=[ { "name": "innodb_large_prefix", "value": "ON", }, { "name": "connect_timeout", "value": "50", }, ])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
auto_renew (pulumi.Input[bool]) – Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is
PrePaid. Default tofalse.auto_renew_period (pulumi.Input[float]) – 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_minor_version (pulumi.Input[str]) – 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.
- Parameters
db_instance_storage_type (pulumi.Input[str]) – The storage type of the instance. Valid values:
- local_ssd: specifies to use local SSDs. This value is recommended. - cloud_ssd: specifies to use standard SSDs. - cloud_essd: specifies to use enhanced SSDs (ESSDs). - cloud_essd2: specifies to use enhanced SSDs (ESSDs). - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
- Parameters
engine (pulumi.Input[str]) – Database type. Value options: MySQL, SQLServer, PostgreSQL, and PPAS.
engine_version (pulumi.Input[str]) – Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion.force_restart (pulumi.Input[bool]) – Set it to true to make some parameter efficient when modifying them. Default to false.
instance_charge_type (pulumi.Input[str]) – Valid values are
Prepaid,Postpaid, Default toPostpaid. Currently, the resource only supports PostPaid to PrePaid.instance_name (pulumi.Input[str]) – The name of DB instance. It a string of 2 to 256 characters.
instance_storage (pulumi.Input[float]) – User-defined DB instance storage space. Value range:
- [5, 2000] for MySQL/PostgreSQL/PPAS HA dual node edition; - [20,1000] for MySQL 5.7 basic single node edition; - [10, 2000] for SQL Server 2008R2; - [20,2000] for SQL Server 2012 basic single node edition Increase progressively at a rate of 5 GB. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm). Note: There is extra 5 GB storage for SQL Server Instance and it is not in specified `instance_storage`.
- Parameters
instance_type (pulumi.Input[str]) – DB Instance type. For details, see Instance type table.
maintain_time (pulumi.Input[str]) – Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
monitoring_period (pulumi.Input[float]) – The monitoring frequency in seconds. Valid values are 5, 60, 300. Defaults to 300.
parameters (pulumi.Input[list]) – Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates .
period (pulumi.Input[float]) – The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid. Valid values: [1~9], 12, 24, 36. Default to 1.resource_group_id (pulumi.Input[str]) – The ID of resource group which the DB instance belongs.
security_group_id (pulumi.Input[str]) – It has been deprecated from 1.69.0 and use
security_group_idsinstead.security_group_ids (pulumi.Input[list]) – , Available in 1.69.0+) The list IDs to join ECS Security Group. At most supports three security groups.
security_ip_mode (pulumi.Input[str]) – Valid values are
normal,safety, Default tonormal. supportsafetyswitch to high security access modesecurity_ips (pulumi.Input[list]) – List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
sql_collector_config_value (pulumi.Input[float]) – The sql collector keep time of the instance. Valid values are
30,180,365,1095,1825, Default to30.sql_collector_status (pulumi.Input[str]) – The sql collector status of the instance. Valid values are
Enabled,Disabled, Default toDisabled.tags (pulumi.Input[dict]) – 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.
- Parameters
vswitch_id (pulumi.Input[str]) – The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
zone_id (pulumi.Input[str]) – The Zone to launch the DB instance. From version 1.8.1, it supports multiple zone. If it is a multi-zone and
vswitch_idis specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmultito “true” in the data source.getZones.
The parameters object supports the following:
name(pulumi.Input[str])value(pulumi.Input[str])
auto_renew: pulumi.Output[bool] = None¶Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is
PrePaid. Default tofalse.
auto_renew_period: pulumi.Output[float] = None¶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_minor_version: pulumi.Output[str] = None¶The upgrade method to use. Valid values:
Auto: Instances are automatically upgraded to a higher minor version.
Manual: Instances are forcibly upgraded to a higher minor version when the current version is unpublished.
connection_string: pulumi.Output[str] = None¶RDS database connection string.
db_instance_storage_type: pulumi.Output[str] = None¶The storage type of the instance. Valid values:
local_ssd: specifies to use local SSDs. This value is recommended.
cloud_ssd: specifies to use standard SSDs.
cloud_essd: specifies to use enhanced SSDs (ESSDs).
cloud_essd2: specifies to use enhanced SSDs (ESSDs).
cloud_essd3: specifies to use enhanced SSDs (ESSDs).
engine: pulumi.Output[str] = None¶Database type. Value options: MySQL, SQLServer, PostgreSQL, and PPAS.
engine_version: pulumi.Output[str] = None¶Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion.
force_restart: pulumi.Output[bool] = None¶Set it to true to make some parameter efficient when modifying them. Default to false.
instance_charge_type: pulumi.Output[str] = None¶Valid values are
Prepaid,Postpaid, Default toPostpaid. Currently, the resource only supports PostPaid to PrePaid.
instance_name: pulumi.Output[str] = None¶The name of DB instance. It a string of 2 to 256 characters.
instance_storage: pulumi.Output[float] = None¶User-defined DB instance storage space. Value range:
[5, 2000] for MySQL/PostgreSQL/PPAS HA dual node edition;
[20,1000] for MySQL 5.7 basic single node edition;
[10, 2000] for SQL Server 2008R2;
[20,2000] for SQL Server 2012 basic single node edition Increase progressively at a rate of 5 GB. For details, see Instance type table. Note: There is extra 5 GB storage for SQL Server Instance and it is not in specified
instance_storage.
instance_type: pulumi.Output[str] = None¶DB Instance type. For details, see Instance type table.
maintain_time: pulumi.Output[str] = None¶Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
monitoring_period: pulumi.Output[float] = None¶The monitoring frequency in seconds. Valid values are 5, 60, 300. Defaults to 300.
parameters: pulumi.Output[list] = None¶Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates .
name(str)value(str)
period: pulumi.Output[float] = None¶The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid. Valid values: [1~9], 12, 24, 36. Default to 1.
port: pulumi.Output[str] = None¶RDS database connection port.
resource_group_id: pulumi.Output[str] = None¶The ID of resource group which the DB instance belongs.
security_group_id: pulumi.Output[str] = None¶It has been deprecated from 1.69.0 and use
security_group_idsinstead.
security_group_ids: pulumi.Output[list] = None¶, Available in 1.69.0+) The list IDs to join ECS Security Group. At most supports three security groups.
security_ip_mode: pulumi.Output[str] = None¶Valid values are
normal,safety, Default tonormal. supportsafetyswitch to high security access mode
security_ips: pulumi.Output[list] = None¶List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
sql_collector_config_value: pulumi.Output[float] = None¶The sql collector keep time of the instance. Valid values are
30,180,365,1095,1825, Default to30.
sql_collector_status: pulumi.Output[str] = None¶The sql collector status of the instance. Valid values are
Enabled,Disabled, Default toDisabled.
A mapping of tags to assign to the resource.
vswitch_id: pulumi.Output[str] = None¶The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
zone_id: pulumi.Output[str] = None¶The Zone to launch the DB instance. From version 1.8.1, it supports multiple zone. If it is a multi-zone and
vswitch_idis specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmultito “true” in the data source.getZones.
- static
get(resource_name, id, opts=None, auto_renew=None, auto_renew_period=None, auto_upgrade_minor_version=None, connection_string=None, db_instance_storage_type=None, engine=None, engine_version=None, force_restart=None, instance_charge_type=None, instance_name=None, instance_storage=None, instance_type=None, maintain_time=None, monitoring_period=None, parameters=None, period=None, port=None, resource_group_id=None, security_group_id=None, security_group_ids=None, security_ip_mode=None, security_ips=None, sql_collector_config_value=None, sql_collector_status=None, tags=None, vswitch_id=None, zone_id=None)¶ Get an existing Instance resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
auto_renew (pulumi.Input[bool]) – Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is
PrePaid. Default tofalse.auto_renew_period (pulumi.Input[float]) – 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_minor_version (pulumi.Input[str]) – 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.
- Parameters
connection_string (pulumi.Input[str]) – RDS database connection string.
db_instance_storage_type (pulumi.Input[str]) – The storage type of the instance. Valid values:
- local_ssd: specifies to use local SSDs. This value is recommended. - cloud_ssd: specifies to use standard SSDs. - cloud_essd: specifies to use enhanced SSDs (ESSDs). - cloud_essd2: specifies to use enhanced SSDs (ESSDs). - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
- Parameters
engine (pulumi.Input[str]) – Database type. Value options: MySQL, SQLServer, PostgreSQL, and PPAS.
engine_version (pulumi.Input[str]) –
Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion.force_restart (pulumi.Input[bool]) – Set it to true to make some parameter efficient when modifying them. Default to false.
instance_charge_type (pulumi.Input[str]) – Valid values are
Prepaid,Postpaid, Default toPostpaid. Currently, the resource only supports PostPaid to PrePaid.instance_name (pulumi.Input[str]) – The name of DB instance. It a string of 2 to 256 characters.
instance_storage (pulumi.Input[float]) – User-defined DB instance storage space. Value range:
- [5, 2000] for MySQL/PostgreSQL/PPAS HA dual node edition; - [20,1000] for MySQL 5.7 basic single node edition; - [10, 2000] for SQL Server 2008R2; - [20,2000] for SQL Server 2012 basic single node edition Increase progressively at a rate of 5 GB. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm). Note: There is extra 5 GB storage for SQL Server Instance and it is not in specified `instance_storage`.
- Parameters
instance_type (pulumi.Input[str]) –
DB Instance type. For details, see Instance type table.
maintain_time (pulumi.Input[str]) – Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
monitoring_period (pulumi.Input[float]) – The monitoring frequency in seconds. Valid values are 5, 60, 300. Defaults to 300.
parameters (pulumi.Input[list]) –
Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates .
period (pulumi.Input[float]) – The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid. Valid values: [1~9], 12, 24, 36. Default to 1.port (pulumi.Input[str]) – RDS database connection port.
resource_group_id (pulumi.Input[str]) – The ID of resource group which the DB instance belongs.
security_group_id (pulumi.Input[str]) – It has been deprecated from 1.69.0 and use
security_group_idsinstead.security_group_ids (pulumi.Input[list]) – , Available in 1.69.0+) The list IDs to join ECS Security Group. At most supports three security groups.
security_ip_mode (pulumi.Input[str]) – Valid values are
normal,safety, Default tonormal. supportsafetyswitch to high security access modesecurity_ips (pulumi.Input[list]) – List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
sql_collector_config_value (pulumi.Input[float]) – The sql collector keep time of the instance. Valid values are
30,180,365,1095,1825, Default to30.sql_collector_status (pulumi.Input[str]) – The sql collector status of the instance. Valid values are
Enabled,Disabled, Default toDisabled.tags (pulumi.Input[dict]) – 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.
- Parameters
vswitch_id (pulumi.Input[str]) – The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
zone_id (pulumi.Input[str]) – The Zone to launch the DB instance. From version 1.8.1, it supports multiple zone. If it is a multi-zone and
vswitch_idis specified, the vswitch must in the one of them. The multiple zone ID can be retrieved by settingmultito “true” in the data source.getZones.
The parameters object supports the following:
name(pulumi.Input[str])value(pulumi.Input[str])
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.rds.ReadOnlyInstance(resource_name, opts=None, engine_version=None, instance_name=None, instance_storage=None, instance_type=None, master_db_instance_id=None, parameters=None, resource_group_id=None, tags=None, vswitch_id=None, zone_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides an RDS readonly instance resource.
import pulumi import pulumi_alicloud as alicloud config = pulumi.Config() creation = config.get("creation") if creation is None: creation = "Rds" name = config.get("name") if name is None: name = "dbInstancevpc" default_zones = alicloud.get_zones(available_resource_creation=creation) default_network = alicloud.vpc.Network("defaultNetwork", cidr_block="172.16.0.0/16") default_switch = alicloud.vpc.Switch("defaultSwitch", availability_zone=default_zones.zones[0]["id"], cidr_block="172.16.0.0/24", vpc_id=default_network.id) default_instance = alicloud.rds.Instance("defaultInstance", engine="MySQL", engine_version="5.6", instance_charge_type="Postpaid", instance_name=name, instance_storage="20", instance_type="rds.mysql.t1.small", security_ips=[ "10.168.1.12", "100.69.7.112", ], vswitch_id=default_switch.id) default_read_only_instance = alicloud.rds.ReadOnlyInstance("defaultReadOnlyInstance", engine_version=default_instance.engine_version, instance_name=f"{name}ro", instance_storage="30", instance_type=default_instance.instance_type, master_db_instance_id=default_instance.id, vswitch_id=default_switch.id, zone_id=default_instance.zone_id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
engine_version (pulumi.Input[str]) –
Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion.instance_name (pulumi.Input[str]) – The name of DB instance. It a string of 2 to 256 characters.
instance_storage (pulumi.Input[float]) –
User-defined DB instance storage space. Value range: [5, 2000] for MySQL/SQL Server HA dual node edition. Increase progressively at a rate of 5 GB. For details, see Instance type table.
instance_type (pulumi.Input[str]) –
DB Instance type. For details, see Instance type table.
master_db_instance_id (pulumi.Input[str]) – ID of the master instance.
parameters (pulumi.Input[list]) –
Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates.
resource_group_id (pulumi.Input[str]) – The ID of resource group which the DB read-only instance belongs.
tags (pulumi.Input[dict]) – 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.
- Parameters
vswitch_id (pulumi.Input[str]) – The virtual switch ID to launch DB instances in one VPC.
zone_id (pulumi.Input[str]) – The Zone to launch the DB instance.
The parameters object supports the following:
name(pulumi.Input[str])value(pulumi.Input[str])
connection_string: pulumi.Output[str] = None¶RDS database connection string.
engine: pulumi.Output[str] = None¶Database type.
engine_version: pulumi.Output[str] = None¶Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion.
instance_name: pulumi.Output[str] = None¶The name of DB instance. It a string of 2 to 256 characters.
instance_storage: pulumi.Output[float] = None¶User-defined DB instance storage space. Value range: [5, 2000] for MySQL/SQL Server HA dual node edition. Increase progressively at a rate of 5 GB. For details, see Instance type table.
instance_type: pulumi.Output[str] = None¶DB Instance type. For details, see Instance type table.
master_db_instance_id: pulumi.Output[str] = None¶ID of the master instance.
parameters: pulumi.Output[list] = None¶Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates.
name(str)value(str)
port: pulumi.Output[str] = None¶RDS database connection port.
resource_group_id: pulumi.Output[str] = None¶The ID of resource group which the DB read-only instance belongs.
A mapping of tags to assign to the resource.
vswitch_id: pulumi.Output[str] = None¶The virtual switch ID to launch DB instances in one VPC.
zone_id: pulumi.Output[str] = None¶The Zone to launch the DB instance.
- static
get(resource_name, id, opts=None, connection_string=None, engine=None, engine_version=None, instance_name=None, instance_storage=None, instance_type=None, master_db_instance_id=None, parameters=None, port=None, resource_group_id=None, tags=None, vswitch_id=None, zone_id=None)¶ Get an existing ReadOnlyInstance resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
connection_string (pulumi.Input[str]) – RDS database connection string.
engine (pulumi.Input[str]) – Database type.
engine_version (pulumi.Input[str]) –
Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion.instance_name (pulumi.Input[str]) – The name of DB instance. It a string of 2 to 256 characters.
instance_storage (pulumi.Input[float]) –
User-defined DB instance storage space. Value range: [5, 2000] for MySQL/SQL Server HA dual node edition. Increase progressively at a rate of 5 GB. For details, see Instance type table.
instance_type (pulumi.Input[str]) –
DB Instance type. For details, see Instance type table.
master_db_instance_id (pulumi.Input[str]) – ID of the master instance.
parameters (pulumi.Input[list]) –
Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates.
port (pulumi.Input[str]) – RDS database connection port.
resource_group_id (pulumi.Input[str]) – The ID of resource group which the DB read-only instance belongs.
tags (pulumi.Input[dict]) – 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.
- Parameters
vswitch_id (pulumi.Input[str]) – The virtual switch ID to launch DB instances in one VPC.
zone_id (pulumi.Input[str]) – The Zone to launch the DB instance.
The parameters object supports the following:
name(pulumi.Input[str])value(pulumi.Input[str])
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.rds.ReadWriteSplittingConnection(resource_name, opts=None, connection_prefix=None, distribution_type=None, instance_id=None, max_delay_time=None, port=None, weight=None, __props__=None, __name__=None, __opts__=None)¶ Provides an RDS read write splitting connection resource to allocate an Intranet connection string for RDS instance.
import pulumi import pulumi_alicloud as alicloud config = pulumi.Config() creation = config.get("creation") if creation is None: creation = "Rds" name = config.get("name") if name is None: name = "dbInstancevpc" default_zones = alicloud.get_zones(available_resource_creation=creation) default_network = alicloud.vpc.Network("defaultNetwork", cidr_block="172.16.0.0/16") default_switch = alicloud.vpc.Switch("defaultSwitch", availability_zone=default_zones.zones[0]["id"], cidr_block="172.16.0.0/24", vpc_id=default_network.id) default_instance = alicloud.rds.Instance("defaultInstance", engine="MySQL", engine_version="5.6", instance_charge_type="Postpaid", instance_name=name, instance_storage="20", instance_type="rds.mysql.t1.small", security_ips=[ "10.168.1.12", "100.69.7.112", ], vswitch_id=default_switch.id) default_read_only_instance = alicloud.rds.ReadOnlyInstance("defaultReadOnlyInstance", engine_version=default_instance.engine_version, instance_name=f"{name}ro", instance_storage="30", instance_type=default_instance.instance_type, master_db_instance_id=default_instance.id, vswitch_id=default_switch.id, zone_id=default_instance.zone_id) default_read_write_splitting_connection = alicloud.rds.ReadWriteSplittingConnection("defaultReadWriteSplittingConnection", connection_prefix="t-con-123", distribution_type="Standard", instance_id=default_instance.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
connection_prefix (pulumi.Input[str]) – Prefix of an Internet connection string. It must be checked for uniqueness. It may consist of lowercase letters, numbers, and underlines, and must start with a letter and have no more than 30 characters. Default to
+ ‘rw’. distribution_type (pulumi.Input[str]) – Read weight distribution mode. Values are as follows:
Standardindicates automatic weight distribution based on types,Customindicates custom weight distribution.instance_id (pulumi.Input[str]) – The Id of instance that can run database.
max_delay_time (pulumi.Input[float]) – Delay threshold, in seconds. The value range is 0 to 7200. Default to 30. Read requests are not routed to the read-only instances with a delay greater than the threshold.
port (pulumi.Input[float]) – Intranet connection port. Valid value: [3001-3999]. Default to 3306.
weight (pulumi.Input[dict]) – Read weight distribution. Read weights increase at a step of 100 up to 10,000. Enter weights in the following format: {“Instanceid”:”Weight”,”Instanceid”:”Weight”}. This parameter must be set when distribution_type is set to Custom.
connection_prefix: pulumi.Output[str] = None¶Prefix of an Internet connection string. It must be checked for uniqueness. It may consist of lowercase letters, numbers, and underlines, and must start with a letter and have no more than 30 characters. Default to
+ ‘rw’.
connection_string: pulumi.Output[str] = None¶Connection instance string.
distribution_type: pulumi.Output[str] = None¶Read weight distribution mode. Values are as follows:
Standardindicates automatic weight distribution based on types,Customindicates custom weight distribution.
instance_id: pulumi.Output[str] = None¶The Id of instance that can run database.
max_delay_time: pulumi.Output[float] = None¶Delay threshold, in seconds. The value range is 0 to 7200. Default to 30. Read requests are not routed to the read-only instances with a delay greater than the threshold.
port: pulumi.Output[float] = None¶Intranet connection port. Valid value: [3001-3999]. Default to 3306.
weight: pulumi.Output[dict] = None¶Read weight distribution. Read weights increase at a step of 100 up to 10,000. Enter weights in the following format: {“Instanceid”:”Weight”,”Instanceid”:”Weight”}. This parameter must be set when distribution_type is set to Custom.
- static
get(resource_name, id, opts=None, connection_prefix=None, connection_string=None, distribution_type=None, instance_id=None, max_delay_time=None, port=None, weight=None)¶ Get an existing ReadWriteSplittingConnection resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
connection_prefix (pulumi.Input[str]) – Prefix of an Internet connection string. It must be checked for uniqueness. It may consist of lowercase letters, numbers, and underlines, and must start with a letter and have no more than 30 characters. Default to
+ ‘rw’. connection_string (pulumi.Input[str]) – Connection instance string.
distribution_type (pulumi.Input[str]) – Read weight distribution mode. Values are as follows:
Standardindicates automatic weight distribution based on types,Customindicates custom weight distribution.instance_id (pulumi.Input[str]) – The Id of instance that can run database.
max_delay_time (pulumi.Input[float]) – Delay threshold, in seconds. The value range is 0 to 7200. Default to 30. Read requests are not routed to the read-only instances with a delay greater than the threshold.
port (pulumi.Input[float]) – Intranet connection port. Valid value: [3001-3999]. Default to 3306.
weight (pulumi.Input[dict]) – Read weight distribution. Read weights increase at a step of 100 up to 10,000. Enter weights in the following format: {“Instanceid”:”Weight”,”Instanceid”:”Weight”}. This parameter must be set when distribution_type is set to Custom.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
pulumi_alicloud.rds.get_instance_classes(category=None, db_instance_class=None, engine=None, engine_version=None, instance_charge_type=None, multi_zone=None, output_file=None, sorted_by=None, storage_type=None, zone_id=None, opts=None)¶This data source provides the RDS instance classes resource available info of Alibaba Cloud.
NOTE: Available in v1.46.0+
import pulumi import pulumi_alicloud as alicloud resources = alicloud.rds.get_instance_classes(engine="MySQL", engine_version="5.6", instance_charge_type="PostPaid", output_file="./classes.txt") pulumi.export("firstDbInstanceClass", resources.instance_classes[0]["instance_class"])
- Parameters
category (str) – DB Instance category. the value like [
Basic,HighAvailability,Finance], detail info.db_instance_class (str) – The DB instance class type by the user.
engine (str) – Database type. Options are
MySQL,SQLServer,PostgreSQLandPPAS. If no value is specified, all types are returned.engine_version (str) –
Database version required by the user. Value options can refer to the latest docs detail info
EngineVersion.instance_charge_type (str) – Filter the results by charge type. Valid values:
PrePaidandPostPaid. Default toPostPaid.multi_zone (bool) – Whether to show multi available zone. Default false to not show multi availability zone.
storage_type (str) – The DB instance storage space required by the user. Valid values:
cloud_ssdandlocal_ssd.zone_id (str) – The Zone to launch the DB instance.
pulumi_alicloud.rds.get_instance_engines(engine=None, engine_version=None, instance_charge_type=None, multi_zone=None, output_file=None, zone_id=None, opts=None)¶This data source provides the RDS instance engines resource available info of Alibaba Cloud.
NOTE: Available in v1.46.0+
import pulumi import pulumi_alicloud as alicloud resources = alicloud.rds.get_instance_engines(engine="MySQL", engine_version="5.6", instance_charge_type="PostPaid", output_file="./engines.txt") pulumi.export("firstDbCategory", resources.instance_engines[0]["category"])
- Parameters
engine (str) – Database type. Options are
MySQL,SQLServer,PostgreSQLandPPAS. If no value is specified, all types are returned.engine_version (str) –
Database version required by the user. Value options can refer to the latest docs detail info
EngineVersion.instance_charge_type (str) – Filter the results by charge type. Valid values:
PrePaidandPostPaid. Default toPostPaid.multi_zone (bool) – Whether to show multi available zone. Default false to not show multi availability zone.
zone_id (str) – The Zone to launch the DB instance.
pulumi_alicloud.rds.get_instances(connection_mode=None, db_type=None, engine=None, ids=None, name_regex=None, output_file=None, status=None, tags=None, vpc_id=None, vswitch_id=None, opts=None)¶The
rds.getInstancesdata source provides a collection of RDS instances available in Alibaba Cloud account. Filters support regular expression for the instance name, searches by tags, and other filters which are listed below.import pulumi import pulumi_alicloud as alicloud db_instances_ds = alicloud.rds.get_instances(name_regex="data-\d+", status="Running", tags={ "size": "tiny", "type": "database", }) pulumi.export("firstDbInstanceId", db_instances_ds.instances[0]["id"])
- Parameters
connection_mode (str) –
Standardfor standard access mode andSafefor high security access mode.db_type (str) –
Primaryfor primary instance,Readonlyfor read-only instance,Guardfor disaster recovery instance, andTempfor temporary instance.engine (str) – Database type. Options are
MySQL,SQLServer,PostgreSQLandPPAS. If no value is specified, all types are returned.ids (list) – A list of RDS instance IDs.
name_regex (str) – A regex string to filter results by instance name.
status (str) – Status of the instance.
tags (dict) – A map of tags assigned to the DB instances. Note: Before 1.60.0, the value’s format is a
jsonstring which includingTagKeyandTagValue.TagKeycannot be null, andTagValuecan be empty. Format example"{"key1":"value1"}"vpc_id (str) – Used to retrieve instances belong to specified VPC.
vswitch_id (str) – Used to retrieve instances belong to specified
vswitchresources.
pulumi_alicloud.rds.get_zones(instance_charge_type=None, multi=None, output_file=None, opts=None)¶This data source provides availability zones for RDS that can be accessed by an Alibaba Cloud account within the region configured in the provider.
NOTE: Available in v1.73.0+.
import pulumi import pulumi_alicloud as alicloud zones_ids = alicloud.rds.get_zones() # Create an RDS instance with the first matched zone db = alicloud.rds.Instance("db", zone_id=zones_ids.zones[0]) # Other properties...
- Parameters
instance_charge_type (str) – Filter the results by a specific instance charge type. Valid values:
PrePaidandPostPaid. Default toPostPaid.multi (bool) – Indicate whether the zones can be used in a multi AZ configuration. Default to
false. Multi AZ is usually used to launch RDS instances.