Skip to content

ShardingInstance

This class encapsulates and extends the ROS resource type ALIYUN::MONGODB::ShardingInstance, which is used to create or clone an ApsaraDB for MongoDB sharded cluster instance.

Initializers

import ros_cdk_mongodb
ros_cdk_mongodb.ShardingInstance(
  scope: Construct,
  id: str,
  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,
  network_type: 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,
  enable_resource_property_constraint: bool = None
)
Name Type Description
scope ros_cdk_core.Construct No description.
id str No description.
config_server typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ConfigServerProperty]]] Property configServer:.
mongos typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, MongosProperty]]] Property mongos:.
replica_set typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ReplicaSetProperty]]] Property replicaSet:.
account_password typing.Union[str, ros_cdk_core.IResolvable] Property accountPassword: Root account password, can contain the letters, numbers or underscores the composition, length of 6~32 bit.
auto_renew typing.Union[bool, ros_cdk_core.IResolvable] Property autoRenew: Indicates whether automatic renewal is enabled 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: Description of created database instance.
engine_version typing.Union[str, ros_cdk_core.IResolvable] Property engineVersion: Database instance 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.
network_type typing.Union[str, ros_cdk_core.IResolvable] Property networkType: The instance network type.
period typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property period: The subscription period of the instance.Default Unit: Month.Valid values: [1~9], 12, 24, 36. Default to 1.
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: Create an instance of the backup set based on an instance.
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.
enable_resource_property_constraint bool No description.

scopeRequired

  • Type: ros_cdk_core.Construct

idRequired

  • Type: str

config_serverRequired

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

Property configServer:.


mongosRequired

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

Property mongos:.


replica_setRequired

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

Property replicaSet:.


account_passwordOptional

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

Property accountPassword: Root account password, can contain the letters, numbers or underscores the composition, length of 6~32 bit.


auto_renewOptional

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

Property autoRenew: Indicates whether automatic renewal is enabled for the instance.

Valid values:true: Automatic renewal is enabled.false: Automatic renewal is not enabled. You must renew the instance manually.Default value: false.


charge_typeOptional

  • 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

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

Property dbInstanceDescription: Description of created database instance.


engine_versionOptional

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

Property engineVersion: Database instance version.


hidden_zone_idOptional

  • 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.


network_typeOptional

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

Property networkType: The instance network type.

Support 'CLASSIC' and 'VPC' only, default is 'CLASSIC'.


periodOptional

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

Property period: The subscription period of the instance.Default Unit: Month.Valid values: [1~9], 12, 24, 36. Default to 1.


protocol_typeOptional

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

Property protocolType: Protocol type.

Valid value: mongodb or dynamodb.


resource_group_idOptional

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

Property resourceGroupId: The ID of the resource group.


restore_timeOptional

  • 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

  • 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

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

Property securityIpArray: Security ips to add or remove.


src_db_instance_idOptional

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

Property srcDbInstanceId: Create an instance of the backup set based on an instance.


storage_engineOptional

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

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


storage_typeOptional

  • 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

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

  • 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

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

Property vpcId: The VPC id to create mongodb instance.


v_switch_idOptional

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

Property vSwitchId: The vSwitch Id to create mongodb instance.


zone_idOptional

  • 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.


enable_resource_property_constraintOptional

  • Type: bool

Methods

Name Description
to_string Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
add_condition No description.
add_count No description.
add_dependency No description.
add_resource_desc No description.
apply_removal_policy No description.
get_att No description.
set_metadata No description.

to_string

def to_string() -> str

Returns a string representation of this construct.

synthesize

def synthesize(
  session: ISynthesisSession
) -> None

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

sessionRequired

  • Type: ros_cdk_core.ISynthesisSession

The synthesis session.


add_condition

def add_condition(
  condition: RosCondition
) -> None

conditionRequired

  • Type: ros_cdk_core.RosCondition

add_count

def add_count(
  count: typing.Union[typing.Union[int, float], IResolvable]
) -> None

countRequired

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

add_dependency

def add_dependency(
  resource: Resource
) -> None

resourceRequired

  • Type: ros_cdk_core.Resource

add_resource_desc

def add_resource_desc(
  desc: str
) -> None

descRequired

  • Type: str

apply_removal_policy

def apply_removal_policy(
  policy: RemovalPolicy
) -> None

policyRequired

  • Type: ros_cdk_core.RemovalPolicy

get_att

def get_att(
  name: str
) -> IResolvable

nameRequired

  • Type: str

set_metadata

def set_metadata(
  key: str,
  value: typing.Any
) -> None

keyRequired

  • Type: str

valueRequired

  • Type: typing.Any

Static Functions

Name Description
is_construct Return whether the given object is a Construct.

is_construct

import ros_cdk_mongodb
ros_cdk_mongodb.ShardingInstance.is_construct(
  x: typing.Any
)

Return whether the given object is a Construct.

xRequired

  • Type: typing.Any

Properties

Name Type Description
node ros_cdk_core.ConstructNode The construct tree node associated with this construct.
ref str No description.
stack ros_cdk_core.Stack The stack in which this resource is defined.
resource ros_cdk_core.RosResource No description.
attr_db_instance_id ros_cdk_core.IResolvable Attribute DBInstanceId: The instance id of created mongodb instance.
attr_db_instance_status ros_cdk_core.IResolvable Attribute DBInstanceStatus: Status of mongodb instance.
attr_order_id ros_cdk_core.IResolvable Attribute OrderId: Order Id of created instance.

nodeRequired

node: ConstructNode
  • Type: ros_cdk_core.ConstructNode

The construct tree node associated with this construct.


refRequired

ref: str
  • Type: str

stackRequired

stack: Stack
  • Type: ros_cdk_core.Stack

The stack in which this resource is defined.


resourceOptional

resource: RosResource
  • Type: ros_cdk_core.RosResource

attr_db_instance_idRequired

attr_db_instance_id: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute DBInstanceId: The instance id of created mongodb instance.


attr_db_instance_statusRequired

attr_db_instance_status: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute DBInstanceStatus: Status of mongodb instance.


attr_order_idRequired

attr_order_id: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute OrderId: Order Id of created instance.


Structs