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.
adb¶
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.adb.Account(resource_name, opts=None, account_description=None, account_name=None, account_password=None, db_cluster_id=None, kms_encrypted_password=None, kms_encryption_context=None, __props__=None, __name__=None, __opts__=None)¶ Provides a ADB account resource and used to manage databases.
NOTE: Available in v1.71.0+.
import pulumi import pulumi_alicloud as alicloud config = pulumi.Config() creation = config.get("creation") if creation is None: creation = "ADB" name = config.get("name") if name is None: name = "adbaccountmysql" 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) cluster = alicloud.adb.Cluster("cluster", db_cluster_category="Cluster", db_cluster_version="3.0", db_node_class="C8", db_node_count=2, db_node_storage=200, description=name, pay_type="PostPaid", vswitch_id=default_switch.id) account = alicloud.adb.Account("account", account_description=name, account_name="tftestnormal", account_password="Test12345", db_cluster_id=cluster.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
account*description (pulumi.Input[str]) –
Account 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.
account_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.
account_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
account_passwordandkms_encrypted_passwordfields.db_cluster_id (pulumi.Input[str]) – The Id of cluster in which account belongs.
kms_encrypted_password (pulumi.Input[str]) – An KMS encrypts password used to a db account. If the
account_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.
account_description: pulumi.Output[str] = None¶Account 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.
account_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.
account_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
account_passwordandkms_encrypted_passwordfields.
db_cluster_id: pulumi.Output[str] = None¶The Id of cluster in which account belongs.
kms_encrypted_password: pulumi.Output[str] = None¶An KMS encrypts password used to a db account. If the
account_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.
- static
get(resource_name, id, opts=None, account_description=None, account_name=None, account_password=None, db_cluster_id=None, kms_encrypted_password=None, kms_encryption_context=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.
account*description (pulumi.Input[str]) –
Account 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.
account_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.
account_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
account_passwordandkms_encrypted_passwordfields.db_cluster_id (pulumi.Input[str]) – The Id of cluster in which account belongs.
kms_encrypted_password (pulumi.Input[str]) – An KMS encrypts password used to a db account. If the
account_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.
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.adb.AwaitableGetClustersResult(clusters=None, description_regex=None, descriptions=None, id=None, ids=None, output_file=None, tags=None)¶
- class
pulumi_alicloud.adb.AwaitableGetZonesResult(id=None, ids=None, multi=None, output_file=None, zones=None)¶
- class
pulumi_alicloud.adb.BackupPolicy(resource_name, opts=None, db_cluster_id=None, preferred_backup_periods=None, preferred_backup_time=None, __props__=None, __name__=None, __opts__=None)¶ Create a BackupPolicy 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] db_cluster_id: The Id of cluster that can run database. :param pulumi.Input[list] preferred_backup_periods: ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]. :param pulumi.Input[str] preferred_backup_time: ADB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. China time is 8 hours behind it.
backup_retention_period: pulumi.Output[str] = None¶Cluster backup retention days, Fixed for 7 days, not modified.
db_cluster_id: pulumi.Output[str] = None¶The Id of cluster that can run database.
preferred_backup_periods: pulumi.Output[list] = None¶ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
preferred_backup_time: pulumi.Output[str] = None¶ADB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. China time is 8 hours behind it.
- static
get(resource_name, id, opts=None, backup_retention_period=None, db_cluster_id=None, preferred_backup_periods=None, preferred_backup_time=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.
backup_retention_period (pulumi.Input[str]) – Cluster backup retention days, Fixed for 7 days, not modified.
db_cluster_id (pulumi.Input[str]) – The Id of cluster that can run database.
preferred_backup_periods (pulumi.Input[list]) – ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
preferred_backup_time (pulumi.Input[str]) – ADB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. China time is 8 hours behind it.
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.adb.Cluster(resource_name, opts=None, auto_renew_period=None, db_cluster_category=None, db_cluster_version=None, db_node_class=None, db_node_count=None, db_node_storage=None, description=None, maintain_time=None, pay_type=None, period=None, renewal_status=None, security_ips=None, tags=None, vswitch_id=None, zone_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides a ADB cluster resource. A ADB cluster is an isolated database environment in the cloud. A ADB cluster can contain multiple user-created databases.
NOTE: Available in v1.71.0+.
import pulumi import pulumi_alicloud as alicloud config = pulumi.Config() name = config.get("name") if name is None: name = "adbClusterconfig" creation = config.get("creation") if creation is None: creation = "ADB" 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_cluster = alicloud.adb.Cluster("defaultCluster", db_cluster_category="Cluster", db_cluster_version="3.0", db_node_class="C8", db_node_count=2, db_node_storage=200, description=name, pay_type="PostPaid", vswitch_id=default_switch.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
auto_renew_period (pulumi.Input[float]) – Auto-renewal period of an cluster, in the unit of the month. It is valid when pay_type is
PrePaid. Valid value:1, 2, 3, 6, 12, 24, 36, Default to 1.db_cluster_category (pulumi.Input[str]) – Cluster category. Value options:
Basic,Cluster.db_cluster_version (pulumi.Input[str]) – Cluster version. Value options:
3.0, Default to3.0.db_node_class (pulumi.Input[str]) – The db_node_class of cluster node.
db_node_count (pulumi.Input[float]) – The db_node_count of cluster node.
db_node_storage (pulumi.Input[float]) – The db_node_storage of cluster node.
description (pulumi.Input[str]) – The description of cluster.
maintain_time (pulumi.Input[str]) – Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
pay_type (pulumi.Input[str]) – Valid values are
PrePaid,PostPaid, Default toPostPaid. Currently, the resource can not supports change pay type.period (pulumi.Input[float]) – The duration that you will buy DB cluster (in month). It is valid when pay_type is
PrePaid. Valid values: [1~9], 12, 24, 36. Default to 1.renewal_status (pulumi.Input[str]) – Valid values are
AutoRenewal,Normal,NotRenewal, Default toNotRenewal.security_ips (pulumi.Input[list]) – List of IP addresses allowed to access all databases of an cluster. 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]).
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 cluster.
auto_renew_period: pulumi.Output[float] = None¶Auto-renewal period of an cluster, in the unit of the month. It is valid when pay_type is
PrePaid. Valid value:1, 2, 3, 6, 12, 24, 36, Default to 1.
db_cluster_category: pulumi.Output[str] = None¶Cluster category. Value options:
Basic,Cluster.
db_cluster_version: pulumi.Output[str] = None¶Cluster version. Value options:
3.0, Default to3.0.
db_node_class: pulumi.Output[str] = None¶The db_node_class of cluster node.
db_node_count: pulumi.Output[float] = None¶The db_node_count of cluster node.
db_node_storage: pulumi.Output[float] = None¶The db_node_storage of cluster node.
description: pulumi.Output[str] = None¶The description of cluster.
maintain_time: pulumi.Output[str] = None¶Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
pay_type: pulumi.Output[str] = None¶Valid values are
PrePaid,PostPaid, Default toPostPaid. Currently, the resource can not supports change pay type.
period: pulumi.Output[float] = None¶The duration that you will buy DB cluster (in month). It is valid when pay_type is
PrePaid. Valid values: [1~9], 12, 24, 36. Default to 1.
renewal_status: pulumi.Output[str] = None¶Valid values are
AutoRenewal,Normal,NotRenewal, Default toNotRenewal.
security_ips: pulumi.Output[list] = None¶List of IP addresses allowed to access all databases of an cluster. 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]).
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 cluster.
- static
get(resource_name, id, opts=None, auto_renew_period=None, db_cluster_category=None, db_cluster_version=None, db_node_class=None, db_node_count=None, db_node_storage=None, description=None, maintain_time=None, pay_type=None, period=None, renewal_status=None, security_ips=None, tags=None, vswitch_id=None, zone_id=None)¶ Get an existing Cluster 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_period (pulumi.Input[float]) – Auto-renewal period of an cluster, in the unit of the month. It is valid when pay_type is
PrePaid. Valid value:1, 2, 3, 6, 12, 24, 36, Default to 1.db_cluster_category (pulumi.Input[str]) – Cluster category. Value options:
Basic,Cluster.db_cluster_version (pulumi.Input[str]) – Cluster version. Value options:
3.0, Default to3.0.db_node_class (pulumi.Input[str]) – The db_node_class of cluster node.
db_node_count (pulumi.Input[float]) – The db_node_count of cluster node.
db_node_storage (pulumi.Input[float]) – The db_node_storage of cluster node.
description (pulumi.Input[str]) – The description of cluster.
maintain_time (pulumi.Input[str]) – Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
pay_type (pulumi.Input[str]) – Valid values are
PrePaid,PostPaid, Default toPostPaid. Currently, the resource can not supports change pay type.period (pulumi.Input[float]) – The duration that you will buy DB cluster (in month). It is valid when pay_type is
PrePaid. Valid values: [1~9], 12, 24, 36. Default to 1.renewal_status (pulumi.Input[str]) – Valid values are
AutoRenewal,Normal,NotRenewal, Default toNotRenewal.security_ips (pulumi.Input[list]) – List of IP addresses allowed to access all databases of an cluster. 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]).
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 cluster.
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.adb.Connection(resource_name, opts=None, connection_prefix=None, db_cluster_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides an ADB connection resource to allocate an Internet connection string for ADB cluster.
- NOTE: Each ADB instance will allocate a intranet connnection string automatically and its prifix is ADB instance ID.
To avoid unnecessary conflict, please specified a internet connection prefix before applying the resource.
NOTE: Available in v1.81.0+.
import pulumi import pulumi_alicloud as alicloud config = pulumi.Config() creation = config.get("creation") if creation is None: creation = "ADB" name = config.get("name") if name is None: name = "adbaccountmysql" 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) cluster = alicloud.adb.Cluster("cluster", db_cluster_category="Cluster", db_cluster_version="3.0", db_node_class="C8", db_node_count=2, db_node_storage=200, description=name, pay_type="PostPaid", vswitch_id=default_switch.id) connection = alicloud.adb.Connection("connection", connection_prefix="testabc", db_cluster_id=cluster.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’. db_cluster_id (pulumi.Input[str]) – The Id of cluster that can run database.
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 cluster string.
db_cluster_id: pulumi.Output[str] = None¶The Id of cluster that can run database.
ip_address: pulumi.Output[str] = None¶The ip address of connection string.
port: pulumi.Output[str] = None¶Connection cluster port.
- static
get(resource_name, id, opts=None, connection_prefix=None, connection_string=None, db_cluster_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 cluster string.
db_cluster_id (pulumi.Input[str]) – The Id of cluster that can run database.
ip_address (pulumi.Input[str]) – The ip address of connection string.
port (pulumi.Input[str]) – Connection cluster port.
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.adb.GetClustersResult(clusters=None, description_regex=None, descriptions=None, id=None, ids=None, output_file=None, tags=None)¶ A collection of values returned by getClusters.
clusters= None¶A list of ADB clusters. Each element contains the following attributes:
descriptions= None¶A list of ADB cluster descriptions.
id= None¶The provider-assigned unique ID for this managed resource.
ids= None¶A list of ADB cluster IDs.
- class
pulumi_alicloud.adb.GetZonesResult(id=None, ids=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:
pulumi_alicloud.adb.get_clusters(description_regex=None, ids=None, output_file=None, tags=None, opts=None)¶The
adb.getClustersdata source provides a collection of ADB clusters available in Alibaba Cloud account. Filters support regular expression for the cluster description, searches by tags, and other filters which are listed below.NOTE: Available in v1.71.0+.
import pulumi import pulumi_alicloud as alicloud adb_clusters_ds = alicloud.adb.get_clusters(description_regex="am-\w+", status="Running") pulumi.export("firstAdbClusterId", adb_clusters_ds.clusters[0]["id"])
- Parameters
description_regex (str) – A regex string to filter results by cluster description.
ids (list) – A list of ADB cluster IDs.
tags (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.
pulumi_alicloud.adb.get_zones(multi=None, output_file=None, opts=None)¶This data source provides availability zones for ADB 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.adb.get_zones()
- Parameters
multi (bool) – Indicate whether the zones can be used in a multi AZ configuration. Default to
false. Multi AZ is usually used to launch ADB instances.