Property definition
Data source type: polardbx20
Supported configuration modes (ConnectionPropertiesMode):
Connection string mode (UrlMode)
Instance mode (InstanceMode)
Instance mode of the current Alibaba Cloud account
Parameter | Type | Example | Required | Description and note |
regionId | String | cn-shanghai | Yes | The ID of the region to which the instance belongs. |
instanceId | String | pc-2ze82jv51re2990g5 | Yes | The ID of the PolarDB for Oracle cluster. |
database | String | mysql_database | Yes | The name of the database. |
username | String | xxxxx | Yes | The username. |
password | String | xxxxx | Yes | The password. |
properties | JSON Object | | No | The properties of the driver. |
envType | String | Dev | Yes | The information about the data source environment. Valid values:
|
Instance mode of another Alibaba Cloud account
Parameter | Type | Example | Required | Description and note |
regionId | String | cn-shanghai | Yes | The ID of the region to which the instance belongs. |
instanceId | String | pc-2ze82jv51re2990g5 | Yes | The ID of the PolarDB for Oracle cluster. |
database | String | polardbx_database | Yes | The name of the database. |
username | String | xxxxx | Yes | The username. |
password | String | xxxxx | Yes | The password. |
crossAccountOwnerId | String | 1 | Yes | The ID of another Alibaba Cloud account. |
crossAccountRoleName | String | cross-role | Yes | The name of the RAM role assumed by another Alibaba Cloud account. |
properties | JSON Object | | No | The properties of the driver. |
envType | String | Dev | Yes | The information about the data source environment. Valid values:
|
Connection string mode
Parameter | Type | Example | Required | Description and note |
address | Array | | Yes | The address, which contains only a single pair of host and port. |
database | String | polardbx_database | Yes | The name of the database. |
username | String | xxxxx | Yes | The username. |
password | String | xxxxx | Yes | The password. |
properties | JSON Object | | No | The properties of the driver. |
envType | String | Dev | Yes | The information about the data source environment. Valid values:
|
Configuration example of a data source
Instance mode of the current Alibaba Cloud account
{
"envType": "Prod",
"ownerId": "1107550004253538",
"regionId": "cn-beijing",
"instanceId": "pxc-bjrikym49rir1s",
"database": "my_database",
"username": "my_username",
"password": "my_password",
"properties": {
"socketTimeout": "2000"
}
}Instance mode of another Alibaba Cloud account
{
"envType": "Prod",
"regionId": "cn-beijing",
"instanceId": "pxc-bjrikym49rir1s",
"database": "my_database",
"username": "my_username",
"password": "my_password",
"properties": {
"socketTimeout": "2000"
},
"crossAccountOwnerId": "123123123",
"crossAccountRoleName": "cross-role"
}Connection string mode
{
"envType": "Prod",
"address": [
{
"host": "127.0.0.1",
"port": "3306"
}
],
"database": "my_database",
"username": "my_username",
"password": "my_password",
"properties": {
"socketTimeout": "2000"
}
}