Skip to content

remove_source_identifier_from_subscription async

remove_source_identifier_from_subscription(
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    subscription_name: Optional[String] = None,
    source_identifier: Optional[String] = None,
) -> RemoveSourceIdentifierFromSubscriptionResult

Removes a source identifier from an existing RDS event notification subscription.

Parameters:

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

    The name of the RDS event notification subscription you want to remove a source identifier from.

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

    The source identifier to be removed from the subscription, such as the DB instance identifier for a DB instance or the name of a security group.

Raises:

Examples:

To remove a source identifier from a subscription The following example removes the specified source identifier from an existing subscription.

>>> await client.remove_source_identifier_from_subscription(subscription_name='my-instance-events', source_identifier='test-instance-repl')
Source code in docs_src/capo_rds/_services/async_rds.py
async def remove_source_identifier_from_subscription(
    self,
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    subscription_name: Optional["capo_rds.types.string.String"] = None,
    source_identifier: Optional["capo_rds.types.string.String"] = None,
) -> "capo_rds.types.remove_source_identifier_from_subscription_result.RemoveSourceIdentifierFromSubscriptionResult":
    """<p>Removes a source identifier from an existing RDS event notification subscription.</p>

    Args:
        subscription_name: <p>The name of the RDS event notification subscription you want to remove a source identifier from.</p>
        source_identifier: <p>The source identifier to be removed from the subscription, such as the <b>DB instance identifier</b> for a DB instance or the name of a security group.</p>

    Raises:
        capo_rds.errors.source_not_found_fault.SourceNotFoundFault: <p>The requested source could not be found.</p>
        capo_rds.errors.subscription_not_found_fault.SubscriptionNotFoundFault: <p>The subscription name does not exist.</p>
        capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To remove a source identifier from a subscription
        The following example removes the specified source identifier from an existing subscription.

        >>> await client.remove_source_identifier_from_subscription(subscription_name='my-instance-events', source_identifier='test-instance-repl')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_rds.types.remove_source_identifier_from_subscription_message.RemoveSourceIdentifierFromSubscriptionMessage]",
    ) -> AsyncOperationResponse[
        "capo_rds.types.remove_source_identifier_from_subscription_result.RemoveSourceIdentifierFromSubscriptionResult"
    ]:
        import capo_rds._operations.amazon_rd_sv19.remove_source_identifier_from_subscription

        (
            output,
            http_response,
        ) = await capo_rds._operations.amazon_rd_sv19.remove_source_identifier_from_subscription.async_remove_source_identifier_from_subscription(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RemoveSourceIdentifierFromSubscription")
    )
    input_: capo_rds.types.remove_source_identifier_from_subscription_message.RemoveSourceIdentifierFromSubscriptionMessage = {}
    if subscription_name is not None:
        input_["subscription_name"] = subscription_name
    if source_identifier is not None:
        input_["source_identifier"] = source_identifier

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