1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. mongodb
  5. Account
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.mongodb.Account

Explore with Pulumi AI

Import

Mongo D B Account can be imported using the id, e.g.

$ pulumi import alicloud:mongodb/account:Account example <instance_id>:<account_name>
Copy

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,
            account_password: Optional[str] = None,
            instance_id: Optional[str] = None,
            account_description: Optional[str] = None,
            character_type: Optional[str] = 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: alicloud:mongodb:Account
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AccountArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. AccountArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AccountArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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 exampleaccountResourceResourceFromMongodbaccount = new AliCloud.MongoDB.Account("exampleaccountResourceResourceFromMongodbaccount", new()
{
    AccountName = "string",
    AccountPassword = "string",
    InstanceId = "string",
    AccountDescription = "string",
    CharacterType = "string",
});
Copy
example, err := mongodb.NewAccount(ctx, "exampleaccountResourceResourceFromMongodbaccount", &mongodb.AccountArgs{
	AccountName:        pulumi.String("string"),
	AccountPassword:    pulumi.String("string"),
	InstanceId:         pulumi.String("string"),
	AccountDescription: pulumi.String("string"),
	CharacterType:      pulumi.String("string"),
})
Copy
var exampleaccountResourceResourceFromMongodbaccount = new Account("exampleaccountResourceResourceFromMongodbaccount", AccountArgs.builder()
    .accountName("string")
    .accountPassword("string")
    .instanceId("string")
    .accountDescription("string")
    .characterType("string")
    .build());
Copy
exampleaccount_resource_resource_from_mongodbaccount = alicloud.mongodb.Account("exampleaccountResourceResourceFromMongodbaccount",
    account_name="string",
    account_password="string",
    instance_id="string",
    account_description="string",
    character_type="string")
Copy
const exampleaccountResourceResourceFromMongodbaccount = new alicloud.mongodb.Account("exampleaccountResourceResourceFromMongodbaccount", {
    accountName: "string",
    accountPassword: "string",
    instanceId: "string",
    accountDescription: "string",
    characterType: "string",
});
Copy
type: alicloud:mongodb:Account
properties:
    accountDescription: string
    accountName: string
    accountPassword: string
    characterType: string
    instanceId: string
Copy

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
This property is required.
Changes to this property will trigger replacement.
string
The new password.

  • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
  • The password must be 8 to 32 characters in length.
AccountPassword This property is required. string
The password of the database account. The password must be 8 to 32 characters in length. It can contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
InstanceId
This property is required.
Changes to this property will trigger replacement.
string
The account whose password needs to be reset. Set the value to root.
AccountDescription string

Account comment information.

NOTE: Call the ModifyAccountDescription interface to set the account description information before this parameter is returned.

CharacterType Changes to this property will trigger replacement. string
The role type of the instance. Value description

  • When the instance type is sharded cluster, charactertype is required. The values are db and cs.
  • When the instance type is a replica set, charactertype can be null or pass in normal.
AccountName
This property is required.
Changes to this property will trigger replacement.
string
The new password.

  • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
  • The password must be 8 to 32 characters in length.
AccountPassword This property is required. string
The password of the database account. The password must be 8 to 32 characters in length. It can contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
InstanceId
This property is required.
Changes to this property will trigger replacement.
string
The account whose password needs to be reset. Set the value to root.
AccountDescription string

Account comment information.

NOTE: Call the ModifyAccountDescription interface to set the account description information before this parameter is returned.

CharacterType Changes to this property will trigger replacement. string
The role type of the instance. Value description

  • When the instance type is sharded cluster, charactertype is required. The values are db and cs.
  • When the instance type is a replica set, charactertype can be null or pass in normal.
accountName
This property is required.
Changes to this property will trigger replacement.
String
The new password.

  • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
  • The password must be 8 to 32 characters in length.
accountPassword This property is required. String
The password of the database account. The password must be 8 to 32 characters in length. It can contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
instanceId
This property is required.
Changes to this property will trigger replacement.
String
The account whose password needs to be reset. Set the value to root.
accountDescription String

Account comment information.

NOTE: Call the ModifyAccountDescription interface to set the account description information before this parameter is returned.

characterType Changes to this property will trigger replacement. String
The role type of the instance. Value description

  • When the instance type is sharded cluster, charactertype is required. The values are db and cs.
  • When the instance type is a replica set, charactertype can be null or pass in normal.
accountName
This property is required.
Changes to this property will trigger replacement.
string
The new password.

  • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
  • The password must be 8 to 32 characters in length.
accountPassword This property is required. string
The password of the database account. The password must be 8 to 32 characters in length. It can contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
instanceId
This property is required.
Changes to this property will trigger replacement.
string
The account whose password needs to be reset. Set the value to root.
accountDescription string

Account comment information.

NOTE: Call the ModifyAccountDescription interface to set the account description information before this parameter is returned.

characterType Changes to this property will trigger replacement. string
The role type of the instance. Value description

  • When the instance type is sharded cluster, charactertype is required. The values are db and cs.
  • When the instance type is a replica set, charactertype can be null or pass in normal.
account_name
This property is required.
Changes to this property will trigger replacement.
str
The new password.

  • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
  • The password must be 8 to 32 characters in length.
account_password This property is required. str
The password of the database account. The password must be 8 to 32 characters in length. It can contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
instance_id
This property is required.
Changes to this property will trigger replacement.
str
The account whose password needs to be reset. Set the value to root.
account_description str

Account comment information.

NOTE: Call the ModifyAccountDescription interface to set the account description information before this parameter is returned.

