Skip to content

InstanceProps

Properties for defining a Instance.

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

Initializer

import { InstanceProps } from '@alicloud/ros-cdk-mongodb'
const instanceProps: InstanceProps = { ... }

Properties

Name Type Description
dbInstanceClass string | @alicloud/ros-cdk-core.IResolvable Property dbInstanceClass: MongoDB instance supported instance type, make sure it should be correct.
dbInstanceStorage number | @alicloud/ros-cdk-core.IResolvable Property dbInstanceStorage: Database instance storage size.
accountPassword string | @alicloud/ros-cdk-core.IResolvable Property accountPassword: The password of the root account.
auditPolicyOptions @alicloud/ros-cdk-core.IResolvable | AuditPolicyOptionsProperty Property auditPolicyOptions: Audit policy options.
autoRenew boolean | @alicloud/ros-cdk-core.IResolvable Property autoRenew: Specifies whether to enable auto-renewal for the instance.
backupId string | @alicloud/ros-cdk-core.IResolvable Property backupId: The backup point ID.
backupPolicyOptions @alicloud/ros-cdk-core.IResolvable | BackupPolicyOptionsProperty Property backupPolicyOptions: Backup policy options.
businessInfo string | @alicloud/ros-cdk-core.IResolvable Property businessInfo: The business information.
chargeType string | @alicloud/ros-cdk-core.IResolvable Property chargeType: The billing method of the instance.values:PostPaid: Pay-As-You-Go.PrePaid: Subscription.Default value: PostPaid.
clusterId string | @alicloud/ros-cdk-core.IResolvable Property clusterId: The dedicated cluster ID.
couponNo string | @alicloud/ros-cdk-core.IResolvable Property couponNo: Specifies whether to use a coupon.
databaseNames string | @alicloud/ros-cdk-core.IResolvable Property databaseNames: The database name.
dbInstanceDescription string | @alicloud/ros-cdk-core.IResolvable Property dbInstanceDescription: The name of the instance.
dbInstanceReleaseProtection boolean | @alicloud/ros-cdk-core.IResolvable Property dbInstanceReleaseProtection: Enables instance release protection.
encrypted boolean | @alicloud/ros-cdk-core.IResolvable Property encrypted: Whether to enable cloud disk encryption.
encryptionKey string | @alicloud/ros-cdk-core.IResolvable Property encryptionKey: Custom key ID.
engineVersion string | @alicloud/ros-cdk-core.IResolvable Property engineVersion: The database version.
hiddenZoneId string | @alicloud/ros-cdk-core.IResolvable Property hiddenZoneId: Configure the zone where the hidden node resides to implement multi-availability zone deployment.
period number | @alicloud/ros-cdk-core.IResolvable Property period: The subscription duration of the instance.
privateConnections @alicloud/ros-cdk-core.IResolvable | PrivateConnectionsProperty Property privateConnections: Connection configs of private connection.
provisionedIops number | @alicloud/ros-cdk-core.IResolvable Property provisionedIops: Provisioned IOPS.
readonlyReplicas number | @alicloud/ros-cdk-core.IResolvable Property readonlyReplicas: The number of read-only nodes in the replica set instance.
replicationFactor number | @alicloud/ros-cdk-core.IResolvable Property replicationFactor: The number of nodes in the replica set.
resourceGroupId string | @alicloud/ros-cdk-core.IResolvable Property resourceGroupId: The ID of the resource group.
restoreTime string | @alicloud/ros-cdk-core.IResolvable Property restoreTime: The time to restore the cloned instance to.
restoreType number | @alicloud/ros-cdk-core.IResolvable Property restoreType: The method to restore an instance from a backup.
secondaryZoneId string | @alicloud/ros-cdk-core.IResolvable Property secondaryZoneId: Configure the zone where the secondary node resides to implement multi-availability zone deployment.
securityGroupId string | @alicloud/ros-cdk-core.IResolvable Property securityGroupId: The ID of the ECS security group.
securityIpArray string | @alicloud/ros-cdk-core.IResolvable Property securityIpArray: Security ips to add or remove.
srcDbInstanceId string | @alicloud/ros-cdk-core.IResolvable Property srcDbInstanceId: The source instance ID.
srcRegion string | @alicloud/ros-cdk-core.IResolvable Property srcRegion: The source instance region.
sslOptions @alicloud/ros-cdk-core.IResolvable | SSLOptionsProperty Property sslOptions: SSL options.
storageEngine string | @alicloud/ros-cdk-core.IResolvable Property storageEngine: Database storage engine.Support WiredTiger, RocksDB, TerarkDB.
storageType string | @alicloud/ros-cdk-core.IResolvable Property storageType: The storage type of the instance.
tags TagsProperty[] Property tags: Tags to attach to instance.
tdeStatus boolean | @alicloud/ros-cdk-core.IResolvable Property tdeStatus: Specifies whether to enable Transparent Data Encryption (TDE).
vpcId string | @alicloud/ros-cdk-core.IResolvable Property vpcId: The VPC id to create mongodb instance.
vpcPasswordFree boolean | @alicloud/ros-cdk-core.IResolvable Property vpcPasswordFree: Specifies whether to enable password free for access within the VPC.
vSwitchId string | @alicloud/ros-cdk-core.IResolvable Property vSwitchId: The vSwitch Id to create mongodb instance.
zoneId string | @alicloud/ros-cdk-core.IResolvable Property zoneId: On which zone to create the instance.

