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/acm.py
| def list_tags_for_resource(
self,
resource_arn: "capo_acm.types.arn.Arn",
*,
config_overrides: Optional[ACMClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_acm.types.list_tags_for_resource_request.ListTagsForResourceRequest]",
) -> OperationResponse[
"capo_acm.types.list_tags_for_resource_response.ListTagsForResourceResponse"
]:
import capo_acm._operations.certificate_manager.list_tags_for_resource
output, http_response = (
capo_acm._operations.certificate_manager.list_tags_for_resource.list_tags_for_resource(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|