character_type Changes to this property will trigger replacement. str
The role type of the instance. Value description

  • When the instance type is sharded cluster, charactertype is required. The values are db and cs.
  • When the instance type is a replica set, charactertype can be null or pass in normal.
accountName
This property is required.
Changes to this property will trigger replacement.
String
The new password.

  • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
  • The password must be 8 to 32 characters in length.
accountPassword This property is required. String
The password of the database account. The password must be 8 to 32 characters in length. It can contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
instanceId
This property is required.
Changes to this property will trigger replacement.
String
The account whose password needs to be reset. Set the value to root.
accountDescription String

Account comment information.

NOTE: Call the ModifyAccountDescription interface to set the account description information before this parameter is returned.

characterType Changes to this property will trigger replacement. String
The role type of the instance. Value description

  • When the instance type is sharded cluster, charactertype is required. The values are db and cs.
  • When the instance type is a replica set, charactertype can be null or pass in normal.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Status string
Account Status
Id string
The provider-assigned unique ID for this managed resource.
Status string
Account Status
id String
The provider-assigned unique ID for this managed resource.
status String
Account Status
id string
The provider-assigned unique ID for this managed resource.
status string
Account Status
id str
The provider-assigned unique ID for this managed resource.
status str
Account Status
id String
The provider-assigned unique ID for this managed resource.
status String
Account Status

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_description: Optional[str] = None,
        account_name: Optional[str] = None,
        account_password: Optional[str] = None,
        character_type: Optional[str] = None,
        instance_id: Optional[str] = None,
        status: Optional[str] = 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: alicloud:mongodb:Account    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AccountDescription string

Account comment information.

NOTE: Call the ModifyAccountDescription interface to set the account description information before this parameter is returned.

AccountName Changes to this property will trigger replacement. string
The new password.

  • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
  • The password must be 8 to 32 characters in length.
AccountPassword string
The password of the database account. The password must be 8 to 32 characters in length. It can contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
CharacterType Changes to this property will trigger replacement. string
The role type of the instance. Value description

  • When the instance type is sharded cluster, charactertype is required. The values are db and cs.
  • When the instance type is a replica set, charactertype can be null or pass in normal.
InstanceId Changes to this property will trigger replacement. string
The account whose password needs to be reset. Set the value to root.
Status string
Account Status
AccountDescription string

Account comment information.

NOTE: Call the ModifyAccountDescription interface to set the account description information before this parameter is returned.

AccountName Changes to this property will trigger replacement. string
The new password.

  • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
  • The password must be 8 to 32 characters in length.
AccountPassword string
The password of the database account. The password must be 8 to 32 characters in length. It can contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
CharacterType Changes to this property will trigger replacement. string
The role type of the instance. Value description

  • When the instance type is sharded cluster, charactertype is required. The values are db and cs.
  • When the instance type is a replica set, charactertype can be null or pass in normal.
InstanceId Changes to this property will trigger replacement. string
The account whose password needs to be reset. Set the value to root.
Status string
Account Status
accountDescription String

Account comment information.

NOTE: Call the ModifyAccountDescription interface to set the account description information before this parameter is returned.

accountName Changes to this property will trigger replacement. String
The new password.

  • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
  • The password must be 8 to 32 characters in length.
accountPassword String
The password of the database account. The password must be 8 to 32 characters in length. It can contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
characterType Changes to this property will trigger replacement. String
The role type of the instance. Value description

  • When the instance type is sharded cluster, charactertype is required. The values are db and cs.
  • When the instance type is a replica set, charactertype can be null or pass in normal.
instanceId Changes to this property will trigger replacement. String
The account whose password needs to be reset. Set the value to root.
status String
Account Status
accountDescription string

Account comment information.

NOTE: Call the ModifyAccountDescription interface to set the account description information before this parameter is returned.

accountName Changes to this property will trigger replacement. string
The new password.

  • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
  • The password must be 8 to 32 characters in length.
accountPassword string
The password of the database account. The password must be 8 to 32 characters in length. It can contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
characterType Changes to this property will trigger replacement. string
The role type of the instance. Value description

  • When the instance type is sharded cluster, charactertype is required. The values are db and cs.
  • When the instance type is a replica set, charactertype can be null or pass in normal.
instanceId Changes to this property will trigger replacement. string
The account whose password needs to be reset. Set the value to root.
status string
Account Status
account_description str

Account comment information.

NOTE: Call the ModifyAccountDescription interface to set the account description information before this parameter is returned.

account_name Changes to this property will trigger replacement. str
The new password.

  • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
  • The password must be 8 to 32 characters in length.
account_password str
The password of the database account. The password must be 8 to 32 characters in length. It can contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
character_type Changes to this property will trigger replacement. str
The role type of the instance. Value description

  • When the instance type is sharded cluster, charactertype is required. The values are db and cs.
  • When the instance type is a replica set, charactertype can be null or pass in normal.
instance_id Changes to this property will trigger replacement. str
The account whose password needs to be reset. Set the value to root.
status str
Account Status
accountDescription String

Account comment information.

NOTE: Call the ModifyAccountDescription interface to set the account description information before this parameter is returned.

accountName Changes to this property will trigger replacement. String
The new password.

  • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
  • The password must be 8 to 32 characters in length.
accountPassword String
The password of the database account. The password must be 8 to 32 characters in length. It can contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! # $ % ^ & * ( ) _ + - =
characterType Changes to this property will trigger replacement. String
The role type of the instance. Value description

  • When the instance type is sharded cluster, charactertype is required. The values are db and cs.
  • When the instance type is a replica set, charactertype can be null or pass in normal.
instanceId Changes to this property will trigger replacement. String
The account whose password needs to be reset. Set the value to root.
status String
Account Status

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.