Skip to content

modify_endpoint

modify_endpoint(
    endpoint_arn: String,
    *,
    config_overrides: Optional[DatabaseMigrationServiceClientConfig] = None,
    endpoint_identifier: Optional[String] = None,
    endpoint_type: Optional[ReplicationEndpointTypeValue] = None,
    engine_name: Optional[String] = None,
    username: Optional[String] = None,
    password: Optional[SecretString] = None,
    server_name: Optional[String] = None,
    port: Optional[IntegerOptional] = None,
    database_name: Optional[String] = None,
    extra_connection_attributes: Optional[String] = None,
    certificate_arn: Optional[String] = None,
    ssl_mode: Optional[DmsSslModeValue] = None,
    service_access_role_arn: Optional[String] = None,
    external_table_definition: Optional[String] = None,
    dynamo_db_settings: Optional[DynamoDbSettings] = None,
    s3_settings: Optional[S3Settings] = None,
    dms_transfer_settings: Optional[DmsTransferSettings] = None,
    mongo_db_settings: Optional[MongoDbSettings] = None,
    kinesis_settings: Optional[KinesisSettings] = None,
    kafka_settings: Optional[KafkaSettings] = None,
    elasticsearch_settings: Optional[ElasticsearchSettings] = None,
    neptune_settings: Optional[NeptuneSettings] = None,
    redshift_settings: Optional[RedshiftSettings] = None,
    postgre_sql_settings: Optional[PostgreSQLSettings] = None,
    my_sql_settings: Optional[MySQLSettings] = None,
    oracle_settings: Optional[OracleSettings] = None,
    sybase_settings: Optional[SybaseSettings] = None,
    microsoft_sql_server_settings: Optional[MicrosoftSQLServerSettings] = None,
    ibm_db2_settings: Optional[IBMDb2Settings] = None,
    doc_db_settings: Optional[DocDbSettings] = None,
    redis_settings: Optional[RedisSettings] = None,
    exact_settings: Optional[BooleanOptional] = None,
    gcp_my_sql_settings: Optional[GcpMySQLSettings] = None,
    timestream_settings: Optional[TimestreamSettings] = None,
) -> ModifyEndpointResponse

Modifies the specified endpoint.

For a MySQL source or target endpoint, don't explicitly specify the database using the DatabaseName request parameter on the ModifyEndpoint API call. Specifying DatabaseName when you modify a MySQL endpoint replicates all the task tables to this single database. For MySQL endpoints, you specify the database only when you specify the schema in the table-mapping rules of the DMS task.

Parameters:

Raises:

Examples:

Modify endpoint Modifies the specified endpoint.

