1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. mongodb
  5. Account
Alibaba Cloud v3.89.0 published on Saturday, Nov 22, 2025 by Pulumi
alicloud logo
Alibaba Cloud v3.89.0 published on Saturday, Nov 22, 2025 by Pulumi

    Import

    Mongodb 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 com.pulumi.alicloud.mongodb.Account("exampleaccountResourceResourceFromMongodbaccount", com.pulumi.alicloud.mongodb.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
    Account Name
    AccountPassword string
    Account Password
    InstanceId string
    Instance Id
    AccountDescription string
    Set the comment information of the account.

    • Cannot start with http:// or https.
    • Start with Chinese and English letters.
    • Can contain Chinese characters, English characters, underscores (_), dashes (-), and numbers, and can be 2 to 256 characters in length.
    CharacterType string
    The account Comment Information type. Value:
    AccountName string
    Account Name
    AccountPassword string
    Account Password
    InstanceId string
    Instance Id
    AccountDescription string
    Set the comment information of the account.

    • Cannot start with http:// or https.
    • Start with Chinese and English letters.
    • Can contain Chinese characters, English characters, underscores (_), dashes (-), and numbers, and can be 2 to 256 characters in length.
    CharacterType string
    The account Comment Information type. Value:
    accountName String
    Account Name
    accountPassword String
    Account Password
    instanceId String
    Instance Id
    accountDescription String
    Set the comment information of the account.

    • Cannot start with http:// or https.
    • Start with Chinese and English letters.
    • Can contain Chinese characters, English characters, underscores (_), dashes (-), and numbers, and can be 2 to 256 characters in length.
    characterType String
    The account Comment Information type. Value:
    accountName string
    Account Name
    accountPassword string
    Account Password
    instanceId string
    Instance Id
    accountDescription string
    Set the comment information of the account.

    • Cannot start with http:// or https.
    • Start with Chinese and English letters.
    • Can contain Chinese characters, English characters, underscores (_), dashes (-), and numbers, and can be 2 to 256 characters in length.
    characterType string
    The account Comment Information type. Value:
    account_name str
    Account Name
    account_password str
    Account Password
    instance_id str
    Instance Id
    account_description str
    Set the comment information of the account.

    • Cannot start with http:// or https.
    • Start with Chinese and English letters.
    • Can contain Chinese characters, English characters, underscores (_), dashes (-), and numbers, and can be 2 to 256 characters in length.
    character_type str
    The account Comment Information type. Value:
    accountName String
    Account Name
    accountPassword String
    Account Password
    instanceId String
    Instance Id
    accountDescription String
    Set the comment information of the account.

    • Cannot start with http:// or https.
    • Start with Chinese and English letters.
    • Can contain Chinese characters, English characters, underscores (_), dashes (-), and numbers, and can be 2 to 256 characters in length.
    characterType String
    The account Comment Information type. Value:

    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
    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:
    AccountDescription string
    Set the comment information of the account.

    • Cannot start with http:// or https.
    • Start with Chinese and English letters.
    • Can contain Chinese characters, English characters, underscores (_), dashes (-), and numbers, and can be 2 to 256 characters in length.
    AccountName string
    Account Name
    AccountPassword string
    Account Password
    CharacterType string
    The account Comment Information type. Value:
    InstanceId string
    Instance Id
    Status string
    Account Status
    AccountDescription string
    Set the comment information of the account.

    • Cannot start with http:// or https.
    • Start with Chinese and English letters.
    • Can contain Chinese characters, English characters, underscores (_), dashes (-), and numbers, and can be 2 to 256 characters in length.
    AccountName string
    Account Name
    AccountPassword string
    Account Password
    CharacterType string
    The account Comment Information type. Value:
    InstanceId string
    Instance Id
    Status string
    Account Status
    accountDescription String
    Set the comment information of the account.

    • Cannot start with http:// or https.
    • Start with Chinese and English letters.
    • Can contain Chinese characters, English characters, underscores (_), dashes (-), and numbers, and can be 2 to 256 characters in length.
    accountName String
    Account Name
    accountPassword String
    Account Password
    characterType String
    The account Comment Information type. Value:
    instanceId String
    Instance Id
    status String
    Account Status
    accountDescription string
    Set the comment information of the account.

    • Cannot start with http:// or https.
    • Start with Chinese and English letters.
    • Can contain Chinese characters, English characters, underscores (_), dashes (-), and numbers, and can be 2 to 256 characters in length.
    accountName string
    Account Name
    accountPassword string
    Account Password
    characterType string
    The account Comment Information type. Value:
    instanceId string
    Instance Id
    status string
    Account Status
    account_description str
    Set the comment information of the account.

    • Cannot start with http:// or https.
    • Start with Chinese and English letters.
    • Can contain Chinese characters, English characters, underscores (_), dashes (-), and numbers, and can be 2 to 256 characters in length.
    account_name str
    Account Name
    account_password str
    Account Password
    character_type str
    The account Comment Information type. Value:
    instance_id str
    Instance Id
    status str
    Account Status
    accountDescription String
    Set the comment information of the account.

    • Cannot start with http:// or https.
    • Start with Chinese and English letters.
    • Can contain Chinese characters, English characters, underscores (_), dashes (-), and numbers, and can be 2 to 256 characters in length.
    accountName String
    Account Name
    accountPassword String
    Account Password
    characterType String
    The account Comment Information type. Value:
    instanceId String
    Instance Id
    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.
    alicloud logo
    Alibaba Cloud v3.89.0 published on Saturday, Nov 22, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate