Skip to content

create_replication_config async

create_replication_config(
    replication_config_identifier: String,
    source_endpoint_arn: String,
    target_endpoint_arn: String,
    compute_config: ComputeConfig,
    replication_type: MigrationTypeValue,
    table_mappings: String,
    *,
    config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
    replication_settings: Optional[String] = None,
    supplemental_settings: Optional[String] = None,
    resource_identifier: Optional[String] = None,
    tags: Optional[TagList] = None,
) -> CreateReplicationConfigResponse

Creates a configuration that you can later provide to configure and start an DMS Serverless replication. You can also provide options to validate the configuration inputs before you start the replication.

Parameters:

  • replication_config_identifier (String) –

    A unique identifier that you want to use to create a ReplicationConfigArn that is returned as part of the output from this action. You can then pass this output ReplicationConfigArn as the value of the ReplicationConfigArn option for other actions to identify both DMS Serverless replications and replication configurations that you want those actions to operate on. For some actions, you can also use either this unique identifier or a corresponding ARN in action filters to identify the specific replication and replication configuration to operate on.

  • source_endpoint_arn (String) –

    The Amazon Resource Name (ARN) of the source endpoint for this DMS Serverless replication configuration.

  • target_endpoint_arn (String) –

    The Amazon Resource Name (ARN) of the target endpoint for this DMS serverless replication configuration.

  • compute_config (ComputeConfig) –

    Configuration parameters for provisioning an DMS Serverless replication.

  • replication_type (MigrationTypeValue) –

    The type of DMS Serverless replication to provision using this replication configuration.

    Possible values:

    • "full-load"

    • "cdc"

    • "full-load-and-cdc"

  • table_mappings (String) –

    JSON table mappings for DMS Serverless replications that are provisioned using this replication configuration. For more information, see Specifying table selection and transformations rules using JSON.

  • replication_settings (Optional[String], default: None ) –

    Optional JSON settings for DMS Serverless replications that are provisioned using this replication configuration. For example, see Change processing tuning settings.

  • supplemental_settings (Optional[String], default: None ) –

    Optional JSON settings for specifying supplemental data. For more information, see Specifying supplemental data for task settings.

  • resource_identifier (Optional[String], default: None ) –

    Optional unique value or name that you set for a given resource that can be used to construct an Amazon Resource Name (ARN) for that resource. For more information, see Fine-grained access control using resource names and tags.

  • tags (Optional[TagList], default: None ) –

    One or more optional tags associated with resources used by the DMS Serverless replication. For more information, see Tagging resources in Database Migration Service.

Raises:

