alicloud.mongodb.ShardingInstance
Explore with Pulumi AI
Provides a MongoDB sharding instance resource supports replica set instances only. the MongoDB provides stable, reliable, and automatic scalable database services. It offers a full range of database solutions, such as disaster recovery, backup, recovery, monitoring, and alarms. You can see detail product introduction here
NOTE: Available since v1.40.0.
NOTE: The following regions don’t support create Classic network MongoDB sharding instance. [
cn-zhangjiakou
,cn-huhehaote
,ap-southeast-2
,ap-southeast-3
,ap-southeast-5
,ap-south-1
,me-east-1
,ap-northeast-1
,eu-west-1
]
NOTE: Create MongoDB Sharding instance or change instance type and storage would cost 10~20 minutes. Please make full preparation
Module Support
You can use to the existing mongodb-sharding module to create a MongoDB sharding instance resource one-click.
Example Usage
Create a Mongodb Sharding instance
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 defaultZones = AliCloud.MongoDB.GetZones.Invoke();
var index = defaultZones.Apply(getZonesResult => getZonesResult.Zones).Length.Apply(length => length - 1);
var zoneId = defaultZones.Apply(getZonesResult => getZonesResult.Zones)[index].Id;
var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new()
{
VpcName = name,
CidrBlock = "172.17.3.0/24",
});
var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new()
{
VswitchName = name,
CidrBlock = "172.17.3.0/24",
VpcId = defaultNetwork.Id,
ZoneId = zoneId,
});
var defaultShardingInstance = new AliCloud.MongoDB.ShardingInstance("defaultShardingInstance", new()
{
ZoneId = zoneId,
VswitchId = defaultSwitch.Id,
EngineVersion = "4.2",
ShardLists = new[]
{
new AliCloud.MongoDB.Inputs.ShardingInstanceShardListArgs
{
NodeClass = "dds.shard.mid",
NodeStorage = 10,
},
new AliCloud.MongoDB.Inputs.ShardingInstanceShardListArgs
{
NodeClass = "dds.shard.standard",
NodeStorage = 20,
ReadonlyReplicas = 1,
},
},
MongoLists = new[]
{
new AliCloud.MongoDB.Inputs.ShardingInstanceMongoListArgs
{
NodeClass = "dds.mongos.mid",
},
new AliCloud.MongoDB.Inputs.ShardingInstanceMongoListArgs
{
NodeClass = "dds.mongos.mid",
},
},
});
});
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
}
defaultZones, err := mongodb.GetZones(ctx, nil, nil)
if err != nil {
return err
}
index := len(defaultZones.Zones) - 1
zoneId := defaultZones.Zones[index].Id
defaultNetwork, err := vpc.NewNetwork(ctx, "defaultNetwork", &vpc.NetworkArgs{
VpcName: pulumi.String(name),
CidrBlock: pulumi.String("172.17.3.0/24"),
})
if err != nil {
return err
}
defaultSwitch, err := vpc.NewSwitch(ctx, "defaultSwitch", &vpc.SwitchArgs{
VswitchName: pulumi.String(name),
CidrBlock: pulumi.String("172.17.3.0/24"),
VpcId: defaultNetwork.ID(),
ZoneId: *pulumi.String(zoneId),
})
if err != nil {
return err
}
_, err = mongodb.NewShardingInstance(ctx, "defaultShardingInstance", &mongodb.ShardingInstanceArgs{
ZoneId: *pulumi.String(zoneId),
VswitchId: defaultSwitch.ID(),
EngineVersion: pulumi.String("4.2"),
ShardLists: mongodb.ShardingInstanceShardListArray{
&mongodb.ShardingInstanceShardListArgs{
NodeClass: pulumi.String("dds.shard.mid"),
NodeStorage: pulumi.Int(10),
},
&mongodb.ShardingInstanceShardListArgs{
NodeClass: pulumi.String("dds.shard.standard"),
NodeStorage: pulumi.Int(20),
ReadonlyReplicas: pulumi.Int(1),
},
},
MongoLists: mongodb.ShardingInstanceMongoListArray{
&mongodb.ShardingInstanceMongoListArgs{
NodeClass: pulumi.String("dds.mongos.mid"),
},
&mongodb.ShardingInstanceMongoListArgs{
NodeClass: pulumi.String("dds.mongos.mid"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.mongodb.MongodbFunctions;
import com.pulumi.alicloud.mongodb.inputs.GetZonesArgs;
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.ShardingInstanceShardListArgs;
import com.pulumi.alicloud.mongodb.inputs.ShardingInstanceMongoListArgs;
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 defaultZones = MongodbFunctions.getZones();
final var index = defaultZones.applyValue(getZonesResult -> getZonesResult.zones()).length() - 1;
final var zoneId = defaultZones.applyValue(getZonesResult -> getZonesResult.zones())[index].id();
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("172.17.3.0/24")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vswitchName(name)
.cidrBlock("172.17.3.0/24")
.vpcId(defaultNetwork.id())
.zoneId(zoneId)
.build());
var defaultShardingInstance = new ShardingInstance("defaultShardingInstance", ShardingInstanceArgs.builder()
.zoneId(zoneId)
.vswitchId(defaultSwitch.id())
.engineVersion("4.2")
.shardLists(
ShardingInstanceShardListArgs.builder()
.nodeClass("dds.shard.mid")
.nodeStorage("10")
.build(),
ShardingInstanceShardListArgs.builder()
.nodeClass("dds.shard.standard")
.nodeStorage("20")
.readonlyReplicas("1")
.build())
.mongoLists(
ShardingInstanceMongoListArgs.builder()
.nodeClass("dds.mongos.mid")
.build(),
ShardingInstanceMongoListArgs.builder()
.nodeClass("dds.mongos.mid")
.build())
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default_zones = alicloud.mongodb.get_zones()
index = len(default_zones.zones) - 1
zone_id = default_zones.zones[index].id
default_network = alicloud.vpc.Network("defaultNetwork",
vpc_name=name,
cidr_block="172.17.3.0/24")
default_switch = alicloud.vpc.Switch("defaultSwitch",
vswitch_name=name,
cidr_block="172.17.3.0/24",
vpc_id=default_network.id,
zone_id=zone_id)
default_sharding_instance = alicloud.mongodb.ShardingInstance("defaultShardingInstance",
zone_id=zone_id,
vswitch_id=default_switch.id,
engine_version="4.2",
shard_lists=[
alicloud.mongodb.ShardingInstanceShardListArgs(
node_class="dds.shard.mid",
node_storage=10,
),
alicloud.mongodb.ShardingInstanceShardListArgs(
node_class="dds.shard.standard",
node_storage=20,
readonly_replicas=1,
),
],
mongo_lists=[
alicloud.mongodb.ShardingInstanceMongoListArgs(
node_class="dds.mongos.mid",
),
alicloud.mongodb.ShardingInstanceMongoListArgs(
node_class="dds.mongos.mid",
),
])
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 defaultZones = alicloud.mongodb.getZones({});
const index = defaultZones.then(defaultZones => defaultZones.zones).length.then(length => length - 1);
const zoneId = defaultZones.then(defaultZones => defaultZones.zones[index].id);
const defaultNetwork = new alicloud.vpc.Network("defaultNetwork", {
vpcName: name,
cidrBlock: "172.17.3.0/24",
});
const defaultSwitch = new alicloud.vpc.Switch("defaultSwitch", {
vswitchName: name,
cidrBlock: "172.17.3.0/24",
vpcId: defaultNetwork.id,
zoneId: zoneId,
});
const defaultShardingInstance = new alicloud.mongodb.ShardingInstance("defaultShardingInstance", {
zoneId: zoneId,
vswitchId: defaultSwitch.id,
engineVersion: "4.2",
shardLists: [
{
nodeClass: "dds.shard.mid",
nodeStorage: 10,
},
{
nodeClass: "dds.shard.standard",
nodeStorage: 20,
readonlyReplicas: 1,
},
],
mongoLists: [
{
nodeClass: "dds.mongos.mid",
},
{
nodeClass: "dds.mongos.mid",
},
],
});
Coming soon!
Create ShardingInstance Resource
new ShardingInstance(name: string, args: ShardingInstanceArgs, opts?: CustomResourceOptions);
@overload
def ShardingInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_password: Optional[str] = None,
auto_renew: Optional[bool] = None,
backup_periods: Optional[Sequence[str]] = None,
backup_time: Optional[str] = None,
engine_version: Optional[str] = None,
instance_charge_type: Optional[str] = None,
kms_encrypted_password: Optional[str] = None,
kms_encryption_context: Optional[Mapping[str, Any]] = None,
mongo_lists: Optional[Sequence[ShardingInstanceMongoListArgs]] = None,
name: Optional[str] = None,
network_type: Optional[str] = None,
order_type: Optional[str] = None,
period: Optional[int] = None,
protocol_type: Optional[str] = None,
resource_group_id: Optional[str] = None,
security_group_id: Optional[str] = None,
security_ip_lists: Optional[Sequence[str]] = None,
shard_lists: Optional[Sequence[ShardingInstanceShardListArgs]] = None,
storage_engine: Optional[str] = None,
tags: Optional[Mapping[str, Any]] = None,
tde_status: Optional[str] = None,
vpc_id: Optional[str] = None,
vswitch_id: Optional[str] = None,
zone_id: Optional[str] = None)
@overload
def ShardingInstance(resource_name: str,
args: ShardingInstanceArgs,
opts: Optional[ResourceOptions] = None)
func NewShardingInstance(ctx *Context, name string, args ShardingInstanceArgs, opts ...ResourceOption) (*ShardingInstance, error)
public ShardingInstance(string name, ShardingInstanceArgs args, CustomResourceOptions? opts = null)
public ShardingInstance(String name, ShardingInstanceArgs args)
public ShardingInstance(String name, ShardingInstanceArgs args, CustomResourceOptions options)
type: alicloud:mongodb:ShardingInstance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ShardingInstanceArgs
- 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 ShardingInstanceArgs
- 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 ShardingInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ShardingInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ShardingInstanceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ShardingInstance Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ShardingInstance resource accepts the following input properties:
- Engine
Version string Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- Mongo
Lists List<Pulumi.Ali Cloud. Mongo DB. Inputs. Sharding Instance Mongo List> The mongo-node count can be purchased is in range of [2, 32]. See
mongo_list
below.- List<Pulumi.
Ali Cloud. Mongo DB. Inputs. Sharding Instance Shard List> the shard-node count can be purchased is in range of [2, 32]. See
shard_list
below.- Account
Password string Password of the root account. It is a string of 6 to 32 characters and is composed of letters, numbers, and underlines.
- Auto
Renew bool Auto renew for prepaid, true of false. Default is false.
- Backup
Periods List<string> MongoDB Instance backup period. It is required when
backup_time
was existed. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]. Default to [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]- Backup
Time string MongoDB instance backup time. It is required when
backup_period
was existed. In the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. If not set, the system will return a default, like "23:00Z-24:00Z".- Instance
Charge stringType Valid values are
PrePaid
,PostPaid
,System default toPostPaid
. NOTE: It can be modified fromPostPaid
toPrePaid
after version v1.141.0.- Kms
Encrypted stringPassword An KMS encrypts password used to a instance. If the
account_password
is filled in, this field will be ignored.- Kms
Encryption Dictionary<string, object>Context An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set.- Name string
The name of DB instance. It a string of 2 to 256 characters.
- Network
Type string The network type of the instance. Valid values:
Classic
orVPC
. Default value:Classic
.- Order
Type string The type of configuration changes performed. Default value: DOWNGRADE. Valid values:
- UPGRADE: The specifications are upgraded.
- DOWNGRADE: The specifications are downgraded.
Note: This parameter is only applicable to instances when
instance_charge_type
is PrePaid.
- Period int
The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid
. Valid values: [1~9], 12, 24, 36. System default to 1.- Protocol
Type string The type of the access protocol. Valid values:
mongodb
ordynamodb
.- Resource
Group stringId The ID of the Resource Group.
- Security
Group stringId The Security Group ID of ECS.
- Security
Ip List<string>Lists List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]). System default to
["127.0.0.1"]
.- Storage
Engine string Storage engine: WiredTiger or RocksDB. System Default value: WiredTiger.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Tde
Status string The TDE(Transparent Data Encryption) status. It can be updated from version 1.160.0+.
- Vpc
Id string The ID of the VPC. > NOTE: This parameter is valid only when NetworkType is set to VPC.
- Vswitch
Id string The virtual switch ID to launch DB instances in one VPC.
- Zone
Id string The Zone to launch the DB instance. MongoDB sharding instance does not support multiple-zone. If it is a multi-zone and
vswitch_id
is specified, the vswitch must in one of them.
- Engine
Version string Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- Mongo
Lists []ShardingInstance Mongo List Args The mongo-node count can be purchased is in range of [2, 32]. See
mongo_list
below.- []Sharding
Instance Shard List Args the shard-node count can be purchased is in range of [2, 32]. See
shard_list
below.- Account
Password string Password of the root account. It is a string of 6 to 32 characters and is composed of letters, numbers, and underlines.
- Auto
Renew bool Auto renew for prepaid, true of false. Default is false.
- Backup
Periods []string MongoDB Instance backup period. It is required when
backup_time
was existed. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]. Default to [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]- Backup
Time string MongoDB instance backup time. It is required when
backup_period
was existed. In the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. If not set, the system will return a default, like "23:00Z-24:00Z".- Instance
Charge stringType Valid values are
PrePaid
,PostPaid
,System default toPostPaid
. NOTE: It can be modified fromPostPaid
toPrePaid
after version v1.141.0.- Kms
Encrypted stringPassword An KMS encrypts password used to a instance. If the
account_password
is filled in, this field will be ignored.- Kms
Encryption map[string]interface{}Context An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set.- Name string
The name of DB instance. It a string of 2 to 256 characters.
- Network
Type string The network type of the instance. Valid values:
Classic
orVPC
. Default value:Classic
.- Order
Type string The type of configuration changes performed. Default value: DOWNGRADE. Valid values:
- UPGRADE: The specifications are upgraded.
- DOWNGRADE: The specifications are downgraded.
Note: This parameter is only applicable to instances when
instance_charge_type
is PrePaid.
- Period int
The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid
. Valid values: [1~9], 12, 24, 36. System default to 1.- Protocol
Type string The type of the access protocol. Valid values:
mongodb
ordynamodb
.- Resource
Group stringId The ID of the Resource Group.
- Security
Group stringId The Security Group ID of ECS.
- Security
Ip []stringLists List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]). System default to
["127.0.0.1"]
.- Storage
Engine string Storage engine: WiredTiger or RocksDB. System Default value: WiredTiger.
- map[string]interface{}
A mapping of tags to assign to the resource.
- Tde
Status string The TDE(Transparent Data Encryption) status. It can be updated from version 1.160.0+.
- Vpc
Id string The ID of the VPC. > NOTE: This parameter is valid only when NetworkType is set to VPC.
- Vswitch
Id string The virtual switch ID to launch DB instances in one VPC.
- Zone
Id string The Zone to launch the DB instance. MongoDB sharding instance does not support multiple-zone. If it is a multi-zone and
vswitch_id
is specified, the vswitch must in one of them.
- engine
Version String Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- mongo
Lists List<ShardingInstance Mongo List> The mongo-node count can be purchased is in range of [2, 32]. See
mongo_list
below.- List<Sharding
Instance Shard List> the shard-node count can be purchased is in range of [2, 32]. See
shard_list
below.- account
Password String Password of the root account. It is a string of 6 to 32 characters and is composed of letters, numbers, and underlines.
- auto
Renew Boolean Auto renew for prepaid, true of false. Default is false.
- backup
Periods List<String> MongoDB Instance backup period. It is required when
backup_time
was existed. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]. Default to [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]- backup
Time String MongoDB instance backup time. It is required when
backup_period
was existed. In the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. If not set, the system will return a default, like "23:00Z-24:00Z".- instance
Charge StringType Valid values are
PrePaid
,PostPaid
,System default toPostPaid
. NOTE: It can be modified fromPostPaid
toPrePaid
after version v1.141.0.- kms
Encrypted StringPassword An KMS encrypts password used to a instance. If the
account_password
is filled in, this field will be ignored.- kms
Encryption Map<String,Object>Context An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set.- name String
The name of DB instance. It a string of 2 to 256 characters.
- network
Type String The network type of the instance. Valid values:
Classic
orVPC
. Default value:Classic
.- order
Type String The type of configuration changes performed. Default value: DOWNGRADE. Valid values:
- UPGRADE: The specifications are upgraded.
- DOWNGRADE: The specifications are downgraded.
Note: This parameter is only applicable to instances when
instance_charge_type
is PrePaid.
- period Integer
The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid
. Valid values: [1~9], 12, 24, 36. System default to 1.- protocol
Type String The type of the access protocol. Valid values:
mongodb
ordynamodb
.- resource
Group StringId The ID of the Resource Group.
- security
Group StringId The Security Group ID of ECS.
- security
Ip List<String>Lists List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]). System default to
["127.0.0.1"]
.- storage
Engine String Storage engine: WiredTiger or RocksDB. System Default value: WiredTiger.
- Map<String,Object>
A mapping of tags to assign to the resource.
- tde
Status String The TDE(Transparent Data Encryption) status. It can be updated from version 1.160.0+.
- vpc
Id String The ID of the VPC. > NOTE: This parameter is valid only when NetworkType is set to VPC.
- vswitch
Id String The virtual switch ID to launch DB instances in one VPC.
- zone
Id String The Zone to launch the DB instance. MongoDB sharding instance does not support multiple-zone. If it is a multi-zone and
vswitch_id
is specified, the vswitch must in one of them.
- engine
Version string Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- mongo
Lists ShardingInstance Mongo List[] The mongo-node count can be purchased is in range of [2, 32]. See
mongo_list
below.- Sharding
Instance Shard List[] the shard-node count can be purchased is in range of [2, 32]. See
shard_list
below.- account
Password string Password of the root account. It is a string of 6 to 32 characters and is composed of letters, numbers, and underlines.
- auto
Renew boolean Auto renew for prepaid, true of false. Default is false.
- backup
Periods string[] MongoDB Instance backup period. It is required when
backup_time
was existed. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]. Default to [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]- backup
Time string MongoDB instance backup time. It is required when
backup_period
was existed. In the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. If not set, the system will return a default, like "23:00Z-24:00Z".- instance
Charge stringType Valid values are
PrePaid
,PostPaid
,System default toPostPaid
. NOTE: It can be modified fromPostPaid
toPrePaid
after version v1.141.0.- kms
Encrypted stringPassword An KMS encrypts password used to a instance. If the
account_password
is filled in, this field will be ignored.- kms
Encryption {[key: string]: any}Context An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set.- name string
The name of DB instance. It a string of 2 to 256 characters.
- network
Type string The network type of the instance. Valid values:
Classic
orVPC
. Default value:Classic
.- order
Type string The type of configuration changes performed. Default value: DOWNGRADE. Valid values:
- UPGRADE: The specifications are upgraded.
- DOWNGRADE: The specifications are downgraded.
Note: This parameter is only applicable to instances when
instance_charge_type
is PrePaid.
- period number
The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid
. Valid values: [1~9], 12, 24, 36. System default to 1.- protocol
Type string The type of the access protocol. Valid values:
mongodb
ordynamodb
.- resource
Group stringId The ID of the Resource Group.
- security
Group stringId The Security Group ID of ECS.
- security
Ip string[]Lists List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]). System default to
["127.0.0.1"]
.- storage
Engine string Storage engine: WiredTiger or RocksDB. System Default value: WiredTiger.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- tde
Status string The TDE(Transparent Data Encryption) status. It can be updated from version 1.160.0+.
- vpc
Id string The ID of the VPC. > NOTE: This parameter is valid only when NetworkType is set to VPC.
- vswitch
Id string The virtual switch ID to launch DB instances in one VPC.
- zone
Id string The Zone to launch the DB instance. MongoDB sharding instance does not support multiple-zone. If it is a multi-zone and
vswitch_id
is specified, the vswitch must in one of them.
- engine_
version str Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- mongo_
lists Sequence[ShardingInstance Mongo List Args] The mongo-node count can be purchased is in range of [2, 32]. See
mongo_list
below.- Sequence[Sharding
Instance Shard List Args] the shard-node count can be purchased is in range of [2, 32]. See
shard_list
below.- account_
password str Password of the root account. It is a string of 6 to 32 characters and is composed of letters, numbers, and underlines.
- auto_
renew bool Auto renew for prepaid, true of false. Default is false.
- backup_
periods Sequence[str] MongoDB Instance backup period. It is required when
backup_time
was existed. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]. Default to [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]- backup_
time str MongoDB instance backup time. It is required when
backup_period
was existed. In the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. If not set, the system will return a default, like "23:00Z-24:00Z".- instance_
charge_ strtype Valid values are
PrePaid
,PostPaid
,System default toPostPaid
. NOTE: It can be modified fromPostPaid
toPrePaid
after version v1.141.0.- kms_
encrypted_ strpassword An KMS encrypts password used to a instance. If the
account_password
is filled in, this field will be ignored.- kms_
encryption_ Mapping[str, Any]context An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set.- name str
The name of DB instance. It a string of 2 to 256 characters.
- network_
type str The network type of the instance. Valid values:
Classic
orVPC
. Default value:Classic
.- order_
type str The type of configuration changes performed. Default value: DOWNGRADE. Valid values:
- UPGRADE: The specifications are upgraded.
- DOWNGRADE: The specifications are downgraded.
Note: This parameter is only applicable to instances when
instance_charge_type
is PrePaid.
- period int
The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid
. Valid values: [1~9], 12, 24, 36. System default to 1.- protocol_
type str The type of the access protocol. Valid values:
mongodb
ordynamodb
.- resource_
group_ strid The ID of the Resource Group.
- security_
group_ strid The Security Group ID of ECS.
- security_
ip_ Sequence[str]lists List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]). System default to
["127.0.0.1"]
.- storage_
engine str Storage engine: WiredTiger or RocksDB. System Default value: WiredTiger.
- Mapping[str, Any]
A mapping of tags to assign to the resource.
- tde_
status str The TDE(Transparent Data Encryption) status. It can be updated from version 1.160.0+.
- vpc_
id str The ID of the VPC. > NOTE: This parameter is valid only when NetworkType is set to VPC.
- vswitch_
id str The virtual switch ID to launch DB instances in one VPC.
- zone_
id str The Zone to launch the DB instance. MongoDB sharding instance does not support multiple-zone. If it is a multi-zone and
vswitch_id
is specified, the vswitch must in one of them.
- engine
Version String Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- mongo
Lists List<Property Map> The mongo-node count can be purchased is in range of [2, 32]. See
mongo_list
below.- List<Property Map>
the shard-node count can be purchased is in range of [2, 32]. See
shard_list
below.- account
Password String Password of the root account. It is a string of 6 to 32 characters and is composed of letters, numbers, and underlines.
- auto
Renew Boolean Auto renew for prepaid, true of false. Default is false.
- backup
Periods List<String> MongoDB Instance backup period. It is required when
backup_time
was existed. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]. Default to [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]- backup
Time String MongoDB instance backup time. It is required when
backup_period
was existed. In the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. If not set, the system will return a default, like "23:00Z-24:00Z".- instance
Charge StringType Valid values are
PrePaid
,PostPaid
,System default toPostPaid
. NOTE: It can be modified fromPostPaid
toPrePaid
after version v1.141.0.- kms
Encrypted StringPassword An KMS encrypts password used to a instance. If the
account_password
is filled in, this field will be ignored.- kms
Encryption Map<Any>Context An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set.- name String
The name of DB instance. It a string of 2 to 256 characters.
- network
Type String The network type of the instance. Valid values:
Classic
orVPC
. Default value:Classic
.- order
Type String The type of configuration changes performed. Default value: DOWNGRADE. Valid values:
- UPGRADE: The specifications are upgraded.
- DOWNGRADE: The specifications are downgraded.
Note: This parameter is only applicable to instances when
instance_charge_type
is PrePaid.
- period Number
The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid
. Valid values: [1~9], 12, 24, 36. System default to 1.- protocol
Type String The type of the access protocol. Valid values:
mongodb
ordynamodb
.- resource
Group StringId The ID of the Resource Group.
- security
Group StringId The Security Group ID of ECS.
- security
Ip List<String>Lists List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]). System default to
["127.0.0.1"]
.- storage
Engine String Storage engine: WiredTiger or RocksDB. System Default value: WiredTiger.
- Map<Any>
A mapping of tags to assign to the resource.
- tde
Status String The TDE(Transparent Data Encryption) status. It can be updated from version 1.160.0+.
- vpc
Id String The ID of the VPC. > NOTE: This parameter is valid only when NetworkType is set to VPC.
- vswitch
Id String The virtual switch ID to launch DB instances in one VPC.
- zone
Id String The Zone to launch the DB instance. MongoDB sharding instance does not support multiple-zone. If it is a multi-zone and
vswitch_id
is specified, the vswitch must in one of them.
Outputs
All input properties are implicitly available as output properties. Additionally, the ShardingInstance resource produces the following output properties:
- Config
Server List<Pulumi.Lists Ali Cloud. Mongo DB. Outputs. Sharding Instance Config Server List> The node information list of config server. See
config_server_list
below.- Id string
The provider-assigned unique ID for this managed resource.
- Retention
Period int Instance data backup retention days. NOTE: Available in 1.42.0+.
- Config
Server []ShardingLists Instance Config Server List The node information list of config server. See
config_server_list
below.- Id string
The provider-assigned unique ID for this managed resource.
- Retention
Period int Instance data backup retention days. NOTE: Available in 1.42.0+.
- config
Server List<ShardingLists Instance Config Server List> The node information list of config server. See
config_server_list
below.- id String
The provider-assigned unique ID for this managed resource.
- retention
Period Integer Instance data backup retention days. NOTE: Available in 1.42.0+.
- config
Server ShardingLists Instance Config Server List[] The node information list of config server. See
config_server_list
below.- id string
The provider-assigned unique ID for this managed resource.
- retention
Period number Instance data backup retention days. NOTE: Available in 1.42.0+.
- config_
server_ Sequence[Shardinglists Instance Config Server List] The node information list of config server. See
config_server_list
below.- id str
The provider-assigned unique ID for this managed resource.
- retention_
period int Instance data backup retention days. NOTE: Available in 1.42.0+.
- config
Server List<Property Map>Lists The node information list of config server. See
config_server_list
below.- id String
The provider-assigned unique ID for this managed resource.
- retention
Period Number Instance data backup retention days. NOTE: Available in 1.42.0+.
Look up Existing ShardingInstance Resource
Get an existing ShardingInstance 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?: ShardingInstanceState, opts?: CustomResourceOptions): ShardingInstance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_password: Optional[str] = None,
auto_renew: Optional[bool] = None,
backup_periods: Optional[Sequence[str]] = None,
backup_time: Optional[str] = None,
config_server_lists: Optional[Sequence[ShardingInstanceConfigServerListArgs]] = None,
engine_version: Optional[str] = None,
instance_charge_type: Optional[str] = None,
kms_encrypted_password: Optional[str] = None,
kms_encryption_context: Optional[Mapping[str, Any]] = None,
mongo_lists: Optional[Sequence[ShardingInstanceMongoListArgs]] = None,
name: Optional[str] = None,
network_type: Optional[str] = None,
order_type: Optional[str] = None,
period: Optional[int] = None,
protocol_type: Optional[str] = None,
resource_group_id: Optional[str] = None,
retention_period: Optional[int] = None,
security_group_id: Optional[str] = None,
security_ip_lists: Optional[Sequence[str]] = None,
shard_lists: Optional[Sequence[ShardingInstanceShardListArgs]] = None,
storage_engine: Optional[str] = None,
tags: Optional[Mapping[str, Any]] = None,
tde_status: Optional[str] = None,
vpc_id: Optional[str] = None,
vswitch_id: Optional[str] = None,
zone_id: Optional[str] = None) -> ShardingInstance
func GetShardingInstance(ctx *Context, name string, id IDInput, state *ShardingInstanceState, opts ...ResourceOption) (*ShardingInstance, error)
public static ShardingInstance Get(string name, Input<string> id, ShardingInstanceState? state, CustomResourceOptions? opts = null)
public static ShardingInstance get(String name, Output<String> id, ShardingInstanceState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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
Password string Password of the root account. It is a string of 6 to 32 characters and is composed of letters, numbers, and underlines.
- Auto
Renew bool Auto renew for prepaid, true of false. Default is false.
- Backup
Periods List<string> MongoDB Instance backup period. It is required when
backup_time
was existed. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]. Default to [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]- Backup
Time string MongoDB instance backup time. It is required when
backup_period
was existed. In the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. If not set, the system will return a default, like "23:00Z-24:00Z".- Config
Server List<Pulumi.Lists Ali Cloud. Mongo DB. Inputs. Sharding Instance Config Server List> The node information list of config server. See
config_server_list
below.- Engine
Version string Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- Instance
Charge stringType Valid values are
PrePaid
,PostPaid
,System default toPostPaid
. NOTE: It can be modified fromPostPaid
toPrePaid
after version v1.141.0.- Kms
Encrypted stringPassword An KMS encrypts password used to a instance. If the
account_password
is filled in, this field will be ignored.- Kms
Encryption Dictionary<string, object>Context An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set.- Mongo
Lists List<Pulumi.Ali Cloud. Mongo DB. Inputs. Sharding Instance Mongo List> The mongo-node count can be purchased is in range of [2, 32]. See
mongo_list
below.- Name string
The name of DB instance. It a string of 2 to 256 characters.
- Network
Type string The network type of the instance. Valid values:
Classic
orVPC
. Default value:Classic
.- Order
Type string The type of configuration changes performed. Default value: DOWNGRADE. Valid values:
- UPGRADE: The specifications are upgraded.
- DOWNGRADE: The specifications are downgraded.
Note: This parameter is only applicable to instances when
instance_charge_type
is PrePaid.
- Period int
The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid
. Valid values: [1~9], 12, 24, 36. System default to 1.- Protocol
Type string The type of the access protocol. Valid values:
mongodb
ordynamodb
.- Resource
Group stringId The ID of the Resource Group.
- Retention
Period int Instance data backup retention days. NOTE: Available in 1.42.0+.
- Security
Group stringId The Security Group ID of ECS.
- Security
Ip List<string>Lists List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]). System default to
["127.0.0.1"]
.- Shard
Lists List<Pulumi.Ali Cloud. Mongo DB. Inputs. Sharding Instance Shard List> the shard-node count can be purchased is in range of [2, 32]. See
shard_list
below.- Storage
Engine string Storage engine: WiredTiger or RocksDB. System Default value: WiredTiger.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Tde
Status string The TDE(Transparent Data Encryption) status. It can be updated from version 1.160.0+.
- Vpc
Id string The ID of the VPC. > NOTE: This parameter is valid only when NetworkType is set to VPC.
- Vswitch
Id string The virtual switch ID to launch DB instances in one VPC.
- Zone
Id string The Zone to launch the DB instance. MongoDB sharding instance does not support multiple-zone. If it is a multi-zone and
vswitch_id
is specified, the vswitch must in one of them.
- Account
Password string Password of the root account. It is a string of 6 to 32 characters and is composed of letters, numbers, and underlines.
- Auto
Renew bool Auto renew for prepaid, true of false. Default is false.
- Backup
Periods []string MongoDB Instance backup period. It is required when
backup_time
was existed. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]. Default to [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]- Backup
Time string MongoDB instance backup time. It is required when
backup_period
was existed. In the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. If not set, the system will return a default, like "23:00Z-24:00Z".- Config
Server []ShardingLists Instance Config Server List Args The node information list of config server. See
config_server_list
below.- Engine
Version string Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- Instance
Charge stringType Valid values are
PrePaid
,PostPaid
,System default toPostPaid
. NOTE: It can be modified fromPostPaid
toPrePaid
after version v1.141.0.- Kms
Encrypted stringPassword An KMS encrypts password used to a instance. If the
account_password
is filled in, this field will be ignored.- Kms
Encryption map[string]interface{}Context An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set.- Mongo
Lists []ShardingInstance Mongo List Args The mongo-node count can be purchased is in range of [2, 32]. See
mongo_list
below.- Name string
The name of DB instance. It a string of 2 to 256 characters.
- Network
Type string The network type of the instance. Valid values:
Classic
orVPC
. Default value:Classic
.- Order
Type string The type of configuration changes performed. Default value: DOWNGRADE. Valid values:
- UPGRADE: The specifications are upgraded.
- DOWNGRADE: The specifications are downgraded.
Note: This parameter is only applicable to instances when
instance_charge_type
is PrePaid.
- Period int
The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid
. Valid values: [1~9], 12, 24, 36. System default to 1.- Protocol
Type string The type of the access protocol. Valid values:
mongodb
ordynamodb
.- Resource
Group stringId The ID of the Resource Group.
- Retention
Period int Instance data backup retention days. NOTE: Available in 1.42.0+.
- Security
Group stringId The Security Group ID of ECS.
- Security
Ip []stringLists List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]). System default to
["127.0.0.1"]
.- Shard
Lists []ShardingInstance Shard List Args the shard-node count can be purchased is in range of [2, 32]. See
shard_list
below.- Storage
Engine string Storage engine: WiredTiger or RocksDB. System Default value: WiredTiger.
- map[string]interface{}
A mapping of tags to assign to the resource.
- Tde
Status string The TDE(Transparent Data Encryption) status. It can be updated from version 1.160.0+.
- Vpc
Id string The ID of the VPC. > NOTE: This parameter is valid only when NetworkType is set to VPC.
- Vswitch
Id string The virtual switch ID to launch DB instances in one VPC.
- Zone
Id string The Zone to launch the DB instance. MongoDB sharding instance does not support multiple-zone. If it is a multi-zone and
vswitch_id
is specified, the vswitch must in one of them.
- account
Password String Password of the root account. It is a string of 6 to 32 characters and is composed of letters, numbers, and underlines.
- auto
Renew Boolean Auto renew for prepaid, true of false. Default is false.
- backup
Periods List<String> MongoDB Instance backup period. It is required when
backup_time
was existed. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]. Default to [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]- backup
Time String MongoDB instance backup time. It is required when
backup_period
was existed. In the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. If not set, the system will return a default, like "23:00Z-24:00Z".- config
Server List<ShardingLists Instance Config Server List> The node information list of config server. See
config_server_list
below.- engine
Version String Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- instance
Charge StringType Valid values are
PrePaid
,PostPaid
,System default toPostPaid
. NOTE: It can be modified fromPostPaid
toPrePaid
after version v1.141.0.- kms
Encrypted StringPassword An KMS encrypts password used to a instance. If the
account_password
is filled in, this field will be ignored.- kms
Encryption Map<String,Object>Context An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set.- mongo
Lists List<ShardingInstance Mongo List> The mongo-node count can be purchased is in range of [2, 32]. See
mongo_list
below.- name String
The name of DB instance. It a string of 2 to 256 characters.
- network
Type String The network type of the instance. Valid values:
Classic
orVPC
. Default value:Classic
.- order
Type String The type of configuration changes performed. Default value: DOWNGRADE. Valid values:
- UPGRADE: The specifications are upgraded.
- DOWNGRADE: The specifications are downgraded.
Note: This parameter is only applicable to instances when
instance_charge_type
is PrePaid.
- period Integer
The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid
. Valid values: [1~9], 12, 24, 36. System default to 1.- protocol
Type String The type of the access protocol. Valid values:
mongodb
ordynamodb
.- resource
Group StringId The ID of the Resource Group.
- retention
Period Integer Instance data backup retention days. NOTE: Available in 1.42.0+.
- security
Group StringId The Security Group ID of ECS.
- security
Ip List<String>Lists List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]). System default to
["127.0.0.1"]
.- shard
Lists List<ShardingInstance Shard List> the shard-node count can be purchased is in range of [2, 32]. See
shard_list
below.- storage
Engine String Storage engine: WiredTiger or RocksDB. System Default value: WiredTiger.
- Map<String,Object>
A mapping of tags to assign to the resource.
- tde
Status String The TDE(Transparent Data Encryption) status. It can be updated from version 1.160.0+.
- vpc
Id String The ID of the VPC. > NOTE: This parameter is valid only when NetworkType is set to VPC.
- vswitch
Id String The virtual switch ID to launch DB instances in one VPC.
- zone
Id String The Zone to launch the DB instance. MongoDB sharding instance does not support multiple-zone. If it is a multi-zone and
vswitch_id
is specified, the vswitch must in one of them.
- account
Password string Password of the root account. It is a string of 6 to 32 characters and is composed of letters, numbers, and underlines.
- auto
Renew boolean Auto renew for prepaid, true of false. Default is false.
- backup
Periods string[] MongoDB Instance backup period. It is required when
backup_time
was existed. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]. Default to [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]- backup
Time string MongoDB instance backup time. It is required when
backup_period
was existed. In the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. If not set, the system will return a default, like "23:00Z-24:00Z".- config
Server ShardingLists Instance Config Server List[] The node information list of config server. See
config_server_list
below.- engine
Version string Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- instance
Charge stringType Valid values are
PrePaid
,PostPaid
,System default toPostPaid
. NOTE: It can be modified fromPostPaid
toPrePaid
after version v1.141.0.- kms
Encrypted stringPassword An KMS encrypts password used to a instance. If the
account_password
is filled in, this field will be ignored.- kms
Encryption {[key: string]: any}Context An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set.- mongo
Lists ShardingInstance Mongo List[] The mongo-node count can be purchased is in range of [2, 32]. See
mongo_list
below.- name string
The name of DB instance. It a string of 2 to 256 characters.
- network
Type string The network type of the instance. Valid values:
Classic
orVPC
. Default value:Classic
.- order
Type string The type of configuration changes performed. Default value: DOWNGRADE. Valid values:
- UPGRADE: The specifications are upgraded.
- DOWNGRADE: The specifications are downgraded.
Note: This parameter is only applicable to instances when
instance_charge_type
is PrePaid.
- period number
The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid
. Valid values: [1~9], 12, 24, 36. System default to 1.- protocol
Type string The type of the access protocol. Valid values:
mongodb
ordynamodb
.- resource
Group stringId The ID of the Resource Group.
- retention
Period number Instance data backup retention days. NOTE: Available in 1.42.0+.
- security
Group stringId The Security Group ID of ECS.
- security
Ip string[]Lists List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]). System default to
["127.0.0.1"]
.- shard
Lists ShardingInstance Shard List[] the shard-node count can be purchased is in range of [2, 32]. See
shard_list
below.- storage
Engine string Storage engine: WiredTiger or RocksDB. System Default value: WiredTiger.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- tde
Status string The TDE(Transparent Data Encryption) status. It can be updated from version 1.160.0+.
- vpc
Id string The ID of the VPC. > NOTE: This parameter is valid only when NetworkType is set to VPC.
- vswitch
Id string The virtual switch ID to launch DB instances in one VPC.
- zone
Id string The Zone to launch the DB instance. MongoDB sharding instance does not support multiple-zone. If it is a multi-zone and
vswitch_id
is specified, the vswitch must in one of them.
- account_
password str Password of the root account. It is a string of 6 to 32 characters and is composed of letters, numbers, and underlines.
- auto_
renew bool Auto renew for prepaid, true of false. Default is false.
- backup_
periods Sequence[str] MongoDB Instance backup period. It is required when
backup_time
was existed. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]. Default to [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]- backup_
time str MongoDB instance backup time. It is required when
backup_period
was existed. In the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. If not set, the system will return a default, like "23:00Z-24:00Z".- config_
server_ Sequence[Shardinglists Instance Config Server List Args] The node information list of config server. See
config_server_list
below.- engine_
version str Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- instance_
charge_ strtype Valid values are
PrePaid
,PostPaid
,System default toPostPaid
. NOTE: It can be modified fromPostPaid
toPrePaid
after version v1.141.0.- kms_
encrypted_ strpassword An KMS encrypts password used to a instance. If the
account_password
is filled in, this field will be ignored.- kms_
encryption_ Mapping[str, Any]context An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set.- mongo_
lists Sequence[ShardingInstance Mongo List Args] The mongo-node count can be purchased is in range of [2, 32]. See
mongo_list
below.- name str
The name of DB instance. It a string of 2 to 256 characters.
- network_
type str The network type of the instance. Valid values:
Classic
orVPC
. Default value:Classic
.- order_
type str The type of configuration changes performed. Default value: DOWNGRADE. Valid values:
- UPGRADE: The specifications are upgraded.
- DOWNGRADE: The specifications are downgraded.
Note: This parameter is only applicable to instances when
instance_charge_type
is PrePaid.
- period int
The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid
. Valid values: [1~9], 12, 24, 36. System default to 1.- protocol_
type str The type of the access protocol. Valid values:
mongodb
ordynamodb
.- resource_
group_ strid The ID of the Resource Group.
- retention_
period int Instance data backup retention days. NOTE: Available in 1.42.0+.
- security_
group_ strid The Security Group ID of ECS.
- security_
ip_ Sequence[str]lists List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]). System default to
["127.0.0.1"]
.- shard_
lists Sequence[ShardingInstance Shard List Args] the shard-node count can be purchased is in range of [2, 32]. See
shard_list
below.- storage_
engine str Storage engine: WiredTiger or RocksDB. System Default value: WiredTiger.
- Mapping[str, Any]
A mapping of tags to assign to the resource.
- tde_
status str The TDE(Transparent Data Encryption) status. It can be updated from version 1.160.0+.
- vpc_
id str The ID of the VPC. > NOTE: This parameter is valid only when NetworkType is set to VPC.
- vswitch_
id str The virtual switch ID to launch DB instances in one VPC.
- zone_
id str The Zone to launch the DB instance. MongoDB sharding instance does not support multiple-zone. If it is a multi-zone and
vswitch_id
is specified, the vswitch must in one of them.
- account
Password String Password of the root account. It is a string of 6 to 32 characters and is composed of letters, numbers, and underlines.
- auto
Renew Boolean Auto renew for prepaid, true of false. Default is false.
- backup
Periods List<String> MongoDB Instance backup period. It is required when
backup_time
was existed. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]. Default to [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]- backup
Time String MongoDB instance backup time. It is required when
backup_period
was existed. In the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. If not set, the system will return a default, like "23:00Z-24:00Z".- config
Server List<Property Map>Lists The node information list of config server. See
config_server_list
below.- engine
Version String Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion
.- instance
Charge StringType Valid values are
PrePaid
,PostPaid
,System default toPostPaid
. NOTE: It can be modified fromPostPaid
toPrePaid
after version v1.141.0.- kms
Encrypted StringPassword An KMS encrypts password used to a instance. If the
account_password
is filled in, this field will be ignored.- kms
Encryption Map<Any>Context An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set.- mongo
Lists List<Property Map> The mongo-node count can be purchased is in range of [2, 32]. See
mongo_list
below.- name String
The name of DB instance. It a string of 2 to 256 characters.
- network
Type String The network type of the instance. Valid values:
Classic
orVPC
. Default value:Classic
.- order
Type String The type of configuration changes performed. Default value: DOWNGRADE. Valid values:
- UPGRADE: The specifications are upgraded.
- DOWNGRADE: The specifications are downgraded.
Note: This parameter is only applicable to instances when
instance_charge_type
is PrePaid.
- period Number
The duration that you will buy DB instance (in month). It is valid when instance_charge_type is
PrePaid
. Valid values: [1~9], 12, 24, 36. System default to 1.- protocol
Type String The type of the access protocol. Valid values:
mongodb
ordynamodb
.- resource
Group StringId The ID of the Resource Group.
- retention
Period Number Instance data backup retention days. NOTE: Available in 1.42.0+.
- security
Group StringId The Security Group ID of ECS.
- security
Ip List<String>Lists List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]). System default to
["127.0.0.1"]
.- shard
Lists List<Property Map> the shard-node count can be purchased is in range of [2, 32]. See
shard_list
below.- storage
Engine String Storage engine: WiredTiger or RocksDB. System Default value: WiredTiger.
- Map<Any>
A mapping of tags to assign to the resource.
- tde
Status String The TDE(Transparent Data Encryption) status. It can be updated from version 1.160.0+.
- vpc
Id String The ID of the VPC. > NOTE: This parameter is valid only when NetworkType is set to VPC.
- vswitch
Id String The virtual switch ID to launch DB instances in one VPC.
- zone
Id String The Zone to launch the DB instance. MongoDB sharding instance does not support multiple-zone. If it is a multi-zone and
vswitch_id
is specified, the vswitch must in one of them.
Supporting Types
ShardingInstanceConfigServerList, ShardingInstanceConfigServerListArgs
- Connect
String string The connection address of the Config Server node.
- Max
Connections int The max connections of the Config Server node.
- Max
Iops int The maximum IOPS of the Config Server node.
- Node
Class string The node class of the Config Server node.
- Node
Description string The description of the Config Server node.
- Node
Id string The ID of the Config Server node.
- Node
Storage int The node storage of the Config Server node.
- Port int
The connection port of the Config Server node.
- Connect
String string The connection address of the Config Server node.
- Max
Connections int The max connections of the Config Server node.
- Max
Iops int The maximum IOPS of the Config Server node.
- Node
Class string The node class of the Config Server node.
- Node
Description string The description of the Config Server node.
- Node
Id string The ID of the Config Server node.
- Node
Storage int The node storage of the Config Server node.
- Port int
The connection port of the Config Server node.
- connect
String String The connection address of the Config Server node.
- max
Connections Integer The max connections of the Config Server node.
- max
Iops Integer The maximum IOPS of the Config Server node.
- node
Class String The node class of the Config Server node.
- node
Description String The description of the Config Server node.
- node
Id String The ID of the Config Server node.
- node
Storage Integer The node storage of the Config Server node.
- port Integer
The connection port of the Config Server node.
- connect
String string The connection address of the Config Server node.
- max
Connections number The max connections of the Config Server node.
- max
Iops number The maximum IOPS of the Config Server node.
- node
Class string The node class of the Config Server node.
- node
Description string The description of the Config Server node.
- node
Id string The ID of the Config Server node.
- node
Storage number The node storage of the Config Server node.
- port number
The connection port of the Config Server node.
- connect_
string str The connection address of the Config Server node.
- max_
connections int The max connections of the Config Server node.
- max_
iops int The maximum IOPS of the Config Server node.
- node_
class str The node class of the Config Server node.
- node_
description str The description of the Config Server node.
- node_
id str The ID of the Config Server node.
- node_
storage int The node storage of the Config Server node.
- port int
The connection port of the Config Server node.
- connect
String String The connection address of the Config Server node.
- max
Connections Number The max connections of the Config Server node.
- max
Iops Number The maximum IOPS of the Config Server node.
- node
Class String The node class of the Config Server node.
- node
Description String The description of the Config Server node.
- node
Id String The ID of the Config Server node.
- node
Storage Number The node storage of the Config Server node.
- port Number
The connection port of the Config Server node.
ShardingInstanceMongoList, ShardingInstanceMongoListArgs
- Node
Class string Node specification. see Instance specifications.
- Connect
String string Mongo node connection string.
- Node
Id string The ID of the mongo-node.
- Port int
Mongo node port.
- Node
Class string Node specification. see Instance specifications.
- Connect
String string Mongo node connection string.
- Node
Id string The ID of the mongo-node.
- Port int
Mongo node port.
- node
Class String Node specification. see Instance specifications.
- connect
String String Mongo node connection string.
- node
Id String The ID of the mongo-node.
- port Integer
Mongo node port.
- node
Class string Node specification. see Instance specifications.
- connect
String string Mongo node connection string.
- node
Id string The ID of the mongo-node.
- port number
Mongo node port.
- node_
class str Node specification. see Instance specifications.
- connect_
string str Mongo node connection string.
- node_
id str The ID of the mongo-node.
- port int
Mongo node port.
- node
Class String Node specification. see Instance specifications.
- connect
String String Mongo node connection string.
- node
Id String The ID of the mongo-node.
- port Number
Mongo node port.
ShardingInstanceShardList, ShardingInstanceShardListArgs
- Node
Class string Node specification. see Instance specifications.
- Node
Storage int - Custom storage space; value range: [10, 1,000]
- 10-GB increments. Unit: GB.
- Node
Id string The ID of the shard-node.
- Readonly
Replicas int The number of read-only nodes in shard node. Valid values: 0 to 5. Default value: 0.
- Node
Class string Node specification. see Instance specifications.
- Node
Storage int - Custom storage space; value range: [10, 1,000]
- 10-GB increments. Unit: GB.
- Node
Id string The ID of the shard-node.
- Readonly
Replicas int The number of read-only nodes in shard node. Valid values: 0 to 5. Default value: 0.
- node
Class String Node specification. see Instance specifications.
- node
Storage Integer - Custom storage space; value range: [10, 1,000]
- 10-GB increments. Unit: GB.
- node
Id String The ID of the shard-node.
- readonly
Replicas Integer The number of read-only nodes in shard node. Valid values: 0 to 5. Default value: 0.
- node
Class string Node specification. see Instance specifications.
- node
Storage number - Custom storage space; value range: [10, 1,000]
- 10-GB increments. Unit: GB.
- node
Id string The ID of the shard-node.
- readonly
Replicas number The number of read-only nodes in shard node. Valid values: 0 to 5. Default value: 0.
- node_
class str Node specification. see Instance specifications.
- node_
storage int - Custom storage space; value range: [10, 1,000]
- 10-GB increments. Unit: GB.
- node_
id str The ID of the shard-node.
- readonly_
replicas int The number of read-only nodes in shard node. Valid values: 0 to 5. Default value: 0.
- node
Class String Node specification. see Instance specifications.
- node
Storage Number - Custom storage space; value range: [10, 1,000]
- 10-GB increments. Unit: GB.
- node
Id String The ID of the shard-node.
- readonly
Replicas Number The number of read-only nodes in shard node. Valid values: 0 to 5. Default value: 0.
Import
MongoDB can be imported using the id, e.g.
$ pulumi import alicloud:mongodb/shardingInstance:ShardingInstance example dds-bp1291daeda44195
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.