Skip to content

InstanceProps

Properties for defining a Instance.

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

Initializer

import ros_cdk_mongodb
ros_cdk_mongodb.InstanceProps(
  db_instance_class: typing.Union[str, IResolvable],
  db_instance_storage: typing.Union[typing.Union[int, float], IResolvable],
  account_password: typing.Union[str, IResolvable] = None,
  audit_policy_options: typing.Union[IResolvable, AuditPolicyOptionsProperty] = None,
  auto_renew: typing.Union[bool, IResolvable] = None,
  backup_id: typing.Union[str, IResolvable] = None,
  backup_policy_options: typing.Union[IResolvable, BackupPolicyOptionsProperty] = None,
  business_info: typing.Union[str, IResolvable] = None,
  charge_type: typing.Union[str, IResolvable] = None,
  cluster_id: typing.Union[str, IResolvable] = None,
  coupon_no: typing.Union[str, IResolvable] = None,
  database_names: typing.Union[str, IResolvable] = None,
  db_instance_description: typing.Union[str, IResolvable] = None,
  db_instance_release_protection: typing.Union[bool, IResolvable] = None,
  encrypted: typing.Union[bool, IResolvable] = None,
  encryption_key: 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,
  private_connections: typing.Union[IResolvable, PrivateConnectionsProperty] = None,
  provisioned_iops: typing.Union[typing.Union[int, float], IResolvable] = None,
  readonly_replicas: typing.Union[typing.Union[int, float], IResolvable] = None,
  replication_factor: typing.Union[typing.Union[int, float], IResolvable] = None,
  resource_group_id: typing.Union[str, IResolvable] = None,
  restore_time: typing.Union[str, IResolvable] = None,
  restore_type: typing.Union[typing.Union[int, float], IResolvable] = None,
  secondary_zone_id: typing.Union[str, IResolvable] = None,
  security_group_id: typing.Union[str, IResolvable] = None,
  security_ip_array: typing.Union[str, IResolvable] = None,
  src_db_instance_id: typing.Union[str, IResolvable] = None,
  src_region: typing.Union[str, IResolvable] = None,
  ssl_options: typing.Union[IResolvable, SSLOptionsProperty] = 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,
  vpc_password_free: typing.Union[bool, IResolvable] = None,
  v_switch_id: typing.Union[str, IResolvable] = None,
  zone_id: typing.Union[str, IResolvable] = None
)

Properties

Name Type Description
db_instance_class typing.Union[str, ros_cdk_core.IResolvable] Property dbInstanceClass: MongoDB instance supported instance type, make sure it should be correct.
db_instance_storage typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property dbInstanceStorage: Database instance storage size.
account_password typing.Union[str, ros_cdk_core.IResolvable] Property accountPassword: The password of the root account.
audit_policy_options typing.Union[ros_cdk_core.IResolvable, AuditPolicyOptionsProperty] Property auditPolicyOptions: Audit policy options.
auto_renew typing.Union[bool, ros_cdk_core.IResolvable] Property autoRenew: Specifies whether to enable auto-renewal for the instance.
backup_id typing.Union[str, ros_cdk_core.IResolvable] Property backupId: The backup point ID.
backup_policy_options typing.Union[ros_cdk_core.IResolvable, BackupPolicyOptionsProperty] Property backupPolicyOptions: Backup policy options.
business_info typing.Union[str, ros_cdk_core.IResolvable] Property businessInfo: The business information.
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.
cluster_id typing.Union[str, ros_cdk_core.IResolvable] Property clusterId: The dedicated cluster ID.
coupon_no typing.Union[str, ros_cdk_core.IResolvable] Property couponNo: Specifies whether to use a coupon.
database_names typing.Union[str, ros_cdk_core.IResolvable] Property databaseNames: The database name.
db_instance_description typing.Union[str, ros_cdk_core.IResolvable] Property dbInstanceDescription: The name of the instance.
db_instance_release_protection typing.Union[bool, ros_cdk_core.IResolvable] Property dbInstanceReleaseProtection: Enables instance release protection.
encrypted typing.Union[bool, ros_cdk_core.IResolvable] Property encrypted: Whether to enable cloud disk encryption.
encryption_key typing.Union[str, ros_cdk_core.IResolvable] Property encryptionKey: Custom key ID.
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.
private_connections typing.Union[ros_cdk_core.IResolvable, PrivateConnectionsProperty] Property privateConnections: Connection configs of private connection.
provisioned_iops typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property provisionedIops: Provisioned IOPS.
readonly_replicas typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property readonlyReplicas: The number of read-only nodes in the replica set instance.
replication_factor typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property replicationFactor: The number of nodes in the replica set.
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.
restore_type typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property restoreType: The method to restore an instance from a backup.
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_group_id typing.Union[str, ros_cdk_core.IResolvable] Property securityGroupId: The ID of the ECS security group.
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.
src_region typing.Union[str, ros_cdk_core.IResolvable] Property srcRegion: The source instance region.
ssl_options typing.Union[ros_cdk_core.IResolvable, SSLOptionsProperty] Property sslOptions: SSL options.
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.
vpc_password_free typing.Union[bool, ros_cdk_core.IResolvable] Property vpcPasswordFree: Specifies whether to enable password free for access within the VPC.
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.

