tagResource method

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

Adds a tag(s) to a designated resource.

May throw AccessDeniedException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter resourceArn : Required element for TagResource to identify the ARN for the resource to add a tag to.

Parameter tags : Required element for ListTagsForResource to provide the content for a tag.

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: '/v1/tags/${Uri.encodeComponent(resourceArn)}',
    exceptionFnMap: _exceptionFns,
  );
}