Skip to content

modify_replication_config

modify_replication_config(
    replication_config_arn: String,
    *,
    config_overrides: Optional[DatabaseMigrationServiceClientConfig] = None,
    replication_config_identifier: Optional[String] = None,
    replication_type: Optional[MigrationTypeValue] = None,
    table_mappings: Optional[String] = None,
    replication_settings: Optional[String] = None,
    supplemental_settings: Optional[String] = None,
    compute_config: Optional[ComputeConfig] = None,
    source_endpoint_arn: Optional[String] = None,
    target_endpoint_arn: Optional[String] = None,
) -> ModifyReplicationConfigResponse

Modifies an existing DMS Serverless replication configuration that you can use to start a replication. This command includes input validation and logic to check the state of any replication that uses this configuration. You can only modify a replication configuration before any replication that uses it has started. As soon as you have initially started a replication with a given configuiration, you can't modify that configuration, even if you stop it.

Other run statuses that allow you to run this command include FAILED and CREATED. A provisioning state that allows you to run this command is FAILED_PROVISION.

Parameters:

  • replication_config_arn (String) –

    The Amazon Resource Name of the replication to modify.

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

    The new replication config to apply to the replication.

  • replication_type (Optional[MigrationTypeValue], default: None ) –

    The type of replication.

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

    Table mappings specified in the replication.

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

    The settings for the replication.

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

    Additional settings for the replication.

  • compute_config (Optional[ComputeConfig], default: None ) –

    Configuration parameters for provisioning an DMS Serverless replication.

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

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

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

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

Raises:

Source code in docs_src/capo_database_migration_service/_services/database_migration_service.py
def modify_replication_config(
    self,
    replication_config_arn: "capo_database_migration_service.types.string.String",
    *,
    config_overrides: Optional[DatabaseMigrationServiceClientConfig] = None,
    replication_config_identifier: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    replication_type: Optional[
        "capo_database_migration_service.types.migration_type_value.MigrationTypeValue"
    ] = None,
    table_mappings: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    replication_settings: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    supplemental_settings: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    compute_config: Optional[
        "capo_database_migration_service.types.compute_config.ComputeConfig"
    ] = None,
    source_endpoint_arn: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    target_endpoint_arn: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
) -> "capo_database_migration_service.types.modify_replication_config_response.ModifyReplicationConfigResponse":
    """<p>Modifies an existing DMS Serverless replication configuration that you can use to start a replication. This command includes input validation and logic to check the state of any replication that uses this configuration. You can only modify a replication configuration before any replication that uses it has started. As soon as you have initially started a replication with a given configuiration, you can't modify that configuration, even if you stop it.</p> <p>Other run statuses that allow you to run this command include FAILED and CREATED. A provisioning state that allows you to run this command is FAILED_PROVISION.</p>

    Args:
        replication_config_arn: <p>The Amazon Resource Name of the replication to modify.</p>
        replication_config_identifier: <p>The new replication config to apply to the replication.</p>
        replication_type: <p>The type of replication.</p>
        table_mappings: <p>Table mappings specified in the replication.</p>
        replication_settings: <p>The settings for the replication.</p>
        supplemental_settings: <p>Additional settings for the replication.</p>
        compute_config: <p>Configuration parameters for provisioning an DMS Serverless replication.</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>

    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_not_found_fault.ResourceNotFoundFault: <p>The resource could not be found.</p>
        capo_database_migration_service.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_database_migration_service.types.modify_replication_config_message.ModifyReplicationConfigMessage]",
    ) -> OperationResponse[
        "capo_database_migration_service.types.modify_replication_config_response.ModifyReplicationConfigResponse"
    ]:
        import capo_database_migration_service._operations.amazon_dm_sv20160101.modify_replication_config

        output, http_response = (
            capo_database_migration_service._operations.amazon_dm_sv20160101.modify_replication_config.modify_replication_config(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ModifyReplicationConfig")
    )
    input_: capo_database_migration_service.types.modify_replication_config_message.ModifyReplicationConfigMessage = {
        "replication_config_arn": replication_config_arn
    }
    if replication_config_identifier is not None:
        input_["replication_config_identifier"] = replication_config_identifier
    if replication_type is not None:
        input_["replication_type"] = replication_type
    if table_mappings is not None:
        input_["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 compute_config is not None:
        input_["compute_config"] = compute_config
    if source_endpoint_arn is not None:
        input_["source_endpoint_arn"] = source_endpoint_arn
    if target_endpoint_arn is not None:
        input_["target_endpoint_arn"] = target_endpoint_arn

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output