Skip to content

list_tags_for_resource async

list_tags_for_resource(
    resource_arn: Arn, *, config_overrides: Optional[AsyncACMClientConfig] = None
) -> ListTagsForResourceResponse

Lists the tags associated with an ACM resource.

Use this action for all ACM resource types except the certificate resource type. For certificate resources, use ListTagsForCertificate instead.

To add one or more tags, use the TagResource action. To remove one or more tags, use the UntagResource action.

Parameters:

  • resource_arn (Arn) –

    The ARN of the ACM resource for which to list tags.

Raises:

  • ResourceNotFoundException –

    The specified certificate cannot be found in the caller's account or the caller's account cannot be found.

  • ValidationException –

    The supplied input failed to satisfy constraints of an Amazon Web Services service.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_acm/_services/async_acm.py
async def list_tags_for_resource(
    self,
    resource_arn: "capo_acm.types.arn.Arn",
    *,
    config_overrides: Optional[AsyncACMClientConfig] = None,
) -> "capo_acm.types.list_tags_for_resource_response.ListTagsForResourceResponse":
    """<p>Lists the tags associated with an ACM resource.</p> <note> <p>Use this action for all ACM resource types except the <code>certificate</code> resource type. For certificate resources, use <a>ListTagsForCertificate</a> instead.</p> </note> <p>To add one or more tags, use the <a>TagResource</a> action. To remove one or more tags, use the <a>UntagResource</a> action.</p>

    Args:
        resource_arn: <p>The ARN of the ACM resource for which to list tags.</p>

    Raises:
        capo_acm.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified certificate cannot be found in the caller's account or the caller's account cannot be found.</p>
        capo_acm.errors.validation_exception.ValidationException: <p>The supplied input failed to satisfy constraints of an Amazon Web Services service.</p>
        capo_acm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_acm.types.list_tags_for_resource_request.ListTagsForResourceRequest]",
    ) -> AsyncOperationResponse[
        "capo_acm.types.list_tags_for_resource_response.ListTagsForResourceResponse"
    ]:
        import capo_acm._operations.certificate_manager.list_tags_for_resource

        (
            output,
            http_response,
        ) = await capo_acm._operations.certificate_manager.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_acm.types.list_tags_for_resource_request.ListTagsForResourceRequest = {
        "resource_arn": resource_arn
    }

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