tagResource method

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

Attaches a key-value pair to a resource, as identified by its Amazon Resource Name (ARN). Taggable resources in AWS User Notifications Contacts include email contacts.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter arn : The ARN of the configuration.

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

Implementation

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