tagResource method
Adds one or more key-value tags to an Amazon Rekognition collection, stream processor, or Custom Labels model. For more information, see Tagging AWS Resources.
This operation requires permissions to perform the
rekognition:TagResource action.
May throw AccessDeniedException.
May throw InternalServerError.
May throw InvalidParameterException.
May throw ProvisionedThroughputExceededException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
Parameter resourceArn :
Amazon Resource Name (ARN) of the model, collection, or stream processor
that you want to assign the tags to.
Parameter tags :
The key-value tags to assign to the resource.
Implementation
Future<void> tagResource({
required String resourceArn,
required Map<String, String> tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'RekognitionService.TagResource'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResourceArn': resourceArn,
'Tags': tags,
},
);
}