tagResource method

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

Adds tags to a function.

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

Parameter resource : The function's Amazon Resource Name (ARN).

Parameter tags : A list of tags to apply to the function.

Implementation

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