Skip to content

update_subscriptions_to_event_bridge async

update_subscriptions_to_event_bridge(
    *,
    config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
    force_move: Optional[BooleanOptional] = None,
) -> UpdateSubscriptionsToEventBridgeResponse

Migrates 10 active and enabled Amazon SNS subscriptions at a time and converts them to corresponding Amazon EventBridge rules. By default, this operation migrates subscriptions only when all your replication instance versions are 3.4.5 or higher. If any replication instances are from versions earlier than 3.4.5, the operation raises an error and tells you to upgrade these instances to version 3.4.5 or higher. To enable migration regardless of version, set the Force option to true. However, if you don't upgrade instances earlier than version 3.4.5, some types of events might not be available when you use Amazon EventBridge.

To call this operation, make sure that you have certain permissions added to your user account. For more information, see Migrating event subscriptions to Amazon EventBridge in the Amazon Web Services Database Migration Service User Guide.

Parameters:

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

    When set to true, this operation migrates DMS subscriptions for Amazon SNS notifications no matter what your replication instance version is. If not set or set to false, this operation runs only when all your replication instances are from DMS version 3.4.5 or higher.

Raises:

  • AccessDeniedFault –

    DMS was denied access to the endpoint. Check that the role is correctly configured.

  • InvalidResourceStateFault –

    The resource is in a state that prevents it from being used for database migration.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_database_migration_service/_services/async_database_migration_service.py
async def update_subscriptions_to_event_bridge(
    self,
    *,
    config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
    force_move: Optional[
        "capo_database_migration_service.types.boolean_optional.BooleanOptional"
    ] = None,
) -> "capo_database_migration_service.types.update_subscriptions_to_event_bridge_response.UpdateSubscriptionsToEventBridgeResponse":
    """<p>Migrates 10 active and enabled Amazon SNS subscriptions at a time and converts them to corresponding Amazon EventBridge rules. By default, this operation migrates subscriptions only when all your replication instance versions are 3.4.5 or higher. If any replication instances are from versions earlier than 3.4.5, the operation raises an error and tells you to upgrade these instances to version 3.4.5 or higher. To enable migration regardless of version, set the <code>Force</code> option to true. However, if you don't upgrade instances earlier than version 3.4.5, some types of events might not be available when you use Amazon EventBridge.</p> <p>To call this operation, make sure that you have certain permissions added to your user account. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Events.html#CHAP_Events-migrate-to-eventbridge">Migrating event subscriptions to Amazon EventBridge</a> in the <i>Amazon Web Services Database Migration Service User Guide</i>.</p>

    Args:
        force_move: <p>When set to true, this operation migrates DMS subscriptions for Amazon SNS notifications no matter what your replication instance version is. If not set or set to false, this operation runs only when all your replication instances are from DMS version 3.4.5 or higher. </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.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_database_migration_service.types.update_subscriptions_to_event_bridge_message.UpdateSubscriptionsToEventBridgeMessage]",
    ) -> AsyncOperationResponse[
        "capo_database_migration_service.types.update_subscriptions_to_event_bridge_response.UpdateSubscriptionsToEventBridgeResponse"
    ]:
        import capo_database_migration_service._operations.amazon_dm_sv20160101.update_subscriptions_to_event_bridge

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateSubscriptionsToEventBridge")
    )
    input_: capo_database_migration_service.types.update_subscriptions_to_event_bridge_message.UpdateSubscriptionsToEventBridgeMessage = {}
    if force_move is not None:
        input_["force_move"] = force_move

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