Skip to content

list_tags_for_resource async

list_tags_for_resource(
    workload_arn: WorkloadArn,
    *,
    config_overrides: Optional[AsyncWellArchitectedClientConfig] = None,
) -> ListTagsForResourceOutput

List the tags for a resource.

The WorkloadArn parameter can be a workload ARN, a custom lens ARN, a profile ARN, or review template ARN.

Raises:

Source code in docs_src/capo_wellarchitected/_services/async_well_architected.py
async def list_tags_for_resource(
    self,
    workload_arn: "capo_wellarchitected.types.workload_arn.WorkloadArn",
    *,
    config_overrides: Optional[AsyncWellArchitectedClientConfig] = None,
) -> "capo_wellarchitected.types.list_tags_for_resource_output.ListTagsForResourceOutput":
    """<p>List the tags for a resource.</p> <note> <p>The WorkloadArn parameter can be a workload ARN, a custom lens ARN, a profile ARN, or review template ARN.</p> </note>

    Raises:
        capo_wellarchitected.errors.internal_server_exception.InternalServerException: <p>There is a problem with the Well-Architected Tool API service.</p>
        capo_wellarchitected.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found.</p>
        capo_wellarchitected.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_wellarchitected.types.list_tags_for_resource_input.ListTagsForResourceInput]",
    ) -> AsyncOperationResponse[
        "capo_wellarchitected.types.list_tags_for_resource_output.ListTagsForResourceOutput"
    ]:
        import capo_wellarchitected._operations.well_architected_api_service_lambda.list_tags_for_resource

        (
            output,
            http_response,
        ) = await capo_wellarchitected._operations.well_architected_api_service_lambda.list_tags_for_resource.async_list_tags_for_resource(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListTagsForResource")
    )
    input_: capo_wellarchitected.types.list_tags_for_resource_input.ListTagsForResourceInput = {
        "workload_arn": workload_arn
    }

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