Create tags for a resource
Raises:
Source code in docs_src/capo_medialive/_services/async_media_live.py
| async def create_tags(
self,
resource_arn: "capo_medialive.types.__string.__string",
*,
config_overrides: Optional[AsyncMediaLiveClientConfig] = None,
tags: Optional["capo_medialive.types.tags.Tags"] = None,
) -> None:
"""Create tags for a resource
Raises:
capo_medialive.errors.bad_request_exception.BadRequestException: Placeholder documentation for BadRequestException
capo_medialive.errors.forbidden_exception.ForbiddenException: Placeholder documentation for ForbiddenException
capo_medialive.errors.internal_server_error_exception.InternalServerErrorException: Placeholder documentation for InternalServerErrorException
capo_medialive.errors.not_found_exception.NotFoundException: Placeholder documentation for NotFoundException
capo_medialive.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_medialive.types.create_tags_request.CreateTagsRequest]",
) -> AsyncOperationResponse[None]:
import capo_medialive._operations.media_live.create_tags
(
output,
http_response,
) = await capo_medialive._operations.media_live.create_tags.async_create_tags(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateTags")
)
input_: capo_medialive.types.create_tags_request.CreateTagsRequest = {
"resource_arn": resource_arn
}
if tags is not None:
input_["tags"] = tags
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|