tagResource method

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

Adds tags to a Lambda MicroVM resource.

May throw InvalidParameterValueException. May throw ResourceConflictException. May throw ResourceNotFoundException. May throw ServiceException. May throw TooManyRequestsException.

Parameter resource : The ARN of the resource to tag.

Parameter tags : The key-value pairs of tags to add to the resource.

Implementation

Future<void> tagResource({
  required String resource,
  required Map<String, String> tags,
}) async {
  final $payload = <String, dynamic>{
    'Tags': tags,
  };
  await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/2017-03-31/tags/${Uri.encodeComponent(resource)}',
    exceptionFnMap: _exceptionFns,
  );
}