published on Monday, Mar 9, 2026 by Byteplus
published on Monday, Mar 9, 2026 by Byteplus
RDS PostgreSQL 数据库账号
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as bytepluscc from "@byteplus/pulumi-bytepluscc";
const rDSPostgreSQLDBAccountNormalDemo = new bytepluscc.rdspostgresql.DbAccount("RDSPostgreSQLDBAccountNormalDemo", {
instanceId: "postgres-xxxxxxx",
accountName: "ccapi-test-Normal",
accountPassword: "**********",
accountType: "Normal",
accountPrivileges: "Inherit,Login,CreateRole,CreateDB",
notAllowPrivileges: ["DDL"],
});
import pulumi
import pulumi_bytepluscc as bytepluscc
r_ds_postgre_sqldb_account_normal_demo = bytepluscc.rdspostgresql.DbAccount("RDSPostgreSQLDBAccountNormalDemo",
instance_id="postgres-xxxxxxx",
account_name="ccapi-test-Normal",
account_password="**********",
account_type="Normal",
account_privileges="Inherit,Login,CreateRole,CreateDB",
not_allow_privileges=["DDL"])
package main
import (
"github.com/byteplus-sdk/pulumi-bytepluscc/sdk/go/bytepluscc/rdspostgresql"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := rdspostgresql.NewDbAccount(ctx, "RDSPostgreSQLDBAccountNormalDemo", &rdspostgresql.DbAccountArgs{
InstanceId: pulumi.String("postgres-xxxxxxx"),
AccountName: pulumi.String("ccapi-test-Normal"),
AccountPassword: pulumi.String("**********"),
AccountType: pulumi.String("Normal"),
AccountPrivileges: pulumi.String("Inherit,Login,CreateRole,CreateDB"),
NotAllowPrivileges: pulumi.StringArray{
pulumi.String("DDL"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Bytepluscc = Byteplus.Pulumi.Bytepluscc;
return await Deployment.RunAsync(() =>
{
var rDSPostgreSQLDBAccountNormalDemo = new Bytepluscc.Rdspostgresql.DbAccount("RDSPostgreSQLDBAccountNormalDemo", new()
{
InstanceId = "postgres-xxxxxxx",
AccountName = "ccapi-test-Normal",
AccountPassword = "**********",
AccountType = "Normal",
AccountPrivileges = "Inherit,Login,CreateRole,CreateDB",
NotAllowPrivileges = new[]
{
"DDL",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.byteplus.bytepluscc.rdspostgresql.DbAccount;
import com.byteplus.bytepluscc.rdspostgresql.DbAccountArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var rDSPostgreSQLDBAccountNormalDemo = new DbAccount("rDSPostgreSQLDBAccountNormalDemo", DbAccountArgs.builder()
.instanceId("postgres-xxxxxxx")
.accountName("ccapi-test-Normal")
.accountPassword("**********")
.accountType("Normal")
.accountPrivileges("Inherit,Login,CreateRole,CreateDB")
.notAllowPrivileges("DDL")
.build());
}
}
resources:
rDSPostgreSQLDBAccountNormalDemo:
type: bytepluscc:rdspostgresql:DbAccount
name: RDSPostgreSQLDBAccountNormalDemo
properties:
instanceId: postgres-xxxxxxx
accountName: ccapi-test-Normal
accountPassword: '**********'
accountType: Normal
accountPrivileges: Inherit,Login,CreateRole,CreateDB
notAllowPrivileges:
- DDL
Create DbAccount Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DbAccount(name: string, args: DbAccountArgs, opts?: CustomResourceOptions);@overload
def DbAccount(resource_name: str,
args: DbAccountArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DbAccount(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_name: Optional[str] = None,
account_password: Optional[str] = None,
account_type: Optional[str] = None,
account_privileges: Optional[str] = None,
instance_id: Optional[str] = None,
not_allow_privileges: Optional[Sequence[str]] = None)func NewDbAccount(ctx *Context, name string, args DbAccountArgs, opts ...ResourceOption) (*DbAccount, error)public DbAccount(string name, DbAccountArgs args, CustomResourceOptions? opts = null)
public DbAccount(String name, DbAccountArgs args)
public DbAccount(String name, DbAccountArgs args, CustomResourceOptions options)
type: bytepluscc:rdspostgresql:DbAccount
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DbAccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DbAccountArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DbAccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DbAccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DbAccountArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var byteplusccDbAccountResource = new Bytepluscc.Rdspostgresql.DbAccount("byteplusccDbAccountResource", new()
{
AccountName = "string",
AccountPassword = "string",
AccountType = "string",
AccountPrivileges = "string",
InstanceId = "string",
NotAllowPrivileges = new[]
{
"string",
},
});
example, err := rdspostgresql.NewDbAccount(ctx, "byteplusccDbAccountResource", &rdspostgresql.DbAccountArgs{
AccountName: pulumi.String("string"),
AccountPassword: pulumi.String("string"),
AccountType: pulumi.String("string"),
AccountPrivileges: pulumi.String("string"),
InstanceId: pulumi.String("string"),
NotAllowPrivileges: pulumi.StringArray{
pulumi.String("string"),
},
})
var byteplusccDbAccountResource = new com.byteplus.bytepluscc.rdspostgresql.DbAccount("byteplusccDbAccountResource", com.byteplus.bytepluscc.rdspostgresql.DbAccountArgs.builder()
.accountName("string")
.accountPassword("string")
.accountType("string")
.accountPrivileges("string")
.instanceId("string")
.notAllowPrivileges("string")
.build());
bytepluscc_db_account_resource = bytepluscc.rdspostgresql.DbAccount("byteplusccDbAccountResource",
account_name="string",
account_password="string",
account_type="string",
account_privileges="string",
instance_id="string",
not_allow_privileges=["string"])
const byteplusccDbAccountResource = new bytepluscc.rdspostgresql.DbAccount("byteplusccDbAccountResource", {
accountName: "string",
accountPassword: "string",
accountType: "string",
accountPrivileges: "string",
instanceId: "string",
notAllowPrivileges: ["string"],
});
type: bytepluscc:rdspostgresql:DbAccount
properties:
accountName: string
accountPassword: string
accountPrivileges: string
accountType: string
instanceId: string
notAllowPrivileges:
- string
DbAccount Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The DbAccount resource accepts the following input properties:
- Account
Name string - 数据库账号名称。账号名称的设置规则如下:长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能以 pg 开头。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。
- Account
Password string - 数据库账号的密码。数据库账号密码的设置规则如下:长度为 8~32 个字符。由大写字母、小写字母、数字、特殊字符中的任意三种组成。特殊字符为 !@#$%^*()&_+-=。
- Account
Type string - 数据库账号类型,取值范围如下:Super:高权限账号。Normal:普通账号。InstanceReadOnly:实例只读账号。
- Account
Privileges string - 账号权限信息。多个权限中间以英文逗号(,)分隔。取值:Login:登录权限。Inherit:继承权限。CreateRole:创建角色权限。CreateDB:创建数据库权限。说明当账号类型为高权限账号时,无需传入该参数,默认支持全部权限。当账号类型为普通账号时,支持传入该参数,默认值为 Login 和 Inherit。账号类型为实例只读账号时,即 AccountType 取值为 InstanceReadOnly 时,不支持传入该参数
- Instance
Id string - 实例 ID
- Not
Allow List<string>Privileges - 为账号禁用的权限。当前仅支持取值为 DDL。说明仅支持为高权限账号或普通账号传入此字段,即 AccountType 取值为 Super 或 Normal 时。
- Account
Name string - 数据库账号名称。账号名称的设置规则如下:长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能以 pg 开头。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。
- Account
Password string - 数据库账号的密码。数据库账号密码的设置规则如下:长度为 8~32 个字符。由大写字母、小写字母、数字、特殊字符中的任意三种组成。特殊字符为 !@#$%^*()&_+-=。
- Account
Type string - 数据库账号类型,取值范围如下:Super:高权限账号。Normal:普通账号。InstanceReadOnly:实例只读账号。
- Account
Privileges string - 账号权限信息。多个权限中间以英文逗号(,)分隔。取值:Login:登录权限。Inherit:继承权限。CreateRole:创建角色权限。CreateDB:创建数据库权限。说明当账号类型为高权限账号时,无需传入该参数,默认支持全部权限。当账号类型为普通账号时,支持传入该参数,默认值为 Login 和 Inherit。账号类型为实例只读账号时,即 AccountType 取值为 InstanceReadOnly 时,不支持传入该参数
- Instance
Id string - 实例 ID
- Not
Allow []stringPrivileges - 为账号禁用的权限。当前仅支持取值为 DDL。说明仅支持为高权限账号或普通账号传入此字段,即 AccountType 取值为 Super 或 Normal 时。
- account
Name String - 数据库账号名称。账号名称的设置规则如下:长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能以 pg 开头。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。
- account
Password String - 数据库账号的密码。数据库账号密码的设置规则如下:长度为 8~32 个字符。由大写字母、小写字母、数字、特殊字符中的任意三种组成。特殊字符为 !@#$%^*()&_+-=。
- account
Type String - 数据库账号类型,取值范围如下:Super:高权限账号。Normal:普通账号。InstanceReadOnly:实例只读账号。
- account
Privileges String - 账号权限信息。多个权限中间以英文逗号(,)分隔。取值:Login:登录权限。Inherit:继承权限。CreateRole:创建角色权限。CreateDB:创建数据库权限。说明当账号类型为高权限账号时,无需传入该参数,默认支持全部权限。当账号类型为普通账号时,支持传入该参数,默认值为 Login 和 Inherit。账号类型为实例只读账号时,即 AccountType 取值为 InstanceReadOnly 时,不支持传入该参数
- instance
Id String - 实例 ID
- not
Allow List<String>Privileges - 为账号禁用的权限。当前仅支持取值为 DDL。说明仅支持为高权限账号或普通账号传入此字段,即 AccountType 取值为 Super 或 Normal 时。
- account
Name string - 数据库账号名称。账号名称的设置规则如下:长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能以 pg 开头。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。
- account
Password string - 数据库账号的密码。数据库账号密码的设置规则如下:长度为 8~32 个字符。由大写字母、小写字母、数字、特殊字符中的任意三种组成。特殊字符为 !@#$%^*()&_+-=。
- account
Type string - 数据库账号类型,取值范围如下:Super:高权限账号。Normal:普通账号。InstanceReadOnly:实例只读账号。
- account
Privileges string - 账号权限信息。多个权限中间以英文逗号(,)分隔。取值:Login:登录权限。Inherit:继承权限。CreateRole:创建角色权限。CreateDB:创建数据库权限。说明当账号类型为高权限账号时,无需传入该参数,默认支持全部权限。当账号类型为普通账号时,支持传入该参数,默认值为 Login 和 Inherit。账号类型为实例只读账号时,即 AccountType 取值为 InstanceReadOnly 时,不支持传入该参数
- instance
Id string - 实例 ID
- not
Allow string[]Privileges - 为账号禁用的权限。当前仅支持取值为 DDL。说明仅支持为高权限账号或普通账号传入此字段,即 AccountType 取值为 Super 或 Normal 时。
- account_
name str - 数据库账号名称。账号名称的设置规则如下:长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能以 pg 开头。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。
- account_
password str - 数据库账号的密码。数据库账号密码的设置规则如下:长度为 8~32 个字符。由大写字母、小写字母、数字、特殊字符中的任意三种组成。特殊字符为 !@#$%^*()&_+-=。
- account_
type str - 数据库账号类型,取值范围如下:Super:高权限账号。Normal:普通账号。InstanceReadOnly:实例只读账号。
- account_
privileges str - 账号权限信息。多个权限中间以英文逗号(,)分隔。取值:Login:登录权限。Inherit:继承权限。CreateRole:创建角色权限。CreateDB:创建数据库权限。说明当账号类型为高权限账号时,无需传入该参数,默认支持全部权限。当账号类型为普通账号时,支持传入该参数,默认值为 Login 和 Inherit。账号类型为实例只读账号时,即 AccountType 取值为 InstanceReadOnly 时,不支持传入该参数
- instance_
id str - 实例 ID
- not_
allow_ Sequence[str]privileges - 为账号禁用的权限。当前仅支持取值为 DDL。说明仅支持为高权限账号或普通账号传入此字段,即 AccountType 取值为 Super 或 Normal 时。
- account
Name String - 数据库账号名称。账号名称的设置规则如下:长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能以 pg 开头。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。
- account
Password String - 数据库账号的密码。数据库账号密码的设置规则如下:长度为 8~32 个字符。由大写字母、小写字母、数字、特殊字符中的任意三种组成。特殊字符为 !@#$%^*()&_+-=。
- account
Type String - 数据库账号类型,取值范围如下:Super:高权限账号。Normal:普通账号。InstanceReadOnly:实例只读账号。
- account
Privileges String - 账号权限信息。多个权限中间以英文逗号(,)分隔。取值:Login:登录权限。Inherit:继承权限。CreateRole:创建角色权限。CreateDB:创建数据库权限。说明当账号类型为高权限账号时,无需传入该参数,默认支持全部权限。当账号类型为普通账号时,支持传入该参数,默认值为 Login 和 Inherit。账号类型为实例只读账号时,即 AccountType 取值为 InstanceReadOnly 时,不支持传入该参数
- instance
Id String - 实例 ID
- not
Allow List<String>Privileges - 为账号禁用的权限。当前仅支持取值为 DDL。说明仅支持为高权限账号或普通账号传入此字段,即 AccountType 取值为 Super 或 Normal 时。
Outputs
All input properties are implicitly available as output properties. Additionally, the DbAccount resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing DbAccount Resource
Get an existing DbAccount resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DbAccountState, opts?: CustomResourceOptions): DbAccount@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_name: Optional[str] = None,
account_password: Optional[str] = None,
account_privileges: Optional[str] = None,
account_type: Optional[str] = None,
instance_id: Optional[str] = None,
not_allow_privileges: Optional[Sequence[str]] = None) -> DbAccountfunc GetDbAccount(ctx *Context, name string, id IDInput, state *DbAccountState, opts ...ResourceOption) (*DbAccount, error)public static DbAccount Get(string name, Input<string> id, DbAccountState? state, CustomResourceOptions? opts = null)public static DbAccount get(String name, Output<String> id, DbAccountState state, CustomResourceOptions options)resources: _: type: bytepluscc:rdspostgresql:DbAccount get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Account
Name string - 数据库账号名称。账号名称的设置规则如下:长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能以 pg 开头。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。
- Account
Password string - 数据库账号的密码。数据库账号密码的设置规则如下:长度为 8~32 个字符。由大写字母、小写字母、数字、特殊字符中的任意三种组成。特殊字符为 !@#$%^*()&_+-=。
- Account
Privileges string - 账号权限信息。多个权限中间以英文逗号(,)分隔。取值:Login:登录权限。Inherit:继承权限。CreateRole:创建角色权限。CreateDB:创建数据库权限。说明当账号类型为高权限账号时,无需传入该参数,默认支持全部权限。当账号类型为普通账号时,支持传入该参数,默认值为 Login 和 Inherit。账号类型为实例只读账号时,即 AccountType 取值为 InstanceReadOnly 时,不支持传入该参数
- Account
Type string - 数据库账号类型,取值范围如下:Super:高权限账号。Normal:普通账号。InstanceReadOnly:实例只读账号。
- Instance
Id string - 实例 ID
- Not
Allow List<string>Privileges - 为账号禁用的权限。当前仅支持取值为 DDL。说明仅支持为高权限账号或普通账号传入此字段,即 AccountType 取值为 Super 或 Normal 时。
- Account
Name string - 数据库账号名称。账号名称的设置规则如下:长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能以 pg 开头。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。
- Account
Password string - 数据库账号的密码。数据库账号密码的设置规则如下:长度为 8~32 个字符。由大写字母、小写字母、数字、特殊字符中的任意三种组成。特殊字符为 !@#$%^*()&_+-=。
- Account
Privileges string - 账号权限信息。多个权限中间以英文逗号(,)分隔。取值:Login:登录权限。Inherit:继承权限。CreateRole:创建角色权限。CreateDB:创建数据库权限。说明当账号类型为高权限账号时,无需传入该参数,默认支持全部权限。当账号类型为普通账号时,支持传入该参数,默认值为 Login 和 Inherit。账号类型为实例只读账号时,即 AccountType 取值为 InstanceReadOnly 时,不支持传入该参数
- Account
Type string - 数据库账号类型,取值范围如下:Super:高权限账号。Normal:普通账号。InstanceReadOnly:实例只读账号。
- Instance
Id string - 实例 ID
- Not
Allow []stringPrivileges - 为账号禁用的权限。当前仅支持取值为 DDL。说明仅支持为高权限账号或普通账号传入此字段,即 AccountType 取值为 Super 或 Normal 时。
- account
Name String - 数据库账号名称。账号名称的设置规则如下:长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能以 pg 开头。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。
- account
Password String - 数据库账号的密码。数据库账号密码的设置规则如下:长度为 8~32 个字符。由大写字母、小写字母、数字、特殊字符中的任意三种组成。特殊字符为 !@#$%^*()&_+-=。
- account
Privileges String - 账号权限信息。多个权限中间以英文逗号(,)分隔。取值:Login:登录权限。Inherit:继承权限。CreateRole:创建角色权限。CreateDB:创建数据库权限。说明当账号类型为高权限账号时,无需传入该参数,默认支持全部权限。当账号类型为普通账号时,支持传入该参数,默认值为 Login 和 Inherit。账号类型为实例只读账号时,即 AccountType 取值为 InstanceReadOnly 时,不支持传入该参数
- account
Type String - 数据库账号类型,取值范围如下:Super:高权限账号。Normal:普通账号。InstanceReadOnly:实例只读账号。
- instance
Id String - 实例 ID
- not
Allow List<String>Privileges - 为账号禁用的权限。当前仅支持取值为 DDL。说明仅支持为高权限账号或普通账号传入此字段,即 AccountType 取值为 Super 或 Normal 时。
- account
Name string - 数据库账号名称。账号名称的设置规则如下:长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能以 pg 开头。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。
- account
Password string - 数据库账号的密码。数据库账号密码的设置规则如下:长度为 8~32 个字符。由大写字母、小写字母、数字、特殊字符中的任意三种组成。特殊字符为 !@#$%^*()&_+-=。
- account
Privileges string - 账号权限信息。多个权限中间以英文逗号(,)分隔。取值:Login:登录权限。Inherit:继承权限。CreateRole:创建角色权限。CreateDB:创建数据库权限。说明当账号类型为高权限账号时,无需传入该参数,默认支持全部权限。当账号类型为普通账号时,支持传入该参数,默认值为 Login 和 Inherit。账号类型为实例只读账号时,即 AccountType 取值为 InstanceReadOnly 时,不支持传入该参数
- account
Type string - 数据库账号类型,取值范围如下:Super:高权限账号。Normal:普通账号。InstanceReadOnly:实例只读账号。
- instance
Id string - 实例 ID
- not
Allow string[]Privileges - 为账号禁用的权限。当前仅支持取值为 DDL。说明仅支持为高权限账号或普通账号传入此字段,即 AccountType 取值为 Super 或 Normal 时。
- account_
name str - 数据库账号名称。账号名称的设置规则如下:长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能以 pg 开头。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。
- account_
password str - 数据库账号的密码。数据库账号密码的设置规则如下:长度为 8~32 个字符。由大写字母、小写字母、数字、特殊字符中的任意三种组成。特殊字符为 !@#$%^*()&_+-=。
- account_
privileges str - 账号权限信息。多个权限中间以英文逗号(,)分隔。取值:Login:登录权限。Inherit:继承权限。CreateRole:创建角色权限。CreateDB:创建数据库权限。说明当账号类型为高权限账号时,无需传入该参数,默认支持全部权限。当账号类型为普通账号时,支持传入该参数,默认值为 Login 和 Inherit。账号类型为实例只读账号时,即 AccountType 取值为 InstanceReadOnly 时,不支持传入该参数
- account_
type str - 数据库账号类型,取值范围如下:Super:高权限账号。Normal:普通账号。InstanceReadOnly:实例只读账号。
- instance_
id str - 实例 ID
- not_
allow_ Sequence[str]privileges - 为账号禁用的权限。当前仅支持取值为 DDL。说明仅支持为高权限账号或普通账号传入此字段,即 AccountType 取值为 Super 或 Normal 时。
- account
Name String - 数据库账号名称。账号名称的设置规则如下:长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能以 pg 开头。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。
- account
Password String - 数据库账号的密码。数据库账号密码的设置规则如下:长度为 8~32 个字符。由大写字母、小写字母、数字、特殊字符中的任意三种组成。特殊字符为 !@#$%^*()&_+-=。
- account
Privileges String - 账号权限信息。多个权限中间以英文逗号(,)分隔。取值:Login:登录权限。Inherit:继承权限。CreateRole:创建角色权限。CreateDB:创建数据库权限。说明当账号类型为高权限账号时,无需传入该参数,默认支持全部权限。当账号类型为普通账号时,支持传入该参数,默认值为 Login 和 Inherit。账号类型为实例只读账号时,即 AccountType 取值为 InstanceReadOnly 时,不支持传入该参数
- account
Type String - 数据库账号类型,取值范围如下:Super:高权限账号。Normal:普通账号。InstanceReadOnly:实例只读账号。
- instance
Id String - 实例 ID
- not
Allow List<String>Privileges - 为账号禁用的权限。当前仅支持取值为 DDL。说明仅支持为高权限账号或普通账号传入此字段,即 AccountType 取值为 Super 或 Normal 时。
Import
$ pulumi import bytepluscc:rdspostgresql/dbAccount:DbAccount example "instance_id|account_name"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- bytepluscc byteplus-sdk/pulumi-bytepluscc
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
byteplusccTerraform Provider.
published on Monday, Mar 9, 2026 by Byteplus
