Associates a set of tags with a DAX resource. You can call TagResource up to 5 times per second, per account.
Parameters:
-
resource_name
(String)
–
The name of the DAX resource to which tags should be added.
-
tags
(TagList)
–
The tags to be assigned to the DAX resource.
Raises:
Source code in docs_src/capo_dax/_services/async_dax.py
| async def tag_resource(
self,
resource_name: "capo_dax.types.string.String",
tags: "capo_dax.types.tag_list.TagList",
*,
config_overrides: Optional[AsyncDAXClientConfig] = None,
) -> "capo_dax.types.tag_resource_response.TagResourceResponse":
"""<p>Associates a set of tags with a DAX resource. You can call <code>TagResource</code> up to 5 times per second, per account. </p>
Args:
resource_name: <p>The name of the DAX resource to which tags should be added.</p>
tags: <p>The tags to be assigned to the DAX resource. </p>
Raises:
capo_dax.errors.cluster_not_found_fault.ClusterNotFoundFault: <p>The requested cluster ID does not refer to an existing DAX cluster.</p>
capo_dax.errors.invalid_arn_fault.InvalidARNFault: <p>The Amazon Resource Name (ARN) supplied in the request is not valid.</p>
capo_dax.errors.invalid_cluster_state_fault.InvalidClusterStateFault: <p>The requested DAX cluster is not in the <i>available</i> state.</p>
capo_dax.errors.invalid_parameter_combination_exception.InvalidParameterCombinationException: <p>Two or more incompatible parameters were specified.</p>
capo_dax.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The value for a parameter is invalid.</p>
capo_dax.errors.service_linked_role_not_found_fault.ServiceLinkedRoleNotFoundFault: <p>The specified service linked role (SLR) was not found.</p>
capo_dax.errors.tag_quota_per_resource_exceeded.TagQuotaPerResourceExceeded: <p>You have exceeded the maximum number of tags for this DAX cluster.</p>
capo_dax.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_dax.types.tag_resource_request.TagResourceRequest]",
) -> AsyncOperationResponse[
"capo_dax.types.tag_resource_response.TagResourceResponse"
]:
import capo_dax._operations.amazon_daxv3.tag_resource
(
output,
http_response,
) = await capo_dax._operations.amazon_daxv3.tag_resource.async_tag_resource(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("TagResource")
)
input_: capo_dax.types.tag_resource_request.TagResourceRequest = {
"resource_name": resource_name,
"tags": tags,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|