Skip to content

get_sink async

get_sink(
    identifier: ResourceIdentifier,
    *,
    config_overrides: Optional[AsyncOAMClientConfig] = None,
    include_tags: Optional[IncludeTags] = None,
) -> GetSinkOutput

Returns complete information about one monitoring account sink.

To use this operation, provide the sink ARN. To retrieve a list of sink ARNs, use ListSinks.

Parameters:

  • identifier (ResourceIdentifier) –

    The ARN of the sink to retrieve information for.

  • include_tags (Optional[IncludeTags], default: None ) –

    Specifies whether to include the tags associated with the sink in the response. When IncludeTags is set to true and the caller has the required permission, oam:ListTagsForResource, the API will return the tags for the specified resource. If the caller doesn't have the required permission, oam:ListTagsForResource, the API will raise an exception.

    The default value is false.

Raises:

Source code in docs_src/capo_oam/_services/async_oam.py
async def get_sink(
    self,
    identifier: "capo_oam.types.resource_identifier.ResourceIdentifier",
    *,
    config_overrides: Optional[AsyncOAMClientConfig] = None,
    include_tags: Optional["capo_oam.types.include_tags.IncludeTags"] = None,
) -> "capo_oam.types.get_sink_output.GetSinkOutput":
    """<p>Returns complete information about one monitoring account sink.</p> <p>To use this operation, provide the sink ARN. To retrieve a list of sink ARNs, use <a href="https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListSinks.html">ListSinks</a>.</p>

    Args:
        identifier: <p>The ARN of the sink to retrieve information for.</p>
        include_tags: <p>Specifies whether to include the tags associated with the sink in the response. When <code>IncludeTags</code> is set to <code>true</code> and the caller has the required permission, <code>oam:ListTagsForResource</code>, the API will return the tags for the specified resource. If the caller doesn't have the required permission, <code>oam:ListTagsForResource</code>, the API will raise an exception.</p> <p>The default value is <code>false</code>.</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.get_sink_input.GetSinkInput]",
    ) -> AsyncOperationResponse["capo_oam.types.get_sink_output.GetSinkOutput"]:
        import capo_oam._operations.oamservice.get_sink

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetSink")
    )
    input_: capo_oam.types.get_sink_input.GetSinkInput = {"identifier": identifier}
    if include_tags is not None:
        input_["include_tags"] = include_tags

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