Skip to content

delete_notification_subscription

delete_notification_subscription(
    subscription_id: IdType,
    organization_id: IdType,
    *,
    config_overrides: Optional[WorkDocsClientConfig] = None,
) -> None

Deletes the specified subscription from the specified organization.

Parameters:

  • subscription_id (IdType) –

    The ID of the subscription.

  • organization_id (IdType) –

    The ID of the organization.

Raises:

Source code in docs_src/capo_workdocs/_services/work_docs.py
def delete_notification_subscription(
    self,
    subscription_id: "capo_workdocs.types.id_type.IdType",
    organization_id: "capo_workdocs.types.id_type.IdType",
    *,
    config_overrides: Optional[WorkDocsClientConfig] = None,
) -> None:
    """<p>Deletes the specified subscription from the specified organization.</p>

    Args:
        subscription_id: <p>The ID of the subscription.</p>
        organization_id: <p>The ID of the organization.</p>

    Raises:
        capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
        capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
        capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
        capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
        capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_workdocs.types.delete_notification_subscription_request.DeleteNotificationSubscriptionRequest]",
    ) -> OperationResponse[None]:
        import capo_workdocs._operations.aws_gorilla_boy_service.delete_notification_subscription

        output, http_response = (
            capo_workdocs._operations.aws_gorilla_boy_service.delete_notification_subscription.delete_notification_subscription(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteNotificationSubscription")
    )
    input_: capo_workdocs.types.delete_notification_subscription_request.DeleteNotificationSubscriptionRequest = {
        "subscription_id": subscription_id,
        "organization_id": organization_id,
    }

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