Instance
This class encapsulates and extends the ROS resource type ALIYUN::DTS::Instance
, which is a new resource type that is used to create a Data Transmission Service (DTS) instance.
Initializers
import ros_cdk_dts
ros_cdk_dts.Instance(
scope: Construct,
id: str,
instance_class: typing.Union[str, IResolvable],
pay_type: typing.Union[str, IResolvable],
type: typing.Union[str, IResolvable],
auto_pay: typing.Union[bool, IResolvable] = None,
auto_start: typing.Union[bool, IResolvable] = None,
compute_unit: typing.Union[typing.Union[int, float], IResolvable] = None,
database_count: typing.Union[typing.Union[int, float], IResolvable] = None,
destination_endpoint_engine_name: typing.Union[str, IResolvable] = None,
destination_region: typing.Union[str, IResolvable] = None,
du: typing.Union[typing.Union[int, float], IResolvable] = None,
fee_type: typing.Union[str, IResolvable] = None,
job_id: typing.Union[str, IResolvable] = None,
period: typing.Union[str, IResolvable] = None,
resource_group_id: typing.Union[str, IResolvable] = None,
source_endpoint_engine_name: typing.Union[str, IResolvable] = None,
source_region: typing.Union[str, IResolvable] = None,
sync_architecture: typing.Union[str, IResolvable] = None,
used_time: typing.Union[typing.Union[int, float], IResolvable] = None,
enable_resource_property_constraint: bool = None
)
Name | Type | Description |
---|---|---|
scope |
ros_cdk_core.Construct |
No description. |
id |
str |
No description. |
instance_class |
typing.Union[str, ros_cdk_core.IResolvable] |
Property instanceClass: The instance class. |
pay_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property payType: The billing method. |
type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property type: The type of the DTS instance. |
auto_pay |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property autoPay: Specifies whether to automatically renew the DTS instance when it expires. |
auto_start |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property autoStart: Specifies whether to automatically start the task after the DTS instance is purchased. |
compute_unit |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property computeUnit: The specifications of the extract, transform, and load (ETL) instance. |
database_count |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property databaseCount: The number of private custom ApsaraDB RDS instances in a PolarDB-X instance. |
destination_endpoint_engine_name |
typing.Union[str, ros_cdk_core.IResolvable] |
Property destinationEndpointEngineName: The database engine of the destination instance. |
destination_region |
typing.Union[str, ros_cdk_core.IResolvable] |
Property destinationRegion: The ID of the region in which the destination instance resides. |
du |
typing.Union[typing.Union[int, float], 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. |
fee_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property feeType: The billing type for a change tracking instance. |
job_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property jobId: The ID of the task. |
period |
typing.Union[str, ros_cdk_core.IResolvable] |
Property period: The unit of the subscription duration. |
resource_group_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property resourceGroupId: The ID of the resource group. |
source_endpoint_engine_name |
typing.Union[str, ros_cdk_core.IResolvable] |
Property sourceEndpointEngineName: The database engine of the source instance. |
source_region |
typing.Union[str, ros_cdk_core.IResolvable] |
Property sourceRegion: The ID of the region in which the source instance resides. |
sync_architecture |
typing.Union[str, ros_cdk_core.IResolvable] |
Property syncArchitecture: The synchronization topology. |
used_time |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property usedTime: The subscription duration. |
enable_resource_property_constraint |
bool |
No description. |
scope
Required
- Type: ros_cdk_core.Construct
id
Required
- Type: str
instance_class
Required
- Type: typing.Union[str, 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.
pay_type
Required
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property payType: The billing method.
Valid values:
- PrePaid: subscription
- PostPaid: pay-as-you-go
type
Required
- Type: typing.Union[str, 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
auto_pay
Optional
- Type: typing.Union[bool, 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.
auto_start
Optional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property autoStart: Specifies whether to automatically start the task after the DTS instance is purchased.
Valid values:
- false: does not automatically start the task after the DTS instance is purchased. This is the default value.
- true: automatically starts the task after the DTS instance is purchased.
compute_unit
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property computeUnit: The specifications 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.
database_count
Optional
- Type: typing.Union[typing.Union[int, float], 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.
destination_endpoint_engine_name
Optional
- Type: typing.Union[str, 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.
destination_region
Optional
- Type: typing.Union[str, 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.
du
Optional
- Type: typing.Union[typing.Union[int, float], 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.
fee_type
Optional
- Type: typing.Union[str, 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.
job_id
Optional
- Type: typing.Union[str, 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.
period
Optional
- Type: typing.Union[str, 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.
resource_group_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property resourceGroupId: The ID of the resource group.
source_endpoint_engine_name
Optional
- Type: typing.Union[str, 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.
source_region
Optional
- Type: typing.Union[str, 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.
sync_architecture
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property syncArchitecture: The synchronization topology.
Valid values:
- oneway: one-way synchronization. This is the default value.
- bidirectional: two-way synchronization.
used_time
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property usedTime: The subscription duration.
- Valid values if the Period parameter is set to Month: 1, 2, 3, 4, 5, 6, 7, 8, and 9.
- Valid values if the Period parameter is set to Year: 1, 2, 3, and 5. Note: You must specify this parameter only if the PayType parameter is set to PrePaid. You can set the Period parameter to specify the unit of the subscription duration.
enable_resource_property_constraint
Optional
- 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.
- Type: ros_cdk_core.ISynthesisSession
The synthesis session.
add_condition
def add_condition(
condition: RosCondition
) -> None
- Type: ros_cdk_core.RosCondition
add_count
def add_count(
count: typing.Union[typing.Union[int, float], IResolvable]
) -> None
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
add_dependency
def add_dependency(
resource: Resource
) -> None
- Type: ros_cdk_core.Resource
add_resource_desc
def add_resource_desc(
desc: str
) -> None
- Type: str
apply_removal_policy
def apply_removal_policy(
policy: RemovalPolicy
) -> None
- Type: ros_cdk_core.RemovalPolicy
get_att
def get_att(
name: str
) -> IResolvable
- Type: str
set_metadata
def set_metadata(
key: str,
value: typing.Any
) -> None
- Type: str
- Type: typing.Any
Static Functions
Name | Description |
---|---|
is_construct |
Return whether the given object is a Construct. |
is_construct
import ros_cdk_dts
ros_cdk_dts.Instance.is_construct(
x: typing.Any
)
Return whether the given object is a Construct.
- 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_instance_id |
ros_cdk_core.IResolvable |
Attribute InstanceId: The ID of the DTS instance. |
attr_job_id |
ros_cdk_core.IResolvable |
Attribute JobId: The ID of the task. |
node
Required
node: ConstructNode
- Type: ros_cdk_core.ConstructNode
The construct tree node associated with this construct.
ref
Required
ref: str
- Type: str
stack
Required
stack: Stack
- Type: ros_cdk_core.Stack
The stack in which this resource is defined.
resource
Optional
resource: RosResource
- Type: ros_cdk_core.RosResource
attr_instance_id
Required
attr_instance_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute InstanceId: The ID of the DTS instance.
attr_job_id
Required
attr_job_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute JobId: The ID of the task.