public static final class CreateDatabaseRequest.Builder extends Object
限定符和类型 | 方法和说明 |
---|---|
CreateDatabaseRequest.Builder |
accountName(String accountName)
The name of the account that is authorized to access the database.
|
CreateDatabaseRequest.Builder |
accountPrivilege(String accountPrivilege)
The permissions that are granted to the account.
|
CreateDatabaseRequest |
build() |
CreateDatabaseRequest.Builder |
characterSetName(String characterSetName)
The character set that is used by the cluster.
|
CreateDatabaseRequest.Builder |
collate(String collate)
The language that indicates the collation of the databases that are created.
|
CreateDatabaseRequest.Builder |
ctype(String ctype)
The language that indicates the character type of the database.
|
CreateDatabaseRequest.Builder |
DBClusterId(String DBClusterId)
The ID of cluster.
|
CreateDatabaseRequest.Builder |
DBDescription(String DBDescription)
The description of the database.
|
CreateDatabaseRequest.Builder |
DBName(String DBName)
The name of the database.
|
CreateDatabaseRequest.Builder |
ownerAccount(String ownerAccount)
OwnerAccount.
|
CreateDatabaseRequest.Builder |
ownerId(Long ownerId)
OwnerId.
|
CreateDatabaseRequest.Builder |
resourceOwnerAccount(String resourceOwnerAccount)
ResourceOwnerAccount.
|
CreateDatabaseRequest.Builder |
resourceOwnerId(Long resourceOwnerId)
ResourceOwnerId.
|
public CreateDatabaseRequest.Builder accountName(String accountName)
>- You can specify only a standard account. By default, privileged accounts have all permissions on all databases. You do not need to grant privileged accounts the permissions to access the database. >- This parameter is required for PolarDB for PostgreSQL (Compatible with Oracle) clusters or PolarDB for PostgreSQL clusters. This parameter is optional for PolarDB for MySQL clusters.
public CreateDatabaseRequest.Builder accountPrivilege(String accountPrivilege)
* **ReadWrite**: read and write permissions. * **ReadOnly**: read-only permissions. * **DMLOnly**: the permissions to execute only DML statements. * **DDLOnly**: the permissions to execute only DDL statements. * **ReadIndex**: the read-only and index permissions. If you leave this parameter empty, the default value **ReadWrite** is used. >- This parameter is valid only if you specify **AccountName**. >- This parameter is required for PolarDB for PostgreSQL (Compatible with Oracle) clusters or PolarDB for PostgreSQL clusters. >- This parameter is optional for PolarDB for MySQL clusters.
public CreateDatabaseRequest.Builder characterSetName(String characterSetName)
public CreateDatabaseRequest.Builder collate(String collate)
> * The language must be compatible with the character set that is specified by **CharacterSetName**. >* This parameter is required for PolarDB for PostgreSQL (Compatible with Oracle) clusters or PolarDB for PostgreSQL clusters. This parameter is not supported by PolarDB for MySQL clusters. To view the valid values for this parameter, perform the following steps: Log on to the PolarDB console and click the ID of a cluster. In the left-side navigation pane, choose **Settings and Management** > **Databases**. Then, click **Create Database**.
public CreateDatabaseRequest.Builder ctype(String ctype)
>- The language must be compatible with the character set that is specified by **CharacterSetName**. >- The value that you specify must be the same as the value of **Collate**. >- This parameter is required for PolarDB for PostgreSQL (Compatible with Oracle) clusters or PolarDB for PostgreSQL clusters. This parameter is optional for PolarDB for MySQL clusters. To view the valid values for this parameter, perform the following steps: Log on to the PolarDB console and click the ID of a cluster. In the left-side navigation pane, choose **Settings and Management** > **Databases**. Then, click **Create Database**.
public CreateDatabaseRequest.Builder DBClusterId(String DBClusterId)
public CreateDatabaseRequest.Builder DBDescription(String DBDescription)
* It cannot start with `http://` or `https://`. * It must be 2 to 256 characters in length. > This parameter is required for a PolarDB for Oracle or PolarDB for PostgreSQL cluster. This parameter is optional for a PolarDB for MySQL cluster.
public CreateDatabaseRequest.Builder DBName(String DBName)
* The name can contain lowercase letters, digits, hyphens (-), and underscores (\_). * The name must start with a lowercase letter and end with a lowercase letter or a digit. The name must be 1 to 64 characters in length. > Do not use reserved words as database names, such as `test` or `mysql`.
public CreateDatabaseRequest.Builder ownerAccount(String ownerAccount)
public CreateDatabaseRequest.Builder ownerId(Long ownerId)
public CreateDatabaseRequest.Builder resourceOwnerAccount(String resourceOwnerAccount)
public CreateDatabaseRequest.Builder resourceOwnerId(Long resourceOwnerId)
public CreateDatabaseRequest build()
Copyright © 2024. All rights reserved.