InstanceProps
Properties for defining a Instance.
See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-mongodb-instance
Initializer
import com.aliyun.ros.cdk.mongodb.InstanceProps;
InstanceProps.builder()
.dbInstanceClass(java.lang.String)
.dbInstanceClass(IResolvable)
.dbInstanceStorage(java.lang.Number)
.dbInstanceStorage(IResolvable)
// .accountPassword(java.lang.String)
// .accountPassword(IResolvable)
// .auditPolicyOptions(IResolvable)
// .auditPolicyOptions(AuditPolicyOptionsProperty)
// .autoRenew(java.lang.Boolean)
// .autoRenew(IResolvable)
// .backupId(java.lang.String)
// .backupId(IResolvable)
// .backupPolicyOptions(IResolvable)
// .backupPolicyOptions(BackupPolicyOptionsProperty)
// .businessInfo(java.lang.String)
// .businessInfo(IResolvable)
// .chargeType(java.lang.String)
// .chargeType(IResolvable)
// .clusterId(java.lang.String)
// .clusterId(IResolvable)
// .couponNo(java.lang.String)
// .couponNo(IResolvable)
// .databaseNames(java.lang.String)
// .databaseNames(IResolvable)
// .dbInstanceDescription(java.lang.String)
// .dbInstanceDescription(IResolvable)
// .dbInstanceReleaseProtection(java.lang.Boolean)
// .dbInstanceReleaseProtection(IResolvable)
// .encrypted(java.lang.Boolean)
// .encrypted(IResolvable)
// .encryptionKey(java.lang.String)
// .encryptionKey(IResolvable)
// .engineVersion(java.lang.String)
// .engineVersion(IResolvable)
// .hiddenZoneId(java.lang.String)
// .hiddenZoneId(IResolvable)
// .period(java.lang.Number)
// .period(IResolvable)
// .privateConnections(IResolvable)
// .privateConnections(PrivateConnectionsProperty)
// .provisionedIops(java.lang.Number)
// .provisionedIops(IResolvable)
// .readonlyReplicas(java.lang.Number)
// .readonlyReplicas(IResolvable)
// .replicationFactor(java.lang.Number)
// .replicationFactor(IResolvable)
// .resourceGroupId(java.lang.String)
// .resourceGroupId(IResolvable)
// .restoreTime(java.lang.String)
// .restoreTime(IResolvable)
// .restoreType(java.lang.Number)
// .restoreType(IResolvable)
// .secondaryZoneId(java.lang.String)
// .secondaryZoneId(IResolvable)
// .securityGroupId(java.lang.String)
// .securityGroupId(IResolvable)
// .securityIpArray(java.lang.String)
// .securityIpArray(IResolvable)
// .srcDbInstanceId(java.lang.String)
// .srcDbInstanceId(IResolvable)
// .srcRegion(java.lang.String)
// .srcRegion(IResolvable)
// .sslOptions(IResolvable)
// .sslOptions(SSLOptionsProperty)
// .storageEngine(java.lang.String)
// .storageEngine(IResolvable)
// .storageType(java.lang.String)
// .storageType(IResolvable)
// .tags(java.util.List<TagsProperty>)
// .tdeStatus(java.lang.Boolean)
// .tdeStatus(IResolvable)
// .vpcId(java.lang.String)
// .vpcId(IResolvable)
// .vpcPasswordFree(java.lang.Boolean)
// .vpcPasswordFree(IResolvable)
// .vSwitchId(java.lang.String)
// .vSwitchId(IResolvable)
// .zoneId(java.lang.String)
// .zoneId(IResolvable)
.build();
Properties
| Name | Type | Description |
|---|---|---|
dbInstanceClass | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property dbInstanceClass: MongoDB instance supported instance type, make sure it should be correct. |
dbInstanceStorage | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property dbInstanceStorage: Database instance storage size. |
accountPassword | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property accountPassword: The password of the root account. |
auditPolicyOptions | com.aliyun.ros.cdk.core.IResolvable OR AuditPolicyOptionsProperty | Property auditPolicyOptions: Audit policy options. |
autoRenew | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property autoRenew: Specifies whether to enable auto-renewal for the instance. |
backupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property backupId: The backup point ID. |
backupPolicyOptions | com.aliyun.ros.cdk.core.IResolvable OR BackupPolicyOptionsProperty | Property backupPolicyOptions: Backup policy options. |
businessInfo | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property businessInfo: The business information. |
chargeType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property chargeType: The billing method of the instance.values:PostPaid: Pay-As-You-Go.PrePaid: Subscription.Default value: PostPaid. |
clusterId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property clusterId: The dedicated cluster ID. |
couponNo | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property couponNo: Specifies whether to use a coupon. |
databaseNames | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property databaseNames: The database name. |
dbInstanceDescription | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property dbInstanceDescription: The name of the instance. |
dbInstanceReleaseProtection | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property dbInstanceReleaseProtection: Enables instance release protection. |
encrypted | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property encrypted: Whether to enable cloud disk encryption. |
encryptionKey | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property encryptionKey: Custom key ID. |
engineVersion | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property engineVersion: The database version. |
hiddenZoneId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property hiddenZoneId: Configure the zone where the hidden node resides to implement multi-availability zone deployment. |
period | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property period: The subscription duration of the instance. |
privateConnections | com.aliyun.ros.cdk.core.IResolvable OR PrivateConnectionsProperty | Property privateConnections: Connection configs of private connection. |
provisionedIops | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property provisionedIops: Provisioned IOPS. |
readonlyReplicas | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property readonlyReplicas: The number of read-only nodes in the replica set instance. |
replicationFactor | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property replicationFactor: The number of nodes in the replica set. |
resourceGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property resourceGroupId: The ID of the resource group. |
restoreTime | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property restoreTime: The time to restore the cloned instance to. |
restoreType | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property restoreType: The method to restore an instance from a backup. |
secondaryZoneId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property secondaryZoneId: Configure the zone where the secondary node resides to implement multi-availability zone deployment. |
securityGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property securityGroupId: The ID of the ECS security group. |
securityIpArray | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property securityIpArray: Security ips to add or remove. |
srcDbInstanceId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property srcDbInstanceId: The source instance ID. |
srcRegion | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property srcRegion: The source instance region. |
sslOptions | com.aliyun.ros.cdk.core.IResolvable OR SSLOptionsProperty | Property sslOptions: SSL options. |
storageEngine | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property storageEngine: Database storage engine.Support WiredTiger, RocksDB, TerarkDB. |
storageType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property storageType: The storage type of the instance. |
tags | java.util.List<TagsProperty> | Property tags: Tags to attach to instance. |
tdeStatus | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property tdeStatus: Specifies whether to enable Transparent Data Encryption (TDE). |
vpcId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property vpcId: The VPC id to create mongodb instance. |
vpcPasswordFree | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property vpcPasswordFree: Specifies whether to enable password free for access within the VPC. |
vSwitchId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property vSwitchId: The vSwitch Id to create mongodb instance. |
zoneId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property zoneId: On which zone to create the instance. |
dbInstanceClassRequired
public java.lang.Object getDbInstanceClass();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property dbInstanceClass: MongoDB instance supported instance type, make sure it should be correct.
dbInstanceStorageRequired
public java.lang.Object getDbInstanceStorage();
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property dbInstanceStorage: Database instance storage size.
MongoDB is [5,3000], increased every 10 GB, Unit in GB
accountPasswordOptional
public java.lang.Object getAccountPassword();
- Type: java.lang.String OR com.aliyun.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 java.lang.Object getAuditPolicyOptions();
- Type: com.aliyun.ros.cdk.core.IResolvable OR AuditPolicyOptionsProperty
Property auditPolicyOptions: Audit policy options.
autoRenewOptional
public java.lang.Object getAutoRenew();
- Type: java.lang.Boolean OR com.aliyun.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 java.lang.Object getBackupId();
- Type: java.lang.String OR com.aliyun.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 java.lang.Object getBackupPolicyOptions();
- Type: com.aliyun.ros.cdk.core.IResolvable OR BackupPolicyOptionsProperty
Property backupPolicyOptions: Backup policy options.
businessInfoOptional
public java.lang.Object getBusinessInfo();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property businessInfo: The business information.
It is an additional parameter.
chargeTypeOptional
public java.lang.Object getChargeType();
- Type: java.lang.String OR com.aliyun.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 java.lang.Object getClusterId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property clusterId: The dedicated cluster ID.
couponNoOptional
public java.lang.Object getCouponNo();
- Type: java.lang.String OR com.aliyun.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 java.lang.Object getDatabaseNames();
- Type: java.lang.String OR com.aliyun.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 java.lang.Object getDbInstanceDescription();
- Type: java.lang.String OR com.aliyun.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 java.lang.Object getDbInstanceReleaseProtection();
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property dbInstanceReleaseProtection: Enables instance release protection.
Values:
- true: Enabled.
- false: Not enabled.
encryptedOptional
public java.lang.Object getEncrypted();
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property encrypted: Whether to enable cloud disk encryption.
encryptionKeyOptional
public java.lang.Object getEncryptionKey();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property encryptionKey: Custom key ID.
engineVersionOptional
public java.lang.Object getEngineVersion();
- Type: java.lang.String OR com.aliyun.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 java.lang.Object getHiddenZoneId();
- Type: java.lang.String OR com.aliyun.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 java.lang.Object getPeriod();
- Type: java.lang.Number OR com.aliyun.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 java.lang.Object getPrivateConnections();
- Type: com.aliyun.ros.cdk.core.IResolvable OR PrivateConnectionsProperty
Property privateConnections: Connection configs of private connection.
provisionedIopsOptional
public java.lang.Object getProvisionedIops();
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property provisionedIops: Provisioned IOPS.
The value range is 0 to 50000.
readonlyReplicasOptional
public java.lang.Object getReadonlyReplicas();
- Type: java.lang.Number OR com.aliyun.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 java.lang.Object getReplicationFactor();
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property replicationFactor: The number of nodes in the replica set.
Allowed values: [3, 5, 7], default to 3.
resourceGroupIdOptional
public java.lang.Object getResourceGroupId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: The ID of the resource group.
restoreTimeOptional
public java.lang.Object getRestoreTime();
- Type: java.lang.String OR com.aliyun.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 java.lang.Object getRestoreType();
- Type: java.lang.Number OR com.aliyun.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 java.lang.Object getSecondaryZoneId();
- Type: java.lang.String OR com.aliyun.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 java.lang.Object getSecurityGroupId();
- Type: java.lang.String OR com.aliyun.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 java.lang.Object getSecurityIpArray();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property securityIpArray: Security ips to add or remove.
Update to this property will cover the current security ips.
srcDbInstanceIdOptional
public java.lang.Object getSrcDbInstanceId();
- Type: java.lang.String OR com.aliyun.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 java.lang.Object getSrcRegion();
- Type: java.lang.String OR com.aliyun.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 java.lang.Object getSslOptions();
- Type: com.aliyun.ros.cdk.core.IResolvable OR SSLOptionsProperty
Property sslOptions: SSL options.
storageEngineOptional
public java.lang.Object getStorageEngine();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property storageEngine: Database storage engine.Support WiredTiger, RocksDB, TerarkDB.
storageTypeOptional
public java.lang.Object getStorageType();
- Type: java.lang.String OR com.aliyun.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 java.util.List<TagsProperty> getTags();
- Type: java.util.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.
tdeStatusOptional
public java.lang.Object getTdeStatus();
- Type: java.lang.Boolean OR com.aliyun.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 java.lang.Object getVpcId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vpcId: The VPC id to create mongodb instance.
vpcPasswordFreeOptional
public java.lang.Object getVpcPasswordFree();
- Type: java.lang.Boolean OR com.aliyun.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 java.lang.Object getVSwitchId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vSwitchId: The vSwitch Id to create mongodb instance.
zoneIdOptional
public java.lang.Object getZoneId();
- Type: java.lang.String OR com.aliyun.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.