aws_ddk_core.resources.DMSFactory¶
- class aws_ddk_core.resources.DMSFactory¶
Class factory create and configure DMS DDK resources, including endpoints, replication tasks and replication instances.
- __init__()¶
Methods
__init__
()endpoint
(scope, id, environment_id, ...)Create and configure DMS endpoint.
endpoint_settings_s3
(scope, id, ...[, ...])Create and configure DMS endpoint settings for s3.
replication_instance
(scope, id, ...[, ...])Create and configure DMS replication instance.
replication_task
(scope, id, environment_id, ...)Create and configure DMS replication task.
- static endpoint(scope: constructs.Construct, id: str, environment_id: str, endpoint_type: str, engine_name: str, s3_settings: Optional[aws_cdk.aws_dms.CfnEndpoint.S3SettingsProperty], **endpoint_props: Any) aws_cdk.aws_dms.CfnEndpoint ¶
Create and configure DMS endpoint.
This construct allows to configure parameters of the dms endpoint using ddk.json configuration file depending on the environment_id in which the function is used. Supported parameters are: …
- Parameters
scope (Construct) – Scope within which this construct is defined
id (str) – Identifier of the destination
environment_id (str) – Identifier of the environment
endpoint_type (str) – The type of endpoint. Valid values are source and target.
engine_name (str) – The type of engine for the endpoint, depending on the EndpointType value. Valid values : mysql | oracle | postgres | mariadb | aurora | aurora-postgresql | opensearch | redshift | s3 | db2 | azuredb | sybase | dynamodb | mongodb | kinesis | kafka | elasticsearch | docdb | sqlserver | neptune
s3_settings (Union[dms.S3SettingsProperty, None]) – Settings in JSON format for the source and target Amazon S3 endpoint. For more information about other available settings, see https://docs.aws.amazon.com/cdk/api/v1/python/aws_cdk.aws_dms/CfnEndpoint.html#s3settingsproperty
**endpoint_props (Any) – Additional properties. For complete list of properties refer to CDK Documentation - DMS Endpoints: https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_dms/CfnEndpoint.html
- Returns
dms.CfnEndpoint – A DMS Endpoint
- Return type
dms.CfnEndpoint
- static endpoint_settings_s3(scope: constructs.Construct, id: str, environment_id: str, bucket_name: str, bucket_folder: Optional[str] = None, service_access_role_arn: Optional[str] = None, external_table_definition: Optional[str] = None, enable_statistics: Optional[bool] = None, max_file_size: Optional[int] = None, **endpoint_s3_props: Any) aws_cdk.aws_dms.CfnEndpoint.S3SettingsProperty ¶
Create and configure DMS endpoint settings for s3.
This construct allows to configure parameters of the dms endpoint using ddk.json configuration file depending on the environment_id in which the function is used. Supported parameters are: enable_statistics and max_file_size
- Parameters
scope (Construct) – Scope within which this construct is defined
id (str) – Identifier of the destination
environment_id (str) – Identifier of the environment
bucket_name (str) – The name of the S3 bucket.
bucket_folder (Optional[str]) – An optional parameter to set a folder name in the S3 bucket. If provided, tables are created in the path bucketFolder / schema_name / table_name / . If this parameter isn’t specified, the path used is schema_name / table_name / .
service_access_role_arn (Optional[str]) – An IAM role that should be able to access the specified bucket. If no bucket is specified a role with required permissions will be created for you.
external_table_definition (Optional[str]) – The external table definition. Conditional: If S3 is used as a source then ExternalTableDefinition is required.
enable_statistics (Optional[bool]) – A value that enables statistics for Parquet pages and row groups. Choose true to enable statistics, false to disable. Statistics include NULL , DISTINCT , MAX , and MIN values. This parameter defaults to true . This value is used for .parquet file format only.
max_file_size (Optional[int]) – A value that specifies the maximum size (in KB) of any .csv file to be created while migrating to an S3 target during full load
**endpoint_settings_s3_props (Any) – Additional properties. For complete list of properties refer to CDK Documentation - DMS Endpoints: https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_dms/CfnEndpoint.html#s3settingsproperty
- Returns
dms.CfnEndpoint.S3SettingsProperty – DMS Endpoint Settings for S3
- Return type
dms.CfnEndpoint.S3SettingsProperty:
- static replication_instance(scope: constructs.Construct, id: str, environment_id: str, replication_instance_class: str, allocated_storage: Optional[str] = None, allow_major_version_upgrade: Optional[bool] = False, auto_minor_version_upgrade: Optional[bool] = False, availability_zone: Optional[str] = None, engine_version: Optional[str] = None, kms_key_id: Optional[str] = None, multi_az: Optional[bool] = False, preferred_maintenance_window: Optional[str] = None, publicly_accessible: Optional[bool] = False, replication_instance_identifier: Optional[str] = None, replication_subnet_group_identifier: Optional[str] = None, resource_identifier: Optional[str] = None, vpc_security_group_ids: Optional[List[str]] = None, **replication_instance_props: Any) aws_cdk.aws_dms.CfnReplicationInstance ¶
Create and configure DMS replication instance.
This construct allows to configure parameters of the dms replication instance using ddk.json configuration file depending on the environment_id in which the function is used. Supported parameters are: …
- Parameters
scope (Construct) – Scope within which this construct is defined
id (str) – Identifier of the destination
environment_id (str) – Identifier of the environment
replication_instance_class (str) – The compute and memory capacity of the replication instance as defined for the specified replication instance class.
allocated_storage (Optional[str]) – The amount of storage (in gigabytes) to be initially allocated for the replication instance.
allow_major_version_upgrade (Optional[bool]) – Indicates that major version upgrades are allowed.
auto_minor_version_upgrade (Optional[bool]) – A value that indicates whether minor engine upgrades are applied automatically to the replication instance during the maintenance window. This parameter defaults to true. Default: true
availability_zone (Optional[str]) – The Availability Zone that the replication instance will be created in
engine_version (Optional[str]) – The engine version number of the replication instance. If an engine version number is not specified when a replication instance is created, the default is the latest engine version available.
kms_key_id (Optional[str]) – An AWS KMS key identifier that is used to encrypt the data on the replication instance. If you don’t specify a value for the KmsKeyId parameter, AWS DMS uses your default encryption key.
multi_az (Optional[bool]) – Specifies whether the replication instance is a Multi-AZ deployment. You can’t set the AvailabilityZone parameter if the Multi-AZ parameter is set to true.
preferred_maintenance_window (Optional[str]) – The weekly time range during which system maintenance can occur, in UTC. Format : ddd:hh24:mi-ddd:hh24:mi
publicly_accessible (Optional[bool]) – Specifies the accessibility options for the replication instance. A value of true represents an instance with a public IP address. A value of false represents an instance with a private IP address.
replication_instance_identifier (Optional[str]) – The replication instance identifier. This parameter is stored as a lowercase string.
replication_subnet_group_identifier (Optional[str]) – A subnet group to associate with the replication instance.
resource_identifier (Optional[str]) – A display name for the resource identifier at the end of the EndpointArn response parameter that is returned in the created Endpoint object. The value for this parameter can have up to 31 characters. It can contain only ASCII letters, digits, and hyphen (‘-‘)
vpc_security_group_ids (Optional[List[str]]) – Specifies the virtual private cloud (VPC) security group to be used with the replication instance. The VPC security group must work with the VPC containing the replication instance.
**replication_instance_props (Any) – Additional properties. For complete list of properties refer to CDK Documentation - DMS Endpoints: https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_dms/CfnReplicationInstance.html
- Returns
dms.CfnReplicationInstance – A DMS Replication instance
- Return type
dms.CfnReplicationInstance
- static replication_task(scope: constructs.Construct, id: str, environment_id: str, replication_instance_arn: str, source_endpoint_arn: str, target_endpoint_arn: str, table_mappings: str, migration_type: str = 'full-load', replication_task_settings: Optional[str] = None, **replication_task_props: Any) aws_cdk.aws_dms.CfnEndpoint ¶
Create and configure DMS replication task.
This construct allows to configure parameters of the dms replication task using ddk.json configuration file depending on the environment_id in which the function is used. Supported parameters are: …
- Parameters
scope (Construct) – Scope within which this construct is defined
id (str) – Identifier of the destination
environment_id (str) – Identifier of the environment
migration_type (str) – The migration type. Valid values: full-load | cdc | full-load-and-cdc Default: ‘full-load’
replication_instance_arn (str) – The Amazon Resource Name (ARN) of a replication instance.
source_endpoint_arn (str) – An Amazon Resource Name (ARN) that uniquely identifies the source endpoint.
target_endpoint_arn (str) – An Amazon Resource Name (ARN) that uniquely identifies the target endpoint.
table_mappings (str) – The table mappings for the task, in JSON format.
replication_task_settings (Optional[str]) – Overall settings for the task, in JSON format. For more information, see https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TaskSettings.html
**replication_task_props (Any) – Additional properties. For complete list of properties refer to CDK Documentation - DMS Endpoints: https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_dms/CfnReplicationTask.html
- Returns
dms.CfnReplicationTask – A DMS Replication Task
- Return type
dms.CfnReplicationTask