Skip to content

Instance2

This class encapsulates and extends the ROS resource type ALIYUN::DMS::Instance2.

Initializers

import ros_cdk_dms
ros_cdk_dms.Instance2(
  scope: Construct,
  id: str,
  database_password: typing.Union[str, IResolvable],
  database_user: typing.Union[str, IResolvable],
  dba_id: typing.Union[typing.Union[int, float], IResolvable],
  enable_sell_trust: typing.Union[str, IResolvable],
  env_type: typing.Union[str, IResolvable],
  export_timeout: typing.Union[typing.Union[int, float], IResolvable],
  host: typing.Union[str, IResolvable],
  instance_alias: typing.Union[str, IResolvable],
  instance_source: typing.Union[str, IResolvable],
  instance_type: typing.Union[str, IResolvable],
  network_type: typing.Union[str, IResolvable],
  port: typing.Union[typing.Union[int, float], IResolvable],
  query_timeout: typing.Union[typing.Union[int, float], IResolvable],
  safe_rule: typing.Union[str, IResolvable],
  data_link_name: typing.Union[str, IResolvable] = None,
  ddl_online: typing.Union[typing.Union[int, float], IResolvable] = None,
  ecs_instance_id: typing.Union[str, IResolvable] = None,
  ecs_region: typing.Union[str, IResolvable] = None,
  enable_sell_common: typing.Union[str, IResolvable] = None,
  enable_sell_sitd: typing.Union[str, IResolvable] = None,
  enable_sell_stable: typing.Union[str, IResolvable] = None,
  sid: typing.Union[str, IResolvable] = None,
  skip_test: typing.Union[bool, IResolvable] = None,
  template_id: typing.Union[typing.Union[int, float], IResolvable] = None,
  template_type: typing.Union[str, IResolvable] = None,
  tid: typing.Union[typing.Union[int, float], IResolvable] = None,
  use_dsql: typing.Union[typing.Union[int, float], IResolvable] = None,
  use_ssl: typing.Union[typing.Union[int, float], IResolvable] = None,
  vpc_id: typing.Union[str, IResolvable] = None,
  enable_resource_property_constraint: bool = None
)
Name Type Description
scope ros_cdk_core.Construct No description.
id str No description.
database_password typing.Union[str, ros_cdk_core.IResolvable] Property databasePassword: The logon password of the database instance.
database_user typing.Union[str, ros_cdk_core.IResolvable] Property databaseUser: The logon username of the database instance.
dba_id typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property dbaId: The user ID of the instance DBA role.
enable_sell_trust typing.Union[str, ros_cdk_core.IResolvable] Property enableSellTrust: Whether the instance needs to enable secure hosting.
env_type typing.Union[str, ros_cdk_core.IResolvable] Property envType: The type of the environment to which the database instance belongs.
export_timeout typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property exportTimeout: The timeout period for exporting the database instance.
host typing.Union[str, ros_cdk_core.IResolvable] Property host: The endpoint of the database instance.
instance_alias typing.Union[str, ros_cdk_core.IResolvable] Property instanceAlias: The alias of the database instance.
instance_source typing.Union[str, ros_cdk_core.IResolvable] Property instanceSource: The source of the database instance.
instance_type typing.Union[str, ros_cdk_core.IResolvable] Property instanceType: The type of the database instance.
network_type typing.Union[str, ros_cdk_core.IResolvable] Property networkType: The network type of the database instance.
port typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property port: The connection port of the database instance.
query_timeout typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property queryTimeout: The timeout period for querying the database instance.
safe_rule typing.Union[str, ros_cdk_core.IResolvable] Property safeRule: The security rule of the database instance.
data_link_name typing.Union[str, ros_cdk_core.IResolvable] Property dataLinkName: The name of the data link for cross-database query.
ddl_online typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property ddlOnline: [Important] Specifies whether to enable the online data description language (DDL) service.
ecs_instance_id typing.Union[str, ros_cdk_core.IResolvable] Property ecsInstanceId: The ID of the ECS instance to which the database instance belongs.
ecs_region typing.Union[str, ros_cdk_core.IResolvable] Property ecsRegion: The region where the database instance resides.
enable_sell_common typing.Union[str, ros_cdk_core.IResolvable] Property enableSellCommon: Whether the instance needs to enable the security collaboration function.
enable_sell_sitd typing.Union[str, ros_cdk_core.IResolvable] Property enableSellSitd: Y: enables the sensitive data protection feature NULL or other: disables the sensitive data protection feature.
enable_sell_stable typing.Union[str, ros_cdk_core.IResolvable] Property enableSellStable: Whether the instance needs to enable the stable change function.
sid typing.Union[str, ros_cdk_core.IResolvable] Property sid: The system ID (SID) of the database instance.
skip_test typing.Union[bool, ros_cdk_core.IResolvable] Property skipTest: Whether the instance ignores the test connectivity.
template_id typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property templateId: The ID of the classification template.
template_type typing.Union[str, ros_cdk_core.IResolvable] Property templateType: The type of the classification template.
tid typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property tid: The ID of the tenant.
use_dsql typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property useDsql: Specifies whether to enable cross-database query for the database instance.
use_ssl typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property useSsl: Select whether to enable SSL connection.
vpc_id typing.Union[str, ros_cdk_core.IResolvable] Property vpcId: The ID of the VPC to which the database instance belongs.
enable_resource_property_constraint bool No description.

scopeRequired

  • Type: ros_cdk_core.Construct

idRequired

  • Type: str

database_passwordRequired

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

Property databasePassword: The logon password of the database instance.


