tagResource method
Applies one or more user-defined tags to an Amazon S3 Tables resource or updates existing tags. Each tag is a label consisting of a key and value pair. Tags can help you organize, track costs for, and control access to your resources. You can add up to 50 tags for each S3 resource.
- Permissions
-
For tables and table buckets, you must have the
s3tables:TagResourcepermission to use this operation.
May throw BadRequestException.
May throw ConflictException.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw NotFoundException.
May throw TooManyRequestsException.
Parameter resourceArn :
The Amazon Resource Name (ARN) of the Amazon S3 Tables resource that
you're applying tags to. The tagged resource can be a table bucket or a
table. For a list of all S3 resources that support tagging, see Managing
tags for Amazon S3 resources.
Parameter tags :
The user-defined tag that you want to add to the specified S3 Tables
resource. For more information, see Tagging
for cost allocation or attribute-based access control (ABAC).
Implementation
Future<void> tagResource({
required String resourceArn,
required Map<String, String> tags,
}) async {
final $payload = <String, dynamic>{
'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/tag/${Uri.encodeComponent(resourceArn)}',
exceptionFnMap: _exceptionFns,
);
}