tag method

Future<TagOutput> tag({
  1. required String arn,
  2. required Map<String, String> tags,
})

Adds tags to a resource group with the specified Amazon resource name (ARN). Existing tags on a resource group are not changed if they are not specified in the request parameters. Minimum permissions

To run this command, you must have the following permissions:

  • resource-groups:Tag

May throw BadRequestException. May throw ForbiddenException. May throw InternalServerErrorException. May throw MethodNotAllowedException. May throw NotFoundException. May throw TooManyRequestsException.

Parameter arn : The Amazon resource name (ARN) of the resource group to which to add tags.

Parameter tags : The tags to add to the specified resource group. A tag is a string-to-string map of key-value pairs.

Implementation

Future<TagOutput> tag({
  required String arn,
  required Map<String, String> tags,
}) async {
  final $payload = <String, dynamic>{
    'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/resources/${Uri.encodeComponent(arn)}/tags',
    exceptionFnMap: _exceptionFns,
  );
  return TagOutput.fromJson(response);
}