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>
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 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 exampleaccountResourceResourceFromMongodbaccount = new AliCloud.MongoDB.Account("exampleaccountResourceResourceFromMongodbaccount", new()
{
    AccountName = "string",
    AccountPassword = "string",
    InstanceId = "string",
    AccountDescription = "string",
    CharacterType = "string",
});
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"),
})
var exampleaccountResourceResourceFromMongodbaccount = new Account("exampleaccountResourceResourceFromMongodbaccount", AccountArgs.builder()
    .accountName("string")
    .accountPassword("string")
    .instanceId("string")
    .accountDescription("string")
    .characterType("string")
    .build());
exampleaccount_resource_resource_from_mongodbaccount = alicloud.mongodb.Account("exampleaccountResourceResourceFromMongodbaccount",
    account_name="string",
    account_password="string",
    instance_id="string",
    account_description="string",
    character_type="string")
const exampleaccountResourceResourceFromMongodbaccount = new alicloud.mongodb.Account("exampleaccountResourceResourceFromMongodbaccount", {
    accountName: "string",
    accountPassword: "string",
    instanceId: "string",
    accountDescription: "string",
    characterType: "string",
});
type: alicloud:mongodb:Account
properties:
    accountDescription: string
    accountName: string
    accountPassword: string
    characterType: string
    instanceId: string
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
- 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.
 
- The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include 
- 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 ! # $ % ^ & * ( ) _ + - =
- InstanceId 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 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 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.
 
- The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include 
- 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 ! # $ % ^ & * ( ) _ + - =
- InstanceId 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 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 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.
 
- The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include 
- 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 ! # $ % ^ & * ( ) _ + - =
- instanceId 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 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 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.
 
- The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include 
- 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 ! # $ % ^ & * ( ) _ + - =
- instanceId 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 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 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.
 
- The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include 
- 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 ! # $ % ^ & * ( ) _ + - =
- instance_id 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 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 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.
 
- The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include 
- 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 ! # $ % ^ & * ( ) _ + - =
- instanceId 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 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:
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) -> Accountfunc 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
- 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.
- AccountDescription string
- Account comment information. - NOTE: Call the ModifyAccountDescription interface to set the account description information before this parameter is returned. 
- AccountName 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.
 
- The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include 
- 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 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 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 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.
 
- The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include 
- 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 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 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 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.
 
- The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include 
- 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 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 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 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.
 
- The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include 
- 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 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 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 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.
 
- The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include 
- 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 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 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 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.
 
- The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include 
- 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 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 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 alicloudTerraform Provider.