db_instance_classRequired

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

Property dbInstanceClass: MongoDB instance supported instance type, make sure it should be correct.


db_instance_storageRequired

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

Property dbInstanceStorage: Database instance storage size.

MongoDB is [5,3000], increased every 10 GB, Unit in GB


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.

audit_policy_optionsOptional

audit_policy_options: typing.Union[IResolvable, AuditPolicyOptionsProperty]

Property auditPolicyOptions: Audit policy options.


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.


backup_idOptional

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

Property backupId: The backup point ID.

To query the backup point ID, call the DescribeBackups operation.

You must specify this parameter and the SrcDBInstanceId parameter only when you clone an instance based on a backup point.


backup_policy_optionsOptional

backup_policy_options: typing.Union[IResolvable, BackupPolicyOptionsProperty]

Property backupPolicyOptions: Backup policy options.


business_infoOptional

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

Property businessInfo: The business information.

It is an additional parameter.


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.


cluster_idOptional

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

Property clusterId: The dedicated cluster ID.


coupon_noOptional

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

Property couponNo: Specifies whether to use a coupon.

Valid values:

  • default or null (default): Uses a coupon.
  • youhuiquan_promotion_option_id_for_blank: Does not use a coupon.

database_namesOptional

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

Property databaseNames: The database name.

When you clone an instance, you can specify this parameter to clone specific databases. If you do not specify this parameter, all databases of the instance are cloned.


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.

db_instance_release_protectionOptional

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

Property dbInstanceReleaseProtection: Enables instance release protection.

Values:

  • true: Enabled.
  • false: Not enabled.

encryptedOptional

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

Property encrypted: Whether to enable cloud disk encryption.


encryption_keyOptional

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

Property encryptionKey: Custom key ID.


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.


private_connectionsOptional

private_connections: typing.Union[IResolvable, PrivateConnectionsProperty]

Property privateConnections: Connection configs of private connection.


provisioned_iopsOptional

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

Property provisionedIops: Provisioned IOPS.

The value range is 0 to 50000.


readonly_replicasOptional

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

Property readonlyReplicas: The number of read-only nodes in the replica set instance.

Valid values are integers from 0 to 5. The default value is 0.


replication_factorOptional

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

Property replicationFactor: The number of nodes in the replica set.

Allowed values: [3, 5, 7], default to 3.


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.


restore_typeOptional

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

Property restoreType: The method to restore an instance from a backup.

  • 0: Restores the instance to a specified backup set.
  • 1: Restores the instance to a specified point in time.
  • 2: Restores a released instance to a specified backup set.
  • 3: Restores the instance to a specified geo-redundant backup set.

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_group_idOptional

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

Property securityGroupId: The ID of the ECS security group.

Each ApsaraDB for MongoDB instance can be added in up to 10 security group. You can call the ECS DescribeSecurityGroup to describe the ID of the security group in the target region.


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.


src_regionOptional

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

Property srcRegion: The source instance region.

  • When the backup recovery type is 2 or 3, this parameter is required.

ssl_optionsOptional

ssl_options: typing.Union[IResolvable, SSLOptionsProperty]

Property sslOptions: SSL options.


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.


vpc_password_freeOptional

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

Property vpcPasswordFree: Specifies whether to enable password free for access within the VPC.

If set to:

  • true: enables password free.
  • false: disables password free.

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.