tencentcloud.MongodbInstanceAccount
Explore with Pulumi AI
Provides a resource to create a mongodb instance_account
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const instanceAccount = new tencentcloud.MongodbInstanceAccount("instanceAccount", {
authRoles: [{
mask: 0,
namespace: "*",
}],
instanceId: "cmgo-lxaz2c9b",
mongoUserPassword: "xxxxxxxxx",
password: "xxxxxxxx",
userDesc: "test account",
userName: "test_account",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
instance_account = tencentcloud.MongodbInstanceAccount("instanceAccount",
auth_roles=[{
"mask": 0,
"namespace": "*",
}],
instance_id="cmgo-lxaz2c9b",
mongo_user_password="xxxxxxxxx",
password="xxxxxxxx",
user_desc="test account",
user_name="test_account")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewMongodbInstanceAccount(ctx, "instanceAccount", &tencentcloud.MongodbInstanceAccountArgs{
AuthRoles: tencentcloud.MongodbInstanceAccountAuthRoleArray{
&tencentcloud.MongodbInstanceAccountAuthRoleArgs{
Mask: pulumi.Float64(0),
Namespace: pulumi.String("*"),
},
},
InstanceId: pulumi.String("cmgo-lxaz2c9b"),
MongoUserPassword: pulumi.String("xxxxxxxxx"),
Password: pulumi.String("xxxxxxxx"),
UserDesc: pulumi.String("test account"),
UserName: pulumi.String("test_account"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var instanceAccount = new Tencentcloud.MongodbInstanceAccount("instanceAccount", new()
{
AuthRoles = new[]
{
new Tencentcloud.Inputs.MongodbInstanceAccountAuthRoleArgs
{
Mask = 0,
Namespace = "*",
},
},
InstanceId = "cmgo-lxaz2c9b",
MongoUserPassword = "xxxxxxxxx",
Password = "xxxxxxxx",
UserDesc = "test account",
UserName = "test_account",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.MongodbInstanceAccount;
import com.pulumi.tencentcloud.MongodbInstanceAccountArgs;
import com.pulumi.tencentcloud.inputs.MongodbInstanceAccountAuthRoleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var instanceAccount = new MongodbInstanceAccount("instanceAccount", MongodbInstanceAccountArgs.builder()
.authRoles(MongodbInstanceAccountAuthRoleArgs.builder()
.mask(0)
.namespace("*")
.build())
.instanceId("cmgo-lxaz2c9b")
.mongoUserPassword("xxxxxxxxx")
.password("xxxxxxxx")
.userDesc("test account")
.userName("test_account")
.build());
}
}
resources:
instanceAccount:
type: tencentcloud:MongodbInstanceAccount
properties:
authRoles:
- mask: 0
namespace: '*'
instanceId: cmgo-lxaz2c9b
mongoUserPassword: xxxxxxxxx
password: xxxxxxxx
userDesc: test account
userName: test_account
Create MongodbInstanceAccount Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MongodbInstanceAccount(name: string, args: MongodbInstanceAccountArgs, opts?: CustomResourceOptions);
@overload
def MongodbInstanceAccount(resource_name: str,
args: MongodbInstanceAccountArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MongodbInstanceAccount(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
user_name: Optional[str] = None,
auth_roles: Optional[Sequence[MongodbInstanceAccountAuthRoleArgs]] = None,
mongo_user_password: Optional[str] = None,
mongodb_instance_account_id: Optional[str] = None,
password: Optional[str] = None,
user_desc: Optional[str] = None)
func NewMongodbInstanceAccount(ctx *Context, name string, args MongodbInstanceAccountArgs, opts ...ResourceOption) (*MongodbInstanceAccount, error)
public MongodbInstanceAccount(string name, MongodbInstanceAccountArgs args, CustomResourceOptions? opts = null)
public MongodbInstanceAccount(String name, MongodbInstanceAccountArgs args)
public MongodbInstanceAccount(String name, MongodbInstanceAccountArgs args, CustomResourceOptions options)
type: tencentcloud:MongodbInstanceAccount
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 MongodbInstanceAccountArgs
- 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 MongodbInstanceAccountArgs
- 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 MongodbInstanceAccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MongodbInstanceAccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MongodbInstanceAccountArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
MongodbInstanceAccount 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 MongodbInstanceAccount resource accepts the following input properties:
- Instance
Id string - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- User
Name string - The new account name. Its format requirements are as follows: character range [1,32]. Characters in the range of [A,Z], [a,z], [1,9] as well as underscore _ and dash - can be input.
- Auth
Roles List<MongodbInstance Account Auth Role> - The read and write permission information of the account.
- Mongo
User stringPassword - The password corresponding to the mongouser account. mongouser is the system default account, which is the password set when creating an instance.
- Mongodb
Instance stringAccount Id - ID of the resource.
- Password string
- New account password. Password complexity requirements are as follows: character length range [8,32]. Contains at least letters, numbers and special characters (exclamation point!, at@, pound sign #, percent sign %, caret ^, asterisk *, parentheses (), underscore _).
- User
Desc string - Account remarks.
- Instance
Id string - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- User
Name string - The new account name. Its format requirements are as follows: character range [1,32]. Characters in the range of [A,Z], [a,z], [1,9] as well as underscore _ and dash - can be input.
- Auth
Roles []MongodbInstance Account Auth Role Args - The read and write permission information of the account.
- Mongo
User stringPassword - The password corresponding to the mongouser account. mongouser is the system default account, which is the password set when creating an instance.
- Mongodb
Instance stringAccount Id - ID of the resource.
- Password string
- New account password. Password complexity requirements are as follows: character length range [8,32]. Contains at least letters, numbers and special characters (exclamation point!, at@, pound sign #, percent sign %, caret ^, asterisk *, parentheses (), underscore _).
- User
Desc string - Account remarks.
- instance
Id String - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- user
Name String - The new account name. Its format requirements are as follows: character range [1,32]. Characters in the range of [A,Z], [a,z], [1,9] as well as underscore _ and dash - can be input.
- auth
Roles List<MongodbInstance Account Auth Role> - The read and write permission information of the account.
- mongo
User StringPassword - The password corresponding to the mongouser account. mongouser is the system default account, which is the password set when creating an instance.
- mongodb
Instance StringAccount Id - ID of the resource.
- password String
- New account password. Password complexity requirements are as follows: character length range [8,32]. Contains at least letters, numbers and special characters (exclamation point!, at@, pound sign #, percent sign %, caret ^, asterisk *, parentheses (), underscore _).
- user
Desc String - Account remarks.
- instance
Id string - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- user
Name string - The new account name. Its format requirements are as follows: character range [1,32]. Characters in the range of [A,Z], [a,z], [1,9] as well as underscore _ and dash - can be input.
- auth
Roles MongodbInstance Account Auth Role[] - The read and write permission information of the account.
- mongo
User stringPassword - The password corresponding to the mongouser account. mongouser is the system default account, which is the password set when creating an instance.
- mongodb
Instance stringAccount Id - ID of the resource.
- password string
- New account password. Password complexity requirements are as follows: character length range [8,32]. Contains at least letters, numbers and special characters (exclamation point!, at@, pound sign #, percent sign %, caret ^, asterisk *, parentheses (), underscore _).
- user
Desc string - Account remarks.
- instance_
id str - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- user_
name str - The new account name. Its format requirements are as follows: character range [1,32]. Characters in the range of [A,Z], [a,z], [1,9] as well as underscore _ and dash - can be input.
- auth_
roles Sequence[MongodbInstance Account Auth Role Args] - The read and write permission information of the account.
- mongo_
user_ strpassword - The password corresponding to the mongouser account. mongouser is the system default account, which is the password set when creating an instance.
- mongodb_
instance_ straccount_ id - ID of the resource.
- password str
- New account password. Password complexity requirements are as follows: character length range [8,32]. Contains at least letters, numbers and special characters (exclamation point!, at@, pound sign #, percent sign %, caret ^, asterisk *, parentheses (), underscore _).
- user_
desc str - Account remarks.
- instance
Id String - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- user
Name String - The new account name. Its format requirements are as follows: character range [1,32]. Characters in the range of [A,Z], [a,z], [1,9] as well as underscore _ and dash - can be input.
- auth
Roles List<Property Map> - The read and write permission information of the account.
- mongo
User StringPassword - The password corresponding to the mongouser account. mongouser is the system default account, which is the password set when creating an instance.
- mongodb
Instance StringAccount Id - ID of the resource.
- password String
- New account password. Password complexity requirements are as follows: character length range [8,32]. Contains at least letters, numbers and special characters (exclamation point!, at@, pound sign #, percent sign %, caret ^, asterisk *, parentheses (), underscore _).
- user
Desc String - Account remarks.
Outputs
All input properties are implicitly available as output properties. Additionally, the MongodbInstanceAccount resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing MongodbInstanceAccount Resource
Get an existing MongodbInstanceAccount 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?: MongodbInstanceAccountState, opts?: CustomResourceOptions): MongodbInstanceAccount
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auth_roles: Optional[Sequence[MongodbInstanceAccountAuthRoleArgs]] = None,
instance_id: Optional[str] = None,
mongo_user_password: Optional[str] = None,
mongodb_instance_account_id: Optional[str] = None,
password: Optional[str] = None,
user_desc: Optional[str] = None,
user_name: Optional[str] = None) -> MongodbInstanceAccount
func GetMongodbInstanceAccount(ctx *Context, name string, id IDInput, state *MongodbInstanceAccountState, opts ...ResourceOption) (*MongodbInstanceAccount, error)
public static MongodbInstanceAccount Get(string name, Input<string> id, MongodbInstanceAccountState? state, CustomResourceOptions? opts = null)
public static MongodbInstanceAccount get(String name, Output<String> id, MongodbInstanceAccountState state, CustomResourceOptions options)
resources: _: type: tencentcloud:MongodbInstanceAccount 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.
- Auth
Roles List<MongodbInstance Account Auth Role> - The read and write permission information of the account.
- Instance
Id string - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- Mongo
User stringPassword - The password corresponding to the mongouser account. mongouser is the system default account, which is the password set when creating an instance.
- Mongodb
Instance stringAccount Id - ID of the resource.
- Password string
- New account password. Password complexity requirements are as follows: character length range [8,32]. Contains at least letters, numbers and special characters (exclamation point!, at@, pound sign #, percent sign %, caret ^, asterisk *, parentheses (), underscore _).
- User
Desc string - Account remarks.
- User
Name string - The new account name. Its format requirements are as follows: character range [1,32]. Characters in the range of [A,Z], [a,z], [1,9] as well as underscore _ and dash - can be input.
- Auth
Roles []MongodbInstance Account Auth Role Args - The read and write permission information of the account.
- Instance
Id string - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- Mongo
User stringPassword - The password corresponding to the mongouser account. mongouser is the system default account, which is the password set when creating an instance.
- Mongodb
Instance stringAccount Id - ID of the resource.
- Password string
- New account password. Password complexity requirements are as follows: character length range [8,32]. Contains at least letters, numbers and special characters (exclamation point!, at@, pound sign #, percent sign %, caret ^, asterisk *, parentheses (), underscore _).
- User
Desc string - Account remarks.
- User
Name string - The new account name. Its format requirements are as follows: character range [1,32]. Characters in the range of [A,Z], [a,z], [1,9] as well as underscore _ and dash - can be input.
- auth
Roles List<MongodbInstance Account Auth Role> - The read and write permission information of the account.
- instance
Id String - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- mongo
User StringPassword - The password corresponding to the mongouser account. mongouser is the system default account, which is the password set when creating an instance.
- mongodb
Instance StringAccount Id - ID of the resource.
- password String
- New account password. Password complexity requirements are as follows: character length range [8,32]. Contains at least letters, numbers and special characters (exclamation point!, at@, pound sign #, percent sign %, caret ^, asterisk *, parentheses (), underscore _).
- user
Desc String - Account remarks.
- user
Name String - The new account name. Its format requirements are as follows: character range [1,32]. Characters in the range of [A,Z], [a,z], [1,9] as well as underscore _ and dash - can be input.
- auth
Roles MongodbInstance Account Auth Role[] - The read and write permission information of the account.
- instance
Id string - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- mongo
User stringPassword - The password corresponding to the mongouser account. mongouser is the system default account, which is the password set when creating an instance.
- mongodb
Instance stringAccount Id - ID of the resource.
- password string
- New account password. Password complexity requirements are as follows: character length range [8,32]. Contains at least letters, numbers and special characters (exclamation point!, at@, pound sign #, percent sign %, caret ^, asterisk *, parentheses (), underscore _).
- user
Desc string - Account remarks.
- user
Name string - The new account name. Its format requirements are as follows: character range [1,32]. Characters in the range of [A,Z], [a,z], [1,9] as well as underscore _ and dash - can be input.
- auth_
roles Sequence[MongodbInstance Account Auth Role Args] - The read and write permission information of the account.
- instance_
id str - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- mongo_
user_ strpassword - The password corresponding to the mongouser account. mongouser is the system default account, which is the password set when creating an instance.
- mongodb_
instance_ straccount_ id - ID of the resource.
- password str
- New account password. Password complexity requirements are as follows: character length range [8,32]. Contains at least letters, numbers and special characters (exclamation point!, at@, pound sign #, percent sign %, caret ^, asterisk *, parentheses (), underscore _).
- user_
desc str - Account remarks.
- user_
name str - The new account name. Its format requirements are as follows: character range [1,32]. Characters in the range of [A,Z], [a,z], [1,9] as well as underscore _ and dash - can be input.
- auth
Roles List<Property Map> - The read and write permission information of the account.
- instance
Id String - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- mongo
User StringPassword - The password corresponding to the mongouser account. mongouser is the system default account, which is the password set when creating an instance.
- mongodb
Instance StringAccount Id - ID of the resource.
- password String
- New account password. Password complexity requirements are as follows: character length range [8,32]. Contains at least letters, numbers and special characters (exclamation point!, at@, pound sign #, percent sign %, caret ^, asterisk *, parentheses (), underscore _).
- user
Desc String - Account remarks.
- user
Name String - The new account name. Its format requirements are as follows: character range [1,32]. Characters in the range of [A,Z], [a,z], [1,9] as well as underscore _ and dash - can be input.
Supporting Types
MongodbInstanceAccountAuthRole, MongodbInstanceAccountAuthRoleArgs
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.