>>> client.modify_endpoint(endpoint_arn='', endpoint_identifier='', endpoint_type='source', engine_name='', username='', password='', server_name='', port=123, database_name='', extra_connection_attributes='', certificate_arn='', ssl_mode='require')
Source code in docs_src/capo_database_migration_service/_services/database_migration_service.py
def modify_endpoint(
    self,
    endpoint_arn: "capo_database_migration_service.types.string.String",
    *,
    config_overrides: Optional[DatabaseMigrationServiceClientConfig] = None,
    endpoint_identifier: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    endpoint_type: Optional[
        "capo_database_migration_service.types.replication_endpoint_type_value.ReplicationEndpointTypeValue"
    ] = None,
    engine_name: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    username: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    password: Optional[
        "capo_database_migration_service.types.secret_string.SecretString"
    ] = None,
    server_name: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    port: Optional[
        "capo_database_migration_service.types.integer_optional.IntegerOptional"
    ] = None,
    database_name: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    extra_connection_attributes: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    certificate_arn: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    ssl_mode: Optional[
        "capo_database_migration_service.types.dms_ssl_mode_value.DmsSslModeValue"
    ] = None,
    service_access_role_arn: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    external_table_definition: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    dynamo_db_settings: Optional[
        "capo_database_migration_service.types.dynamo_db_settings.DynamoDbSettings"
    ] = None,
    s3_settings: Optional[
        "capo_database_migration_service.types.s3_settings.S3Settings"
    ] = None,
    dms_transfer_settings: Optional[
        "capo_database_migration_service.types.dms_transfer_settings.DmsTransferSettings"
    ] = None,
    mongo_db_settings: Optional[
        "capo_database_migration_service.types.mongo_db_settings.MongoDbSettings"
    ] = None,
    kinesis_settings: Optional[
        "capo_database_migration_service.types.kinesis_settings.KinesisSettings"
    ] = None,
    kafka_settings: Optional[
        "capo_database_migration_service.types.kafka_settings.KafkaSettings"
    ] = None,
    elasticsearch_settings: Optional[
        "capo_database_migration_service.types.elasticsearch_settings.ElasticsearchSettings"
    ] = None,
    neptune_settings: Optional[
        "capo_database_migration_service.types.neptune_settings.NeptuneSettings"
    ] = None,
    redshift_settings: Optional[
        "capo_database_migration_service.types.redshift_settings.RedshiftSettings"
    ] = None,
    postgre_sql_settings: Optional[
        "capo_database_migration_service.types.postgre_sql_settings.PostgreSQLSettings"
    ] = None,
    my_sql_settings: Optional[
        "capo_database_migration_service.types.my_sql_settings.MySQLSettings"
    ] = None,
    oracle_settings: Optional[
        "capo_database_migration_service.types.oracle_settings.OracleSettings"
    ] = None,
    sybase_settings: Optional[
        "capo_database_migration_service.types.sybase_settings.SybaseSettings"
    ] = None,
    microsoft_sql_server_settings: Optional[
        "capo_database_migration_service.types.microsoft_sql_server_settings.MicrosoftSQLServerSettings"
    ] = None,
    ibm_db2_settings: Optional[
        "capo_database_migration_service.types.ibm_db2_settings.IBMDb2Settings"
    ] = None,
    doc_db_settings: Optional[
        "capo_database_migration_service.types.doc_db_settings.DocDbSettings"
    ] = None,
    redis_settings: Optional[
        "capo_database_migration_service.types.redis_settings.RedisSettings"
    ] = None,
    exact_settings: Optional[
        "capo_database_migration_service.types.boolean_optional.BooleanOptional"
    ] = None,
    gcp_my_sql_settings: Optional[
        "capo_database_migration_service.types.gcp_my_sql_settings.GcpMySQLSettings"
    ] = None,
    timestream_settings: Optional[
        "capo_database_migration_service.types.timestream_settings.TimestreamSettings"
    ] = None,
) -> "capo_database_migration_service.types.modify_endpoint_response.ModifyEndpointResponse":
    """<p>Modifies the specified endpoint.</p> <note> <p>For a MySQL source or target endpoint, don't explicitly specify the database using the <code>DatabaseName</code> request parameter on the <code>ModifyEndpoint</code> API call. Specifying <code>DatabaseName</code> when you modify a MySQL endpoint replicates all the task tables to this single database. For MySQL endpoints, you specify the database only when you specify the schema in the table-mapping rules of the DMS task.</p> </note>

    Args:
        endpoint_arn: <p>The Amazon Resource Name (ARN) string that uniquely identifies the endpoint.</p>
        endpoint_identifier: <p>The database endpoint identifier. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen or contain two consecutive hyphens.</p>
        endpoint_type: <p>The type of endpoint. Valid values are <code>source</code> and <code>target</code>.</p>
        engine_name: <p>The database engine name. Valid values, depending on the EndpointType, include <code>"mysql"</code>, <code>"oracle"</code>, <code>"postgres"</code>, <code>"mariadb"</code>, <code>"aurora"</code>, <code>"aurora-postgresql"</code>, <code>"redshift"</code>, <code>"s3"</code>, <code>"db2"</code>, <code>"db2-zos"</code>, <code>"azuredb"</code>, <code>"sybase"</code>, <code>"dynamodb"</code>, <code>"mongodb"</code>, <code>"kinesis"</code>, <code>"kafka"</code>, <code>"elasticsearch"</code>, <code>"documentdb"</code>, <code>"sqlserver"</code>, <code>"neptune"</code>, and <code>"babelfish"</code>.</p>
        username: <p>The user name to be used to login to the endpoint database.</p>
        password: <p>The password to be used to login to the endpoint database.</p>
        server_name: <p>The name of the server where the endpoint database resides.</p>
        port: <p>The port used by the endpoint database.</p>
        database_name: <p>The name of the endpoint database. For a MySQL source or target endpoint, do not specify DatabaseName.</p>
        extra_connection_attributes: <p>Additional attributes associated with the connection. To reset this parameter, pass the empty string ("") as an argument.</p>
        certificate_arn: <p>The Amazon Resource Name (ARN) of the certificate used for SSL connection.</p>
        ssl_mode: <p>The SSL mode used to connect to the endpoint. The default value is <code>none</code>.</p>
        service_access_role_arn: <p> The Amazon Resource Name (ARN) for the IAM role you want to use to modify the endpoint. The role must allow the <code>iam:PassRole</code> action.</p>
        external_table_definition: <p>The external table definition.</p>
        dynamo_db_settings: <p>Settings in JSON format for the target Amazon DynamoDB endpoint. For information about other available settings, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.DynamoDB.html#CHAP_Target.DynamoDB.ObjectMapping">Using Object Mapping to Migrate Data to DynamoDB</a> in the <i>Database Migration Service User Guide.</i> </p>
        s3_settings: <p>Settings in JSON format for the target Amazon S3 endpoint. For more information about the available settings, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.S3.html#CHAP_Target.S3.Configuring">Extra Connection Attributes When Using Amazon S3 as a Target for DMS</a> in the <i>Database Migration Service User Guide.</i> </p>
        dms_transfer_settings: <p>The settings in JSON format for the DMS transfer type of source endpoint. </p> <p>Attributes include the following:</p> <ul> <li> <p>serviceAccessRoleArn - The Amazon Resource Name (ARN) used by the service access IAM role. The role must allow the <code>iam:PassRole</code> action.</p> </li> <li> <p>BucketName - The name of the S3 bucket to use.</p> </li> </ul> <p>Shorthand syntax for these settings is as follows: <code>ServiceAccessRoleArn=string ,BucketName=string</code> </p> <p>JSON syntax for these settings is as follows: <code>{ "ServiceAccessRoleArn": "string", "BucketName": "string"} </code> </p>
        mongo_db_settings: <p>Settings in JSON format for the source MongoDB endpoint. For more information about the available settings, see the configuration properties section in <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html#CHAP_Source.MongoDB.Configuration">Endpoint configuration settings when using MongoDB as a source for Database Migration Service</a> in the <i>Database Migration Service User Guide.</i> </p>
        kinesis_settings: <p>Settings in JSON format for the target endpoint for Amazon Kinesis Data Streams. For more information about the available settings, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kinesis.html#CHAP_Target.Kinesis.ObjectMapping">Using object mapping to migrate data to a Kinesis data stream</a> in the <i>Database Migration Service User Guide.</i> </p>
        kafka_settings: <p>Settings in JSON format for the target Apache Kafka endpoint. For more information about the available settings, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kafka.html#CHAP_Target.Kafka.ObjectMapping">Using object mapping to migrate data to a Kafka topic</a> in the <i>Database Migration Service User Guide.</i> </p>
        elasticsearch_settings: <p>Settings in JSON format for the target OpenSearch endpoint. For more information about the available settings, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Elasticsearch.html#CHAP_Target.Elasticsearch.Configuration">Extra Connection Attributes When Using OpenSearch as a Target for DMS</a> in the <i>Database Migration Service User Guide.</i> </p>
        neptune_settings: <p>Settings in JSON format for the target Amazon Neptune endpoint. For more information about the available settings, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Neptune.html#CHAP_Target.Neptune.EndpointSettings">Specifying graph-mapping rules using Gremlin and R2RML for Amazon Neptune as a target</a> in the <i>Database Migration Service User Guide.</i> </p>
        postgre_sql_settings: <p>Settings in JSON format for the source and target PostgreSQL endpoint. For information about other available settings, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.PostgreSQL.html#CHAP_Source.PostgreSQL.ConnectionAttrib">Extra connection attributes when using PostgreSQL as a source for DMS</a> and <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.PostgreSQL.html#CHAP_Target.PostgreSQL.ConnectionAttrib"> Extra connection attributes when using PostgreSQL as a target for DMS</a> in the <i>Database Migration Service User Guide.</i> </p>
        my_sql_settings: <p>Settings in JSON format for the source and target MySQL endpoint. For information about other available settings, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MySQL.html#CHAP_Source.MySQL.ConnectionAttrib">Extra connection attributes when using MySQL as a source for DMS</a> and <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.MySQL.html#CHAP_Target.MySQL.ConnectionAttrib">Extra connection attributes when using a MySQL-compatible database as a target for DMS</a> in the <i>Database Migration Service User Guide.</i> </p>
        oracle_settings: <p>Settings in JSON format for the source and target Oracle endpoint. For information about other available settings, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.Oracle.html#CHAP_Source.Oracle.ConnectionAttrib">Extra connection attributes when using Oracle as a source for DMS</a> and <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Oracle.html#CHAP_Target.Oracle.ConnectionAttrib"> Extra connection attributes when using Oracle as a target for DMS</a> in the <i>Database Migration Service User Guide.</i> </p>
        sybase_settings: <p>Settings in JSON format for the source and target SAP ASE endpoint. For information about other available settings, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.SAP.html#CHAP_Source.SAP.ConnectionAttrib">Extra connection attributes when using SAP ASE as a source for DMS</a> and <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.SAP.html#CHAP_Target.SAP.ConnectionAttrib">Extra connection attributes when using SAP ASE as a target for DMS</a> in the <i>Database Migration Service User Guide.</i> </p>
        microsoft_sql_server_settings: <p>Settings in JSON format for the source and target Microsoft SQL Server endpoint. For information about other available settings, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.SQLServer.html#CHAP_Source.SQLServer.ConnectionAttrib">Extra connection attributes when using SQL Server as a source for DMS</a> and <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.SQLServer.html#CHAP_Target.SQLServer.ConnectionAttrib"> Extra connection attributes when using SQL Server as a target for DMS</a> in the <i>Database Migration Service User Guide.</i> </p>
        ibm_db2_settings: <p>Settings in JSON format for the source IBM Db2 LUW endpoint. For information about other available settings, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.DB2.html#CHAP_Source.DB2.ConnectionAttrib">Extra connection attributes when using Db2 LUW as a source for DMS</a> in the <i>Database Migration Service User Guide.</i> </p>
        doc_db_settings: <p>Settings in JSON format for the source DocumentDB endpoint. For more information about the available settings, see the configuration properties section in <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.DocumentDB.html"> Using DocumentDB as a Target for Database Migration Service </a> in the <i>Database Migration Service User Guide.</i> </p>
        redis_settings: <p>Settings in JSON format for the Redis target endpoint.</p>
        exact_settings: <p>If this attribute is Y, the current call to <code>ModifyEndpoint</code> replaces all existing endpoint settings with the exact settings that you specify in this call. If this attribute is N, the current call to <code>ModifyEndpoint</code> does two things: </p> <ul> <li> <p>It replaces any endpoint settings that already exist with new values, for settings with the same names.</p> </li> <li> <p>It creates new endpoint settings that you specify in the call, for settings with different names. </p> </li> </ul> <p>For example, if you call <code>create-endpoint ... --endpoint-settings '{"a":1}' ...</code>, the endpoint has the following endpoint settings: <code>'{"a":1}'</code>. If you then call <code>modify-endpoint ... --endpoint-settings '{"b":2}' ...</code> for the same endpoint, the endpoint has the following settings: <code>'{"a":1,"b":2}'</code>. </p> <p>However, suppose that you follow this with a call to <code>modify-endpoint ... --endpoint-settings '{"b":2}' --exact-settings ...</code> for that same endpoint again. Then the endpoint has the following settings: <code>'{"b":2}'</code>. All existing settings are replaced with the exact settings that you specify. </p>
        gcp_my_sql_settings: <p>Settings in JSON format for the source GCP MySQL endpoint.</p>
        timestream_settings: <p>Settings in JSON format for the target Amazon Timestream endpoint.</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.kms_key_not_accessible_fault.KMSKeyNotAccessibleFault: <p>DMS cannot access the KMS key.</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.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Modify endpoint
        Modifies the specified endpoint.

        >>> client.modify_endpoint(endpoint_arn='', endpoint_identifier='', endpoint_type='source', engine_name='', username='', password='', server_name='', port=123, database_name='', extra_connection_attributes='', certificate_arn='', ssl_mode='require')
    """

    def _handler(
        req: "OperationRequest[capo_database_migration_service.types.modify_endpoint_message.ModifyEndpointMessage]",
    ) -> OperationResponse[
        "capo_database_migration_service.types.modify_endpoint_response.ModifyEndpointResponse"
    ]:
        import capo_database_migration_service._operations.amazon_dm_sv20160101.modify_endpoint

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

    def _redact_input(
        input_: "capo_database_migration_service.types.modify_endpoint_message.ModifyEndpointMessage",
    ) -> dict[str, Any]:
        import capo_database_migration_service.types.modify_endpoint_message

        return capo_database_migration_service.types.modify_endpoint_message.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_database_migration_service.types.modify_endpoint_response.ModifyEndpointResponse",
    ) -> dict[str, Any]:
        import capo_database_migration_service.types.modify_endpoint_response

        return capo_database_migration_service.types.modify_endpoint_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "ModifyEndpoint",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_database_migration_service.types.modify_endpoint_message.ModifyEndpointMessage = {
        "endpoint_arn": endpoint_arn
    }
    if endpoint_identifier is not None:
        input_["endpoint_identifier"] = endpoint_identifier
    if endpoint_type is not None:
        input_["endpoint_type"] = endpoint_type
    if engine_name is not None:
        input_["engine_name"] = engine_name
    if username is not None:
        input_["username"] = username
    if password is not None:
        input_["password"] = password
    if server_name is not None:
        input_["server_name"] = server_name
    if port is not None:
        input_["port"] = port
    if database_name is not None:
        input_["database_name"] = database_name
    if extra_connection_attributes is not None:
        input_["extra_connection_attributes"] = extra_connection_attributes
    if certificate_arn is not None:
        input_["certificate_arn"] = certificate_arn
    if ssl_mode is not None:
        input_["ssl_mode"] = ssl_mode
    if service_access_role_arn is not None:
        input_["service_access_role_arn"] = service_access_role_arn
    if external_table_definition is not None:
        input_["external_table_definition"] = external_table_definition
    if dynamo_db_settings is not None:
        input_["dynamo_db_settings"] = dynamo_db_settings
    if s3_settings is not None:
        input_["s3_settings"] = s3_settings
    if dms_transfer_settings is not None:
        input_["dms_transfer_settings"] = dms_transfer_settings
    if mongo_db_settings is not None:
        input_["mongo_db_settings"] = mongo_db_settings
    if kinesis_settings is not None:
        input_["kinesis_settings"] = kinesis_settings
    if kafka_settings is not None:
        input_["kafka_settings"] = kafka_settings
    if elasticsearch_settings is not None:
        input_["elasticsearch_settings"] = elasticsearch_settings
    if neptune_settings is not None:
        input_["neptune_settings"] = neptune_settings
    if redshift_settings is not None:
        input_["redshift_settings"] = redshift_settings
    if postgre_sql_settings is not None:
        input_["postgre_sql_settings"] = postgre_sql_settings
    if my_sql_settings is not None:
        input_["my_sql_settings"] = my_sql_settings
    if oracle_settings is not None:
        input_["oracle_settings"] = oracle_settings
    if sybase_settings is not None:
        input_["sybase_settings"] = sybase_settings
    if microsoft_sql_server_settings is not None:
        input_["microsoft_sql_server_settings"] = microsoft_sql_server_settings
    if ibm_db2_settings is not None:
        input_["ibm_db2_settings"] = ibm_db2_settings
    if doc_db_settings is not None:
        input_["doc_db_settings"] = doc_db_settings
    if redis_settings is not None:
        input_["redis_settings"] = redis_settings
    if exact_settings is not None:
        input_["exact_settings"] = exact_settings
    if gcp_my_sql_settings is not None:
        input_["gcp_my_sql_settings"] = gcp_my_sql_settings
    if timestream_settings is not None:
        input_["timestream_settings"] = timestream_settings

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