listTagsForResource method
Lists all tags on a directory.
May throw EntityDoesNotExistException. May throw InvalidNextTokenException. May throw InvalidParameterException. May throw ClientException. May throw ServiceException.
Parameter resourceId
:
Identifier (ID) of the directory for which you want to retrieve tags.
Parameter limit
:
Reserved for future use.
Parameter nextToken
:
Reserved for future use.
Implementation
Future<ListTagsForResourceResult> listTagsForResource({
required String resourceId,
int? limit,
String? nextToken,
}) async {
ArgumentError.checkNotNull(resourceId, 'resourceId');
_s.validateNumRange(
'limit',
limit,
0,
1152921504606846976,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'DirectoryService_20150416.ListTagsForResource'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResourceId': resourceId,
if (limit != null) 'Limit': limit,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListTagsForResourceResult.fromJson(jsonResponse.body);
}