Source code in docs_src/capo_database_migration_service/_services/async_database_migration_service.py
async def create_replication_config(
    self,
    replication_config_identifier: "capo_database_migration_service.types.string.String",
    source_endpoint_arn: "capo_database_migration_service.types.string.String",
    target_endpoint_arn: "capo_database_migration_service.types.string.String",
    compute_config: "capo_database_migration_service.types.compute_config.ComputeConfig",
    replication_type: "capo_database_migration_service.types.migration_type_value.MigrationTypeValue",
    table_mappings: "capo_database_migration_service.types.string.String",
    *,
    config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
    replication_settings: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    supplemental_settings: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    resource_identifier: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    tags: Optional["capo_database_migration_service.types.tag_list.TagList"] = None,
) -> "capo_database_migration_service.types.create_replication_config_response.CreateReplicationConfigResponse":
    """<p>Creates a configuration that you can later provide to configure and start an DMS Serverless replication. You can also provide options to validate the configuration inputs before you start the replication.</p>

    Args:
        replication_config_identifier: <p>A unique identifier that you want to use to create a <code>ReplicationConfigArn</code> that is returned as part of the output from this action. You can then pass this output <code>ReplicationConfigArn</code> as the value of the <code>ReplicationConfigArn</code> option for other actions to identify both DMS Serverless replications and replication configurations that you want those actions to operate on. For some actions, you can also use either this unique identifier or a corresponding ARN in action filters to identify the specific replication and replication configuration to operate on.</p>
        source_endpoint_arn: <p>The Amazon Resource Name (ARN) of the source endpoint for this DMS Serverless replication configuration.</p>
        target_endpoint_arn: <p>The Amazon Resource Name (ARN) of the target endpoint for this DMS serverless replication configuration.</p>
        compute_config: <p>Configuration parameters for provisioning an DMS Serverless replication.</p>
        replication_type: <p>The type of DMS Serverless replication to provision using this replication configuration.</p> <p>Possible values:</p> <ul> <li> <p> <code>"full-load"</code> </p> </li> <li> <p> <code>"cdc"</code> </p> </li> <li> <p> <code>"full-load-and-cdc"</code> </p> </li> </ul>
        table_mappings: <p>JSON table mappings for DMS Serverless replications that are provisioned using this replication configuration. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.html"> Specifying table selection and transformations rules using JSON</a>.</p>
        replication_settings: <p>Optional JSON settings for DMS Serverless replications that are provisioned using this replication configuration. For example, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TaskSettings.ChangeProcessingTuning.html"> Change processing tuning settings</a>.</p>
        supplemental_settings: <p>Optional JSON settings for specifying supplemental data. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.TaskData.html"> Specifying supplemental data for task settings</a>.</p>
        resource_identifier: <p>Optional unique value or name that you set for a given resource that can be used to construct an Amazon Resource Name (ARN) for that resource. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.html#CHAP_Security.FineGrainedAccess"> Fine-grained access control using resource names and tags</a>.</p>
        tags: <p>One or more optional tags associated with resources used by the DMS Serverless replication. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tagging.html"> Tagging resources in Database Migration Service</a>.</p>

    Raises:
        capo_database_migration_service.errors.access_denied_fault.AccessDeniedFault: <p>DMS was denied access to the endpoint. Check that the role is correctly configured.</p>
        capo_database_migration_service.errors.invalid_resource_state_fault.InvalidResourceStateFault: <p>The resource is in a state that prevents it from being used for database migration.</p>
        capo_database_migration_service.errors.invalid_subnet.InvalidSubnet: <p>The subnet provided isn't valid.</p>
        capo_database_migration_service.errors.kms_key_not_accessible_fault.KMSKeyNotAccessibleFault: <p>DMS cannot access the KMS key.</p>
        capo_database_migration_service.errors.replication_subnet_group_does_not_cover_enough_a_zs.ReplicationSubnetGroupDoesNotCoverEnoughAZs: <p>The replication subnet group does not cover enough Availability Zones (AZs). Edit the replication subnet group and add more AZs.</p>
        capo_database_migration_service.errors.resource_already_exists_fault.ResourceAlreadyExistsFault: <p>The resource you are attempting to create already exists.</p>
        capo_database_migration_service.errors.resource_not_found_fault.ResourceNotFoundFault: <p>The resource could not be found.</p>
        capo_database_migration_service.errors.resource_quota_exceeded_fault.ResourceQuotaExceededFault: <p>The quota for this resource quota has been exceeded.</p>
        capo_database_migration_service.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_database_migration_service.types.create_replication_config_message.CreateReplicationConfigMessage]",
    ) -> AsyncOperationResponse[
        "capo_database_migration_service.types.create_replication_config_response.CreateReplicationConfigResponse"
    ]:
        import capo_database_migration_service._operations.amazon_dm_sv20160101.create_replication_config

        (
            output,
            http_response,
        ) = await capo_database_migration_service._operations.amazon_dm_sv20160101.create_replication_config.async_create_replication_config(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateReplicationConfig")
    )
    input_: capo_database_migration_service.types.create_replication_config_message.CreateReplicationConfigMessage = {
        "replication_config_identifier": replication_config_identifier,
        "source_endpoint_arn": source_endpoint_arn,
        "target_endpoint_arn": target_endpoint_arn,
        "compute_config": compute_config,
        "replication_type": replication_type,
        "table_mappings": table_mappings,
    }
    if replication_settings is not None:
        input_["replication_settings"] = replication_settings
    if supplemental_settings is not None:
        input_["supplemental_settings"] = supplemental_settings
    if resource_identifier is not None:
        input_["resource_identifier"] = resource_identifier
    if tags is not None:
        input_["tags"] = tags

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output