createTags method

Future<void> createTags({
  1. required String resourceArn,
  2. Map<String, String>? tags,
})

Add a tag to a resource.

May throw NotFoundException. May throw BadRequestException. May throw InternalServerErrorException. May throw ForbiddenException.

Parameter resourceArn : The Amazon Resource Name (ARN) of the resource tag.

Parameter tags : The key-value pair for the resource tag.

Implementation

Future<void> createTags({
  required String resourceArn,
  Map<String, String>? tags,
}) async {
  ArgumentError.checkNotNull(resourceArn, 'resourceArn');
  final $payload = <String, dynamic>{
    if (tags != null) 'tags': tags,
  };
  await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/v1/tags/${Uri.encodeComponent(resourceArn)}',
    exceptionFnMap: _exceptionFns,
  );
}