Creates a database account under a specified tenant.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
oceanbase:CreateTenantUser |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The ID of the OceanBase cluster. |
ob317v4uif**** |
| TenantId |
string |
Yes |
The tenant ID. |
t4pnum**** |
| UserName |
string |
Yes |
The name of the database account. |
pay_test |
| UserType |
string |
Yes |
The type of the user. Valid values:
|
Normal |
| UserPassword |
string |
Yes |
The password of the database account. Note
|
!Aliyun4Oceanbase |
| Roles |
string |
No |
The role information of the user.
Note
|
[{"Database":"oceanbase1","Role":"readwrite"},{"Database":"oceanbase2","Role":"readonly"}] |
| Description |
string |
No |
The description of the database. |
this is a test database |
| EncryptionType |
string |
No |
The encryption method. |
RAS |
| GlobalPermissions |
string |
No |
The global permission information. |
Encrypt,Decrypt |
For a list of request endpoints, refer to API Reference > Calling Methods.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
EE205C00-30E4-****-****-87E3A8A2AA0C |
| TenantUser |
object |
The list of database accounts in the tenant. |
|
| UserType |
string |
The type of the user. Valid values:
|
Normal |
| Roles |
array<object> |
The role permission information of the account. |
|
|
object |
|||
| Database |
string |
The database name. |
db_pay1 |
| Role |
string |
The role assigned.
Note
Oracle accounts have default read-write permissions on their own schemas, which are not listed here. |
ReadOnly |
| UserStatus |
string |
The status of the database account. Valid values:
Note
The default status of a newly created account is ONLINE. |
ONLINE |
| UserName |
string |
The name of the database account. |
pay_test |
| GlobalPermissions |
string |
The global permissions. |
Encrypt,Decrypt |
Examples
Success response
JSON format
{
"RequestId": "EE205C00-30E4-****-****-87E3A8A2AA0C",
"TenantUser": {
"UserType": "Normal",
"Roles": [
{
"Database": "db_pay1",
"Role": "ReadOnly"
}
],
"UserStatus": "ONLINE",
"UserName": "pay_test",
"GlobalPermissions": "Encrypt,Decrypt"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | InternalError | The request processing has failed due to some unknown error. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.