Skip to content

delete_sink async

delete_sink(
    identifier: ResourceIdentifier,
    *,
    config_overrides: Optional[AsyncOAMClientConfig] = None,
) -> DeleteSinkOutput

Deletes a sink. You must delete all links to a sink before you can delete that sink.

Parameters:

Raises:

Source code in docs_src/capo_oam/_services/async_oam.py
async def delete_sink(
    self,
    identifier: "capo_oam.types.resource_identifier.ResourceIdentifier",
    *,
    config_overrides: Optional[AsyncOAMClientConfig] = None,
) -> "capo_oam.types.delete_sink_output.DeleteSinkOutput":
    """<p>Deletes a sink. You must delete all links to a sink before you can delete that sink.</p>

    Args:
        identifier: <p>The ARN of the sink to delete.</p>

    Raises:
        capo_oam.errors.conflict_exception.ConflictException: <p>A resource was in an inconsistent state during an update or a deletion.</p>
        capo_oam.errors.internal_service_fault.InternalServiceFault: <p>Unexpected error while processing the request. Retry the request.</p>
        capo_oam.errors.invalid_parameter_exception.InvalidParameterException: <p>A parameter is specified incorrectly.</p>
        capo_oam.errors.missing_required_parameter_exception.MissingRequiredParameterException: <p>A required parameter is missing from the request.</p>
        capo_oam.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource that does not exist.</p>
        capo_oam.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_oam.types.delete_sink_input.DeleteSinkInput]",
    ) -> AsyncOperationResponse[
        "capo_oam.types.delete_sink_output.DeleteSinkOutput"
    ]:
        import capo_oam._operations.oamservice.delete_sink

        (
            output,
            http_response,
        ) = await capo_oam._operations.oamservice.delete_sink.async_delete_sink(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteSink")
    )
    input_: capo_oam.types.delete_sink_input.DeleteSinkInput = {
        "identifier": identifier
    }

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