describeTrusts method
Obtains information about the trust relationships for this account.
If no input parameters are provided, such as DirectoryId or TrustIds, this request describes all the trust relationships belonging to the account.
May throw EntityDoesNotExistException. May throw InvalidNextTokenException. May throw InvalidParameterException. May throw ClientException. May throw ServiceException. May throw UnsupportedOperationException.
Parameter directoryId
:
The Directory ID of the AWS directory that is a part of the requested
trust relationship.
Parameter limit
:
The maximum number of objects to return.
Parameter nextToken
:
The DescribeTrustsResult.NextToken value from a previous call to
DescribeTrusts. Pass null if this is the first call.
Parameter trustIds
:
A list of identifiers of the trust relationships for which to obtain the
information. If this member is null, all trust relationships that belong
to the current account are returned.
An empty list results in an InvalidParameterException
being
thrown.
Implementation
Future<DescribeTrustsResult> describeTrusts({
String? directoryId,
int? limit,
String? nextToken,
List<String>? trustIds,
}) async {
_s.validateNumRange(
'limit',
limit,
0,
1152921504606846976,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'DirectoryService_20150416.DescribeTrusts'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (directoryId != null) 'DirectoryId': directoryId,
if (limit != null) 'Limit': limit,
if (nextToken != null) 'NextToken': nextToken,
if (trustIds != null) 'TrustIds': trustIds,
},
);
return DescribeTrustsResult.fromJson(jsonResponse.body);
}