Skip to content

modify_data_provider async

modify_data_provider(
    data_provider_identifier: String,
    *,
    config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
    data_provider_name: Optional[String] = None,
    description: Optional[String] = None,
    engine: Optional[String] = None,
    virtual: Optional[BooleanOptional] = None,
    exact_settings: Optional[BooleanOptional] = None,
    settings: Optional[DataProviderSettings] = None,
) -> ModifyDataProviderResponse

Modifies the specified data provider using the provided settings.

Required permissions: dms:UpdateDataProvider. For more information, see Actions, resources, and condition keys for Database Migration Service.

You must remove the data provider from all migration projects before you can modify it.

Parameters:

  • data_provider_identifier (String) –

    The identifier of the data provider. 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.

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

    The name of the data provider.

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

    A user-friendly description of the data provider.

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

    The type of database engine for the data provider.

    Valid values: aurora, aurora-postgresql, db2, db2-zos, docdb, mariadb, mongodb, mysql, oracle, postgres, redshift, sqlserver, and sybase. A value of aurora represents Amazon Aurora MySQL-Compatible Edition.

  • virtual (Optional[BooleanOptional], default: None ) –

    Indicates whether the data provider is virtual.

  • exact_settings (Optional[BooleanOptional], default: None ) –

    If this attribute is Y, the current call to ModifyDataProvider replaces all existing data provider settings with the exact settings that you specify in this call. If this attribute is N, the current call to ModifyDataProvider does two things:

    • It replaces any data provider settings that already exist with new values, for settings with the same names.

    • It creates new data provider settings that you specify in the call, for settings with different names.

  • settings (Optional[DataProviderSettings], default: None ) –

    The settings in JSON format for a data provider.

Raises:

Examples:

Modify a data provider The following example updates the description and server name of a data provider.

>>> await client.modify_data_provider(data_provider_identifier='arn:aws:dms:us-east-1:111122223333:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS', description='Updated data provider description', engine='sqlserver', settings={'MicrosoftSqlServerSettings': {'ServerName': 'new-source-server.us-east-1.rds.amazonaws.com'}})
Source code in docs_src/capo_database_migration_service/_services/async_database_migration_service.py
async def modify_data_provider(
    self,
    data_provider_identifier: "capo_database_migration_service.types.string.String",
    *,
    config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
    data_provider_name: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    description: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    engine: Optional["capo_database_migration_service.types.string.String"] = None,
    virtual: Optional[
        "capo_database_migration_service.types.boolean_optional.BooleanOptional"
    ] = None,
    exact_settings: Optional[
        "capo_database_migration_service.types.boolean_optional.BooleanOptional"
    ] = None,
    settings: Optional[
        "capo_database_migration_service.types.data_provider_settings.DataProviderSettings"
    ] = None,
) -> "capo_database_migration_service.types.modify_data_provider_response.ModifyDataProviderResponse":
    """<p>Modifies the specified data provider using the provided settings.</p> <p> <b>Required permissions:</b> <code>dms:UpdateDataProvider</code>. For more information, see <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsdatabasemigrationservice.html">Actions, resources, and condition keys for Database Migration Service</a>.</p> <note> <p>You must remove the data provider from all migration projects before you can modify it.</p> </note>

    Args:
        data_provider_identifier: <p>The identifier of the data provider. 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>
        data_provider_name: <p>The name of the data provider.</p>
        description: <p>A user-friendly description of the data provider.</p>
        engine: <p>The type of database engine for the data provider.</p> <p>Valid values: <code>aurora</code>, <code>aurora-postgresql</code>, <code>db2</code>, <code>db2-zos</code>, <code>docdb</code>, <code>mariadb</code>, <code>mongodb</code>, <code>mysql</code>, <code>oracle</code>, <code>postgres</code>, <code>redshift</code>, <code>sqlserver</code>, and <code>sybase</code>. A value of <code>aurora</code> represents Amazon Aurora MySQL-Compatible Edition.</p>
        virtual: <p>Indicates whether the data provider is virtual.</p>
        exact_settings: <p>If this attribute is Y, the current call to <code>ModifyDataProvider</code> replaces all existing data provider settings with the exact settings that you specify in this call. If this attribute is N, the current call to <code>ModifyDataProvider</code> does two things: </p> <ul> <li> <p>It replaces any data provider settings that already exist with new values, for settings with the same names.</p> </li> <li> <p>It creates new data provider settings that you specify in the call, for settings with different names. </p> </li> </ul>
        settings: <p>The settings in JSON format for a data provider.</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.failed_dependency_fault.FailedDependencyFault: <p>A dependency threw an exception.</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.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 a data provider
        The following example updates the description and server name of a data provider.

        >>> await client.modify_data_provider(data_provider_identifier='arn:aws:dms:us-east-1:111122223333:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS', description='Updated data provider description', engine='sqlserver', settings={'MicrosoftSqlServerSettings': {'ServerName': 'new-source-server.us-east-1.rds.amazonaws.com'}})
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_database_migration_service.types.modify_data_provider_message.ModifyDataProviderMessage]",
    ) -> AsyncOperationResponse[
        "capo_database_migration_service.types.modify_data_provider_response.ModifyDataProviderResponse"
    ]:
        import capo_database_migration_service._operations.amazon_dm_sv20160101.modify_data_provider

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ModifyDataProvider")
    )
    input_: capo_database_migration_service.types.modify_data_provider_message.ModifyDataProviderMessage = {
        "data_provider_identifier": data_provider_identifier
    }
    if data_provider_name is not None:
        input_["data_provider_name"] = data_provider_name
    if description is not None:
        input_["description"] = description
    if engine is not None:
        input_["engine"] = engine
    if virtual is not None:
        input_["virtual"] = virtual
    if exact_settings is not None:
        input_["exact_settings"] = exact_settings
    if settings is not None:
        input_["settings"] = settings

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