Skip to content

delete_link async

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

Deletes a link between a monitoring account sink and a source account. You must run this operation in the source account.

Parameters:

Raises:

Source code in docs_src/capo_oam/_services/async_oam.py
async def delete_link(
    self,
    identifier: "capo_oam.types.resource_identifier.ResourceIdentifier",
    *,
    config_overrides: Optional[AsyncOAMClientConfig] = None,
) -> "capo_oam.types.delete_link_output.DeleteLinkOutput":
    """<p>Deletes a link between a monitoring account sink and a source account. You must run this operation in the source account.</p>

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

    Raises:
        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_link_input.DeleteLinkInput]",
    ) -> AsyncOperationResponse[
        "capo_oam.types.delete_link_output.DeleteLinkOutput"
    ]:
        import capo_oam._operations.oamservice.delete_link

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteLink")
    )
    input_: capo_oam.types.delete_link_input.DeleteLinkInput = {
        "identifier": identifier
    }

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