Instance
- Implements: IInstance
This class encapsulates and extends the ROS resource type ALIYUN::DTS::Instance.
Initializers
import com.aliyun.ros.cdk.dts.Instance;
Instance.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.instanceClass(java.lang.String)
.instanceClass(IResolvable)
.payType(java.lang.String)
.payType(IResolvable)
.type(java.lang.String)
.type(IResolvable)
// .autoPay(java.lang.Boolean)
// .autoPay(IResolvable)
// .autoStart(java.lang.Boolean)
// .autoStart(IResolvable)
// .computeUnit(java.lang.Number)
// .computeUnit(IResolvable)
// .databaseCount(java.lang.Number)
// .databaseCount(IResolvable)
// .destinationEndpointEngineName(java.lang.String)
// .destinationEndpointEngineName(IResolvable)
// .destinationRegion(java.lang.String)
// .destinationRegion(IResolvable)
// .du(java.lang.Number)
// .du(IResolvable)
// .feeType(java.lang.String)
// .feeType(IResolvable)
// .insightModule(java.lang.Boolean)
// .insightModule(IResolvable)
// .jobId(java.lang.String)
// .jobId(IResolvable)
// .maxDu(java.lang.Number)
// .maxDu(IResolvable)
// .minDu(java.lang.Number)
// .minDu(IResolvable)
// .period(java.lang.String)
// .period(IResolvable)
// .resourceGroupId(java.lang.String)
// .resourceGroupId(IResolvable)
// .sourceEndpointEngineName(java.lang.String)
// .sourceEndpointEngineName(IResolvable)
// .sourceRegion(java.lang.String)
// .sourceRegion(IResolvable)
// .syncArchitecture(java.lang.String)
// .syncArchitecture(IResolvable)
// .usedTime(java.lang.Number)
// .usedTime(IResolvable)
.build();
| Name | Type | Description |
|---|---|---|
scope | com.aliyun.ros.cdk.core.Construct | No description. |
id | java.lang.String | No description. |
enableResourcePropertyConstraint | java.lang.Boolean | No description. |
instanceClass | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property instanceClass: The instance class. |
payType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property payType: The billing method. |
type | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property type: The type of the DTS instance. |
autoPay | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property autoPay: Specifies whether to automatically renew the DTS instance when it expires. |
autoStart | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property autoStart: Specifies whether to automatically start the task after the DTS instance is purchased. |
computeUnit | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property computeUnit: The specification of the extract, transform, and load (ETL) instance. |
databaseCount | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property databaseCount: The number of private custom ApsaraDB RDS instances in a PolarDB-X instance. |
destinationEndpointEngineName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property destinationEndpointEngineName: The database engine of the destination instance. |
destinationRegion | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property destinationRegion: The ID of the region in which the destination instance resides. |
du | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property du: The number of DTS units (DUs) that are assigned to a DTS task that is run on a DTS dedicated cluster. |
feeType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property feeType: The billing type for a change tracking instance. |
insightModule | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property insightModule: Whether to enable the insight module. |
jobId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property jobId: The ID of the task. |
maxDu | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property maxDu: Upper limit of DU. |
minDu | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property minDu: Lower limit of DU. |
period | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property period: The unit of the subscription duration. |
resourceGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property resourceGroupId: The ID of the resource group. |
sourceEndpointEngineName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property sourceEndpointEngineName: The database engine of the source instance. |
sourceRegion | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property sourceRegion: The ID of the region in which the source instance resides. |
syncArchitecture | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property syncArchitecture: The synchronization topology. |
usedTime | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property usedTime: The subscription duration. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
instanceClassRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property instanceClass: The instance class.
- DTS supports the following instance classes for a data migration instance: xxlarge, xlarge, large, medium, and small.
- DTS supports the following instance classes for a data synchronization instance: large, medium, small, and micro. Note: Although the instance specification supports modification after creation, the downgrade instance feature is currently in canary release and available only for specific users.
payTypeRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property payType: The billing method.
Valid values:
- PrePaid: subscription
- PostPaid: pay-as-you-go
This parameter must be specified.
typeRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property type: The type of the DTS instance.
Valid values:
- MIGRATION: data migration instance
- SYNC: data synchronization instance
- SUBSCRIBE: change tracking instance
You must specify one of this parameter and the JobId parameter.
autoPayOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property autoPay: Specifies whether to automatically renew the DTS instance when it expires.
Valid values:
- false: does not automatically renew the DTS instance when it expires. This is the default value.
- true: automatically renews the DTS instance when it expires.
autoStartOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property autoStart: Specifies whether to automatically start the task after the DTS instance is purchased.
Valid values:
- false (default)
- true
This parameter can be set to true and take effect only if you specify a valid value for JobId.
computeUnitOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property computeUnit: The specification of the extract, transform, and load (ETL) instance.
The unit is compute unit (CU). One CU is equal to 1 vCPU and 4 GB of memory. The value of this parameter must be an integer greater than or equal to 2.
databaseCountOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property databaseCount: The number of private custom ApsaraDB RDS instances in a PolarDB-X instance.
Default value: 1. Note: You must specify this parameter only if the SourceEndpointEngineName parameter is set to drds.
destinationEndpointEngineNameOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property destinationEndpointEngineName: The database engine of the destination instance.
Valid values:
- MySQL: ApsaraDB RDS for MySQL instance or self-managed MySQL database
- PolarDB: PolarDB for MySQL cluster
- polardb_o: PolarDB for Oracle cluster
- polardb_pg: PolarDB for PostgreSQL cluster
- Redis: ApsaraDB for Redis instance or self-managed Redis database
- DRDS: PolarDB-X 1.0 or PolarDB-X 2.0 instance
- PostgreSQL: self-managed PostgreSQL database
- odps: MaxCompute project
- oracle: self-managed Oracle database
- mongodb: ApsaraDB for MongoDB instance or self-managed MongoDB database
- tidb: TiDB database
- ADS: AnalyticDB for MySQL V2.0 cluster
- ADB30: AnalyticDB for MySQL V3.0 cluster
- Greenplum: AnalyticDB for PostgreSQL instance
- MSSQL: ApsaraDB RDS for SQL Server instance or self-managed SQL Server database
- kafka: Message Queue for Apache Kafka instance or self-managed Kafka cluster
- DataHub: DataHub project
- DB2: self-managed Db2 for LUW database
- as400: AS/400
- Tablestore: Tablestore instance Note: The default value is MySQL. You must specify one of this parameter and the JobId parameter.
destinationRegionOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property destinationRegion: The ID of the region in which the destination instance resides.
Note: You must specify one of this parameter and the JobId parameter.
duOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property du: The number of DTS units (DUs) that are assigned to a DTS task that is run on a DTS dedicated cluster.
Valid values: 1 to 100. Note: The value of this parameter must be within the range of the number of DUs available for the DTS dedicated cluster.
feeTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property feeType: The billing type for a change tracking instance.
Valid values: ONLY_CONFIGURATION_FEE and CONFIGURATION_FEE_AND_DATA_FEE.
- ONLY_CONFIGURATION_FEE: charges only configuration fees.
- CONFIGURATION_FEE_AND_DATA_FEE: charges configuration fees and data traffic fees.
insightModuleOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property insightModule: Whether to enable the insight module.
jobIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property jobId: The ID of the task.
Note: If this parameter is specified, you do not need to specify the SourceRegion, DestinationRegion, SourceEndpointEngineName, or DestinationEndpointEngineName parameter. Even if these parameters are specified, the value of the JobId parameter takes precedence.
maxDuOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property maxDu: Upper limit of DU.
Only supported by Serverless instances.
minDuOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property minDu: Lower limit of DU.
Only supported by Serverless instances.
periodOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property period: The unit of the subscription duration.
Valid values: Year and Month. Note: You must specify this parameter only if the PayType parameter is set to PrePaid.
resourceGroupIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: The ID of the resource group.
sourceEndpointEngineNameOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property sourceEndpointEngineName: The database engine of the source instance.
Valid values:
- MySQL: ApsaraDB RDS for MySQL instance or self-managed MySQL database
- PolarDB: PolarDB for MySQL cluster
- polardb_o: PolarDB for Oracle cluster
- polardb_pg: PolarDB for PostgreSQL cluster
- Redis: ApsaraDB for Redis instance or self-managed Redis database
- DRDS: PolarDB-X 1.0 or PolarDB-X 2.0 instance
- PostgreSQL: self-managed PostgreSQL database
- odps: MaxCompute project
- oracle: self-managed Oracle database
- mongodb: ApsaraDB for MongoDB instance or self-managed MongoDB database
- tidb: TiDB database
- ADS: AnalyticDB for MySQL V2.0 cluster
- ADB30: AnalyticDB for MySQL V3.0 cluster
- Greenplum: AnalyticDB for PostgreSQL instance
- MSSQL: ApsaraDB RDS for SQL Server instance or self-managed SQL Server database
- kafka: Message Queue for Apache Kafka instance or self-managed Kafka cluster
- DataHub: DataHub project
- DB2: self-managed Db2 for LUW database
- as400: AS/400
- Tablestore: Tablestore instance Note: The default value is MySQL. You must specify one of this parameter and the JobId parameter.
sourceRegionOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property sourceRegion: The ID of the region in which the source instance resides.
Note: You must specify one of this parameter and the JobId parameter.
syncArchitectureOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property syncArchitecture: The synchronization topology.
Valid values:
- oneway: one-way synchronization. This is the default value.
- bidirectional: two-way synchronization.
usedTimeOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property usedTime: The subscription duration.
- Valid values if Period is set to Month: 1, 2, 3, 4, 5, 6, 7, 8, and 9.
- Valid values if Period is set to Year: 1, 2, 3, and 5.
- This parameter is valid and required only if PayType is set to PrePaid.
- You can configure Period to specify the unit of the subscription duration.
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of this construct. |
synthesize | Allows this construct to emit artifacts into the cloud assembly during synthesis. |
addCondition | No description. |
addCount | No description. |
addDependency | No description. |
addResourceDesc | No description. |
applyRemovalPolicy | No description. |
fetchCondition | No description. |
fetchDependency | No description. |
fetchResourceDesc | No description. |
getAtt | No description. |
setMetadata | No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
synthesize
public void synthesize(ISynthesisSession session)
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.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
fetchCondition
public RosCondition fetchCondition()
fetchDependency
public java.util.List<java.lang.String> fetchDependency()
fetchResourceDesc
public java.lang.String fetchResourceDesc()
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
| Name | Description |
|---|---|
isConstruct | Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.dts.Instance;
Instance.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node | com.aliyun.ros.cdk.core.ConstructNode | The construct tree node associated with this construct. |
env | com.aliyun.ros.cdk.core.IResourceEnvironment | The environment this resource belongs to. |
ref | java.lang.String | No description. |
stack | com.aliyun.ros.cdk.core.Stack | The stack in which this resource is defined. |
resource | com.aliyun.ros.cdk.core.RosResource | No description. |
attrInstanceId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InstanceId: The ID of the DTS instance. |
attrJobId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute JobId: The ID of the task. |
props | InstanceProps | No description. |
nodeRequired
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
envRequired
public IResourceEnvironment getEnv();
- Type: com.aliyun.ros.cdk.core.IResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
refRequired
public java.lang.String getRef();
- Type: java.lang.String
stackRequired
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resourceOptional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrInstanceIdRequired
public java.lang.Object getAttrInstanceId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute InstanceId: The ID of the DTS instance.
attrJobIdRequired
public java.lang.Object getAttrJobId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute JobId: The ID of the task.
propsRequired
public InstanceProps getProps();
- Type: InstanceProps