database_userRequired

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

Property databaseUser: The logon username of the database instance.


dba_idRequired

  • Type: typing.Union[typing.Union[int, float], 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.


enable_sell_trustRequired

  • Type: typing.Union[str, 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.

env_typeRequired

  • Type: typing.Union[str, 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.


export_timeoutRequired

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

Property exportTimeout: The timeout period for exporting the database instance.

Unit: seconds.


hostRequired

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

Property host: The endpoint of the database instance.


instance_aliasRequired

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

Property instanceAlias: The alias of the database instance.

The alias helps you quickly find the required instance.


instance_sourceRequired

  • Type: typing.Union[str, 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).


instance_typeRequired

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

Property instanceType: The type of the database instance.

Valid values: MySQL, SQLServer, PostgreSQL, Oracle, DRDS, OceanBase, Mongo, Redis


network_typeRequired

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

Property networkType: The network type of the database instance.

Valid values: CLASSIC VPC


portRequired

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

Property port: The connection port of the database instance.


query_timeoutRequired

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

Property queryTimeout: The timeout period for querying the database instance.

Unit: seconds.


safe_ruleRequired

  • Type: typing.Union[str, 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.


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

Property dataLinkName: The name of the data link for cross-database query.


ddl_onlineOptional

  • Type: typing.Union[typing.Union[int, float], 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.


ecs_instance_idOptional

  • Type: typing.Union[str, 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.


ecs_regionOptional

  • Type: typing.Union[str, 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.


enable_sell_commonOptional

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

Property enableSellCommon: Whether the instance needs to enable the security collaboration function.

  • Y: Enable.
  • NULL or other: Not enable.

enable_sell_sitdOptional

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

Property enableSellSitd: Y: enables the sensitive data protection feature NULL or other: disables the sensitive data protection feature.


enable_sell_stableOptional

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

Property enableSellStable: Whether the instance needs to enable the stable change function.

  • Y: Enable.
  • NULL or other: Do not enable.

sidOptional

  • Type: typing.Union[str, 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.


skip_testOptional

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

Property skipTest: Whether the instance ignores the test connectivity.

The values are as follows:

  • true: ignore
  • false: do not ignore

template_idOptional

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

Property templateId: The ID of the classification template.

You can call the ListClassificationTemplates operation to query the template ID.


template_typeOptional

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

Property templateType: The type of the classification template.

You can call the ListClassificationTemplates operation to query the template type.


tidOptional

  • Type: typing.Union[typing.Union[int, float], 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.


use_dsqlOptional

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

Property useDsql: Specifies whether to enable cross-database query for the database instance.

Valid values: 0: disabled 1: enabled


use_sslOptional

  • Type: typing.Union[typing.Union[int, float], 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.

vpc_idOptional

  • Type: typing.Union[str, 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.


enable_resource_property_constraintOptional

  • Type: bool

Methods

Name Description
to_string Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
add_condition No description.
add_count No description.
add_dependency No description.
add_resource_desc No description.
apply_removal_policy No description.
get_att No description.
set_metadata No description.

to_string

def to_string() -> str

Returns a string representation of this construct.

synthesize

def synthesize(
  session: ISynthesisSession
) -> None

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.

sessionRequired

  • Type: ros_cdk_core.ISynthesisSession

The synthesis session.


add_condition

def add_condition(
  condition: RosCondition
) -> None

conditionRequired

  • Type: ros_cdk_core.RosCondition

add_count

def add_count(
  count: typing.Union[typing.Union[int, float], IResolvable]
) -> None

countRequired

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

add_dependency

def add_dependency(
  resource: Resource
) -> None

resourceRequired

  • Type: ros_cdk_core.Resource

add_resource_desc

def add_resource_desc(
  desc: str
) -> None

descRequired

  • Type: str

apply_removal_policy

def apply_removal_policy(
  policy: RemovalPolicy
) -> None

policyRequired

  • Type: ros_cdk_core.RemovalPolicy

get_att

def get_att(
  name: str
) -> IResolvable

nameRequired

  • Type: str

set_metadata

def set_metadata(
  key: str,
  value: typing.Any
) -> None

keyRequired

  • Type: str

valueRequired

  • Type: typing.Any

Static Functions

Name Description
is_construct Return whether the given object is a Construct.

is_construct

import ros_cdk_dms
ros_cdk_dms.Instance2.is_construct(
  x: typing.Any
)

Return whether the given object is a Construct.

xRequired

  • Type: typing.Any

Properties

Name Type Description
node ros_cdk_core.ConstructNode The construct tree node associated with this construct.
ref str No description.
stack ros_cdk_core.Stack The stack in which this resource is defined.
resource ros_cdk_core.RosResource No description.
attr_host ros_cdk_core.IResolvable Attribute Host: The endpoint of the database instance.
attr_instance_id ros_cdk_core.IResolvable Attribute InstanceId: The ID of the database instance.
attr_port ros_cdk_core.IResolvable Attribute Port: The connection port of the database instance.

nodeRequired

node: ConstructNode
  • Type: ros_cdk_core.ConstructNode

The construct tree node associated with this construct.


refRequired

ref: str
  • Type: str

stackRequired

stack: Stack
  • Type: ros_cdk_core.Stack

The stack in which this resource is defined.


resourceOptional

resource: RosResource
  • Type: ros_cdk_core.RosResource

attr_hostRequired

attr_host: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute Host: The endpoint of the database instance.


attr_instance_idRequired

attr_instance_id: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute InstanceId: The ID of the database instance.


attr_portRequired

attr_port: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute Port: The connection port of the database instance.