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:
- Account
Name string - Account Name
- Account
Password string - Account Password
- Instance
Id string - Instance Id
- Account
Description 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.
- Character
Type string - The account Comment Information type. Value:
- Account
Name string - Account Name
- Account
Password string - Account Password
- Instance
Id string - Instance Id
- Account
Description 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.
- Character
Type string - The account Comment Information type. Value:
- account
Name String - Account Name
- account
Password String - Account Password
- instance
Id String - Instance Id
- account
Description 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.
- character
Type String - The account Comment Information type. Value:
- account
Name string - Account Name
- account
Password string - Account Password
- instance
Id string - Instance Id
- account
Description 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.
- character
Type 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:
- account
Name String - Account Name
- account
Password String - Account Password
- instance
Id String - Instance Id
- account
Description 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.
- character
Type 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:
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.
- Account
Description 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.
- Account
Name string - Account Name
- Account
Password string - Account Password
- Character
Type string - The account Comment Information type. Value:
- Instance
Id string - Instance Id
- Status string
- Account Status
- Account
Description 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.
- Account
Name string - Account Name
- Account
Password string - Account Password
- Character
Type string - The account Comment Information type. Value:
- Instance
Id string - Instance Id
- Status string
- Account Status
- account
Description 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.
- account
Name String - Account Name
- account
Password String - Account Password
- character
Type String - The account Comment Information type. Value:
- instance
Id String - Instance Id
- status String
- Account Status
- account
Description 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.
- account
Name string - Account Name
- account
Password string - Account Password
- character
Type string - The account Comment Information type. Value:
- instance
Id 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
- account
Description 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.
- account
Name String - Account Name
- account
Password String - Account Password
- character
Type String - The account Comment Information type. Value:
- instance
Id 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
alicloudTerraform Provider.
