Skip to content

ShardingInstanceProps

Properties for defining a ShardingInstance.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-mongodb-shardinginstance

Initializer

import ros_cdk_mongodb
ros_cdk_mongodb.ShardingInstanceProps(
  config_server: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, ConfigServerProperty]]],
  mongos: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, MongosProperty]]],
  replica_set: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, ReplicaSetProperty]]],
  account_password: typing.Union[str, IResolvable] = None,
  auto_renew: typing.Union[bool, IResolvable] = None,
  charge_type: typing.Union[str, IResolvable] = None,
  db_instance_description: typing.Union[str, IResolvable] = None,
  engine_version: typing.Union[str, IResolvable] = None,
  hidden_zone_id: typing.Union[str, IResolvable] = None,
  period: typing.Union[typing.Union[int, float], IResolvable] = None,
  protocol_type: typing.Union[str, IResolvable] = None,
  resource_group_id: typing.Union[str, IResolvable] = None,
  restore_time: typing.Union[str, IResolvable] = None,
  secondary_zone_id: typing.Union[str, IResolvable] = None,
  security_ip_array: typing.Union[str, IResolvable] = None,
  src_db_instance_id: typing.Union[str, IResolvable] = None,
  storage_engine: typing.Union[str, IResolvable] = None,
  storage_type: typing.Union[str, IResolvable] = None,
  tags: typing.List[TagsProperty] = None,
  tde_status: typing.Union[bool, IResolvable] = None,
  vpc_id: typing.Union[str, IResolvable] = None,
  v_switch_id: typing.Union[str, IResolvable] = None,
  zone_id: typing.Union[str, IResolvable] = None
)

Properties

Name Type Description
config_server typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ConfigServerProperty]]] Property configServer: The information of Configserver nodes.
mongos typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, MongosProperty]]] Property mongos: The information of Mongos nodes.
replica_set typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ReplicaSetProperty]]] Property replicaSet: The information of shard nodes.
account_password typing.Union[str, ros_cdk_core.IResolvable] Property accountPassword: The password of the root account.
auto_renew typing.Union[bool, ros_cdk_core.IResolvable] Property autoRenew: Specifies whether to enable auto-renewal for the instance.
charge_type typing.Union[str, ros_cdk_core.IResolvable] Property chargeType: The billing method of the instance.values:PostPaid: Pay-As-You-Go.PrePaid: Subscription.Default value: PostPaid.
db_instance_description typing.Union[str, ros_cdk_core.IResolvable] Property dbInstanceDescription: The name of the instance.
engine_version typing.Union[str, ros_cdk_core.IResolvable] Property engineVersion: The database version.
hidden_zone_id typing.Union[str, ros_cdk_core.IResolvable] Property hiddenZoneId: Configure the zone where the hidden node resides to implement multi-availability zone deployment.
period typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property period: The subscription duration of the instance.
protocol_type typing.Union[str, ros_cdk_core.IResolvable] Property protocolType: Protocol type.
resource_group_id typing.Union[str, ros_cdk_core.IResolvable] Property resourceGroupId: The ID of the resource group.
restore_time typing.Union[str, ros_cdk_core.IResolvable] Property restoreTime: The time to restore the cloned instance to.
secondary_zone_id typing.Union[str, ros_cdk_core.IResolvable] Property secondaryZoneId: Configure the zone where the secondary node resides to implement multi-availability zone deployment.
security_ip_array typing.Union[str, ros_cdk_core.IResolvable] Property securityIpArray: Security ips to add or remove.
src_db_instance_id typing.Union[str, ros_cdk_core.IResolvable] Property srcDbInstanceId: The source instance ID.
storage_engine typing.Union[str, ros_cdk_core.IResolvable] Property storageEngine: Database storage engine.Support WiredTiger, RocksDB, TerarkDB.
storage_type typing.Union[str, ros_cdk_core.IResolvable] Property storageType: The storage type of the instance.
tags typing.List[TagsProperty] Property tags: Tags to attach to instance.
tde_status typing.Union[bool, ros_cdk_core.IResolvable] Property tdeStatus: Specifies whether to enable Transparent Data Encryption (TDE).
vpc_id typing.Union[str, ros_cdk_core.IResolvable] Property vpcId: The VPC id to create mongodb instance.
v_switch_id typing.Union[str, ros_cdk_core.IResolvable] Property vSwitchId: The vSwitch Id to create mongodb instance.
zone_id typing.Union[str, ros_cdk_core.IResolvable] Property zoneId: On which zone to create the instance.

config_serverRequired

config_server: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, ConfigServerProperty]]]
  • Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ConfigServerProperty]]]

Property configServer: The information of Configserver nodes.


mongosRequired

