ApsaraDB for OceanBase

Updated at: 2024-11-07 02:14

Property definition

  • Data source type: apsaradb_for_oceanbase

  • Supported configuration modes (ConnectionPropertiesMode):

    • Connection string mode (UrlMode)

    • Instance mode (InstanceMode)

Current-account instance mode

Parameter

Type

Example

Required

Description

Parameter

Type

Example

Required

Description

regionId

String

cn-shanghai

Yes

The ID of the region to which the instance belongs.

instanceId

String

ob5nj51ns6qjr4

Yes

The ID of the ApsaraDB for OceanBase cluster instance.

tenant

String

t5nnecr8dppi8

Yes

The ID of the ApsaraDB for OceanBase tenant.

database

String

ob_database

Yes

The name of the database.

username

String

xxxxx

Yes

The username.

password

String

xxxxx

Yes

The password.

readOnlyDBInstance

String

t62zwpvyehmps-ro0.cn-beijing.oceanbase.aliyuncs.com:1521

No

The address of the secondary database.

envType

String

Dev

Yes

The information about the data source environment. Valid values:

  • Dev: The development environment.

  • Prod: The production environment.

Cross-account instance mode

Parameter

Type

Example

Required

Description

Parameter

Type

Example

Required

Description

regionId

String

cn-shanghai

Yes

The ID of the region to which the instance belongs.

instanceId

String

ob5nj51ns6qjr4

Yes

The ID of the ApsaraDB for OceanBase cluster instance.

tenant

String

t5nnecr8dppi8

Yes

The ID of the ApsaraDB for OceanBase tenant.

database

String

ob_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.

readOnlyDBInstance

String

t62zwpvyehmps-ro0.cn-beijing.oceanbase.aliyuncs.com:1521

No

The address of the secondary database.

envType

String

Dev

Yes

The information about the data source environment. Valid values:

  • Dev: The development environment.

  • Prod: The production environment.

Connection string mode

Parameter

Type

Example

Required

Description

Parameter

Type

Example

Required

Description

dbMode

String

mysql

No

The mode of the database. Valid values:

  • mysql

  • oracle

address

Array

[
  {
    "host": "127.0.0.1",
    "port": 3306
  }
]

Yes

The address, which contains the address and port of a single host.

database

String

ob_database

Yes

The name of the database.

username

String

xxxxx

Yes

The username.

password

String

xxxxx

Yes

The password.

properties

JSON Object

{
    "useSSL": "false"
}

No

The properties of the driver.

envType

String

Dev

Yes

The information about the data source environment. Valid values:

  • Dev: The development environment.

  • Prod: The production environment.

Configuration examples

Current-account instance mode

{
    "envType": "Prod",
    "instanceId": "obxxxxxxxxxx",
    "tenant": "txxxxxxxxxx",
    "regionId": "cn-shanghai",
    "database": "db",
    "username": "aliyun",
    "password": "xxx"
}

Cross-account instance mode

{
    "envType": "Prod",
    "instanceId": "obxxxxxxxxxx",
    "tenant": "txxxxxxxxxx",
    "regionId": "cn-shanghai",
    "database": "db",
    "username": "aliyun",
    "password": "xxx",
    "crossAccountOwnerId": "1234567890",
    "crossAccountRoleName": "my_ram_role"
}

Connection string mode

{
    "envType": "Prod",
    "address": [
        {
            "host": "127.0.0.1",
            "port": "5432"
        }
    ],
    "dbMode": "mysql",
    "database": "db",
    "properties": {
        "connectTimeout": "2000"
    },
    "username": "aliyun",
    "password": "xxx"
}
  • On this page (1, T)
  • Property definition
  • Current-account instance mode
  • Cross-account instance mode
  • Connection string mode
  • Configuration examples
  • Current-account instance mode
  • Cross-account instance mode
  • Connection string mode
Feedback