tagResource method
Adds or overwrites one or more tags for the specified AWS CloudHSM cluster.
May throw CloudHsmAccessDeniedException. May throw CloudHsmInternalFailureException. May throw CloudHsmInvalidRequestException. May throw CloudHsmResourceNotFoundException. May throw CloudHsmServiceException. May throw CloudHsmTagException.
Parameter resourceId
:
The cluster identifier (ID) for the cluster that you are tagging. To find
the cluster ID, use DescribeClusters.
Parameter tagList
:
A list of one or more tags.
Implementation
Future<void> tagResource({
required String resourceId,
required List<Tag> tagList,
}) async {
ArgumentError.checkNotNull(resourceId, 'resourceId');
ArgumentError.checkNotNull(tagList, 'tagList');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'BaldrApiService.TagResource'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResourceId': resourceId,
'TagList': tagList,
},
);
}