Skip to content

remove_source_identifier_from_subscription

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

Removes a source identifier from an existing Amazon DocumentDB event notification subscription.

Parameters:

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

    The name of the Amazon DocumentDB event notification subscription that 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 instance identifier for an instance, or the name of a security group.

Raises:

Source code in docs_src/capo_docdb/_services/doc_db.py
def remove_source_identifier_from_subscription(
    self,
    *,
    config_overrides: Optional[DocDBClientConfig] = None,
    subscription_name: Optional["capo_docdb.types.string.String"] = None,
    source_identifier: Optional["capo_docdb.types.string.String"] = None,
) -> "capo_docdb.types.remove_source_identifier_from_subscription_result.RemoveSourceIdentifierFromSubscriptionResult":
    """<p>Removes a source identifier from an existing Amazon DocumentDB event notification subscription.</p>

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

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

    def _handler(
        req: "OperationRequest[capo_docdb.types.remove_source_identifier_from_subscription_message.RemoveSourceIdentifierFromSubscriptionMessage]",
    ) -> OperationResponse[
        "capo_docdb.types.remove_source_identifier_from_subscription_result.RemoveSourceIdentifierFromSubscriptionResult"
    ]:
        import capo_docdb._operations.amazon_rd_sv19.remove_source_identifier_from_subscription

        output, http_response = (
            capo_docdb._operations.amazon_rd_sv19.remove_source_identifier_from_subscription.remove_source_identifier_from_subscription(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RemoveSourceIdentifierFromSubscription")
    )
    input_: capo_docdb.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 = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output