This operation tags a resource.
Parameters:
-
resource_arn
(__string)
–
An Amazon Resource Name (ARN) that uniquely identifies an AWS resource.
-
tags
(MapOf__string)
–
A label that consists of a customer-defined key and an optional value.
Raises:
Source code in docs_src/capo_dataexchange/_services/async_data_exchange.py
| async def tag_resource(
self,
resource_arn: "capo_dataexchange.types.__string.__string",
tags: "capo_dataexchange.types.map_of__string.MapOf__string",
*,
config_overrides: Optional[AsyncDataExchangeClientConfig] = None,
) -> None:
"""<p>This operation tags a resource.</p>
Args:
resource_arn: <p>An Amazon Resource Name (ARN) that uniquely identifies an AWS resource.</p>
tags: <p>A label that consists of a customer-defined key and an optional value.</p>
Raises:
capo_dataexchange.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_dataexchange.types.tag_resource_request.TagResourceRequest]",
) -> AsyncOperationResponse[None]:
import capo_dataexchange._operations.data_exchange.tag_resource
(
output,
http_response,
) = await capo_dataexchange._operations.data_exchange.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_dataexchange.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
|