Instance2
This class encapsulates and extends the ROS resource type ALIYUN::DMS::Instance2
.
Initializers
import com.aliyun.ros.cdk.dms.Instance2;
Instance2.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.databasePassword(java.lang.String)
.databasePassword(IResolvable)
.databaseUser(java.lang.String)
.databaseUser(IResolvable)
.dbaId(java.lang.Number)
.dbaId(IResolvable)
.enableSellTrust(java.lang.String)
.enableSellTrust(IResolvable)
.envType(java.lang.String)
.envType(IResolvable)
.exportTimeout(java.lang.Number)
.exportTimeout(IResolvable)
.host(java.lang.String)
.host(IResolvable)
.instanceAlias(java.lang.String)
.instanceAlias(IResolvable)
.instanceSource(java.lang.String)
.instanceSource(IResolvable)
.instanceType(java.lang.String)
.instanceType(IResolvable)
.networkType(java.lang.String)
.networkType(IResolvable)
.port(java.lang.Number)
.port(IResolvable)
.queryTimeout(java.lang.Number)
.queryTimeout(IResolvable)
.safeRule(java.lang.String)
.safeRule(IResolvable)
// .dataLinkName(java.lang.String)
// .dataLinkName(IResolvable)
// .ddlOnline(java.lang.Number)
// .ddlOnline(IResolvable)
// .ecsInstanceId(java.lang.String)
// .ecsInstanceId(IResolvable)
// .ecsRegion(java.lang.String)
// .ecsRegion(IResolvable)
// .enableSellCommon(java.lang.String)
// .enableSellCommon(IResolvable)
// .enableSellSitd(java.lang.String)
// .enableSellSitd(IResolvable)
// .enableSellStable(java.lang.String)
// .enableSellStable(IResolvable)
// .sid(java.lang.String)
// .sid(IResolvable)
// .skipTest(java.lang.Boolean)
// .skipTest(IResolvable)
// .templateId(java.lang.Number)
// .templateId(IResolvable)
// .templateType(java.lang.String)
// .templateType(IResolvable)
// .tid(java.lang.Number)
// .tid(IResolvable)
// .useDsql(java.lang.Number)
// .useDsql(IResolvable)
// .useSsl(java.lang.Number)
// .useSsl(IResolvable)
// .vpcId(java.lang.String)
// .vpcId(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. |
databasePassword |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property databasePassword: The logon password of the database instance. |
databaseUser |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property databaseUser: The logon username of the database instance. |
dbaId |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property dbaId: The user ID of the instance DBA role. |
enableSellTrust |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property enableSellTrust: Whether the instance needs to enable secure hosting. |
envType |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property envType: The type of the environment to which the database instance belongs. |
exportTimeout |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property exportTimeout: The timeout period for exporting the database instance. |
host |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property host: The endpoint of the database instance. |
instanceAlias |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property instanceAlias: The alias of the database instance. |
instanceSource |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property instanceSource: The source of the database instance. |
instanceType |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property instanceType: The type of the database instance. |
networkType |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property networkType: The network type of the database instance. |
port |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property port: The connection port of the database instance. |
queryTimeout |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property queryTimeout: The timeout period for querying the database instance. |
safeRule |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property safeRule: The security rule of the database instance. |
dataLinkName |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property dataLinkName: The name of the data link for cross-database query. |
ddlOnline |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property ddlOnline: [Important] Specifies whether to enable the online data description language (DDL) service. |
ecsInstanceId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property ecsInstanceId: The ID of the ECS instance to which the database instance belongs. |
ecsRegion |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property ecsRegion: The region where the database instance resides. |
enableSellCommon |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property enableSellCommon: Whether the instance needs to enable the security collaboration function. |
enableSellSitd |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property enableSellSitd: Y: enables the sensitive data protection feature NULL or other: disables the sensitive data protection feature. |
enableSellStable |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property enableSellStable: Whether the instance needs to enable the stable change function. |
sid |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property sid: The system ID (SID) of the database instance. |
skipTest |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property skipTest: Whether the instance ignores the test connectivity. |
templateId |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property templateId: The ID of the classification template. |
templateType |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property templateType: The type of the classification template. |
tid |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property tid: The ID of the tenant. |
useDsql |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property useDsql: Specifies whether to enable cross-database query for the database instance. |
useSsl |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property useSsl: Select whether to enable SSL connection. |
vpcId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property vpcId: The ID of the VPC to which the database instance belongs. |
scope
Required
- Type: com.aliyun.ros.cdk.core.Construct
id
Required
- Type: java.lang.String
enableResourcePropertyConstraint
Optional
- Type: java.lang.Boolean
databasePassword
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property databasePassword: The logon password of the database instance.
databaseUser
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property databaseUser: The logon username of the database instance.
dbaId
Required
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property dbaId: The user ID of the instance DBA role.
You can call the ListUsers or GetInstance operation to obtain the value of this parameter.
enableSellTrust
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property enableSellTrust: Whether the instance needs to enable secure hosting.
- Y: Enable secure hosting mode.
- NULL or other: Do not enable secure hosting mode.
envType
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property envType: The type of the environment to which the database instance belongs.
Valid values: product: the production environment. dev: the test environment.
exportTimeout
Required
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property exportTimeout: The timeout period for exporting the database instance.
Unit: seconds.
host
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property host: The endpoint of the database instance.
instanceAlias
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property instanceAlias: The alias of the database instance.
The alias helps you quickly find the required instance.
instanceSource
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property instanceSource: The source of the database instance.
Valid values: PUBLIC_OWN: an on-premises database built on the public network. RDS: an ApsaraDB for RDS (RDS) instance. ECS_OWN: an on-premises database built on an Elastic Compute Service (ECS) instance. VPC_IDC: an on-premises database built in an Internet data center (IDC) in Virtual Private Cloud (VPC).
instanceType
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property instanceType: The type of the database instance.
Valid values: MySQL, SQLServer, PostgreSQL, Oracle, DRDS, OceanBase, Mongo, Redis
networkType
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property networkType: The network type of the database instance.
Valid values: CLASSIC VPC
port
Required
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property port: The connection port of the database instance.
queryTimeout
Required
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property queryTimeout: The timeout period for querying the database instance.
Unit: seconds.
safeRule
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property safeRule: The security rule of the database instance.
Enter the name of the security rule for your enterprise. Note To query a specified security rule, log on to the DMS Enterprise console and choose System Management > Security Rules. The security rule appears in the security rule list.
dataLinkName
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property dataLinkName: The name of the data link for cross-database query.
ddlOnline
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property ddlOnline: [Important] Specifies whether to enable the online data description language (DDL) service.
Currently, this service is available only for the MySQL and PolarDB databases. 0: The service is disabled. 1: The native online DDL service prevails. 2: Data change without table locking provided by DMS prevails.
ecsInstanceId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property ecsInstanceId: The ID of the ECS instance to which the database instance belongs.
Note You must specify this parameter if the InstanceSource parameter is set to ECS_OWN.
ecsRegion
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property ecsRegion: The region where the database instance resides.
Note You must specify this parameter if the InstanceSource parameter is set to ECS_OWN or VPC_IDC.
enableSellCommon
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property enableSellCommon: Whether the instance needs to enable the security collaboration function.
- Y: Enable.
- NULL or other: Not enable.
enableSellSitd
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property enableSellSitd: Y: enables the sensitive data protection feature NULL or other: disables the sensitive data protection feature.
enableSellStable
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property enableSellStable: Whether the instance needs to enable the stable change function.
- Y: Enable.
- NULL or other: Do not enable.
sid
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property sid: The system ID (SID) of the database instance.
Note You must specify this parameter if the InstanceType parameter is set to PostgreSQL or Oracle.
skipTest
Optional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property skipTest: Whether the instance ignores the test connectivity.
The values are as follows:
- true: ignore
- false: do not ignore
templateId
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property templateId: The ID of the classification template.
You can call the ListClassificationTemplates operation to query the template ID.
templateType
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property templateType: The type of the classification template.
You can call the ListClassificationTemplates operation to query the template type.
tid
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property tid: The ID of the tenant.
Note To query the ID, log on to the DMS Enterprise console and choose System Management
Instance Management or System Management > User Management. The ID of the tenant appears in the Service Specification section.
useDsql
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property useDsql: Specifies whether to enable cross-database query for the database instance.
Valid values: 0: disabled 1: enabled
useSsl
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property useSsl: Select whether to enable SSL connection.
When enabled, DMS will connect to the database via SSL. The premise of using this parameter is that the database has enabled SSL connection. Currently, the following options are supported:
- 0: Default value (DMS and database service automatically negotiate whether to enable it) The system will automatically identify whether the target database has enabled SSL connection. If the database has enabled SSL connection, DMS will connect to the database via SSL; if the database has not enabled SSL connection, it will connect in a normal way.
- 1: Enable SSL connection. If the database has not enabled SSL connection, this parameter is invalid.
- -1: Disable SSL connection. Note:
- This configuration item only appears when the database is MySQL or Redis.
- SSL (Secure Sockets Layer) can encrypt network connections at the transport layer to improve the security and integrity of communication data, but it will increase the network connection response time.
vpcId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vpcId: The ID of the VPC to which the database instance belongs.
Note You must specify this parameter if the InstanceSource parameter is set to VPC_IDC.
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. |
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
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.dms.Instance2;
Instance2.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. |
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. |
attrHost |
com.aliyun.ros.cdk.core.IResolvable |
Attribute Host: The endpoint of the database instance. |
attrInstanceId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute InstanceId: The ID of the database instance. |
attrPort |
com.aliyun.ros.cdk.core.IResolvable |
Attribute Port: The connection port of the database instance. |
node
Required
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
ref
Required
public java.lang.String getRef();
- Type: java.lang.String
stack
Required
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resource
Optional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrHost
Required
public IResolvable getAttrHost();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute Host: The endpoint of the database instance.
attrInstanceId
Required
public IResolvable getAttrInstanceId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute InstanceId: The ID of the database instance.
attrPort
Required
public IResolvable getAttrPort();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute Port: The connection port of the database instance.