Provides a Mongodb Node resource.
The sub-resources of the ShardingInstance, including the cs, shards, and mongos nodes.
For information about Mongodb Node and how to use it, see What is Node.
NOTE: Available since v1.266.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const zoneId = config.get("zoneId") || "cn-shanghai-b";
const regionId = config.get("regionId") || "cn-shanghai";
const ipv4Cidr = config.get("ipv4Cidr") || "10.0.0.0/24";
const _default = new alicloud.vpc.Network("default", {
description: "tf-example",
vpcName: "tf-vpc-shanghai-b",
cidrBlock: "10.0.0.0/8",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
vpcId: _default.id,
zoneId: zoneId,
cidrBlock: ipv4Cidr,
vswitchName: "tf-shanghai-B",
});
const defaultShardingInstance = new alicloud.mongodb.ShardingInstance("default", {
engineVersion: "4.2",
vswitchId: defaultSwitch.id,
zoneId: zoneId,
name: name,
storageType: "cloud_auto",
provisionedIops: 60,
configServerLists: [{
nodeClass: "mdb.shard.2x.xlarge.d",
nodeStorage: 40,
}],
mongoLists: [
{
nodeClass: "mdb.shard.2x.xlarge.d",
},
{
nodeClass: "mdb.shard.2x.xlarge.d",
},
],
shardLists: [
{
nodeClass: "mdb.shard.2x.xlarge.d",
nodeStorage: 40,
},
{
nodeClass: "mdb.shard.2x.xlarge.d",
nodeStorage: 40,
},
],
});
const defaultNode = new alicloud.mongodb.Node("default", {
accountPassword: "q1w2e3r4!",
autoPay: true,
nodeClass: "mdb.shard.4x.large.d",
shardDirect: false,
businessInfo: "1234",
nodeStorage: 40,
readonlyReplicas: 0,
dbInstanceId: defaultShardingInstance.id,
nodeType: "shard",
accountName: "root",
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
zone_id = config.get("zoneId")
if zone_id is None:
zone_id = "cn-shanghai-b"
region_id = config.get("regionId")
if region_id is None:
region_id = "cn-shanghai"
ipv4_cidr = config.get("ipv4Cidr")
if ipv4_cidr is None:
ipv4_cidr = "10.0.0.0/24"
default = alicloud.vpc.Network("default",
description="tf-example",
vpc_name="tf-vpc-shanghai-b",
cidr_block="10.0.0.0/8")
default_switch = alicloud.vpc.Switch("default",
vpc_id=default.id,
zone_id=zone_id,
cidr_block=ipv4_cidr,
vswitch_name="tf-shanghai-B")
default_sharding_instance = alicloud.mongodb.ShardingInstance("default",
engine_version="4.2",
vswitch_id=default_switch.id,
zone_id=zone_id,
name=name,
storage_type="cloud_auto",
provisioned_iops=60,
config_server_lists=[{
"node_class": "mdb.shard.2x.xlarge.d",
"node_storage": 40,
}],
mongo_lists=[
{
"node_class": "mdb.shard.2x.xlarge.d",
},
{
"node_class": "mdb.shard.2x.xlarge.d",
},
],
shard_lists=[
{
"node_class": "mdb.shard.2x.xlarge.d",
"node_storage": 40,
},
{
"node_class": "mdb.shard.2x.xlarge.d",
"node_storage": 40,
},
])
default_node = alicloud.mongodb.Node("default",
account_password="q1w2e3r4!",
auto_pay=True,
node_class="mdb.shard.4x.large.d",
shard_direct=False,
business_info="1234",
node_storage=40,
readonly_replicas=0,
db_instance_id=default_sharding_instance.id,
node_type="shard",
account_name="root")
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/mongodb"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
zoneId := "cn-shanghai-b"
if param := cfg.Get("zoneId"); param != "" {
zoneId = param
}
regionId := "cn-shanghai"
if param := cfg.Get("regionId"); param != "" {
regionId = param
}
ipv4Cidr := "10.0.0.0/24"
if param := cfg.Get("ipv4Cidr"); param != "" {
ipv4Cidr = param
}
_default, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
Description: pulumi.String("tf-example"),
VpcName: pulumi.String("tf-vpc-shanghai-b"),
CidrBlock: pulumi.String("10.0.0.0/8"),
})
if err != nil {
return err
}
defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
VpcId: _default.ID(),
ZoneId: pulumi.String(zoneId),
CidrBlock: pulumi.String(ipv4Cidr),
VswitchName: pulumi.String("tf-shanghai-B"),
})
if err != nil {
return err
}
defaultShardingInstance, err := mongodb.NewShardingInstance(ctx, "default", &mongodb.ShardingInstanceArgs{
EngineVersion: pulumi.String("4.2"),
VswitchId: defaultSwitch.ID(),
ZoneId: pulumi.String(zoneId),
Name: pulumi.String(name),
StorageType: pulumi.String("cloud_auto"),
ProvisionedIops: pulumi.Int(60),
ConfigServerLists: mongodb.ShardingInstanceConfigServerListArray{
&mongodb.ShardingInstanceConfigServerListArgs{
NodeClass: pulumi.String("mdb.shard.2x.xlarge.d"),
NodeStorage: pulumi.Int(40),
},
},
MongoLists: mongodb.ShardingInstanceMongoListArray{
&mongodb.ShardingInstanceMongoListArgs{
NodeClass: pulumi.String("mdb.shard.2x.xlarge.d"),
},
&mongodb.ShardingInstanceMongoListArgs{
NodeClass: pulumi.String("mdb.shard.2x.xlarge.d"),
},
},
ShardLists: mongodb.ShardingInstanceShardListArray{
&mongodb.ShardingInstanceShardListArgs{
NodeClass: pulumi.String("mdb.shard.2x.xlarge.d"),
NodeStorage: pulumi.Int(40),
},
&mongodb.ShardingInstanceShardListArgs{
NodeClass: pulumi.String("mdb.shard.2x.xlarge.d"),
NodeStorage: pulumi.Int(40),
},
},
})
if err != nil {
return err
}
_, err = mongodb.NewNode(ctx, "default", &mongodb.NodeArgs{
AccountPassword: pulumi.String("q1w2e3r4!"),
AutoPay: pulumi.Bool(true),
NodeClass: pulumi.String("mdb.shard.4x.large.d"),
ShardDirect: pulumi.Bool(false),
BusinessInfo: pulumi.String("1234"),
NodeStorage: pulumi.Int(40),
ReadonlyReplicas: pulumi.Int(0),
DbInstanceId: defaultShardingInstance.ID(),
NodeType: pulumi.String("shard"),
AccountName: pulumi.String("root"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var zoneId = config.Get("zoneId") ?? "cn-shanghai-b";
var regionId = config.Get("regionId") ?? "cn-shanghai";
var ipv4Cidr = config.Get("ipv4Cidr") ?? "10.0.0.0/24";
var @default = new AliCloud.Vpc.Network("default", new()
{
Description = "tf-example",
VpcName = "tf-vpc-shanghai-b",
CidrBlock = "10.0.0.0/8",
});
var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
{
VpcId = @default.Id,
ZoneId = zoneId,
CidrBlock = ipv4Cidr,
VswitchName = "tf-shanghai-B",
});
var defaultShardingInstance = new AliCloud.MongoDB.ShardingInstance("default", new()
{
EngineVersion = "4.2",
VswitchId = defaultSwitch.Id,
ZoneId = zoneId,
Name = name,
StorageType = "cloud_auto",
ProvisionedIops = 60,
ConfigServerLists = new[]
{
new AliCloud.MongoDB.Inputs.ShardingInstanceConfigServerListArgs
{
NodeClass = "mdb.shard.2x.xlarge.d",
NodeStorage = 40,
},
},
MongoLists = new[]
{
new AliCloud.MongoDB.Inputs.ShardingInstanceMongoListArgs
{
NodeClass = "mdb.shard.2x.xlarge.d",
},
new AliCloud.MongoDB.Inputs.ShardingInstanceMongoListArgs
{
NodeClass = "mdb.shard.2x.xlarge.d",
},
},
ShardLists = new[]
{
new AliCloud.MongoDB.Inputs.ShardingInstanceShardListArgs
{
NodeClass = "mdb.shard.2x.xlarge.d",
NodeStorage = 40,
},
new AliCloud.MongoDB.Inputs.ShardingInstanceShardListArgs
{
NodeClass = "mdb.shard.2x.xlarge.d",
NodeStorage = 40,
},
},
});
var defaultNode = new AliCloud.MongoDB.Node("default", new()
{
AccountPassword = "q1w2e3r4!",
AutoPay = true,
NodeClass = "mdb.shard.4x.large.d",
ShardDirect = false,
BusinessInfo = "1234",
NodeStorage = 40,
ReadonlyReplicas = 0,
DbInstanceId = defaultShardingInstance.Id,
NodeType = "shard",
AccountName = "root",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.mongodb.ShardingInstance;
import com.pulumi.alicloud.mongodb.ShardingInstanceArgs;
import com.pulumi.alicloud.mongodb.inputs.ShardingInstanceConfigServerListArgs;
import com.pulumi.alicloud.mongodb.inputs.ShardingInstanceMongoListArgs;
import com.pulumi.alicloud.mongodb.inputs.ShardingInstanceShardListArgs;
import com.pulumi.alicloud.mongodb.Node;
import com.pulumi.alicloud.mongodb.NodeArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
final var zoneId = config.get("zoneId").orElse("cn-shanghai-b");
final var regionId = config.get("regionId").orElse("cn-shanghai");
final var ipv4Cidr = config.get("ipv4Cidr").orElse("10.0.0.0/24");
var default_ = new Network("default", NetworkArgs.builder()
.description("tf-example")
.vpcName("tf-vpc-shanghai-b")
.cidrBlock("10.0.0.0/8")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vpcId(default_.id())
.zoneId(zoneId)
.cidrBlock(ipv4Cidr)
.vswitchName("tf-shanghai-B")
.build());
var defaultShardingInstance = new ShardingInstance("defaultShardingInstance", ShardingInstanceArgs.builder()
.engineVersion("4.2")
.vswitchId(defaultSwitch.id())
.zoneId(zoneId)
.name(name)
.storageType("cloud_auto")
.provisionedIops(60)
.configServerLists(ShardingInstanceConfigServerListArgs.builder()
.nodeClass("mdb.shard.2x.xlarge.d")
.nodeStorage(40)
.build())
.mongoLists(
ShardingInstanceMongoListArgs.builder()
.nodeClass("mdb.shard.2x.xlarge.d")
.build(),
ShardingInstanceMongoListArgs.builder()
.nodeClass("mdb.shard.2x.xlarge.d")
.build())
.shardLists(
ShardingInstanceShardListArgs.builder()
.nodeClass("mdb.shard.2x.xlarge.d")
.nodeStorage(40)
.build(),
ShardingInstanceShardListArgs.builder()
.nodeClass("mdb.shard.2x.xlarge.d")
.nodeStorage(40)
.build())
.build());
var defaultNode = new Node("defaultNode", NodeArgs.builder()
.accountPassword("q1w2e3r4!")
.autoPay(true)
.nodeClass("mdb.shard.4x.large.d")
.shardDirect(false)
.businessInfo("1234")
.nodeStorage(40)
.readonlyReplicas(0)
.dbInstanceId(defaultShardingInstance.id())
.nodeType("shard")
.accountName("root")
.build());
}
}
configuration:
name:
type: string
default: terraform-example
zoneId:
type: string
default: cn-shanghai-b
regionId:
type: string
default: cn-shanghai
ipv4Cidr:
type: string
default: 10.0.0.0/24
resources:
default:
type: alicloud:vpc:Network
properties:
description: tf-example
vpcName: tf-vpc-shanghai-b
cidrBlock: 10.0.0.0/8
defaultSwitch:
type: alicloud:vpc:Switch
name: default
properties:
vpcId: ${default.id}
zoneId: ${zoneId}
cidrBlock: ${ipv4Cidr}
vswitchName: tf-shanghai-B
defaultShardingInstance:
type: alicloud:mongodb:ShardingInstance
name: default
properties:
engineVersion: '4.2'
vswitchId: ${defaultSwitch.id}
zoneId: ${zoneId}
name: ${name}
storageType: cloud_auto
provisionedIops: 60
configServerLists:
- nodeClass: mdb.shard.2x.xlarge.d
nodeStorage: 40
mongoLists:
- nodeClass: mdb.shard.2x.xlarge.d
- nodeClass: mdb.shard.2x.xlarge.d
shardLists:
- nodeClass: mdb.shard.2x.xlarge.d
nodeStorage: 40
- nodeClass: mdb.shard.2x.xlarge.d
nodeStorage: 40
defaultNode:
type: alicloud:mongodb:Node
name: default
properties:
accountPassword: q1w2e3r4!
autoPay: 'true'
nodeClass: mdb.shard.4x.large.d
shardDirect: 'false'
businessInfo: '1234'
nodeStorage: '40'
readonlyReplicas: '0'
dbInstanceId: ${defaultShardingInstance.id}
nodeType: shard
accountName: root
📚 Need more examples? VIEW MORE EXAMPLES
Create Node Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Node(name: string, args: NodeArgs, opts?: CustomResourceOptions);@overload
def Node(resource_name: str,
args: NodeArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Node(resource_name: str,
opts: Optional[ResourceOptions] = None,
db_instance_id: Optional[str] = None,
node_type: Optional[str] = None,
node_class: Optional[str] = None,
business_info: Optional[str] = None,
account_name: Optional[str] = None,
effective_time: Optional[str] = None,
from_app: Optional[str] = None,
auto_pay: Optional[bool] = None,
node_storage: Optional[int] = None,
account_password: Optional[str] = None,
order_type: Optional[str] = None,
readonly_replicas: Optional[int] = None,
shard_direct: Optional[bool] = None,
switch_time: Optional[str] = None)func NewNode(ctx *Context, name string, args NodeArgs, opts ...ResourceOption) (*Node, error)public Node(string name, NodeArgs args, CustomResourceOptions? opts = null)type: alicloud:mongodb:Node
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 NodeArgs
- 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 NodeArgs
- 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 NodeArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NodeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NodeArgs
- 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 alicloudNodeResource = new AliCloud.MongoDB.Node("alicloudNodeResource", new()
{
DbInstanceId = "string",
NodeType = "string",
NodeClass = "string",
BusinessInfo = "string",
AccountName = "string",
EffectiveTime = "string",
FromApp = "string",
AutoPay = false,
NodeStorage = 0,
AccountPassword = "string",
OrderType = "string",
ReadonlyReplicas = 0,
ShardDirect = false,
SwitchTime = "string",
});
example, err := mongodb.NewNode(ctx, "alicloudNodeResource", &mongodb.NodeArgs{
DbInstanceId: pulumi.String("string"),
NodeType: pulumi.String("string"),
NodeClass: pulumi.String("string"),
BusinessInfo: pulumi.String("string"),
AccountName: pulumi.String("string"),
EffectiveTime: pulumi.String("string"),
FromApp: pulumi.String("string"),
AutoPay: pulumi.Bool(false),
NodeStorage: pulumi.Int(0),
AccountPassword: pulumi.String("string"),
OrderType: pulumi.String("string"),
ReadonlyReplicas: pulumi.Int(0),
ShardDirect: pulumi.Bool(false),
SwitchTime: pulumi.String("string"),
})
var alicloudNodeResource = new com.pulumi.alicloud.mongodb.Node("alicloudNodeResource", com.pulumi.alicloud.mongodb.NodeArgs.builder()
.dbInstanceId("string")
.nodeType("string")
.nodeClass("string")
.businessInfo("string")
.accountName("string")
.effectiveTime("string")
.fromApp("string")
.autoPay(false)
.nodeStorage(0)
.accountPassword("string")
.orderType("string")
.readonlyReplicas(0)
.shardDirect(false)
.switchTime("string")
.build());
alicloud_node_resource = alicloud.mongodb.Node("alicloudNodeResource",
db_instance_id="string",
node_type="string",
node_class="string",
business_info="string",
account_name="string",
effective_time="string",
from_app="string",
auto_pay=False,
node_storage=0,
account_password="string",
order_type="string",
readonly_replicas=0,
shard_direct=False,
switch_time="string")
const alicloudNodeResource = new alicloud.mongodb.Node("alicloudNodeResource", {
dbInstanceId: "string",
nodeType: "string",
nodeClass: "string",
businessInfo: "string",
accountName: "string",
effectiveTime: "string",
fromApp: "string",
autoPay: false,
nodeStorage: 0,
accountPassword: "string",
orderType: "string",
readonlyReplicas: 0,
shardDirect: false,
switchTime: "string",
});
type: alicloud:mongodb:Node
properties:
accountName: string
accountPassword: string
autoPay: false
businessInfo: string
dbInstanceId: string
effectiveTime: string
fromApp: string
nodeClass: string
nodeStorage: 0
nodeType: string
orderType: string
readonlyReplicas: 0
shardDirect: false
switchTime: string
Node 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 Node resource accepts the following input properties:
- Db
Instance stringId - The ID of the sharded cluster instance.
- Node
Class string - The specifications of the Shard node or Mongos node. For more information, see Instance Specifications.
- Node
Type string - Node type, value description:
- Account
Name string Account name, value description:
- Begins with a lowercase letter.
- Consists of lowercase letters, numbers, or underscores (_).
- 4~16 characters in length.
NOTE: - apsaradb for MongoDB does not support using keywords as accounts.
- The permissions of the account are fixed to read-only permissions.
- When applying for a direct connection address of a Shard node for the first time, you need to set an account and password.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- Account
Password string Account password, value description:
- Consists of at least three of uppercase letters, lowercase letters, numbers, and special characters.
- Oh-! @#$%^& *()_+-= is a special character.
- Length is 8~32 characters.
NOTE: apsaradb for MongoDB does not support resetting the account and password of the Shard node.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- Auto
Pay bool - Whether to pay automatically. Value description:
- Business
Info string Additional parameters, business information.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- Effective
Time string - From
App string - Request Source, value description:
OpenApi: The request source is OpenApi.
- Node
Storage int The disk space of the Node. Unit: GB.
Value range:
10to2000, with a step size of 10GB.NOTE: When the node type is
Shard, you need to configure this parameter.- Order
Type string - Readonly
Replicas int The number of read-only nodes in the Shard.
Value range:
0to5(integer). Default value: **0 * *.NOTE: This parameter is currently only supported by China Station.
- bool
- Whether to apply for the direct connection address of the Shard node. Value description:
- Switch
Time string
- Db
Instance stringId - The ID of the sharded cluster instance.
- Node
Class string - The specifications of the Shard node or Mongos node. For more information, see Instance Specifications.
- Node
Type string - Node type, value description:
- Account
Name string Account name, value description:
- Begins with a lowercase letter.
- Consists of lowercase letters, numbers, or underscores (_).
- 4~16 characters in length.
NOTE: - apsaradb for MongoDB does not support using keywords as accounts.
- The permissions of the account are fixed to read-only permissions.
- When applying for a direct connection address of a Shard node for the first time, you need to set an account and password.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- Account
Password string Account password, value description:
- Consists of at least three of uppercase letters, lowercase letters, numbers, and special characters.
- Oh-! @#$%^& *()_+-= is a special character.
- Length is 8~32 characters.
NOTE: apsaradb for MongoDB does not support resetting the account and password of the Shard node.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- Auto
Pay bool - Whether to pay automatically. Value description:
- Business
Info string Additional parameters, business information.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- Effective
Time string - From
App string - Request Source, value description:
OpenApi: The request source is OpenApi.
- Node
Storage int The disk space of the Node. Unit: GB.
Value range:
10to2000, with a step size of 10GB.NOTE: When the node type is
Shard, you need to configure this parameter.- Order
Type string - Readonly
Replicas int The number of read-only nodes in the Shard.
Value range:
0to5(integer). Default value: **0 * *.NOTE: This parameter is currently only supported by China Station.
- bool
- Whether to apply for the direct connection address of the Shard node. Value description:
- Switch
Time string
- db
Instance StringId - The ID of the sharded cluster instance.
- node
Class String - The specifications of the Shard node or Mongos node. For more information, see Instance Specifications.
- node
Type String - Node type, value description:
- account
Name String Account name, value description:
- Begins with a lowercase letter.
- Consists of lowercase letters, numbers, or underscores (_).
- 4~16 characters in length.
NOTE: - apsaradb for MongoDB does not support using keywords as accounts.
- The permissions of the account are fixed to read-only permissions.
- When applying for a direct connection address of a Shard node for the first time, you need to set an account and password.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- account
Password String Account password, value description:
- Consists of at least three of uppercase letters, lowercase letters, numbers, and special characters.
- Oh-! @#$%^& *()_+-= is a special character.
- Length is 8~32 characters.
NOTE: apsaradb for MongoDB does not support resetting the account and password of the Shard node.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- auto
Pay Boolean - Whether to pay automatically. Value description:
- business
Info String Additional parameters, business information.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- effective
Time String - from
App String - Request Source, value description:
OpenApi: The request source is OpenApi.
- node
Storage Integer The disk space of the Node. Unit: GB.
Value range:
10to2000, with a step size of 10GB.NOTE: When the node type is
Shard, you need to configure this parameter.- order
Type String - readonly
Replicas Integer The number of read-only nodes in the Shard.
Value range:
0to5(integer). Default value: **0 * *.NOTE: This parameter is currently only supported by China Station.
- Boolean
- Whether to apply for the direct connection address of the Shard node. Value description:
- switch
Time String
- db
Instance stringId - The ID of the sharded cluster instance.
- node
Class string - The specifications of the Shard node or Mongos node. For more information, see Instance Specifications.
- node
Type string - Node type, value description:
- account
Name string Account name, value description:
- Begins with a lowercase letter.
- Consists of lowercase letters, numbers, or underscores (_).
- 4~16 characters in length.
NOTE: - apsaradb for MongoDB does not support using keywords as accounts.
- The permissions of the account are fixed to read-only permissions.
- When applying for a direct connection address of a Shard node for the first time, you need to set an account and password.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- account
Password string Account password, value description:
- Consists of at least three of uppercase letters, lowercase letters, numbers, and special characters.
- Oh-! @#$%^& *()_+-= is a special character.
- Length is 8~32 characters.
NOTE: apsaradb for MongoDB does not support resetting the account and password of the Shard node.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- auto
Pay boolean - Whether to pay automatically. Value description:
- business
Info string Additional parameters, business information.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- effective
Time string - from
App string - Request Source, value description:
OpenApi: The request source is OpenApi.
- node
Storage number The disk space of the Node. Unit: GB.
Value range:
10to2000, with a step size of 10GB.NOTE: When the node type is
Shard, you need to configure this parameter.- order
Type string - readonly
Replicas number The number of read-only nodes in the Shard.
Value range:
0to5(integer). Default value: **0 * *.NOTE: This parameter is currently only supported by China Station.
- boolean
- Whether to apply for the direct connection address of the Shard node. Value description:
- switch
Time string
- db_
instance_ strid - The ID of the sharded cluster instance.
- node_
class str - The specifications of the Shard node or Mongos node. For more information, see Instance Specifications.
- node_
type str - Node type, value description:
- account_
name str Account name, value description:
- Begins with a lowercase letter.
- Consists of lowercase letters, numbers, or underscores (_).
- 4~16 characters in length.
NOTE: - apsaradb for MongoDB does not support using keywords as accounts.
- The permissions of the account are fixed to read-only permissions.
- When applying for a direct connection address of a Shard node for the first time, you need to set an account and password.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- account_
password str Account password, value description:
- Consists of at least three of uppercase letters, lowercase letters, numbers, and special characters.
- Oh-! @#$%^& *()_+-= is a special character.
- Length is 8~32 characters.
NOTE: apsaradb for MongoDB does not support resetting the account and password of the Shard node.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- auto_
pay bool - Whether to pay automatically. Value description:
- business_
info str Additional parameters, business information.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- effective_
time str - from_
app str - Request Source, value description:
OpenApi: The request source is OpenApi.
- node_
storage int The disk space of the Node. Unit: GB.
Value range:
10to2000, with a step size of 10GB.NOTE: When the node type is
Shard, you need to configure this parameter.- order_
type str - readonly_
replicas int The number of read-only nodes in the Shard.
Value range:
0to5(integer). Default value: **0 * *.NOTE: This parameter is currently only supported by China Station.
- bool
- Whether to apply for the direct connection address of the Shard node. Value description:
- switch_
time str
- db
Instance StringId - The ID of the sharded cluster instance.
- node
Class String - The specifications of the Shard node or Mongos node. For more information, see Instance Specifications.
- node
Type String - Node type, value description:
- account
Name String Account name, value description:
- Begins with a lowercase letter.
- Consists of lowercase letters, numbers, or underscores (_).
- 4~16 characters in length.
NOTE: - apsaradb for MongoDB does not support using keywords as accounts.
- The permissions of the account are fixed to read-only permissions.
- When applying for a direct connection address of a Shard node for the first time, you need to set an account and password.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- account
Password String Account password, value description:
- Consists of at least three of uppercase letters, lowercase letters, numbers, and special characters.
- Oh-! @#$%^& *()_+-= is a special character.
- Length is 8~32 characters.
NOTE: apsaradb for MongoDB does not support resetting the account and password of the Shard node.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- auto
Pay Boolean - Whether to pay automatically. Value description:
- business
Info String Additional parameters, business information.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- effective
Time String - from
App String - Request Source, value description:
OpenApi: The request source is OpenApi.
- node
Storage Number The disk space of the Node. Unit: GB.
Value range:
10to2000, with a step size of 10GB.NOTE: When the node type is
Shard, you need to configure this parameter.- order
Type String - readonly
Replicas Number The number of read-only nodes in the Shard.
Value range:
0to5(integer). Default value: **0 * *.NOTE: This parameter is currently only supported by China Station.
- Boolean
- Whether to apply for the direct connection address of the Shard node. Value description:
- switch
Time String
Outputs
All input properties are implicitly available as output properties. Additionally, the Node resource produces the following output properties:
Look up Existing Node Resource
Get an existing Node 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?: NodeState, opts?: CustomResourceOptions): Node@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_name: Optional[str] = None,
account_password: Optional[str] = None,
auto_pay: Optional[bool] = None,
business_info: Optional[str] = None,
db_instance_id: Optional[str] = None,
effective_time: Optional[str] = None,
from_app: Optional[str] = None,
node_class: Optional[str] = None,
node_id: Optional[str] = None,
node_storage: Optional[int] = None,
node_type: Optional[str] = None,
order_type: Optional[str] = None,
readonly_replicas: Optional[int] = None,
shard_direct: Optional[bool] = None,
status: Optional[str] = None,
switch_time: Optional[str] = None) -> Nodefunc GetNode(ctx *Context, name string, id IDInput, state *NodeState, opts ...ResourceOption) (*Node, error)public static Node Get(string name, Input<string> id, NodeState? state, CustomResourceOptions? opts = null)public static Node get(String name, Output<String> id, NodeState state, CustomResourceOptions options)resources: _: type: alicloud:mongodb:Node 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
Name string Account name, value description:
- Begins with a lowercase letter.
- Consists of lowercase letters, numbers, or underscores (_).
- 4~16 characters in length.
NOTE: - apsaradb for MongoDB does not support using keywords as accounts.
- The permissions of the account are fixed to read-only permissions.
- When applying for a direct connection address of a Shard node for the first time, you need to set an account and password.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- Account
Password string Account password, value description:
- Consists of at least three of uppercase letters, lowercase letters, numbers, and special characters.
- Oh-! @#$%^& *()_+-= is a special character.
- Length is 8~32 characters.
NOTE: apsaradb for MongoDB does not support resetting the account and password of the Shard node.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- Auto
Pay bool - Whether to pay automatically. Value description:
- Business
Info string Additional parameters, business information.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- Db
Instance stringId - The ID of the sharded cluster instance.
- Effective
Time string - From
App string - Request Source, value description:
OpenApi: The request source is OpenApi.
- Node
Class string - The specifications of the Shard node or Mongos node. For more information, see Instance Specifications.
- Node
Id string - The first ID of the resource
- Node
Storage int The disk space of the Node. Unit: GB.
Value range:
10to2000, with a step size of 10GB.NOTE: When the node type is
Shard, you need to configure this parameter.- Node
Type string - Node type, value description:
- Order
Type string - Readonly
Replicas int The number of read-only nodes in the Shard.
Value range:
0to5(integer). Default value: **0 * *.NOTE: This parameter is currently only supported by China Station.
- Shard
Direct bool - Whether to apply for the direct connection address of the Shard node. Value description:
- Status string
- Running status of node in sharded cluster
- Switch
Time string
- Account
Name string Account name, value description:
- Begins with a lowercase letter.
- Consists of lowercase letters, numbers, or underscores (_).
- 4~16 characters in length.
NOTE: - apsaradb for MongoDB does not support using keywords as accounts.
- The permissions of the account are fixed to read-only permissions.
- When applying for a direct connection address of a Shard node for the first time, you need to set an account and password.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- Account
Password string Account password, value description:
- Consists of at least three of uppercase letters, lowercase letters, numbers, and special characters.
- Oh-! @#$%^& *()_+-= is a special character.
- Length is 8~32 characters.
NOTE: apsaradb for MongoDB does not support resetting the account and password of the Shard node.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- Auto
Pay bool - Whether to pay automatically. Value description:
- Business
Info string Additional parameters, business information.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- Db
Instance stringId - The ID of the sharded cluster instance.
- Effective
Time string - From
App string - Request Source, value description:
OpenApi: The request source is OpenApi.
- Node
Class string - The specifications of the Shard node or Mongos node. For more information, see Instance Specifications.
- Node
Id string - The first ID of the resource
- Node
Storage int The disk space of the Node. Unit: GB.
Value range:
10to2000, with a step size of 10GB.NOTE: When the node type is
Shard, you need to configure this parameter.- Node
Type string - Node type, value description:
- Order
Type string - Readonly
Replicas int The number of read-only nodes in the Shard.
Value range:
0to5(integer). Default value: **0 * *.NOTE: This parameter is currently only supported by China Station.
- Shard
Direct bool - Whether to apply for the direct connection address of the Shard node. Value description:
- Status string
- Running status of node in sharded cluster
- Switch
Time string
- account
Name String Account name, value description:
- Begins with a lowercase letter.
- Consists of lowercase letters, numbers, or underscores (_).
- 4~16 characters in length.
NOTE: - apsaradb for MongoDB does not support using keywords as accounts.
- The permissions of the account are fixed to read-only permissions.
- When applying for a direct connection address of a Shard node for the first time, you need to set an account and password.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- account
Password String Account password, value description:
- Consists of at least three of uppercase letters, lowercase letters, numbers, and special characters.
- Oh-! @#$%^& *()_+-= is a special character.
- Length is 8~32 characters.
NOTE: apsaradb for MongoDB does not support resetting the account and password of the Shard node.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- auto
Pay Boolean - Whether to pay automatically. Value description:
- business
Info String Additional parameters, business information.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- db
Instance StringId - The ID of the sharded cluster instance.
- effective
Time String - from
App String - Request Source, value description:
OpenApi: The request source is OpenApi.
- node
Class String - The specifications of the Shard node or Mongos node. For more information, see Instance Specifications.
- node
Id String - The first ID of the resource
- node
Storage Integer The disk space of the Node. Unit: GB.
Value range:
10to2000, with a step size of 10GB.NOTE: When the node type is
Shard, you need to configure this parameter.- node
Type String - Node type, value description:
- order
Type String - readonly
Replicas Integer The number of read-only nodes in the Shard.
Value range:
0to5(integer). Default value: **0 * *.NOTE: This parameter is currently only supported by China Station.
- shard
Direct Boolean - Whether to apply for the direct connection address of the Shard node. Value description:
- status String
- Running status of node in sharded cluster
- switch
Time String
- account
Name string Account name, value description:
- Begins with a lowercase letter.
- Consists of lowercase letters, numbers, or underscores (_).
- 4~16 characters in length.
NOTE: - apsaradb for MongoDB does not support using keywords as accounts.
- The permissions of the account are fixed to read-only permissions.
- When applying for a direct connection address of a Shard node for the first time, you need to set an account and password.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- account
Password string Account password, value description:
- Consists of at least three of uppercase letters, lowercase letters, numbers, and special characters.
- Oh-! @#$%^& *()_+-= is a special character.
- Length is 8~32 characters.
NOTE: apsaradb for MongoDB does not support resetting the account and password of the Shard node.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- auto
Pay boolean - Whether to pay automatically. Value description:
- business
Info string Additional parameters, business information.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- db
Instance stringId - The ID of the sharded cluster instance.
- effective
Time string - from
App string - Request Source, value description:
OpenApi: The request source is OpenApi.
- node
Class string - The specifications of the Shard node or Mongos node. For more information, see Instance Specifications.
- node
Id string - The first ID of the resource
- node
Storage number The disk space of the Node. Unit: GB.
Value range:
10to2000, with a step size of 10GB.NOTE: When the node type is
Shard, you need to configure this parameter.- node
Type string - Node type, value description:
- order
Type string - readonly
Replicas number The number of read-only nodes in the Shard.
Value range:
0to5(integer). Default value: **0 * *.NOTE: This parameter is currently only supported by China Station.
- shard
Direct boolean - Whether to apply for the direct connection address of the Shard node. Value description:
- status string
- Running status of node in sharded cluster
- switch
Time string
- account_
name str Account name, value description:
- Begins with a lowercase letter.
- Consists of lowercase letters, numbers, or underscores (_).
- 4~16 characters in length.
NOTE: - apsaradb for MongoDB does not support using keywords as accounts.
- The permissions of the account are fixed to read-only permissions.
- When applying for a direct connection address of a Shard node for the first time, you need to set an account and password.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- account_
password str Account password, value description:
- Consists of at least three of uppercase letters, lowercase letters, numbers, and special characters.
- Oh-! @#$%^& *()_+-= is a special character.
- Length is 8~32 characters.
NOTE: apsaradb for MongoDB does not support resetting the account and password of the Shard node.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- auto_
pay bool - Whether to pay automatically. Value description:
- business_
info str Additional parameters, business information.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- db_
instance_ strid - The ID of the sharded cluster instance.
- effective_
time str - from_
app str - Request Source, value description:
OpenApi: The request source is OpenApi.
- node_
class str - The specifications of the Shard node or Mongos node. For more information, see Instance Specifications.
- node_
id str - The first ID of the resource
- node_
storage int The disk space of the Node. Unit: GB.
Value range:
10to2000, with a step size of 10GB.NOTE: When the node type is
Shard, you need to configure this parameter.- node_
type str - Node type, value description:
- order_
type str - readonly_
replicas int The number of read-only nodes in the Shard.
Value range:
0to5(integer). Default value: **0 * *.NOTE: This parameter is currently only supported by China Station.
- shard_
direct bool - Whether to apply for the direct connection address of the Shard node. Value description:
- status str
- Running status of node in sharded cluster
- switch_
time str
- account
Name String Account name, value description:
- Begins with a lowercase letter.
- Consists of lowercase letters, numbers, or underscores (_).
- 4~16 characters in length.
NOTE: - apsaradb for MongoDB does not support using keywords as accounts.
- The permissions of the account are fixed to read-only permissions.
- When applying for a direct connection address of a Shard node for the first time, you need to set an account and password.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- account
Password String Account password, value description:
- Consists of at least three of uppercase letters, lowercase letters, numbers, and special characters.
- Oh-! @#$%^& *()_+-= is a special character.
- Length is 8~32 characters.
NOTE: apsaradb for MongoDB does not support resetting the account and password of the Shard node.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- auto
Pay Boolean - Whether to pay automatically. Value description:
- business
Info String Additional parameters, business information.
NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.
- db
Instance StringId - The ID of the sharded cluster instance.
- effective
Time String - from
App String - Request Source, value description:
OpenApi: The request source is OpenApi.
- node
Class String - The specifications of the Shard node or Mongos node. For more information, see Instance Specifications.
- node
Id String - The first ID of the resource
- node
Storage Number The disk space of the Node. Unit: GB.
Value range:
10to2000, with a step size of 10GB.NOTE: When the node type is
Shard, you need to configure this parameter.- node
Type String - Node type, value description:
- order
Type String - readonly
Replicas Number The number of read-only nodes in the Shard.
Value range:
0to5(integer). Default value: **0 * *.NOTE: This parameter is currently only supported by China Station.
- shard
Direct Boolean - Whether to apply for the direct connection address of the Shard node. Value description:
- status String
- Running status of node in sharded cluster
- switch
Time String
Import
Mongodb Node can be imported using the id, e.g.
$ pulumi import alicloud:mongodb/node:Node example <db_instance_id>:<node_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
