tag_resource(
resource_arn: Arn,
tags: RequestTagMap,
*,
config_overrides: Optional[AsyncTimestreamInfluxDBClientConfig] = None,
) -> None
Tags are composed of a Key/Value pairs. You can use tags to categorize and track your Timestream for InfluxDB resources.
Parameters:
-
resource_arn
(Arn)
–
The Amazon Resource Name (ARN) of the tagged resource.
-
tags
(RequestTagMap)
–
A list of tags used to categorize and track resources.
Raises:
Source code in docs_src/capo_timestream_influxdb/_services/async_timestream_influx_db.py
| async def tag_resource(
self,
resource_arn: "capo_timestream_influxdb.types.arn.Arn",
tags: "capo_timestream_influxdb.types.request_tag_map.RequestTagMap",
*,
config_overrides: Optional[AsyncTimestreamInfluxDBClientConfig] = None,
) -> None:
"""<p>Tags are composed of a Key/Value pairs. You can use tags to categorize and track your Timestream for InfluxDB resources.</p>
Args:
resource_arn: <p>The Amazon Resource Name (ARN) of the tagged resource.</p>
tags: <p>A list of tags used to categorize and track resources.</p>
Raises:
capo_timestream_influxdb.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found or does not exist.</p>
capo_timestream_influxdb.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request exceeds the service quota.</p>
capo_timestream_influxdb.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_timestream_influxdb.types.tag_resource_request.TagResourceRequest]",
) -> AsyncOperationResponse[None]:
import capo_timestream_influxdb._operations.amazon_timestream_influx_db.tag_resource
(
output,
http_response,
) = await capo_timestream_influxdb._operations.amazon_timestream_influx_db.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_timestream_influxdb.types.tag_resource_request.TagResourceRequest = {
"resource_arn": resource_arn,
"tags": tags,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|