public static final class CreateAccountRequest.Builder extends Object
限定符和类型 | 方法和说明 |
---|---|
CreateAccountRequest.Builder |
accountDescription(String accountDescription)
The description of the account.
|
CreateAccountRequest.Builder |
accountName(String accountName)
The name of the account.
|
CreateAccountRequest.Builder |
accountPassword(String accountPassword)
The password of the account.
|
CreateAccountRequest.Builder |
accountPrivilege(String accountPrivilege)
The permissions that are granted to the account.
|
CreateAccountRequest.Builder |
accountType(String accountType)
The type of the account.
|
CreateAccountRequest |
build() |
CreateAccountRequest.Builder |
clientToken(String clientToken)
The client token that is used to ensure the idempotence of the request.
|
CreateAccountRequest.Builder |
DBClusterId(String DBClusterId)
The ID of cluster.
|
CreateAccountRequest.Builder |
DBName(String DBName)
The name of the database that can be accessed by the account.
|
CreateAccountRequest.Builder |
ownerAccount(String ownerAccount)
OwnerAccount.
|
CreateAccountRequest.Builder |
ownerId(Long ownerId)
OwnerId.
|
CreateAccountRequest.Builder |
privForAllDB(String privForAllDB)
PrivForAllDB.
|
CreateAccountRequest.Builder |
resourceOwnerAccount(String resourceOwnerAccount)
ResourceOwnerAccount.
|
CreateAccountRequest.Builder |
resourceOwnerId(Long resourceOwnerId)
ResourceOwnerId.
|
public CreateAccountRequest.Builder accountDescription(String accountDescription)
* It cannot start with `http://` or `https://`. * It must be 2 to 256 characters in length.
public CreateAccountRequest.Builder accountName(String accountName)
* It must start with a lowercase letter and end with a letter or a digit. * It can contain lowercase letters, digits, and underscores (\_). * It must be 2 to 16 characters in length. * It cannot be root, admin, or another username that is reserved by the system.
public CreateAccountRequest.Builder accountPassword(String accountPassword)
* It must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. * It must be 8 to 32 characters in length. * Special characters include `! @ # $ % ^ & * ( ) _ + - =`
public CreateAccountRequest.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 and index permissions > * The `AccountPrivilege` parameter is valid only after you specify the `DBName` parameter. * If multiple database names are specified by the `DBName` parameter, you must grant permissions on the databases. Separate multiple permissions with commas (,). For example, if you want to grant the account the read and write permissions on DB1 and the read-only permissions on DB2, set `DBName` to `DB1,DB2`, and set `AccountPrivilege` to `ReadWrite,ReadOnly`. * This parameter is valid only for standard accounts of PolarDB for MySQL clusters.
public CreateAccountRequest.Builder accountType(String accountType)
* **Normal**: standard account * **Super**: privileged account > * If you leave this parameter empty, the default value **Super** is used. * You can create multiple privileged accounts for a PolarDB for Oracle or PolarDB for PostgreSQL cluster. A privileged account is granted more permissions than a standard account. For more information about how to create a database account, see [Create a database account](~~68508~~). * You can create only one privileged account for a PolarDB for MySQL cluster. A privileged account is granted more permissions than a standard account. For more information about how to create a database account, see [Create a database account](~~68508~~).
public CreateAccountRequest.Builder clientToken(String clientToken)
public CreateAccountRequest.Builder DBClusterId(String DBClusterId)
public CreateAccountRequest.Builder DBName(String DBName)
> This parameter is valid only for standard accounts of PolarDB for MySQL clusters.
public CreateAccountRequest.Builder ownerAccount(String ownerAccount)
public CreateAccountRequest.Builder ownerId(Long ownerId)
public CreateAccountRequest.Builder privForAllDB(String privForAllDB)
public CreateAccountRequest.Builder resourceOwnerAccount(String resourceOwnerAccount)
public CreateAccountRequest.Builder resourceOwnerId(Long resourceOwnerId)
public CreateAccountRequest build()
Copyright © 2024. All rights reserved.