tagResource method
Adds tags to the specified resource.
May throw InternalServerException. May throw ValidationException. May throw NotFoundException.
Parameter resourceArn
:
The Amazon Resource Name (ARN) of the resource.
Parameter tags
:
The tags to add to the resource.
Implementation
Future<void> tagResource({
required String resourceArn,
required Map<String, String> tags,
}) async {
ArgumentError.checkNotNull(resourceArn, 'resourceArn');
_s.validateStringLength(
'resourceArn',
resourceArn,
0,
1011,
isRequired: true,
);
ArgumentError.checkNotNull(tags, 'tags');
final $payload = <String, dynamic>{
'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/tags/${Uri.encodeComponent(resourceArn)}',
exceptionFnMap: _exceptionFns,
);
}