Creates tags for S3 Files resources using standard Amazon Web Services tagging APIs.
Parameters:
-
resource_id
(ResourceId)
–
The ID or Amazon Resource Name (ARN) of the resource to add tags to.
-
tags
(TagList)
–
An array of key-value pairs to add as tags to the resource.
Raises:
Source code in docs_src/capo_s3files/_services/async_s3_files.py
| async def tag_resource(
self,
resource_id: "capo_s3files.types.resource_id.ResourceId",
tags: "capo_s3files.types.tag_list.TagList",
*,
config_overrides: Optional[AsyncS3FilesClientConfig] = None,
) -> None:
"""<p>Creates tags for S3 Files resources using standard Amazon Web Services tagging APIs.</p>
Args:
resource_id: <p>The ID or Amazon Resource Name (ARN) of the resource to add tags to.</p>
tags: <p>An array of key-value pairs to add as tags to the resource.</p>
Raises:
capo_s3files.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Retry your request using exponential backoff.</p>
capo_s3files.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
capo_s3files.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify that the resource exists and that you have permission to access it.</p>
capo_s3files.errors.validation_exception.ValidationException: <p>The input parameters are not valid. Check the parameter values and try again.</p>
capo_s3files.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_s3files.types.tag_resource_request.TagResourceRequest]",
) -> AsyncOperationResponse[None]:
import capo_s3files._operations.s3_files.tag_resource
(
output,
http_response,
) = await capo_s3files._operations.s3_files.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_s3files.types.tag_resource_request.TagResourceRequest = {
"resource_id": resource_id,
"tags": tags,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|