tagResource method
Adds or edits tags on an PCS resource. Each tag consists of a tag key and a tag value. The tag key and tag value are case-sensitive strings. The tag value can be an empty (null) string. To add a tag, specify a new tag key and a tag value. To edit a tag, specify an existing tag key and a new tag value.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
Parameter resourceArn :
The Amazon Resource Name (ARN) of the resource.
Parameter tags :
1 or more tags added to the resource. Each tag consists of a tag key and
tag value. The tag value is optional and can be an empty string.
Implementation
Future<void> tagResource({
required String resourceArn,
required Map<String, String> tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AWSParallelComputingService.TagResource'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'resourceArn': resourceArn,
'tags': tags,
},
);
}