dbInstanceClassRequired

public readonly dbInstanceClass: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

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


dbInstanceStorageRequired

public readonly dbInstanceStorage: number | IResolvable;
  • Type: number | @alicloud/ros-cdk-core.IResolvable

Property dbInstanceStorage: Database instance storage size.

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


accountPasswordOptional

public readonly accountPassword: string | IResolvable;
  • Type: string | @alicloud/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.


auditPolicyOptionsOptional

public readonly auditPolicyOptions: IResolvable | AuditPolicyOptionsProperty;

Property auditPolicyOptions: Audit policy options.


autoRenewOptional

public readonly autoRenew: boolean | IResolvable;
  • Type: boolean | @alicloud/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.


backupIdOptional

public readonly backupId: string | IResolvable;
  • Type: string | @alicloud/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.


backupPolicyOptionsOptional

public readonly backupPolicyOptions: IResolvable | BackupPolicyOptionsProperty;

Property backupPolicyOptions: Backup policy options.


businessInfoOptional

public readonly businessInfo: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property businessInfo: The business information.

It is an additional parameter.


chargeTypeOptional

public readonly chargeType: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

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


clusterIdOptional

public readonly clusterId: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property clusterId: The dedicated cluster ID.


couponNoOptional

public readonly couponNo: string | IResolvable;
  • Type: string | @alicloud/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.


databaseNamesOptional

public readonly databaseNames: string | IResolvable;
  • Type: string | @alicloud/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.


dbInstanceDescriptionOptional

public readonly dbInstanceDescription: string | IResolvable;
  • Type: string | @alicloud/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.


dbInstanceReleaseProtectionOptional

public readonly dbInstanceReleaseProtection: boolean | IResolvable;
  • Type: boolean | @alicloud/ros-cdk-core.IResolvable

Property dbInstanceReleaseProtection: Enables instance release protection.

Values: - true: Enabled. - false: Not enabled.


encryptedOptional

public readonly encrypted: boolean | IResolvable;
  • Type: boolean | @alicloud/ros-cdk-core.IResolvable

Property encrypted: Whether to enable cloud disk encryption.


encryptionKeyOptional

public readonly encryptionKey: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property encryptionKey: Custom key ID.


engineVersionOptional

public readonly engineVersion: string | IResolvable;
  • Type: string | @alicloud/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.

hiddenZoneIdOptional

public readonly hiddenZoneId: string | IResolvable;
  • Type: string | @alicloud/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

public readonly period: number | IResolvable;
  • Type: number | @alicloud/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.


privateConnectionsOptional

public readonly privateConnections: IResolvable | PrivateConnectionsProperty;

Property privateConnections: Connection configs of private connection.


provisionedIopsOptional

public readonly provisionedIops: number | IResolvable;
  • Type: number | @alicloud/ros-cdk-core.IResolvable

Property provisionedIops: Provisioned IOPS.

The value range is 0 to 50000.


readonlyReplicasOptional

public readonly readonlyReplicas: number | IResolvable;
  • Type: number | @alicloud/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.


replicationFactorOptional

public readonly replicationFactor: number | IResolvable;
  • Type: number | @alicloud/ros-cdk-core.IResolvable

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

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


resourceGroupIdOptional

public readonly resourceGroupId: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property resourceGroupId: The ID of the resource group.


restoreTimeOptional

public readonly restoreTime: string | IResolvable;
  • Type: string | @alicloud/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.


restoreTypeOptional

public readonly restoreType: number | IResolvable;
  • Type: number | @alicloud/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.


secondaryZoneIdOptional

public readonly secondaryZoneId: string | IResolvable;
  • Type: string | @alicloud/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.


securityGroupIdOptional

public readonly securityGroupId: string | IResolvable;
  • Type: string | @alicloud/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.


securityIpArrayOptional

public readonly securityIpArray: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property securityIpArray: Security ips to add or remove.

Update to this property will cover the current security ips.


srcDbInstanceIdOptional

public readonly srcDbInstanceId: string | IResolvable;
  • Type: string | @alicloud/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.


srcRegionOptional

public readonly srcRegion: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property srcRegion: The source instance region.

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

sslOptionsOptional

public readonly sslOptions: IResolvable | SSLOptionsProperty;

Property sslOptions: SSL options.


storageEngineOptional

public readonly storageEngine: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

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


storageTypeOptional

public readonly storageType: string | IResolvable;
  • Type: string | @alicloud/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

public readonly tags: 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.


tdeStatusOptional

public readonly tdeStatus: boolean | IResolvable;
  • Type: boolean | @alicloud/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.


vpcIdOptional

public readonly vpcId: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property vpcId: The VPC id to create mongodb instance.


vpcPasswordFreeOptional

public readonly vpcPasswordFree: boolean | IResolvable;
  • Type: boolean | @alicloud/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.


vSwitchIdOptional

public readonly vSwitchId: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property vSwitchId: The vSwitch Id to create mongodb instance.


zoneIdOptional

public readonly zoneId: string | IResolvable;
  • Type: string | @alicloud/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.