tagResource method
Tag the resource.
May throw ResourceNotFoundException.
Parameter resourceARN :
The Amazon Resource Name (ARN) of the resource to tag.
Parameter tags :
A list of tags to assign to the resource.
Implementation
Future<TagResourceOutput> tagResource({
required String resourceARN,
required List<Tag> tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'BackupOnPremises_v20210101.TagResource'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResourceARN': resourceARN,
'Tags': tags,
},
);
return TagResourceOutput.fromJson(jsonResponse.body);
}