mongos: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, MongosProperty]]]
  • Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, MongosProperty]]]

Property mongos: The information of Mongos nodes.


replica_setRequired

replica_set: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, ReplicaSetProperty]]]
  • Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ReplicaSetProperty]]]

Property replicaSet: The information of shard nodes.


account_passwordOptional

account_password: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property accountPassword: The password of the root account.

The password must meet the following requirements:

  • It must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
  • Special characters include !@#$%^&*()_+-=
  • It must be 8 to 32 characters in length.

auto_renewOptional

auto_renew: typing.Union[bool, IResolvable]
  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property autoRenew: Specifies whether to enable auto-renewal for the instance.

Valid values:

  • true: Auto-renewal is enabled.
  • false: Auto-renewal is disabled. You must manually renew the instance. This is the default value.

This parameter is optional and takes effect only when you set the ChargeType parameter to PrePaid.


charge_typeOptional

charge_type: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property chargeType: The billing method of the instance.values:PostPaid: Pay-As-You-Go.PrePaid: Subscription.Default value: PostPaid.


db_instance_descriptionOptional

db_instance_description: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property dbInstanceDescription: The name of the instance.

The name must meet the following requirements:

  • It must start with a Chinese character or a letter.
  • It can contain digits, Chinese characters, letters, underscores (_), periods (.), and hyphens (-).
  • It must be 2 to 256 characters in length.

engine_versionOptional

engine_version: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property engineVersion: The database version.

Valid values:

  • 8.0
  • 7.0
  • 6.0
  • 5.0
  • 4.4
  • 4.2
  • 4.0
  • When you clone an instance by calling this operation, the value of this parameter must be the same as that of the source instance.

hidden_zone_idOptional

hidden_zone_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property hiddenZoneId: Configure the zone where the hidden node resides to implement multi-availability zone deployment.

When the value of the EngineVersion is 4.4 and later, this parameter is available and required. The value of this parameter cannot be the same as that of ZoneId and SecondaryZoneId.


periodOptional

period: typing.Union[typing.Union[int, float], IResolvable]
  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property period: The subscription duration of the instance.

Unit: month. Valid values: 1 to 9 (integer), 12, 24, 36, and 60.

This parameter is required and takes effect only when you set the ChargeType parameter to PrePaid.


protocol_typeOptional

protocol_type: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property protocolType: Protocol type.

Valid value: mongodb or dynamodb.


resource_group_idOptional

resource_group_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property resourceGroupId: The ID of the resource group.


restore_timeOptional

restore_time: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property restoreTime: The time to restore the cloned instance to.

The format is yyyy-MM-ddTHH:mm:ssZ.This parameter can only be specified when this operation is called to clone instances.You must also specify theSrcDBInstanceIdparameter and theBackupIdparameter.You can clone instances to any restore time in the past seven days.


secondary_zone_idOptional

secondary_zone_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property secondaryZoneId: Configure the zone where the secondary node resides to implement multi-availability zone deployment.

When the value of the EngineVersion is 4.4 and later, this parameter is available and required.The value of this parameter cannot be the same as that of ZoneId and HiddenZoneId.


security_ip_arrayOptional

security_ip_array: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property securityIpArray: Security ips to add or remove.

Update to this property will cover the current security ips.


src_db_instance_idOptional

src_db_instance_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property srcDbInstanceId: The source instance ID.

This parameter is required only when you clone an instance by calling this operation. You must also specify the RestoreTime parameter.


storage_engineOptional

storage_engine: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property storageEngine: Database storage engine.Support WiredTiger, RocksDB, TerarkDB.


storage_typeOptional

storage_type: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property storageType: The storage type of the instance.

Instances of MongoDB 4.4 and later only support cloud disks. cloud_essd1 is selected if you leave this parameter empty. Instances of MongoDB 4.2 and earlier support only local disks. local_ssd is selected if you leave this parameter empty.


tagsOptional

tags: typing.List[TagsProperty]

Property tags: Tags to attach to instance.

Max support 20 tags to add during create instance. Each tag with two properties Key and Value, and Key is required.


tde_statusOptional

tde_status: typing.Union[bool, IResolvable]
  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property tdeStatus: Specifies whether to enable Transparent Data Encryption (TDE).

Valid values: true: enable TDE false: disable TDE (default) Note: You cannot disable TDE after it is enabled.


vpc_idOptional

vpc_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property vpcId: The VPC id to create mongodb instance.


v_switch_idOptional

v_switch_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property vSwitchId: The vSwitch Id to create mongodb instance.


zone_idOptional

zone_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property zoneId: On which zone to create the instance.

If VpcId and VSwitchId is specified, ZoneId is required and VSwitch should be in same zone.