tagResource method
Adds or updates tags for a resource in Shield.
May throw InternalErrorException.
May throw InvalidParameterException.
May throw InvalidResourceException.
May throw ResourceNotFoundException.
Parameter resourceARN :
The Amazon Resource Name (ARN) of the resource that you want to add or
update tags for.
Parameter tags :
The tags that you want to modify or add to the resource.
Implementation
Future<void> tagResource({
required String resourceARN,
required List<Tag> tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSShield_20160616.TagResource'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResourceARN': resourceARN,
'Tags': tags,
},
);
}