RDS.MySQL.DataBase
Element Description
A database instance can contain multiple databases created by database users and can be accessed using the client tool and application program that are the same as those of an independent database instance. The RDS.MySQL.DataBase element can be used to create a database in a specified RDS instance.
Element Properties
Property |
Required |
Descripiton |
---|---|---|
instanceId |
Yes |
ID of the RDS instance Type: string Value Constraint: 1. Instance ID needs to be entered,The RDS instance ID displayed on the RDS page. 2. You can connect to the RDS instance to automatically establish the get_reference dependency relationship and obtain the value. Suggestion: Customize the value. |
dataBase |
Yes |
Database configuration Type: MySQL.DataBase Default: {u'characterSet': u'utf8', u'name': u'unset', u'collate': u'utf8_general_ci'} Suggestion: Select the dataBase field in the component part, and then fill in the field based on prompts. |
Relationships Between Elements
Description |
Target |
---|---|
Connected |
|
Connected |
|
DependsOn |
Return Value
Property |
Type |
Description |
---|---|---|
refName |
string |
Name of the created database |
Blueprint Example
tosca_definitions_version: huaweicloud_tosca_version_1_0 inputs: securityGroupId: description: ID of the security group to which the instance belongs dbRootPassword: description: Password of the root user of the instance availabilityZone: description: AZ where the instance is located subnetId: description: ID of the subnet to which the instance belongs dbVersion: description: Database version default: 5.7.21 HAEnable: description: Whether HA is supported vpcId: description: ID of the VPC to which the instance belongs flavor: description: Instance specifications dataBaseName: description: Name of the database that the user can access dbUserPassword: description: Password for logging in to the database dbUserName: description: Username node_templates: rds-ins: type: HuaweiCloud.RDS.MySQL properties: dbPort: 3306 backupStrategy: keepDays: 0 endTime: '02:00' startTime: '01:00' securityGroupId: get_input: securityGroupId dbRootPassword: get_input: dbRootPassword volume: volumetype: COMMON size: 100 availabilityZone: get_input: availabilityZone subnetId: get_input: subnetId dataStore: dbtype: MySQL version: get_input: dbVersion HA: replicationMode: semisync enable: get_input: HAEnable vpcId: get_input: vpcId flavor: get_input: flavor rds-db: type: HuaweiCloud.RDS.MySQL.DataBase properties: instanceId: get_reference: rds-ins dataBase: characterSet: utf8 collate: utf8_general_ci name: get_input: dataBaseName metadata: Designer: id: fd1ae0f5-ce98-487e-be2c-828c4b11e676 requirements: - instanceId: node: rds-ins rds-user: type: HuaweiCloud.RDS.MySQL.User properties: instanceId: get_reference: rds-ins dbUser: userPassword: get_input: dbUserPassword name: get_input: dbUserName userDatabase: - name: get_input: dataBaseName requirements: - instanceId: node: rds-ins - dependency: node: rds-db
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot