1. Packages
  2. Bytepluscc Provider
  3. API Docs
  4. rdspostgresql
  5. DbAccount
Viewing docs for bytepluscc v0.0.16
published on Monday, Mar 9, 2026 by Byteplus
bytepluscc logo
Viewing docs for bytepluscc v0.0.16
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:

    AccountName string
    数据库账号名称。账号名称的设置规则如下:长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能以 pg 开头。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。
    AccountPassword string
    数据库账号的密码。数据库账号密码的设置规则如下:长度为 8~32 个字符。由大写字母、小写字母、数字、特殊字符中的任意三种组成。特殊字符为 !@#$%^*()&_+-=。
    AccountType string
    数据库账号类型,取值范围如下:Super:高权限账号。Normal:普通账号。InstanceReadOnly:实例只读账号。
    AccountPrivileges string
    账号权限信息。多个权限中间以英文逗号(,)分隔。取值:Login:登录权限。Inherit:继承权限。CreateRole:创建角色权限。CreateDB:创建数据库权限。说明当账号类型为高权限账号时,无需传入该参数,默认支持全部权限。当账号类型为普通账号时,支持传入该参数,默认值为 Login 和 Inherit。账号类型为实例只读账号时,即 AccountType 取值为 InstanceReadOnly 时,不支持传入该参数
    InstanceId string
    实例 ID
    NotAllowPrivileges List<string>
    为账号禁用的权限。当前仅支持取值为 DDL。说明仅支持为高权限账号或普通账号传入此字段,即 AccountType 取值为 Super 或 Normal 时。
    AccountName string
    数据库账号名称。账号名称的设置规则如下:长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能以 pg 开头。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。
    AccountPassword string
    数据库账号的密码。数据库账号密码的设置规则如下:长度为 8~32 个字符。由大写字母、小写字母、数字、特殊字符中的任意三种组成。特殊字符为 !@#$%^*()&_+-=。
    AccountType string
    数据库账号类型,取值范围如下:Super:高权限账号。Normal:普通账号。InstanceReadOnly:实例只读账号。
    AccountPrivileges string
    账号权限信息。多个权限中间以英文逗号(,)分隔。取值:Login:登录权限。Inherit:继承权限。CreateRole:创建角色权限。CreateDB:创建数据库权限。说明当账号类型为高权限账号时,无需传入该参数,默认支持全部权限。当账号类型为普通账号时,支持传入该参数,默认值为 Login 和 Inherit。账号类型为实例只读账号时,即 AccountType 取值为 InstanceReadOnly 时,不支持传入该参数
    InstanceId string
    实例 ID
    NotAllowPrivileges []string
    为账号禁用的权限。当前仅支持取值为 DDL。说明仅支持为高权限账号或普通账号传入此字段,即 AccountType 取值为 Super 或 Normal 时。
    accountName String
    数据库账号名称。账号名称的设置规则如下:长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能以 pg 开头。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。
    accountPassword String
    数据库账号的密码。数据库账号密码的设置规则如下:长度为 8~32 个字符。由大写字母、小写字母、数字、特殊字符中的任意三种组成。特殊字符为 !@#$%^*()&_+-=。
    accountType String
    数据库账号类型,取值范围如下:Super:高权限账号。Normal:普通账号。InstanceReadOnly:实例只读账号。
    accountPrivileges String
    账号权限信息。多个权限中间以英文逗号(,)分隔。取值:Login:登录权限。Inherit:继承权限。CreateRole:创建角色权限。CreateDB:创建数据库权限。说明当账号类型为高权限账号时,无需传入该参数,默认支持全部权限。当账号类型为普通账号时,支持传入该参数,默认值为 Login 和 Inherit。账号类型为实例只读账号时,即 AccountType 取值为 InstanceReadOnly 时,不支持传入该参数
    instanceId String
    实例 ID
    notAllowPrivileges List<String>
    为账号禁用的权限。当前仅支持取值为 DDL。说明仅支持为高权限账号或普通账号传入此字段,即 AccountType 取值为 Super 或 Normal 时。
    accountName string
    数据库账号名称。账号名称的设置规则如下:长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能以 pg 开头。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。
    accountPassword string
    数据库账号的密码。数据库账号密码的设置规则如下:长度为 8~32 个字符。由大写字母、小写字母、数字、特殊字符中的任意三种组成。特殊字符为 !@#$%^*()&_+-=。
    accountType string
    数据库账号类型,取值范围如下:Super:高权限账号。Normal:普通账号。InstanceReadOnly:实例只读账号。
    accountPrivileges string
    账号权限信息。多个权限中间以英文逗号(,)分隔。取值:Login:登录权限。Inherit:继承权限。CreateRole:创建角色权限。CreateDB:创建数据库权限。说明当账号类型为高权限账号时,无需传入该参数,默认支持全部权限。当账号类型为普通账号时,支持传入该参数,默认值为 Login 和 Inherit。账号类型为实例只读账号时,即 AccountType 取值为 InstanceReadOnly 时,不支持传入该参数
    instanceId string
    实例 ID
    notAllowPrivileges string[]
    为账号禁用的权限。当前仅支持取值为 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_privileges Sequence[str]
    为账号禁用的权限。当前仅支持取值为 DDL。说明仅支持为高权限账号或普通账号传入此字段,即 AccountType 取值为 Super 或 Normal 时。
    accountName String
    数据库账号名称。账号名称的设置规则如下:长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能以 pg 开头。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。
    accountPassword String
    数据库账号的密码。数据库账号密码的设置规则如下:长度为 8~32 个字符。由大写字母、小写字母、数字、特殊字符中的任意三种组成。特殊字符为 !@#$%^*()&_+-=。
    accountType String
    数据库账号类型,取值范围如下:Super:高权限账号。Normal:普通账号。InstanceReadOnly:实例只读账号。
    accountPrivileges String
    账号权限信息。多个权限中间以英文逗号(,)分隔。取值:Login:登录权限。Inherit:继承权限。CreateRole:创建角色权限。CreateDB:创建数据库权限。说明当账号类型为高权限账号时,无需传入该参数,默认支持全部权限。当账号类型为普通账号时,支持传入该参数,默认值为 Login 和 Inherit。账号类型为实例只读账号时,即 AccountType 取值为 InstanceReadOnly 时,不支持传入该参数
    instanceId String
    实例 ID
    notAllowPrivileges List<String>
    为账号禁用的权限。当前仅支持取值为 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) -> DbAccount
    func 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.
    The following state arguments are supported:
    AccountName string
    数据库账号名称。账号名称的设置规则如下:长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能以 pg 开头。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。
    AccountPassword string
    数据库账号的密码。数据库账号密码的设置规则如下:长度为 8~32 个字符。由大写字母、小写字母、数字、特殊字符中的任意三种组成。特殊字符为 !@#$%^*()&_+-=。
    AccountPrivileges string
    账号权限信息。多个权限中间以英文逗号(,)分隔。取值:Login:登录权限。Inherit:继承权限。CreateRole:创建角色权限。CreateDB:创建数据库权限。说明当账号类型为高权限账号时,无需传入该参数,默认支持全部权限。当账号类型为普通账号时,支持传入该参数,默认值为 Login 和 Inherit。账号类型为实例只读账号时,即 AccountType 取值为 InstanceReadOnly 时,不支持传入该参数
    AccountType string
    数据库账号类型,取值范围如下:Super:高权限账号。Normal:普通账号。InstanceReadOnly:实例只读账号。
    InstanceId string
    实例 ID
    NotAllowPrivileges List<string>
    为账号禁用的权限。当前仅支持取值为 DDL。说明仅支持为高权限账号或普通账号传入此字段,即 AccountType 取值为 Super 或 Normal 时。
    AccountName string
    数据库账号名称。账号名称的设置规则如下:长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能以 pg 开头。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。
    AccountPassword string
    数据库账号的密码。数据库账号密码的设置规则如下:长度为 8~32 个字符。由大写字母、小写字母、数字、特殊字符中的任意三种组成。特殊字符为 !@#$%^*()&_+-=。
    AccountPrivileges string
    账号权限信息。多个权限中间以英文逗号(,)分隔。取值:Login:登录权限。Inherit:继承权限。CreateRole:创建角色权限。CreateDB:创建数据库权限。说明当账号类型为高权限账号时,无需传入该参数,默认支持全部权限。当账号类型为普通账号时,支持传入该参数,默认值为 Login 和 Inherit。账号类型为实例只读账号时,即 AccountType 取值为 InstanceReadOnly 时,不支持传入该参数
    AccountType string
    数据库账号类型,取值范围如下:Super:高权限账号。Normal:普通账号。InstanceReadOnly:实例只读账号。
    InstanceId string
    实例 ID
    NotAllowPrivileges []string
    为账号禁用的权限。当前仅支持取值为 DDL。说明仅支持为高权限账号或普通账号传入此字段,即 AccountType 取值为 Super 或 Normal 时。
    accountName String
    数据库账号名称。账号名称的设置规则如下:长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能以 pg 开头。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。
    accountPassword String
    数据库账号的密码。数据库账号密码的设置规则如下:长度为 8~32 个字符。由大写字母、小写字母、数字、特殊字符中的任意三种组成。特殊字符为 !@#$%^*()&_+-=。
    accountPrivileges String
    账号权限信息。多个权限中间以英文逗号(,)分隔。取值:Login:登录权限。Inherit:继承权限。CreateRole:创建角色权限。CreateDB:创建数据库权限。说明当账号类型为高权限账号时,无需传入该参数,默认支持全部权限。当账号类型为普通账号时,支持传入该参数,默认值为 Login 和 Inherit。账号类型为实例只读账号时,即 AccountType 取值为 InstanceReadOnly 时,不支持传入该参数
    accountType String
    数据库账号类型,取值范围如下:Super:高权限账号。Normal:普通账号。InstanceReadOnly:实例只读账号。
    instanceId String
    实例 ID
    notAllowPrivileges List<String>
    为账号禁用的权限。当前仅支持取值为 DDL。说明仅支持为高权限账号或普通账号传入此字段,即 AccountType 取值为 Super 或 Normal 时。
    accountName string
    数据库账号名称。账号名称的设置规则如下:长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能以 pg 开头。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。
    accountPassword string
    数据库账号的密码。数据库账号密码的设置规则如下:长度为 8~32 个字符。由大写字母、小写字母、数字、特殊字符中的任意三种组成。特殊字符为 !@#$%^*()&_+-=。
    accountPrivileges string
    账号权限信息。多个权限中间以英文逗号(,)分隔。取值:Login:登录权限。Inherit:继承权限。CreateRole:创建角色权限。CreateDB:创建数据库权限。说明当账号类型为高权限账号时,无需传入该参数,默认支持全部权限。当账号类型为普通账号时,支持传入该参数,默认值为 Login 和 Inherit。账号类型为实例只读账号时,即 AccountType 取值为 InstanceReadOnly 时,不支持传入该参数
    accountType string
    数据库账号类型,取值范围如下:Super:高权限账号。Normal:普通账号。InstanceReadOnly:实例只读账号。
    instanceId string
    实例 ID
    notAllowPrivileges string[]
    为账号禁用的权限。当前仅支持取值为 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_privileges Sequence[str]
    为账号禁用的权限。当前仅支持取值为 DDL。说明仅支持为高权限账号或普通账号传入此字段,即 AccountType 取值为 Super 或 Normal 时。
    accountName String
    数据库账号名称。账号名称的设置规则如下:长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能以 pg 开头。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。
    accountPassword String
    数据库账号的密码。数据库账号密码的设置规则如下:长度为 8~32 个字符。由大写字母、小写字母、数字、特殊字符中的任意三种组成。特殊字符为 !@#$%^*()&_+-=。
    accountPrivileges String
    账号权限信息。多个权限中间以英文逗号(,)分隔。取值:Login:登录权限。Inherit:继承权限。CreateRole:创建角色权限。CreateDB:创建数据库权限。说明当账号类型为高权限账号时,无需传入该参数,默认支持全部权限。当账号类型为普通账号时,支持传入该参数,默认值为 Login 和 Inherit。账号类型为实例只读账号时,即 AccountType 取值为 InstanceReadOnly 时,不支持传入该参数
    accountType String
    数据库账号类型,取值范围如下:Super:高权限账号。Normal:普通账号。InstanceReadOnly:实例只读账号。
    instanceId String
    实例 ID
    notAllowPrivileges List<String>
    为账号禁用的权限。当前仅支持取值为 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 bytepluscc Terraform Provider.
    bytepluscc logo
    Viewing docs for bytepluscc v0.0.16
    published on Monday, Mar 9, 2026 by Byteplus
      Try Pulumi Cloud free. Your team will thank you.