tagResource method
An API operation for adding one or more tags (key-value pairs) to a resource.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter resourceArn :
The Amazon Resource Name (ARN) of the resource.
Parameter resourceTags :
A list of tag key value pairs that are associated with the resource.
Implementation
Future<void> tagResource({
required String resourceArn,
required List<ResourceTag> resourceTags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AWSBilling.TagResource'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'resourceArn': resourceArn,
'resourceTags': resourceTags,
},
);
}