1. Packages
  2. Packages
  3. Volcenginecc Provider
  4. API Docs
  5. mongodb
  6. Account
Viewing docs for volcenginecc v0.0.43
published on Monday, Jun 15, 2026 by Volcengine
volcenginecc logo
Viewing docs for volcenginecc v0.0.43
published on Monday, Jun 15, 2026 by Volcengine

    MongoDB instance database account.

    Example Usage

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    resources:
      mongoDBAccountDemo:
        type: volcenginecc:mongodb:Account
        name: MongoDBAccountDemo
        properties:
          accountDesc: this is a test
          accountName: ccapi-test
          accountPassword: QWExxxxzxc
          accountPrivileges:
            - db_name: admin
              role_name: read
            - db_name: admin
              role_name: userAdmin
          authDb: admin
          instanceId: mongo-replica-xxxxxxxx
    
    Example coming soon!
    

    Create Account Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Account(name: string, args: AccountArgs, opts?: CustomResourceOptions);
    @overload
    def Account(resource_name: str,
                args: AccountArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Account(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                account_name: Optional[str] = None,
                instance_id: Optional[str] = None,
                account_desc: Optional[str] = None,
                account_password: Optional[str] = None,
                account_privileges: Optional[Sequence[AccountAccountPrivilegeArgs]] = None,
                auth_db: Optional[str] = None,
                reset_db_account: Optional[bool] = None)
    func NewAccount(ctx *Context, name string, args AccountArgs, opts ...ResourceOption) (*Account, error)
    public Account(string name, AccountArgs args, CustomResourceOptions? opts = null)
    public Account(String name, AccountArgs args)
    public Account(String name, AccountArgs args, CustomResourceOptions options)
    
    type: volcenginecc:mongodb:Account
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "volcenginecc_mongodb_account" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args AccountArgs
    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 AccountArgs
    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 AccountArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AccountArgs
    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 accountResource = new Volcenginecc.Mongodb.Account("accountResource", new()
    {
        AccountName = "string",
        InstanceId = "string",
        AccountDesc = "string",
        AccountPassword = "string",
        AccountPrivileges = new[]
        {
            new Volcenginecc.Mongodb.Inputs.AccountAccountPrivilegeArgs
            {
                DbName = "string",
                RoleName = "string",
            },
        },
        AuthDb = "string",
        ResetDbAccount = false,
    });
    
    example, err := mongodb.NewAccount(ctx, "accountResource", &mongodb.AccountArgs{
    	AccountName:     pulumi.String("string"),
    	InstanceId:      pulumi.String("string"),
    	AccountDesc:     pulumi.String("string"),
    	AccountPassword: pulumi.String("string"),
    	AccountPrivileges: mongodb.AccountAccountPrivilegeArray{
    		&mongodb.AccountAccountPrivilegeArgs{
    			DbName:   pulumi.String("string"),
    			RoleName: pulumi.String("string"),
    		},
    	},
    	AuthDb:         pulumi.String("string"),
    	ResetDbAccount: pulumi.Bool(false),
    })
    
    resource "volcenginecc_mongodb_account" "accountResource" {
      account_name     = "string"
      instance_id      = "string"
      account_desc     = "string"
      account_password = "string"
      account_privileges {
        db_name   = "string"
        role_name = "string"
      }
      auth_db          = "string"
      reset_db_account = false
    }
    
    var accountResource = new com.volcengine.volcenginecc.mongodb.Account("accountResource", com.volcengine.volcenginecc.mongodb.AccountArgs.builder()
        .accountName("string")
        .instanceId("string")
        .accountDesc("string")
        .accountPassword("string")
        .accountPrivileges(AccountAccountPrivilegeArgs.builder()
            .dbName("string")
            .roleName("string")
            .build())
        .authDb("string")
        .resetDbAccount(false)
        .build());
    
    account_resource = volcenginecc.mongodb.Account("accountResource",
        account_name="string",
        instance_id="string",
        account_desc="string",
        account_password="string",
        account_privileges=[{
            "db_name": "string",
            "role_name": "string",
        }],
        auth_db="string",
        reset_db_account=False)
    
    const accountResource = new volcenginecc.mongodb.Account("accountResource", {
        accountName: "string",
        instanceId: "string",
        accountDesc: "string",
        accountPassword: "string",
        accountPrivileges: [{
            dbName: "string",
            roleName: "string",
        }],
        authDb: "string",
        resetDbAccount: false,
    });
    
    type: volcenginecc:mongodb:Account
    properties:
        accountDesc: string
        accountName: string
        accountPassword: string
        accountPrivileges:
            - dbName: string
              roleName: string
        authDb: string
        instanceId: string
        resetDbAccount: false
    

    Account 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 Account resource accepts the following input properties:

    AccountName string
    Account name.
    InstanceId string
    Instance ID.
    AccountDesc string
    Account remarks.
    AccountPassword string
    Account password.
    AccountPrivileges List<Volcengine.AccountAccountPrivilege>
    AuthDb string
    Database associated with the account.
    ResetDbAccount bool
    Whether to reset the root account permissions to the initial state (that is, restore all permissions that can be granted to the super administrator account). Value options: false (default): Do not reset. true: Reset. Note: This parameter only applies to the root account in the admin database (that is, AuthDB is admin and AccountName is root).
    AccountName string
    Account name.
    InstanceId string
    Instance ID.
    AccountDesc string
    Account remarks.
    AccountPassword string
    Account password.
    AccountPrivileges []AccountAccountPrivilegeArgs
    AuthDb string
    Database associated with the account.
    ResetDbAccount bool
    Whether to reset the root account permissions to the initial state (that is, restore all permissions that can be granted to the super administrator account). Value options: false (default): Do not reset. true: Reset. Note: This parameter only applies to the root account in the admin database (that is, AuthDB is admin and AccountName is root).
    account_name string
    Account name.
    instance_id string
    Instance ID.
    account_desc string
    Account remarks.
    account_password string
    Account password.
    account_privileges list(object)
    auth_db string
    Database associated with the account.
    reset_db_account bool
    Whether to reset the root account permissions to the initial state (that is, restore all permissions that can be granted to the super administrator account). Value options: false (default): Do not reset. true: Reset. Note: This parameter only applies to the root account in the admin database (that is, AuthDB is admin and AccountName is root).
    accountName String
    Account name.
    instanceId String
    Instance ID.
    accountDesc String
    Account remarks.
    accountPassword String
    Account password.
    accountPrivileges List<AccountAccountPrivilege>
    authDb String
    Database associated with the account.
    resetDbAccount Boolean
    Whether to reset the root account permissions to the initial state (that is, restore all permissions that can be granted to the super administrator account). Value options: false (default): Do not reset. true: Reset. Note: This parameter only applies to the root account in the admin database (that is, AuthDB is admin and AccountName is root).
    accountName string
    Account name.
    instanceId string
    Instance ID.
    accountDesc string
    Account remarks.
    accountPassword string
    Account password.
    accountPrivileges AccountAccountPrivilege[]
    authDb string
    Database associated with the account.
    resetDbAccount boolean
    Whether to reset the root account permissions to the initial state (that is, restore all permissions that can be granted to the super administrator account). Value options: false (default): Do not reset. true: Reset. Note: This parameter only applies to the root account in the admin database (that is, AuthDB is admin and AccountName is root).
    account_name str
    Account name.
    instance_id str
    Instance ID.
    account_desc str
    Account remarks.
    account_password str
    Account password.
    account_privileges Sequence[AccountAccountPrivilegeArgs]
    auth_db str
    Database associated with the account.
    reset_db_account bool
    Whether to reset the root account permissions to the initial state (that is, restore all permissions that can be granted to the super administrator account). Value options: false (default): Do not reset. true: Reset. Note: This parameter only applies to the root account in the admin database (that is, AuthDB is admin and AccountName is root).
    accountName String
    Account name.
    instanceId String
    Instance ID.
    accountDesc String
    Account remarks.
    accountPassword String
    Account password.
    accountPrivileges List<Property Map>
    authDb String
    Database associated with the account.
    resetDbAccount Boolean
    Whether to reset the root account permissions to the initial state (that is, restore all permissions that can be granted to the super administrator account). Value options: false (default): Do not reset. true: Reset. Note: This parameter only applies to the root account in the admin database (that is, AuthDB is admin and AccountName is root).

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Account resource produces the following output properties:

    AccountType string
    Account type. Value options: Super: Super administrator account, that is, root account; UserAdmin: High-privilege account, that is, an account with any permissions on the admin database; Normal: Regular account, that is, an account with no permissions on the admin database.
    CreateTime string
    Account creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifyTime string
    Last update time of the account. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    AccountType string
    Account type. Value options: Super: Super administrator account, that is, root account; UserAdmin: High-privilege account, that is, an account with any permissions on the admin database; Normal: Regular account, that is, an account with no permissions on the admin database.
    CreateTime string
    Account creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifyTime string
    Last update time of the account. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    account_type string
    Account type. Value options: Super: Super administrator account, that is, root account; UserAdmin: High-privilege account, that is, an account with any permissions on the admin database; Normal: Regular account, that is, an account with no permissions on the admin database.
    create_time string
    Account creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    id string
    The provider-assigned unique ID for this managed resource.
    modify_time string
    Last update time of the account. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    accountType String
    Account type. Value options: Super: Super administrator account, that is, root account; UserAdmin: High-privilege account, that is, an account with any permissions on the admin database; Normal: Regular account, that is, an account with no permissions on the admin database.
    createTime String
    Account creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    id String
    The provider-assigned unique ID for this managed resource.
    modifyTime String
    Last update time of the account. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    accountType string
    Account type. Value options: Super: Super administrator account, that is, root account; UserAdmin: High-privilege account, that is, an account with any permissions on the admin database; Normal: Regular account, that is, an account with no permissions on the admin database.
    createTime string
    Account creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    id string
    The provider-assigned unique ID for this managed resource.
    modifyTime string
    Last update time of the account. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    account_type str
    Account type. Value options: Super: Super administrator account, that is, root account; UserAdmin: High-privilege account, that is, an account with any permissions on the admin database; Normal: Regular account, that is, an account with no permissions on the admin database.
    create_time str
    Account creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    id str
    The provider-assigned unique ID for this managed resource.
    modify_time str
    Last update time of the account. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    accountType String
    Account type. Value options: Super: Super administrator account, that is, root account; UserAdmin: High-privilege account, that is, an account with any permissions on the admin database; Normal: Regular account, that is, an account with no permissions on the admin database.
    createTime String
    Account creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    id String
    The provider-assigned unique ID for this managed resource.
    modifyTime String
    Last update time of the account. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).

    Look up Existing Account Resource

    Get an existing Account 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?: AccountState, opts?: CustomResourceOptions): Account
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_desc: Optional[str] = None,
            account_name: Optional[str] = None,
            account_password: Optional[str] = None,
            account_privileges: Optional[Sequence[AccountAccountPrivilegeArgs]] = None,
            account_type: Optional[str] = None,
            auth_db: Optional[str] = None,
            create_time: Optional[str] = None,
            instance_id: Optional[str] = None,
            modify_time: Optional[str] = None,
            reset_db_account: Optional[bool] = None) -> Account
    func GetAccount(ctx *Context, name string, id IDInput, state *AccountState, opts ...ResourceOption) (*Account, error)
    public static Account Get(string name, Input<string> id, AccountState? state, CustomResourceOptions? opts = null)
    public static Account get(String name, Output<String> id, AccountState state, CustomResourceOptions options)
    resources:  _:    type: volcenginecc:mongodb:Account    get:      id: ${id}
    import {
      to = volcenginecc_mongodb_account.example
      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:
    AccountDesc string
    Account remarks.
    AccountName string
    Account name.
    AccountPassword string
    Account password.
    AccountPrivileges List<Volcengine.AccountAccountPrivilege>
    AccountType string
    Account type. Value options: Super: Super administrator account, that is, root account; UserAdmin: High-privilege account, that is, an account with any permissions on the admin database; Normal: Regular account, that is, an account with no permissions on the admin database.
    AuthDb string
    Database associated with the account.
    CreateTime string
    Account creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    InstanceId string
    Instance ID.
    ModifyTime string
    Last update time of the account. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    ResetDbAccount bool
    Whether to reset the root account permissions to the initial state (that is, restore all permissions that can be granted to the super administrator account). Value options: false (default): Do not reset. true: Reset. Note: This parameter only applies to the root account in the admin database (that is, AuthDB is admin and AccountName is root).
    AccountDesc string
    Account remarks.
    AccountName string
    Account name.
    AccountPassword string
    Account password.
    AccountPrivileges []AccountAccountPrivilegeArgs
    AccountType string
    Account type. Value options: Super: Super administrator account, that is, root account; UserAdmin: High-privilege account, that is, an account with any permissions on the admin database; Normal: Regular account, that is, an account with no permissions on the admin database.
    AuthDb string
    Database associated with the account.
    CreateTime string
    Account creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    InstanceId string
    Instance ID.
    ModifyTime string
    Last update time of the account. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    ResetDbAccount bool
    Whether to reset the root account permissions to the initial state (that is, restore all permissions that can be granted to the super administrator account). Value options: false (default): Do not reset. true: Reset. Note: This parameter only applies to the root account in the admin database (that is, AuthDB is admin and AccountName is root).
    account_desc string
    Account remarks.
    account_name string
    Account name.
    account_password string
    Account password.
    account_privileges list(object)
    account_type string
    Account type. Value options: Super: Super administrator account, that is, root account; UserAdmin: High-privilege account, that is, an account with any permissions on the admin database; Normal: Regular account, that is, an account with no permissions on the admin database.
    auth_db string
    Database associated with the account.
    create_time string
    Account creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    instance_id string
    Instance ID.
    modify_time string
    Last update time of the account. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    reset_db_account bool
    Whether to reset the root account permissions to the initial state (that is, restore all permissions that can be granted to the super administrator account). Value options: false (default): Do not reset. true: Reset. Note: This parameter only applies to the root account in the admin database (that is, AuthDB is admin and AccountName is root).
    accountDesc String
    Account remarks.
    accountName String
    Account name.
    accountPassword String
    Account password.
    accountPrivileges List<AccountAccountPrivilege>
    accountType String
    Account type. Value options: Super: Super administrator account, that is, root account; UserAdmin: High-privilege account, that is, an account with any permissions on the admin database; Normal: Regular account, that is, an account with no permissions on the admin database.
    authDb String
    Database associated with the account.
    createTime String
    Account creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    instanceId String
    Instance ID.
    modifyTime String
    Last update time of the account. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    resetDbAccount Boolean
    Whether to reset the root account permissions to the initial state (that is, restore all permissions that can be granted to the super administrator account). Value options: false (default): Do not reset. true: Reset. Note: This parameter only applies to the root account in the admin database (that is, AuthDB is admin and AccountName is root).
    accountDesc string
    Account remarks.
    accountName string
    Account name.
    accountPassword string
    Account password.
    accountPrivileges AccountAccountPrivilege[]
    accountType string
    Account type. Value options: Super: Super administrator account, that is, root account; UserAdmin: High-privilege account, that is, an account with any permissions on the admin database; Normal: Regular account, that is, an account with no permissions on the admin database.
    authDb string
    Database associated with the account.
    createTime string
    Account creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    instanceId string
    Instance ID.
    modifyTime string
    Last update time of the account. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    resetDbAccount boolean
    Whether to reset the root account permissions to the initial state (that is, restore all permissions that can be granted to the super administrator account). Value options: false (default): Do not reset. true: Reset. Note: This parameter only applies to the root account in the admin database (that is, AuthDB is admin and AccountName is root).
    account_desc str
    Account remarks.
    account_name str
    Account name.
    account_password str
    Account password.
    account_privileges Sequence[AccountAccountPrivilegeArgs]
    account_type str
    Account type. Value options: Super: Super administrator account, that is, root account; UserAdmin: High-privilege account, that is, an account with any permissions on the admin database; Normal: Regular account, that is, an account with no permissions on the admin database.
    auth_db str
    Database associated with the account.
    create_time str
    Account creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    instance_id str
    Instance ID.
    modify_time str
    Last update time of the account. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    reset_db_account bool
    Whether to reset the root account permissions to the initial state (that is, restore all permissions that can be granted to the super administrator account). Value options: false (default): Do not reset. true: Reset. Note: This parameter only applies to the root account in the admin database (that is, AuthDB is admin and AccountName is root).
    accountDesc String
    Account remarks.
    accountName String
    Account name.
    accountPassword String
    Account password.
    accountPrivileges List<Property Map>
    accountType String
    Account type. Value options: Super: Super administrator account, that is, root account; UserAdmin: High-privilege account, that is, an account with any permissions on the admin database; Normal: Regular account, that is, an account with no permissions on the admin database.
    authDb String
    Database associated with the account.
    createTime String
    Account creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    instanceId String
    Instance ID.
    modifyTime String
    Last update time of the account. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    resetDbAccount Boolean
    Whether to reset the root account permissions to the initial state (that is, restore all permissions that can be granted to the super administrator account). Value options: false (default): Do not reset. true: Reset. Note: This parameter only applies to the root account in the admin database (that is, AuthDB is admin and AccountName is root).

    Supporting Types

    AccountAccountPrivilege, AccountAccountPrivilegeArgs

    DbName string
    Databases for which the account has permissions.
    RoleName string
    Permissions the account has in the current database.
    DbName string
    Databases for which the account has permissions.
    RoleName string
    Permissions the account has in the current database.
    db_name string
    Databases for which the account has permissions.
    role_name string
    Permissions the account has in the current database.
    dbName String
    Databases for which the account has permissions.
    roleName String
    Permissions the account has in the current database.
    dbName string
    Databases for which the account has permissions.
    roleName string
    Permissions the account has in the current database.
    db_name str
    Databases for which the account has permissions.
    role_name str
    Permissions the account has in the current database.
    dbName String
    Databases for which the account has permissions.
    roleName String
    Permissions the account has in the current database.

    Import

    $ pulumi import volcenginecc:mongodb/account:Account example "instance_id|account_name"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcenginecc volcengine/pulumi-volcenginecc
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the volcenginecc Terraform Provider.
    volcenginecc logo
    Viewing docs for volcenginecc v0.0.43
    published on Monday, Jun 15, 2026 by Volcengine

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial